public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/html"; BLL.DevInfoBll registeredInfoBll = new BLL.DevInfoBll(); try { devImei = context.Request.Form["Dev_Imei_Web"].Trim(); projNumber = context.Request.Form["Proj_Number_Web"].Trim(); registeredInfo = registeredInfoBll.GetRegisteredInfo(devImei, projNumber); if (registeredInfo != null) { registeredInfo.Proj_Name = context.Request.Form["Proj_Name_Web"]; registeredInfo.Proj_Number = context.Request.Form["Proj_Number_Web"]; registeredInfo.Proj_Address = context.Request.Form["Proj_Address_Web"]; registeredInfo.Proj_Link = context.Request.Form["Proj_Link_Web"]; registeredInfo.Install_Man = context.Request.Form["Install_Man_Web"]; registeredInfo.Install_Time = DateTime.Now; registeredInfo.Install_Address = context.Request.Form["Install_Address_Web"]; registeredInfo.Dev_Type = context.Request.Form["Dev_Type_Web"]; registeredInfo.Dev_Factory = context.Request.Form["Dev_Factory_Web"]; registeredInfo.Dev_Brand = context.Request.Form["Dev_Brand_Web"]; registeredInfo.Dev_Model = context.Request.Form["Dev_Model_Web"]; registeredInfo.Dev_Price = context.Request.Form["Dev_Price_Web"]; registeredInfo.Dev_Number = context.Request.Form["Dev_Number_Web"]; registeredInfo.Dev_Imei = context.Request.Form["Dev_Imei_Web"]; registeredInfo.Dev_Ccid = context.Request.Form["Dev_Ccid_Web"]; registeredInfo.Dev_NB_Number = context.Request.Form["Dev_NB_Number_Web"]; registeredInfo.Dev_NB_ExpirationDate = context.Request.Form["Dev_NB_ExpirationDate_Web"]; registeredInfo.Dev_Ex1 = "1"; //注册:1,修改:2,验收:3 registeredInfo.Dev_Ex2 = string.Empty; registeredInfo.Dev_Ex3 = string.Empty; registeredInfo.Remarks = context.Request.Form["Remarks_Web"]; if (registeredInfoBll.UpdateRegisteredInfo(registeredInfo)) { Alert("修改成功!!"); } else { Alert("修改失败!!"); } } else { Alert("修改失败!!"); } } catch { Alert("修改失败!!"); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/html"; BLL.DevInfoBll registeredInfoBll = new BLL.DevInfoBll(); try { imei = context.Request.Form["myImei"].Trim(); xmbh = Convert.ToInt32(context.Request.Form["myXMBH"]); registeredInfo = registeredInfoBll.GetRegisteredInfo(imei, xmbh); if (registeredInfo != null) { registeredInfo.XMBH = Convert.ToInt32(context.Request.Form["myXMBH"]); registeredInfo.SBXMMC = context.Request.Form["mySBXMMC"]; registeredInfo.XMDZ = context.Request.Form["myXMDZ"]; registeredInfo.DJRLXFS = context.Request.Form["myDJRLXFS"]; registeredInfo.AZRY = context.Request.Form["myAZRY"]; registeredInfo.AZSJ = DateTime.Now; registeredInfo.AZDW = context.Request.Form["myAZDW"]; registeredInfo.SBLX = context.Request.Form["mySBLX"]; registeredInfo.SBBH = context.Request.Form["mySBBH"]; registeredInfo.IMEI = context.Request.Form["myIMEI"]; registeredInfo.CCID = context.Request.Form["myCCID"]; registeredInfo.NBKH = context.Request.Form["myNBKH"]; registeredInfo.NBYXQ = context.Request.Form["myNBYXQ"]; registeredInfo.EX1 = context.Request.Form["myEX1"]; registeredInfo.EX2 = context.Request.Form["myEX2"]; registeredInfo.EX3 = context.Request.Form["myEX3"]; registeredInfo.BZ = context.Request.Form["myBZ"]; string a = registeredInfo.ID.ToString(); if (registeredInfoBll.UpdateRegisteredInfo(registeredInfo)) { Alert("修改成功!!"); } else { Alert("修改失败!!"); } } else { Alert("修改失败!!"); } } catch { Alert("修改失败!!"); } }
protected void Page_Load(object sender, EventArgs e) { BLL.DevInfoBll registeredInfoBll = new BLL.DevInfoBll(); registeredInfo = new DevInfo(); string imei = Request.QueryString["IMEI"]; int xmbh = Convert.ToInt32(Request.QueryString["XMBH"]); registeredInfo.IMEI = imei; registeredInfo.XMBH = xmbh; if (!IsPostBack) { registeredInfo.AZSJ = DateTime.Now; if (imei != null) { if (registeredInfoBll.GetRegisteredInfo(imei, xmbh) != null) { registeredInfo = registeredInfoBll.GetRegisteredInfo(imei, xmbh); } } } else { if (imei != null) { try { if (!registeredInfoBll.IsGetRegisteredInfo(imei)) { registeredInfo.XMBH = Convert.ToInt32(Request.Form["myXMBH"]); registeredInfo.SBXMMC = Request.Form["mySBXMMC"]; registeredInfo.XMDZ = Request.Form["myXMDZ"]; registeredInfo.DJRLXFS = Request.Form["myDJRLXFS"]; registeredInfo.AZRY = Request.Form["myAZRY"]; registeredInfo.AZSJ = DateTime.Now; registeredInfo.AZDW = Request.Form["myAZDW"]; registeredInfo.SBLX = Request.Form["mySBLX"]; registeredInfo.SBBH = Request.Form["mySBBH"]; registeredInfo.IMEI = Request.Form["myIMEI"]; registeredInfo.CCID = Request.Form["myCCID"]; registeredInfo.NBKH = Request.Form["myNBKH"]; registeredInfo.NBYXQ = Request.Form["myNBYXQ"]; registeredInfo.EX1 = Request.Form["myEX1"]; registeredInfo.EX2 = Request.Form["myEX2"]; registeredInfo.EX3 = Request.Form["myEX3"]; registeredInfo.BZ = Request.Form["myBZ"]; if (registeredInfoBll.InsertRegisteredInfo(registeredInfo)) { MsgBox("注册成功!!"); } else { MsgBox("注册失败!!"); } } else { registeredInfo = registeredInfoBll.GetRegisteredInfo(imei, xmbh); MsgBox("已注册!!"); } } catch { MsgBox("注册失败!!"); } } else { MsgBox("注册失败!!"); } } }
protected void Page_Load(object sender, EventArgs e) { BLL.DevInfoBll registeredInfoBll = new BLL.DevInfoBll(); registeredInfo = new DevInfo(); string devImei = Request.QueryString["devImei"]; string projNumber = Request.QueryString["ProjNumber"]; registeredInfo.Dev_Imei = devImei; registeredInfo.Proj_Number = projNumber; if (!IsPostBack) { registeredInfo.Install_Time = DateTime.Now; if (devImei != null) { ExistImei = registeredInfoBll.IsGetRegisteredInfo(devImei); if (registeredInfoBll.GetRegisteredInfo(devImei, projNumber) != null) { registeredInfo = registeredInfoBll.GetRegisteredInfo(devImei, projNumber); } } } else { if (devImei != null) { try { if (!registeredInfoBll.IsGetRegisteredInfo(devImei)) { registeredInfo.Proj_Name = Request.Form["Proj_Name_Web"]; registeredInfo.Proj_Number = Request.Form["Proj_Number_Web"]; registeredInfo.Proj_Address = Request.Form["Proj_Address_Web"]; registeredInfo.Proj_Link = Request.Form["Proj_Link_Web"]; registeredInfo.Install_Man = Request.Form["Install_Man_Web"]; registeredInfo.Install_Time = DateTime.Now; registeredInfo.Install_Address = Request.Form["Install_Address_Web"]; registeredInfo.Dev_Type = Request.Form["Dev_Type_Web"]; registeredInfo.Dev_Factory = Request.Form["Dev_Factory_Web"]; registeredInfo.Dev_Brand = Request.Form["Dev_Brand_Web"]; registeredInfo.Dev_Model = Request.Form["Dev_Model_Web"]; registeredInfo.Dev_Price = Request.Form["Dev_Price_Web"]; registeredInfo.Dev_Number = Request.Form["Dev_Number_Web"]; registeredInfo.Dev_Imei = Request.Form["Dev_Imei_Web"]; registeredInfo.Dev_Ccid = Request.Form["Dev_Ccid_Web"]; registeredInfo.Dev_NB_Number = Request.Form["Dev_NB_Number_Web"]; registeredInfo.Dev_NB_ExpirationDate = Request.Form["Dev_NB_ExpirationDate_Web"]; registeredInfo.Dev_Ex1 = "1"; //注册:1,修改:2,验收:3 registeredInfo.Dev_Ex2 = string.Empty; registeredInfo.Dev_Ex3 = string.Empty; registeredInfo.Remarks = Request.Form["Remarks_Web"]; if (registeredInfoBll.InsertRegisteredInfo(registeredInfo)) { MsgBox("注册成功!!"); } else { MsgBox("注册失败!!"); } } else { registeredInfo = registeredInfoBll.GetRegisteredInfo(devImei, projNumber); MsgBox("已注册!!"); } } catch { MsgBox("注册失败!!"); } } else { MsgBox("注册失败!!"); } } }