84 lines
3.2 KiB
C#
84 lines
3.2 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Web;
|
|||
|
using System.Web.UI;
|
|||
|
using System.Web.UI.WebControls;
|
|||
|
|
|||
|
namespace FineUIPro.Web.FingerMark
|
|||
|
{
|
|||
|
public partial class CheckFinger : System.Web.UI.Page
|
|||
|
{
|
|||
|
protected int result = 233;
|
|||
|
protected string msg = "";
|
|||
|
protected string projectId = "";
|
|||
|
protected string userId = "";
|
|||
|
protected string username = "";
|
|||
|
protected string S = "";
|
|||
|
protected string k = "";
|
|||
|
protected string VerifyTemplate = "", RegisterTemplate = "";
|
|||
|
protected void Page_Load(object sender, EventArgs e)
|
|||
|
{
|
|||
|
checkFinger();
|
|||
|
}
|
|||
|
|
|||
|
private void checkFinger()
|
|||
|
{
|
|||
|
//if (Request.Form["projectId"] != null)//判断页面请求用户名是否为空
|
|||
|
//{
|
|||
|
// projectId = Request.Form["projectId"].Trim();
|
|||
|
//}
|
|||
|
|
|||
|
//if (Request.Form["username"] != null) //用户名
|
|||
|
//{
|
|||
|
// username = Request.Form["username"].Trim();
|
|||
|
//}
|
|||
|
|
|||
|
VerifyTemplate = Request.Form["VerifyTemplate"].Trim();
|
|||
|
RegisterTemplate = Request.Form["RegisterTemplate"];
|
|||
|
|
|||
|
//string projectId = userId;//"560239b5-4d83-4d58-b752-1caa3407ec34";
|
|||
|
//userId = "22c72d38-b76e-48ba-b914-c3981ab717fd";
|
|||
|
//var welderList = BLL.Project_WelderService.GetProjectWelder(projectId);
|
|||
|
var welderList = BLL.HJGL_PersonManageService.GetFingerWelderList(BLL.Const.zzfgsId);
|
|||
|
foreach (var item in welderList)
|
|||
|
{
|
|||
|
var welder = BLL.HJGL_PersonManageService.GetWelderByWenId(item.WED_ID);
|
|||
|
string myFinger = welder.MyFinger;
|
|||
|
|
|||
|
string[] tmpGroup = myFinger.Split('@');
|
|||
|
for (int n = 0; n < tmpGroup.Length; n++)
|
|||
|
{
|
|||
|
k = tmpGroup[n].Substring(0, tmpGroup[n].IndexOf('#'));
|
|||
|
result = BLL.RefComm.process(k, VerifyTemplate); //指纹模板的对比
|
|||
|
if (result == 1)
|
|||
|
{
|
|||
|
userId = item.WED_ID;
|
|||
|
username = welder.WED_Name;
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
if (result == 1)
|
|||
|
{
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if (result == 1)
|
|||
|
{
|
|||
|
//msg = "指纹对比成功,用户名:" + username;
|
|||
|
|
|||
|
//ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script type='text/javascript'>ShowUsingMat('" + userId + "'," + projectId + ");</script>");
|
|||
|
//Response.Redirect("../WeldMat/UsingSentMat/UsingMat.aspx?welderId=" + userId + "",true);
|
|||
|
//Server.Transfer("../WeldMat/UsingSentMat/UsingMat.aspx?welderId=" + userId + "&&projectId=" + projectId + "");
|
|||
|
Response.Write("<script>window.parent.location.href='../WeldMat/UsingSentMat/UsingMat.aspx?welderId=" + userId + "';</script>");
|
|||
|
}
|
|||
|
//msg = "指纹对比成功,用户名:" + username;
|
|||
|
else
|
|||
|
{
|
|||
|
msg = "指纹不匹配";
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|