string type = String.Empty; // 对象类型 protected void Page_Load(object sender, EventArgs e) { string db = ConfigurationManager.AppSettings["ExamineDB"]; op = RequestData.Get <string>("op"); id = RequestData.Get <string>("id"); type = RequestData.Get <string>("type"); OtherPayBill ent = null; switch (RequestActionString) { case "create": ent = GetPostedData <OtherPayBill>(); ent.CreateName = UserInfo.Name; ent.CreateTime = System.DateTime.Now; ent.CreateId = UserInfo.UserID; ent.PayState = "未付款"; ent.DoCreate(); string[] temparray = ent.InterfaceArray.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < temparray.Length; i++) { Logistic lEnt = Logistic.Find(temparray[i]); lEnt.PayState = "已提交"; lEnt.DoUpdate(); } break; default: break; } PageState.Add("PayBillNo", DataHelper.QueryValue("select SHHG_AimExamine.dbo.fun_GetOtherPayBillNo()")); }
protected void lbtSave_Click(object sender, EventArgs e) { OtherPayBill opbEnt = new OtherPayBill(); opbEnt.PayBillNo = rtbPayBillNo.Text; opbEnt.PayType = rcbPayType.SelectedValue; opbEnt.LogisticsCompanyName = rtbLogisticsCompanyName.Text; opbEnt.InvoiceNo = rtbInvoiceNo.Text; opbEnt.InvoiceAmount = Convert.ToDecimal(rntbInvoiceAmount.Text); opbEnt.InterfaceArray = rtbInterfaceArray.Text; opbEnt.ShouldPayAmount = Convert.ToDecimal(rntbShouldPayAmount.Text); opbEnt.Remark = rtbRemark.Text; opbEnt.PayState = "未付款"; opbEnt.CreateTime = System.DateTime.Now; opbEnt.CreateId = WebPortalService.CurrentUserInfo.UserID; opbEnt.CreateName = WebPortalService.CurrentUserInfo.Name; opbEnt.DoCreate(); //付款单创建完毕后将关联的物流单的付款状态改为 已提交 string[] temparray = opbEnt.InterfaceArray.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < temparray.Length; i++) { Logistic lEnt = Logistic.Find(temparray[i]); lEnt.PayState = "已提交"; lEnt.DoUpdate(); } ClientScript.RegisterStartupScript(GetType(), "submit", "window.opener.location.reload();window.close();", true); lbtSave.Visible = false; }
string type = String.Empty; // 对象类型 protected void Page_Load(object sender, EventArgs e) { op = RequestData.Get <string>("op"); id = RequestData.Get <string>("id"); OtherPayBill ent = null; switch (RequestActionString) { case "create": ent = GetPostedData <OtherPayBill>(); ent.CreateName = UserInfo.Name; ent.CreateTime = System.DateTime.Now; ent.CreateId = UserInfo.UserID; ent.PayState = "未付款"; ent.DoCreate(); break; case "update": ent = GetMergedData <OtherPayBill>(); ent.DoUpdate(); break; default: break; } if (op == "c") { PageState.Add("PayBillNo", DataHelper.QueryValue("select SHHG_AimExamine.dbo.fun_GetOtherPayBillNo()")); } else { ent = OtherPayBill.Find(id); SetFormData(ent); } }