This commit is contained in:
58
source/MBI/sign.aspx.cs
Normal file
58
source/MBI/sign.aspx.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using GZTW.AyaNova.BLL;
|
||||
|
||||
namespace AyaNovaMBI
|
||||
{
|
||||
public partial class sign : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
//case 1346
|
||||
//show and process signature if it's signable
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
//Show signature area
|
||||
sigdiv.Visible = true;
|
||||
//lblSignTitleTop.Visible = true;
|
||||
lblSignTitle.Text = util.GlobalSettings.SignatureTitle;
|
||||
lblSignHeader.Text = util.GlobalSettings.SignatureHeader;
|
||||
lblSignFooter.Text = util.GlobalSettings.SignatureFooter;
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
//return from whence we came
|
||||
util.Redirect(Session, Response, "schedule.aspx");
|
||||
}
|
||||
|
||||
protected void btnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
//process possible signature
|
||||
object o = Page.Request["sigpad-data"];
|
||||
if (o != null && !string.IsNullOrWhiteSpace(o.ToString()))
|
||||
{
|
||||
AySignature sig = new AySignature(o.ToString());
|
||||
if (sig.HasSignature)
|
||||
{
|
||||
//store in workorder
|
||||
o.ToString();
|
||||
Workorder w = Workorder.GetItem(new Guid(Request.QueryString["sigwo"]));
|
||||
w.WorkorderService.SetSignature = o.ToString();
|
||||
w.Save();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
util.Redirect(Session, Response, "schedule.aspx");
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user