protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string jobID = ZWL.ObjectOperation.QueryStringHelper.GetQuery("JobID"); if (jobID == null) { Response.Redirect("/Manager/JobList.aspx", false); } else { DataAccess.RunProcedure run = new DataAccess.RunProcedure(); DataSet ds = null; string dbName = run.GetListDbName(jobID); if (string.IsNullOrEmpty(dbName)) { Alert("获取数据失败!"); } else { ds = run.JobView(jobID, dbName); } //根据实际情况调用 LoadPage(ds.Tables[0]); } } }
private void DataInit(string jobID) { DataAccess.RunProcedure run = new DataAccess.RunProcedure(); string dbName = run.GetListDbName(jobID); viewDt = run.JobView(jobID, dbName); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; int IDType = Convert.ToInt32(context.Request.Form["dlZJLX_QS"]); string IDNum = context.Request.Form["txtZJHM_QS"]; string companyID = PageBase.CommonObject.LoginUserInfo.companyId; string jobID = context.Request.Form["hJobID"]; string listID = context.Request.Form["hListID"]; DataAccess.RunProcedure run = new DataAccess.RunProcedure(); DataTable dt = run.NALogicalCheckFR(IDType, IDNum, companyID, jobID, listID).Tables[0]; if (int.Parse(dt.Rows[0]["thisFR"].ToString()) > 0) { context.Response.Write("1"); } else if (int.Parse(dt.Rows[0]["otherFR"].ToString()) > 0) { context.Response.Write("2"); } else { context.Response.Write("3"); } }
private void DataBind() { DataAccess.RunProcedure pro = new DataAccess.RunProcedure(); //repeater.DataSource = pro.ManagerList(CardPrinting.PageBase.CommonObject.ManagerUserInfo.department.ToString()); repeater.DataSource = pro.ManagerList("").Tables[0].Select(string.Format("CreateTime>'{0}'", DateTime.Now.AddDays(-15))); repeater.DataBind(); }
public void ProcessRequest(HttpContext context) { try { context.Response.ContentType = "text/plain"; string jobID = context.Request.Form["jobID"]; string listID = context.Request.Form["listID"]; int selectOperation = int.Parse(context.Request.Form["selectOperation"]); string content = context.Request.Form["content"]; string dbName = new DataAccess.RunProcedure().GetListDbName(jobID); if (string.IsNullOrEmpty(dbName)) { context.Response.Write("获取子表失败!"); } else { if (new DataAccess.RunProcedure().ListOperation(listID, selectOperation, content, dbName)) { context.Response.Write(""); } else { context.Response.Write("请联系网站管理员!"); } } } catch (Exception ex) { context.Response.Write(ex.Message); } }
protected void submit_Click(object sender, EventArgs e) { DateTime begin = DateTime.Parse(dtBegin.Value); DateTime end = DateTime.Parse(dtEnd.Value); DataSet ds = new DataSet(); string filename = string.Empty; ds = new DataAccess.RunProcedure().Statistics5(begin, end); ds.Tables[0].Columns.Add("关区代码"); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { ds.Tables[0].Rows[i][7] = GetCustomCode(ds.Tables[0].Rows[i][3].ToString()); } filename = string.Format("{0}-{1}-{2}.xls", begin.ToString("yyyyMMdd"), end.ToString("yyyyMMdd"), "工单详细信息统计(广州关区)"); var bytes = PageBase.ExcelHelper.GetExcelFileByte(ds); Response.ContentType = "application/vnd.ms-excel;charset=utf-8"; if (Request.Browser.Browser == "InternetExplorer") { filename = Server.UrlEncode(filename); } Response.AddHeader("Content-Disposition", string.Format("attachment;filename={0}", filename)); Response.ContentEncoding = System.Text.Encoding.UTF8; Response.Clear(); Response.BinaryWrite(bytes); Response.End(); }
/// <summary> /// 更新数据 /// </summary> /// <param name="context"></param> private static void UpdateData(HttpContext context) { string strRowType = context.Request["RowType"]; string strRoleId = context.Request["RoleId"]; string strMemuName = context.Request["MemuName"]; string strMemuCode = context.Request["MemuCode"]; string strOperationName = context.Request["OperationName"]; string strOperationCode = context.Request["OperationCode"]; string strOperationType = context.Request["OperationType"]; string strOperationNumber = context.Request["OperationNumber"]; Entity.ManagerRoleOperation entity = new Entity.ManagerRoleOperation() { MemuCode = strMemuCode, MemuName = strMemuName, OperationCode = strOperationCode, OperationId = Guid.NewGuid(), OperationName = strOperationName, OperationNumber = int.Parse(strOperationNumber), OperationType = strOperationType, RoleId = int.Parse(strRoleId) }; DataAccess.RunProcedure runProc = new DataAccess.RunProcedure(); if (runProc.RoleOperationAdd(int.Parse(strRowType), entity)) { context.Response.Write("保存成功"); } else { context.Response.Write("保存失败"); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string jobID = context.Request.Form["jobID"]; string[] jobList = context.Request.Form["jobList"].Split(';'); string msg = string.Empty; if (!string.IsNullOrEmpty(jobID)) { int[] CardNum = new int[4]; DataTable dt = new DataAccess.RunProcedure().SelectCardNum(jobID).Tables[0]; if (dt.Rows.Count > 0) { CardNum[0] = int.Parse(dt.Rows[0][0].ToString()); CardNum[1] = int.Parse(dt.Rows[0][1].ToString()); CardNum[2] = int.Parse(dt.Rows[0][2].ToString()); CardNum[3] = int.Parse(dt.Rows[0][3].ToString()); } int[] needCardNum = new int[4]; foreach (string job in jobList) { if (!string.IsNullOrEmpty(job)) { DataTable selectDt = new DataAccess.RunProcedure().SelectCardNum(job).Tables[0]; if (dt.Rows.Count > 0) { needCardNum[0] += int.Parse(selectDt.Rows[0][0].ToString()); needCardNum[1] += int.Parse(selectDt.Rows[0][1].ToString()); needCardNum[2] += int.Parse(selectDt.Rows[0][2].ToString()); needCardNum[3] += int.Parse(selectDt.Rows[0][3].ToString()); } } } if (CardNum[0] != needCardNum[0] || CardNum[1] != needCardNum[1] || CardNum[2] != needCardNum[2] || CardNum[3] != needCardNum[3]) { msg = string.Format("根据您绑定的业务申请单,您需要添加:{0}张法人卡;{1}张操作员IC卡;{2}张操作员IKEY;{3}张报关员卡;请检查已添加的安全产品数量是否不足或过多。", needCardNum[0], needCardNum[1], needCardNum[2], needCardNum[3]); } if (msg.Equals(string.Empty)) { DataSet ds = new DataAccess.RunProcedure().JobView(jobID, "SaleList"); foreach (DataRow dr in ds.Tables[1].Rows) { if (int.Parse(dr["Num"].ToString()) > int.Parse(dr["StockDesplay"].ToString())) { msg += string.Format("{0}{1}({2})库存不足;", dr["AdditionalAttributes"], dr["CommodityName"], dr["CommodityType"]); } } if (!msg.Equals(string.Empty)) { msg += "请更换库存充足的安全产品厂商或稍后再试"; } } } context.Response.Write(msg); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string type = context.Request.Form["type"]; DataTable dt = new DataAccess.RunProcedure().SelectFileTypeByJobType(type).Tables[0]; string JsonStr = JsonConvert.SerializeObject(dt); context.Response.Write(JsonStr); }
public void ProcessRequest(HttpContext context) { try { context.Response.ContentType = "text/plain"; string jobID = context.Request.Form["hJobID"]; string listID = context.Request.Form["hListID"];//工单 DataAccess.RunProcedure run = new DataAccess.RunProcedure(); DataSet view = run.JobView(jobID, "NewlyAddedList"); if (view.Tables[3].Rows[0]["StatusName"].Equals("未提交.")) { Entity.NewlyAddedList na = new Entity.NewlyAddedList(); DataAccess.NewlyAddedList da = new DataAccess.NewlyAddedList(); DateTime time = DateTime.Now; //工单项 if (string.IsNullOrEmpty(listID)) { na.JobType = "NA00" + ((int.Parse(context.Request.Form["cardType"]) * 2) - int.Parse(context.Request.Form["businessType"])).ToString(); na.ListID = na.JobType + "-" + time.ToString("yyyyMMddhhmmssfff") + (new Random().Next(1, 10000)).ToString().PadLeft(4, '0'); na.JobID = jobID; na.CardType = Enum.Parse(typeof(Entity.Enum.CardType), context.Request.Form["CardType"]).ToString(); } else { na = da.GetModel(listID); } na.CardholderName = context.Request.Form["holdName"]; na.CardholderPhone = context.Request.Form["txtCardholderPhone"]; na.CardholderIdentificationType = int.Parse(context.Request.Form["holdIDType"]); na.CardholderIdentificationNum = context.Request.Form["holdID"]; na.IsDelete = false; na.Remark = ""; //提交数据到后台存储过程事务 DataAccess.TranHelper.BeginTran(); new DataAccess.NADataAccess().InsertListData(na); try { DataAccess.TranHelper.CommitTran(); context.Response.Write(""); } catch (Exception ex) { context.Response.Write("\n数据提交出错!" + ex.Message); } } else { context.Response.Write("该工单状态为已提交,无法继续修改工单信息!"); } } catch (Exception ex) { context.Response.Write("\n" + ex.Message); } }
/// <summary> /// 加载数据 /// </summary> /// <param name="context"></param> private static void LoadData(HttpContext context) { string strRoleId = context.Request["RoleId"]; DataAccess.RunProcedure runProc = new DataAccess.RunProcedure(); DataSet ds = runProc.GetRoleOperationByRoleId(int.Parse(strRoleId)); context.Response.Write(JsonConvert.SerializeObject(ds.Tables[0])); }
public void ProcessRequest(HttpContext context) { try { context.Response.ContentType = "text/plain"; string jobID = context.Request.Form["hJobID"]; string listID = context.Request.Form["hListID"];//工单 DataAccess.RunProcedure run = new DataAccess.RunProcedure(); DataSet view = run.JobView(jobID, "ReMakeList"); if (view.Tables[3].Rows[0]["StatusName"].Equals("未提交.")) { Entity.ReMakeList rm = new Entity.ReMakeList(); DataAccess.ReMakeList da = new DataAccess.ReMakeList(); DateTime time = DateTime.Now; //工单项 if (string.IsNullOrEmpty(listID)) { rm.JobType = "RM001"; rm.ListID = rm.JobType + "-" + time.ToString("yyyyMMddhhmmssfff") + (new Random().Next(1, 10000)).ToString().PadLeft(4, '0'); rm.JobID = jobID; rm.CardType = "报关员卡"; } else { rm = da.GetModel(listID); } rm.CardholderName = context.Request.Form["holdName"]; rm.CardNum = context.Request.Form["holdID"]; rm.IsDelete = false; rm.Remark = ""; //提交数据到后台存储过程事务 DataAccess.TranHelper.BeginTran(); new DataAccess.RMDataAccess().InsertListData(rm); try { DataAccess.TranHelper.CommitTran(); context.Response.Write(""); } catch (Exception ex) { context.Response.Write("\n数据提交出错!" + ex.Message); } } else { context.Response.Write("该工单状态为已提交,无法继续修改工单信息!"); } } catch (Exception ex) { context.Response.Write("\n" + ex.Message); } }
public void DataInit() { jobID = ZWL.ObjectOperation.QueryStringHelper.GetQuery("jobID"); type = ZWL.ObjectOperation.QueryStringHelper.GetQuery("type"); hJobID.Value = jobID; if (!string.IsNullOrEmpty(jobID)) { DataAccess.RunProcedure run = new DataAccess.RunProcedure(); DataSet ds = run.JobView(jobID, "UpdateUnlockList"); if (ds.Tables[3].Rows[0]["StatusName"].Equals("未提交.")) { //2016-4-5 companyName.Value = ds.Tables[0].Rows[0]["EnterpriseName"].ToString(); companyAddress.Value = ds.Tables[0].Rows[0]["EnterpriseAddress"].ToString(); companyCode.Value = ds.Tables[0].Rows[0]["EnterpriseCode"].ToString(); if (companyCode.Value.Length == 18) { typeSelect.SelectedIndex = 1; } agentName.Value = ds.Tables[0].Rows[0]["AgentName"].ToString(); agentPhone.Value = ds.Tables[0].Rows[0]["AgentPhone"].ToString(); if (bool.Parse(ds.Tables[0].Rows[0]["ExpressFlat"].ToString())) { expressTrue.Checked = true; expresssFalse.Checked = false; } else { expressTrue.Checked = false; expresssFalse.Checked = true; } consigneeName.Value = ds.Tables[0].Rows[0]["ConsigneeName"].ToString(); consigneePhone.Value = ds.Tables[0].Rows[0]["ConsigneePhone"].ToString(); consigneeAddress.Value = ds.Tables[0].Rows[0]["ConsigneeAddress"].ToString(); GetFileType(ds); repeater1.DataSource = ds.Tables[1]; repeater1.DataBind(); } else { Response.Redirect("../Manager/JobList.aspx"); } } else { GetFileType(null); ETGData(); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string jobTypeID = context.Request.Form["jobTypeID"]; DataTable dt = new DataAccess.RunProcedure().SpotGetSaleList(jobTypeID).Tables[0]; dt.TableName = "sale"; DataSet ds = new DataSet(); ds.Tables.Add(dt.Copy()); string json = JsonConvert.SerializeObject(ds); context.Response.Write(json); }
private DataSet DataInit(string jobID) { DataAccess.RunProcedure run = new DataAccess.RunProcedure(); string dbName = run.GetListDbName(jobID); if (string.IsNullOrEmpty(dbName)) { Alert("获取数据失败!"); return(null); } else { return(run.JobView(jobID, dbName)); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string listID = context.Request.Form["listID"]; string jobID = new DataAccess.SaleList().GetModel(listID).JobID; DataAccess.RunProcedure run = new DataAccess.RunProcedure(); DataSet view = run.JobView(jobID, "SaleList"); if (view.Tables[3].Rows[0]["StatusName"].Equals("未提交.")) { if (run.SLListDelete(listID)) { Entity.JobInfo job = new DataAccess.JobInfo().GetModel(jobID); DataTable feeDt = run.JobFeeDetal(job.JobID, "SaleList").Tables[0]; job.Fee = decimal.Parse(feeDt.Rows[0]["Fee"].ToString()); if (job.Fee == 0) { job.FeeFlat = "无须缴费"; } else { job.FeeFlat = "待缴费"; } //提交数据到后台存储过程事务 DataAccess.TranHelper.BeginTran(); new DataAccess.JobInfo().Update(job); try { DataAccess.TranHelper.CommitTran(); context.Response.Write(""); } catch (Exception ex) { context.Response.Write("\n更新缴费信息出错!" + ex.Message); } } else { context.Response.Write("删除工单项失败!"); } } else { context.Response.Write("该工单状态为已提交,无法继续修改工单信息!"); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string jobID = context.Request.Form["jobID"]; string[] jobList = context.Request.Form["jobList"].Split(';'); int[] carNum = new int[4]; if (!string.IsNullOrEmpty(jobID)) { //SaleBinding数据 Entity.SaleBinding mBinding = new Entity.SaleBinding(); DataAccess.SaleBinding dalBinding = new DataAccess.SaleBinding(); DataTable dtBindList = dalBinding.GetList("SaleID='" + jobID + "'").Tables[0]; if (dtBindList.Rows.Count > 0) { mBinding = dalBinding.GetEntity(dtBindList.Rows[0][0].ToString()); mBinding.JobID = context.Request.Form["jobList"]; dalBinding.Update(mBinding); } else { mBinding.Guid = Guid.NewGuid().ToString(); mBinding.SaleID = jobID; mBinding.JobID = context.Request.Form["jobList"]; dalBinding.Add(mBinding); } } //获取所需安全产品数量 foreach (string job in jobList) { if (!string.IsNullOrEmpty(job)) { DataTable dt = new DataAccess.RunProcedure().SelectCardNum(job).Tables[0]; if (dt.Rows.Count > 0) { carNum[0] += int.Parse(dt.Rows[0][0].ToString()); carNum[1] += int.Parse(dt.Rows[0][1].ToString()); carNum[2] += int.Parse(dt.Rows[0][2].ToString()); carNum[3] += int.Parse(dt.Rows[0][3].ToString()); } } } context.Response.Write(string.Format("{0}张法人卡,{1}张操作员IC卡,{2}张操作员IKEY,{3}张报关员卡。", carNum[0], carNum[1], carNum[2], carNum[3])); }
protected void submit_Click(object sender, EventArgs e) { DateTime begin = DateTime.Parse(dtBegin.Value); DateTime end = DateTime.Parse(dtEnd.Value); DataSet ds = new DataSet(); string filename = string.Empty; switch (dlStatistics.Value) { case "Statistics1": ds = new DataAccess.RunProcedure().Statistics1(begin, end); filename = string.Format("{0}-{1}-{2}.xls", begin.ToString("yyyyMMdd"), end.ToString("yyyyMMdd"), "常规业务量统计"); break; case "Statistics2": ds = new DataAccess.RunProcedure().Statistics2(begin, end); filename = string.Format("{0}-{1}-{2}.xls", begin.ToString("yyyyMMdd"), end.ToString("yyyyMMdd"), "支付统计"); break; case "Statistics3": ds = new DataAccess.RunProcedure().Statistics3(begin, end); filename = string.Format("{0}-{1}-{2}.xls", begin.ToString("yyyyMMdd"), end.ToString("yyyyMMdd"), "问卷调查统计"); break; case "Statistics4": ds = new DataAccess.RunProcedure().Statistics4(begin, end); filename = string.Format("{0}-{1}-{2}.xls", begin.ToString("yyyyMMdd"), end.ToString("yyyyMMdd"), "东方和南方支付信息"); break; } var bytes = PageBase.ExcelHelper.GetExcelFileByte(ds); Response.ContentType = "application/vnd.ms-excel;charset=utf-8"; if (Request.Browser.Browser == "InternetExplorer") { filename = Server.UrlEncode(filename); } Response.AddHeader("Content-Disposition", string.Format("attachment;filename={0}", filename)); Response.ContentEncoding = System.Text.Encoding.UTF8; Response.Clear(); Response.BinaryWrite(bytes); Response.End(); }
private void DataInit(string jobID) { DataAccess.RunProcedure run = new DataAccess.RunProcedure(); string dbName = run.GetListDbName(jobID); if (string.IsNullOrEmpty(dbName)) { Alert("获取数据失败!"); } else { viewDt = run.JobView(jobID, dbName); if (viewDt.Tables[0].Rows[0]["JobType"].ToString() == "SL") { repeater.DataSource = run.SaleJobListView(jobID).Tables[0]; repeater.DataBind(); } } }
private void DataBind() { string where = string.Empty; if (!string.IsNullOrEmpty(jobID.Value.Trim())) { where += string.Format("and JobInfo.JobID like '%{0}%' ", jobID.Value.Trim()); } if (!string.IsNullOrEmpty(companyName.Value.Trim())) { where += string.Format("and JobInfo.EnterpriseName like '%{0}%' ", companyName.Value.Trim()); } if (!string.IsNullOrEmpty(jobSelect.Value)) { where += string.Format("and JobInfo.JobType='{0}'", jobSelect.Value); } DataAccess.RunProcedure pro = new DataAccess.RunProcedure(); //repeater.DataSource = pro.ManagerList(CardPrinting.PageBase.CommonObject.ManagerUserInfo.department.ToString()); repeater.DataSource = pro.HistoryList(where); repeater.DataBind(); }
/// <summary> /// 调用支付下单接口 /// </summary> /// <param name="jobID"></param> /// <returns></returns> public static string IPay(string jobID) { try { DataSet viewDt; DataAccess.RunProcedure run = new DataAccess.RunProcedure(); string dbName = run.GetListDbName(jobID); if (string.IsNullOrEmpty(dbName)) { throw new Exception("获取数据失败!"); } else { viewDt = run.JobView(jobID, dbName); } Dictionary <string, string> dic = new Dictionary <string, string>(); //正式环境 dic.Add("OrderId", jobID); dic.Add("Amount", (int.Parse(viewDt.Tables[0].Rows[0]["Fee"].ToString()) * 100).ToString()); //测试环境 //dic.Add("OrderId", jobID); //dic.Add("Amount", "1"); dic.Add("Description", string.Format("数据分中心-{0}-制卡收费", viewDt.Tables[0].Rows[0]["JobName"].ToString())); dic.Add("ApplicantName", viewDt.Tables[0].Rows[0]["EnterpriseName"].ToString()); dic.Add("AppId", ZWL.GeneralHelper.GetSettingByKey("AppId")); dic.Add("CallbackUrl", ZWL.GeneralHelper.GetSettingByKey("CallbackUrl")); dic.Add("NotifyUrl", ZWL.GeneralHelper.GetSettingByKey("NotifyUrl")); dic.Add("Account", "haicheng"); dic.Add("Note", ""); dic.Add("NonceStr", Guid.NewGuid().ToString().Replace("-", "")); return(ZWL.GeneralHelper.GetSettingByKey("Pay") + Signature(dic)); } catch (Exception ex) { DataAccess.TranHelper.BeginTran(); new Sys_Log().AddLog(string.Format("Function:CardPrintHelper.IPay;Param:{0};ErrorMsg:{1}", jobID, ex.ToString())); DataAccess.TranHelper.CommitTran(); return(null); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string listID = context.Request.Form["listID"]; string jobID = new DataAccess.ModifyList().GetModel(listID).JobID; DataSet view = new DataAccess.RunProcedure().JobView(jobID, "ReIssueList"); if (view.Tables[3].Rows[0]["StatusName"].Equals("未提交.")) { if (new DataAccess.RunProcedure().RIListDelete(listID)) { context.Response.Write(""); } else { context.Response.Write("删除失败!"); } } else { context.Response.Write("该工单状态为已提交,无法继续修改工单信息!"); } }
private void DataInit(string jobID) { DataAccess.RunProcedure run = new DataAccess.RunProcedure(); string dbName = run.GetListDbName(jobID); if (string.IsNullOrEmpty(dbName)) { Alert("获取数据失败!"); } else { viewDt = run.JobView(jobID, dbName); repeater1.DataSource = run.GetHandleListByJobID(jobID).Tables[0]; repeater1.DataBind(); if (viewDt.Tables[0].Rows[0]["JobType"].ToString().Equals("SL")) { if (type.Equals("view")) { thCheck.Visible = false; repeater.DataSource = run.SaleJobListView(jobID).Tables[0]; repeater.DataBind(); } else { statusRepeater.DataSource = viewDt.Tables[1]; statusRepeater.DataBind(); repeater.DataSource = run.SaleJobList(viewDt.Tables[0].Rows[0]["CreateUser"].ToString()).Tables[0]; repeater.DataBind(); } showStatusRepeater.DataSource = viewDt.Tables[1]; showStatusRepeater.DataBind(); } } InitInvoiceMsg(viewDt.Tables[0]); InitFRMsg(viewDt.Tables[1]); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string jobID = context.Request.Form["jobID"]; DataAccess.RunProcedure run = new DataAccess.RunProcedure(); string dbName = run.GetListDbName(jobID); if (string.IsNullOrEmpty(dbName)) { context.Response.Write("获取子表数据失败!"); } else { if (run.JobDelete(jobID, dbName)) { context.Response.Write(""); } else { context.Response.Write("删除失败!"); } } }
public void ProcessRequest(HttpContext context) { try { context.Response.ContentType = "text/plain"; string jobID = context.Request.Form["hJobID"]; DataAccess.RunProcedure procedure = new DataAccess.RunProcedure(); bool flat = true; if (!string.IsNullOrEmpty(jobID)) { DataSet view = procedure.JobView(jobID, "ReIssueList"); if (!view.Tables[3].Rows[0]["StatusName"].Equals("未提交.")) { flat = false; } } if (flat) { //JobInfo数据 Entity.JobInfo job = new Entity.JobInfo(); DateTime time = DateTime.Now; job.JobID = string.IsNullOrEmpty(jobID) ? "RI-" + CardCenter.DataAccess.CardCenterHelper.GetCardNo() : jobID; job.JobType = "RI"; job.CreateTime = time; job.CreateUser = PageBase.CommonObject.LoginUserInfo.companyId; job.IsDelete = false; job.EnterpriseName = CommonObject.LoginCompanyInfo.FULL_NAME; job.EnterpriseAddress = CommonObject.LoginCompanyInfo.ADDR_CO; job.EnterpriseCode = CommonObject.LoginCompanyInfo.COP_GB_CODE; job.AgentName = context.Request.Form["agentName"]; job.AgentPhone = context.Request.Form["agentPhone"]; job.ConsigneeName = context.Request.Form["consigneeName"]; job.ConsigneeAddress = context.Request.Form["consigneeAddress"]; job.ConsigneePhone = context.Request.Form["consigneePhone"]; job.ExpressFlat = null; job.Remark = string.Empty; job.Fee = 0; job.FeeFlat = "无须缴费"; job.CustomsCode = CommonObject.LoginUserInfo.companyId; job.IsOnline = true; //FileList数据 List <Entity.FileList> fileList = new List <Entity.FileList>(); DataSet ds = procedure.SelectFileTypeByJobType("RI"); string fileErr = string.Empty; foreach (DataRow dr in ds.Tables[0].Rows) { string guid = context.Request.Form["h" + dr["FileTypeID"].ToString()]; string fileName = context.Request.Form["txt" + dr["FileTypeID"].ToString()]; if (!string.IsNullOrEmpty(guid)) { Entity.FileList file = new Entity.FileList(); file.Guid = guid; file.FileType = dr["FileTypeID"].ToString(); file.FileName = fileName; file.JobID = job.JobID; file.ListID = string.Empty; file.IsDelete = false; file.Remark = string.Empty; fileList.Add(file); } else { fileErr += "\n工单随附资料【" + dr["FileTypeName"] + "】未上传!"; } } DataSet list = new DataAccess.ReIssueList().GetList("JobID='" + jobID + "' and IsDelete=0"); foreach (DataRow dr in list.Tables[0].Rows) { DataSet typeDs = procedure.SelectFileTypeByJobType(dr["JobType"].ToString()); foreach (DataRow typeDr in typeDs.Tables[0].Rows) { string guid = context.Request.Form["h" + typeDr["FileTypeID"].ToString() + dr["ListID"].ToString()]; string fileName = context.Request.Form["txt" + typeDr["FileTypeID"].ToString() + dr["ListID"].ToString()]; if (!string.IsNullOrEmpty(guid)) { Entity.FileList file = new Entity.FileList(); file.Guid = guid; file.FileType = typeDr["FileTypeID"].ToString(); file.FileName = fileName; file.JobID = job.JobID; file.ListID = dr["ListID"].ToString(); file.IsDelete = false; file.Remark = string.Empty; fileList.Add(file); } else { fileErr += "\n工单项【业务类型:" + new DataAccess.Para_JobType().GetModel(dr["JobType"].ToString()).JobName + ",持卡人姓名:" + dr["CardholderName"] + "】随附资料【" + typeDr["FileTypeName"] + "】未上传!"; } } } if (context.Request.Form["type"] == "complete") { //判断是否添加附件 if (fileErr != "") { context.Response.Write(JsonConvert.SerializeObject(new Data(fileErr, ""))); return; } //判断是否添加工单项 ds = procedure.JobView(jobID, "ReIssueList"); if (ds.Tables[1].Rows.Count == 0) { context.Response.Write(JsonConvert.SerializeObject(new Data("\n请添加至少一条工单项记录!", ""))); return; } } //FlowInfo数据 Entity.FlowInfo flow = new Entity.FlowInfo(); flow.Guid = Guid.NewGuid().ToString(); flow.JobID = job.JobID; flow.FlowID = context.Request.Form["hSaveType"] == "add" ? 1 : int.Parse(new CardCenter.DataAccess.Flow().GetList("JobType='RI' and FlowOrder=2").Tables[0].Rows[0]["FlowStatus"].ToString()); flow.SubmitDate = time; flow.SubmitUser = PageBase.CommonObject.LoginUserInfo.companyId; flow.Content = context.Request.Form["hSaveType"] == "add" ? PageBase.CommonObject.LoginCompanyInfo.FULL_NAME + "暂存数据." : PageBase.CommonObject.LoginCompanyInfo.FULL_NAME + "提交工单."; flow.IsDelete = false; flow.Remark = string.Empty; //提交数据到后台存储过程事务 DataAccess.TranHelper.BeginTran(); DataAccess.RIDataAccess ri = new DataAccess.RIDataAccess(); ri.InsertHeadData(job, fileList, flow); if (context.Request.Form["hSaveType"] == "complete") { ri.InsertHandleList(job); } try { DataAccess.TranHelper.CommitTran(); DataAccess.CardCenterHelper.SendMessage(job.JobID); context.Response.Write(JsonConvert.SerializeObject(new Data("", job.JobID))); } catch (Exception ex) { context.Response.Write(JsonConvert.SerializeObject(new Data("\n数据提交出错!" + ex.Message, ""))); } } else { context.Response.Write(JsonConvert.SerializeObject(new Data("该工单状态为已提交,无法继续修改工单信息!", ""))); } } catch (Exception ex) { context.Response.Write(JsonConvert.SerializeObject(new Data("\n" + ex.Message, ""))); } }
private void GetFileType(DataSet viewDs) { DataAccess.RunProcedure procedure = new DataAccess.RunProcedure(); DataSet ds = procedure.SelectFileTypeByJobType("NA"); if (ds.Tables[0].Rows.Count > 0) { fileHtml = "<table class='table'><tr><td class='title' colspan='2'>工单随附资料</td></tr>"; //表头附件 foreach (DataRow dr in ds.Tables[0].Rows) { string guid = string.Empty; string fileName = string.Empty; if (viewDs != null) { DataRow[] fileDr = viewDs.Tables[2].Select("ListID = ''"); foreach (DataRow file in fileDr) { if (file["FileTypeName"].ToString() == dr["FileTypeName"].ToString()) { guid = file["Guid"].ToString(); fileName = file["FileName"].ToString(); break; } } } fileHtml += string.Format("<tr><td class='title'>{0}</td><td class='content'><span><input type='file' id='{1}' name='{1}' runat='server'/><input type='hidden' id='txt{1}' name='txt{1}' value='{2}' runat='server'/><input type='hidden' runat='server' id='h{1}' name='h{1}' value='{3}'/></span></td></tr>", dr["FileTypeName"], dr["FileTypeID"], fileName, guid); } fileHtml += "</table>"; } //表体附件 if (viewDs != null) { foreach (DataRow list in viewDs.Tables[1].Rows) { DataSet listFile = procedure.SelectFileTypeByJobType(list["JobTypeID"].ToString()); if (listFile.Tables[0].Rows.Count > 0) { fileHtml += "<br clear='all' /><table class='table' id='file" + list["ListID"] + "'><tr><td class='title' colspan='2'>工单项随附资料【业务类型:" + list["JobName"] + ",持卡人姓名:" + list["CardholderName"] + "】</td></tr>"; DataRow[] listDr = viewDs.Tables[2].Select("ListID = '" + list["ListID"] + "'"); foreach (DataRow dr in listFile.Tables[0].Rows) { string guid = string.Empty; string fileName = string.Empty; foreach (DataRow file in listDr) { if (file["FileTypeName"].ToString() == dr["FileTypeName"].ToString()) { guid = file["Guid"].ToString(); fileName = file["FileName"].ToString(); break; } } fileHtml += string.Format("<tr><td class='title'>{0}</td><td class='content'><span><input type='file' id='{1}{4}' name='{1}{4}' runat='server'/><input type='hidden' id='txt{1}{4}' name='txt{1}{4}' value='{2}' runat='server'/><input type='hidden' runat='server' id='h{1}{4}' name='h{1}{4}' value='{3}'/></span></td></tr>", dr["FileTypeName"], dr["FileTypeID"], fileName, guid, list["ListID"]); } fileHtml += "</table>"; } } } }
public void ProcessRequest(HttpContext context) { try { context.Response.ContentType = "text/plain"; string jobID = context.Request.Form["hjobID"]; string saleID = string.Empty; Entity.JobInfo job = new Entity.JobInfo(); Entity.JobInfo sJob = new Entity.JobInfo(); DateTime time = DateTime.Now; DataAccess.TranHelper.BeginTran(); if (string.IsNullOrEmpty(jobID)) { DataAccess.RunProcedure procedure = new DataAccess.RunProcedure(); //JobInfo数据 job.JobID = context.Request.Form["jobSelect"] + "-" + DataAccess.CardCenterHelper.GetCardNo(); job.JobType = context.Request.Form["jobSelect"]; job.EnterpriseName = context.Request.Form["companyName"]; job.AgentPhone = context.Request.Form["txtPhone"]; job.CreateTime = time; job.CreateUser = context.Request.Form["customCode"]; job.IsDelete = false; job.Remark = context.Request.Form["txtRemark"]; job.CustomsCode = context.Request.Form["customCode"].Length == 10 ? context.Request.Form["customCode"] : null; job.IsOnline = false; job.ExpressFlat = false; if (job.JobType == "SL") { job.Fee = new DataAccess.Stock_Commodity().GetEntity(context.Request.Form["saleSelect"]).SellingPrice *int.Parse(context.Request.Form["txtNum"]); job.FeeFlat = "待缴费"; } else { job.Fee = 0; job.FeeFlat = "无须缴费"; } new DataAccess.JobInfo().Add(job); if (job.JobType == "NA" || job.JobType == "RI" || job.JobType == "RM") { sJob.JobID = "SL-" + DataAccess.CardCenterHelper.GetCardNo(); sJob.JobType = "SL"; sJob.EnterpriseName = job.EnterpriseName; sJob.AgentPhone = job.AgentPhone; sJob.CreateTime = job.CreateTime; sJob.CreateUser = job.CreateUser; sJob.IsDelete = false; sJob.Remark = job.Remark; sJob.CustomsCode = job.CustomsCode; sJob.IsOnline = false; sJob.Fee = new DataAccess.Stock_Commodity().GetEntity(context.Request.Form["saleSelect"]).SellingPrice *int.Parse(context.Request.Form["txtNum"]); sJob.FeeFlat = "待缴费"; sJob.ExpressFlat = false; new DataAccess.JobInfo().Add(sJob); Entity.SaleBinding saleBind = new Entity.SaleBinding(); saleBind.Guid = Guid.NewGuid().ToString(); saleBind.JobID = job.JobID; saleBind.SaleID = sJob.JobID; new DataAccess.SaleBinding().Add(saleBind); saleID = saleBind.SaleID; } //FlowInfo数据 Entity.FlowInfo flow = new Entity.FlowInfo(); flow.Guid = Guid.NewGuid().ToString(); flow.JobID = job.JobID; flow.FlowID = int.Parse(new DataAccess.Flow().GetList(string.Format("FlowOrder=2 and JobType='{0}'", job.JobType)).Tables[0].Rows[0]["FlowStatus"].ToString()); flow.SubmitDate = time; flow.SubmitUser = PageBase.CommonObject.ManagerUserInfo.guid; flow.Content = "现场交单."; flow.IsDelete = false; flow.Remark = string.Empty; new DataAccess.FlowInfo().Add(flow); if (job.JobType == "NA" || job.JobType == "RI" || job.JobType == "RM") { Entity.FlowInfo sFlow = new Entity.FlowInfo(); sFlow.Guid = Guid.NewGuid().ToString(); sFlow.JobID = sJob.JobID; sFlow.FlowID = int.Parse(new DataAccess.Flow().GetList("FlowOrder=2 and JobType='SL'").Tables[0].Rows[0]["FlowStatus"].ToString()); sFlow.SubmitDate = flow.SubmitDate; sFlow.SubmitUser = flow.SubmitUser; sFlow.Content = flow.Content; sFlow.IsDelete = false; sFlow.Remark = string.Empty; new DataAccess.FlowInfo().Add(sFlow); } //绑定文件袋 if (!string.IsNullOrEmpty(context.Request.Form["hBar"])) { new DataAccess.JobBar().BindFile(context.Request.Form["hBar"], job.JobID); if (job.JobType == "NA" || job.JobType == "RI" || job.JobType == "RM") { new DataAccess.JobBar().BindFile(context.Request.Form["hBar"], sJob.JobID); } } } else { job = new DataAccess.JobInfo().GetModel(jobID); if (job.JobType == "SL") { job.Fee += new DataAccess.Stock_Commodity().GetEntity(context.Request.Form["saleSelect"]).SellingPrice *int.Parse(context.Request.Form["txtNum"]); new DataAccess.JobInfo().Update(job); } else if (job.JobType == "NA" || job.JobType == "RI" || job.JobType == "RM") { saleID = new DataAccess.SaleBinding().GetList(string.Format("JobID='{0}'", jobID)).Tables[0].Rows[0]["SaleID"].ToString(); sJob = new DataAccess.JobInfo().GetModel(saleID); sJob.Fee += new DataAccess.Stock_Commodity().GetEntity(context.Request.Form["saleSelect"]).SellingPrice *int.Parse(context.Request.Form["txtNum"]); new DataAccess.JobInfo().Update(sJob); } } //工单项信息 int random = new Random().Next(1, 9999); switch (job.JobType) { case "MD": for (int i = 0; i < int.Parse(context.Request.Form["txtNum"]); i++) { Entity.ModifyList md = new Entity.ModifyList(); md.JobType = context.Request.Form["businessSelect"]; md.ListID = md.JobType + "-" + time.ToString("yyyyMMddhhmmssfff") + (random + i).ToString().PadLeft(4, '0'); md.JobID = job.JobID; md.CardType = new DataAccess.Para_JobType().GetModel(md.JobType).CardType; md.IsChangeName = false; md.IsDelete = false; md.Remark = "现场交单."; new DataAccess.ModifyList().Add(md); } break; case "NA": for (int i = 0; i < int.Parse(context.Request.Form["txtNum"]); i++) { Entity.NewlyAddedList na = new Entity.NewlyAddedList(); na.JobType = context.Request.Form["businessSelect"]; na.ListID = na.JobType + "-" + time.ToString("yyyyMMddhhmmssfff") + (random + i).ToString().PadLeft(4, '0'); na.JobID = job.JobID; na.CardType = new DataAccess.Para_JobType().GetModel(na.JobType).CardType; na.CardholderIdentificationType = 1; na.IsDelete = false; na.Remark = "现场交单."; new DataAccess.NewlyAddedList().Add(na); } Entity.SaleList naSl = new Entity.SaleList(); if (new DataAccess.SaleList().GetList(string.Format("JobID='{0}' and ProductType='{1}' and IsDelete=0", saleID, context.Request.Form["saleSelect"])).Tables[0].Rows.Count == 0) { naSl.JobType = "SL001"; naSl.ListID = naSl.JobType + "-" + time.ToString("yyyyMMddhhmmssfff") + random.ToString().PadLeft(4, '0'); naSl.JobID = saleID; naSl.ProductType = context.Request.Form["saleSelect"]; naSl.Num = int.Parse(context.Request.Form["txtNum"]); naSl.IsDelete = false; naSl.Remark = "现场交单."; new DataAccess.SaleList().Add(naSl); } else { naSl = new DataAccess.SaleList().GetModel(new DataAccess.SaleList().GetList(string.Format("JobID='{0}' and ProductType='{1}' and IsDelete=0", saleID, context.Request.Form["saleSelect"])).Tables[0].Rows[0]["ListID"].ToString()); naSl.Num += int.Parse(context.Request.Form["txtNum"]); new DataAccess.SaleList().Update(naSl); } break; case "RI": for (int i = 0; i < int.Parse(context.Request.Form["txtNum"]); i++) { Entity.ReIssueList ri = new Entity.ReIssueList(); ri.JobType = context.Request.Form["businessSelect"]; ri.ListID = ri.JobType + "-" + time.ToString("yyyyMMddhhmmssfff") + (random + i).ToString().PadLeft(4, '0'); ri.JobID = job.JobID; ri.CardType = new DataAccess.Para_JobType().GetModel(ri.JobType).CardType; ri.IsDelete = false; ri.Remark = "现场交单."; new DataAccess.ReIssueList().Add(ri); } Entity.SaleList riSl = new Entity.SaleList(); if (new DataAccess.SaleList().GetList(string.Format("JobID='{0}' and ProductType='{1}' and IsDelete=0", saleID, context.Request.Form["saleSelect"])).Tables[0].Rows.Count == 0) { riSl.JobType = "SL001"; riSl.ListID = riSl.JobType + "-" + time.ToString("yyyyMMddhhmmssfff") + random.ToString().PadLeft(4, '0'); riSl.JobID = saleID; riSl.ProductType = context.Request.Form["saleSelect"]; riSl.Num = int.Parse(context.Request.Form["txtNum"]); riSl.IsDelete = false; riSl.Remark = "现场交单."; new DataAccess.SaleList().Add(riSl); } else { riSl = new DataAccess.SaleList().GetModel(new DataAccess.SaleList().GetList(string.Format("JobID='{0}' and ProductType='{1}' and IsDelete=0", saleID, context.Request.Form["saleSelect"])).Tables[0].Rows[0]["ListID"].ToString()); riSl.Num += int.Parse(context.Request.Form["txtNum"]); new DataAccess.SaleList().Update(riSl); } break; case "RM": for (int i = 0; i < int.Parse(context.Request.Form["txtNum"]); i++) { Entity.ReMakeList rm = new Entity.ReMakeList(); rm.JobType = context.Request.Form["businessSelect"]; rm.ListID = rm.JobType + "-" + time.ToString("yyyyMMddhhmmssfff") + (random + i).ToString().PadLeft(4, '0'); rm.JobID = job.JobID; rm.CardType = new DataAccess.Para_JobType().GetModel(rm.JobType).CardType; rm.IsDelete = false; rm.Remark = "现场交单."; new DataAccess.ReMakeList().Add(rm); } Entity.SaleList rmSl = new Entity.SaleList(); if (new DataAccess.SaleList().GetList(string.Format("JobID='{0}' and ProductType='{1}' and IsDelete=0", saleID, context.Request.Form["saleSelect"])).Tables[0].Rows.Count == 0) { rmSl.JobType = "SL001"; rmSl.ListID = rmSl.JobType + "-" + time.ToString("yyyyMMddhhmmssfff") + random.ToString().PadLeft(4, '0'); rmSl.JobID = saleID; rmSl.ProductType = context.Request.Form["saleSelect"]; rmSl.Num = int.Parse(context.Request.Form["txtNum"]); rmSl.IsDelete = false; rmSl.Remark = "现场交单."; new DataAccess.SaleList().Add(rmSl); } else { rmSl = new DataAccess.SaleList().GetModel(new DataAccess.SaleList().GetList(string.Format("JobID='{0}' and ProductType='{1}' and IsDelete=0", saleID, context.Request.Form["saleSelect"])).Tables[0].Rows[0]["ListID"].ToString()); rmSl.Num += int.Parse(context.Request.Form["txtNum"]); new DataAccess.SaleList().Update(rmSl); } break; case "SL": Entity.SaleList sl = new Entity.SaleList(); if (new DataAccess.SaleList().GetList(string.Format("JobID='{0}' and ProductType='{1}' and IsDelete=0", saleID, context.Request.Form["saleSelect"])).Tables[0].Rows.Count == 0) { sl.JobType = "SL001"; sl.ListID = sl.JobType + "-" + time.ToString("yyyyMMddhhmmssfff") + random.ToString().PadLeft(4, '0'); sl.JobID = job.JobID; sl.ProductType = context.Request.Form["saleSelect"]; sl.Num = int.Parse(context.Request.Form["txtNum"]); sl.IsDelete = false; sl.Remark = "现场交单."; sl.ManagerFlag = 0; sl.ManagerUser = PageBase.CommonObject.ManagerUserInfo.guid; sl.ManagerTime = DateTime.Now; new DataAccess.SaleList().Add(sl); } else { sl = new DataAccess.SaleList().GetModel(new DataAccess.SaleList().GetList(string.Format("JobID='{0}' and ProductType='{1}' and IsDelete=0", saleID, context.Request.Form["saleSelect"])).Tables[0].Rows[0]["ListID"].ToString()); sl.Num += int.Parse(context.Request.Form["txtNum"]); new DataAccess.SaleList().Update(sl); } break; case "UU": for (int i = 0; i < int.Parse(context.Request.Form["txtNum"]); i++) { Entity.UpdateUnlockList uu = new Entity.UpdateUnlockList(); uu.JobType = context.Request.Form["businessSelect"]; uu.ListID = uu.JobType + "-" + time.ToString("yyyyMMddhhmmssfff") + (random + i).ToString().PadLeft(4, '0'); uu.JobID = job.JobID; uu.CardType = new DataAccess.Para_JobType().GetModel(uu.JobType).CardType; uu.IsDelete = false; uu.Remark = "现场交单."; new DataAccess.UpdateUnlockList().Add(uu); } break; } try { if (job.JobType != "UU" && job.JobType != "MD") { //减少显示库存 Entity.Stock_Commodity mCommodity = new DataAccess.Stock_Commodity().GetEntity(context.Request.Form["saleSelect"]); mCommodity.StockDesplay -= int.Parse(context.Request.Form["txtNum"]); if (mCommodity.StockDesplay < 0) { throw new Exception(string.Format("{0}{1}({2})库存不足,请更换库存充足的安全产品厂商或稍后再试!", mCommodity.AdditionalAttributes, mCommodity.CommodityName, mCommodity.CommodityType)); } else { new DataAccess.Stock_Commodity().Update(mCommodity); } } DataAccess.TranHelper.CommitTran(); DataAccess.TranHelper.BeginTran(); //处理列表信息 switch (job.JobType) { case "MD": new DataAccess.MDDataAccess().InsertHandleList(job); break; case "NA": new DataAccess.NADataAccess().InsertHandleList(job); new DataAccess.SLDataAccess().InsertHandleList(sJob); break; case "RI": new DataAccess.RIDataAccess().InsertHandleList(job); new DataAccess.SLDataAccess().InsertHandleList(sJob); break; case "RM": new DataAccess.RMDataAccess().InsertHandleList(job); new DataAccess.SLDataAccess().InsertHandleList(sJob); break; case "SL": new DataAccess.SLDataAccess().InsertHandleList(job); break; case "UU": new DataAccess.UUDataAccess().InsertHandleList(job); break; } DataAccess.TranHelper.CommitTran(); context.Response.Write(JsonConvert.SerializeObject(new Data("", job.JobID))); } catch (Exception ex) { context.Response.Write(JsonConvert.SerializeObject(new Data(ex.Message, ""))); } } catch (Exception ex) { context.Response.Write(JsonConvert.SerializeObject(new Data(ex.Message, ""))); } }
private void DataBind() { DataAccess.RunProcedure pro = new DataAccess.RunProcedure(); repeater.DataSource = pro.InvoiceList(); repeater.DataBind(); }
static void Main(string[] args) { DataTable dt = new DataAccess.RunProcedure().CloseList(); foreach (DataRow dr in dt.Rows) { try { Dictionary <string, string> result = new Dictionary <string, string>(); try { result = DataAccess.PayHelper.IPaySearch(dr["JobID"].ToString()); } catch (Exception ex) { new DataAccess.Sys_Log().AddLog(string.Format("Function:CloseJob.Main;Param:{0};ErrorMsg:查询接口失败.{1}", dr["JobID"].ToString(), ex.ToString())); } bool IsSuccess = false; if (result["status"] != null) { if (result["status"].Equals("Success")) { IsSuccess = true; } } if (!IsSuccess) { //关闭工单 Entity.FlowInfo flow = new Entity.FlowInfo(); flow.Guid = Guid.NewGuid().ToString(); flow.JobID = dr["JobID"].ToString(); flow.FlowID = 18; flow.SubmitDate = DateTime.Now; flow.SubmitUser = "******"; flow.Content = "超时未支付,系统自动关闭工单。"; flow.IsDelete = false; try { if (!new DataAccess.FlowInfo().AddEx(flow)) { new DataAccess.Sys_Log().AddLog(string.Format("Function:CloseJob.Main;Param:{0};ErrorMsg:关闭工单失败.入库失败", flow.JobID)); } } catch (Exception ex) { new DataAccess.Sys_Log().AddLog(string.Format("Function:CloseJob.Main;Param:{0};ErrorMsg:关闭工单失败.{1}", flow.JobID, ex.ToString())); } //恢复库存 DataTable dtSale = new DataAccess.SaleList().GetList(string.Format("JobID='{0}' and IsDelete=0", flow.JobID)).Tables[0]; foreach (DataRow drSale in dtSale.Rows) { Entity.SaleList mSale = new DataAccess.SaleList().DataRowToModel(drSale); Entity.Stock_Commodity mCommodity = new DataAccess.Stock_Commodity().GetEntity(mSale.ProductType); mCommodity.StockDesplay += mSale.Num; try { if (!new DataAccess.Stock_Commodity().UpdateEx(mCommodity)) { new DataAccess.Sys_Log().AddLog(string.Format("Function:CloseJob.Main;Param:{0};ErrorMsg:恢复库存失败.入库失败", flow.JobID)); } } catch (Exception ex) { new DataAccess.Sys_Log().AddLog(string.Format("Function:CloseJob.Main;Param:{0};ErrorMsg:恢复库存失败.{1}", flow.JobID, ex.ToString())); } } } else { Entity.JobInfo job = new DataAccess.JobInfo().GetModel(dr["JobID"].ToString()); Entity.HandleList handle = new DataAccess.HandleList().GetFeeData(dr["JobID"].ToString()); if (job != null && handle != null) { //更新工单缴费信息 job.FeeFlat = "已缴费"; handle.IsChecked = true; handle.Status = "已处理"; handle.OpeartionUser = job.CustomsCode; handle.OpeartionTime = DateTime.ParseExact(result["lastUpdated"], "yyyyMMddHHmmss", null).AddHours(8); handle.Remark = "网上支付"; try { if (!new DataAccess.JobInfo().UpdateEx(job) && new DataAccess.HandleList().UpdateEx(handle)) { new DataAccess.Sys_Log().AddLog(string.Format("Function:CloseJob.Main;Param:{0};ErrorMsg:更新工单失败.入库失败", job.JobID)); } } catch (Exception ex) { new DataAccess.Sys_Log().AddLog(string.Format("Function:CloseJob.Main;Param:{0};ErrorMsg:更新工单失败.{1}", job.JobID, ex.ToString())); } } } } catch (Exception ex) { new DataAccess.Sys_Log().AddLog(string.Format("Function:CloseJob.Main;Param:{0};ErrorMsg:未知错误.{1}", dr["JobID"].ToString(), ex.ToString())); } } }
protected void btnSearch_Click(object sender, EventArgs e) { DataAccess.RunProcedure pro = new DataAccess.RunProcedure(); repeater.DataSource = pro.ManagerList(txtSearch.Value); repeater.DataBind(); }