You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.9 KiB
59 lines
1.9 KiB
<%@ WebHandler Language="C#" Class="HebCAService" %>
|
|
|
|
using System;
|
|
using System.Web;
|
|
using hyplat.bean.htmlsignature;
|
|
using hyplat.biz.daoimpl;
|
|
using System.Data;
|
|
using hyplat.biz.service.htmlsignature;
|
|
using hyplat.biz;
|
|
|
|
|
|
public class HebCAService : IHttpHandler {
|
|
|
|
public void ProcessRequest (HttpContext context) {
|
|
string keyvalue = context.Request["keyvalue"];
|
|
string InstanceRecordId = context.Request["InstanceRecordId"];
|
|
string filesId = context.Request["filesId"];
|
|
string opinion = context.Request["opinion"];
|
|
HTMLSignatureService htmlsignatureService = ServiceManager.getServiceBean("HTMLSignatureService") as HTMLSignatureService;
|
|
if (keyvalue!=null && keyvalue != "")
|
|
{
|
|
HTMLSignature htmlsignature = new HTMLSignature();
|
|
htmlsignature.ID = SIDWrapper.getSID("HTMLSignature");
|
|
htmlsignature.DocumentID = filesId;
|
|
htmlsignature.SignatureID = InstanceRecordId;
|
|
htmlsignature.Signature = keyvalue;
|
|
|
|
DataTable dt = htmlsignatureService.GetByDocumentIDAndSignatureId(htmlsignature.DocumentID, htmlsignature.SignatureID);
|
|
if (dt.Rows.Count > 0)
|
|
{
|
|
htmlsignature.ID = dt.Rows[0]["ID"].ToString();
|
|
htmlsignatureService.Update(htmlsignature);
|
|
|
|
}
|
|
else
|
|
{
|
|
htmlsignatureService.Add(htmlsignature);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
string Signature = "";
|
|
DataTable dt = htmlsignatureService.GetByDocumentIDAndSignatureId(filesId, InstanceRecordId);
|
|
|
|
if (dt.Rows.Count > 0)
|
|
{
|
|
Signature = dt.Rows[0]["Signature"].ToString();
|
|
}
|
|
context.Response.Write(InstanceRecordId + "," + Signature + "," + opinion);
|
|
}
|
|
}
|
|
|
|
public bool IsReusable {
|
|
get {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
}
|