protected void Page_Load(object sender, EventArgs e) { switch (RequestActionString) { case "batchdelete": IList <object> idList = RequestData.GetList <object>("IdList"); if (idList != null && idList.Count > 0) { foreach (object obj in idList) { OtherPayBill opbEnt = OtherPayBill.Find(obj.ToString()); //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(); //} opbEnt.DoDelete(); } PageState.Add("Message", "删除成功!"); } break; default: DoSelect(); break; } }
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); } }
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 "update": ent = OtherPayBill.Find(id); string nowPayAmount = RequestData.Get <string>("NowPayAmount"); if (!string.IsNullOrEmpty(nowPayAmount)) { ent.AcctualPayAmount = (ent.AcctualPayAmount.HasValue ? ent.AcctualPayAmount : 0) + Convert.ToDecimal(nowPayAmount); if (ent.AcctualPayAmount == ent.ShouldPayAmount) { ent.PayState = "已付款"; ent.PayTime = System.DateTime.Now; ent.PayUserId = UserInfo.UserID; ent.PayUserName = UserInfo.Name; } ent.DoUpdate(); } if (ent.PayType == "物流付款" && ent.PayState == "已付款") { 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; } if (op != "c" && op != "cs") { if (!String.IsNullOrEmpty(id)) { ent = OtherPayBill.Find(id); SetFormData(ent); PageState.Add("PayType", ent.PayType); if (ent.PayType == "物流付款") { string[] array = ent.InterfaceArray.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); PageState.Add("DataList", Logistic.FindAllByPrimaryKeys(array)); } } } }
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; if (op != "c" && op != "cs") { if (!String.IsNullOrEmpty(id)) { ent = OtherPayBill.Find(id); PageState.Add("PayType", ent.PayType); SetFormData(ent); if (ent.PayType == "物流付款") { string[] array = ent.InterfaceArray.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); PageState.Add("DataList", Logistic.FindAllByPrimaryKeys(array)); } } } }