protected void Page_Load(object sender, EventArgs e) { op = RequestData.Get <string>("op"); id = RequestData.Get <string>("id"); CId = RequestData.Get <string>("CId"); switch (RequestActionString) { case "update": ent = this.GetMergedData <PaymentInvoice>(); ent.DoUpdate(); break; case "create": ent = this.GetPostedData <PaymentInvoice>(); ent.BillType = "收据"; ent.CreateId = UserInfo.UserID; ent.CreateName = UserInfo.Name; ent.CreateTime = DateTime.Now; ent.Name = "自动销账"; ent.CorrespondState = "已对应"; ent.DoCreate(); ent.CorrespondInvoice = ent.CorrespondInvoice + "_" + ent.Money; ent.DoUpdate(); break; default: DoSelect(); break; } }
string type = String.Empty; // 对象类型 #endregion #region ASP.NET 事件 protected void Page_Load(object sender, EventArgs e) { op = RequestData.Get <string>("op"); id = RequestData.Get <string>("id"); type = RequestData.Get <string>("type"); PaymentInvoice ent = null; switch (this.RequestAction) { case RequestActionEnum.Update: ent = this.GetMergedData <PaymentInvoice>(); ent.DoUpdate(); this.SetMessage("修改成功!"); break; case RequestActionEnum.Insert: case RequestActionEnum.Create: ent = this.GetPostedData <PaymentInvoice>(); ent.CId = RequestData.Get <string>("CId"); ent.DoCreate(); this.SetMessage("新建成功!"); break; case RequestActionEnum.Delete: ent = this.GetTargetData <PaymentInvoice>(); ent.DoDelete(); this.SetMessage("删除成功!"); return; } if (op != "c" && op != "cs") { if (!String.IsNullOrEmpty(id)) { ent = PaymentInvoice.Find(id); } this.SetFormData(ent); } PageState.Add("PayType", SysEnumeration.GetEnumDict("PayType")); }
protected void Page_Load(object sender, EventArgs e) { string action = Request["action"]; string sql = ""; DataTable dt = null; PaymentInvoice piEnt = null; SaleOrder soEnt = null; switch (action) { case "loadpaytype": sql = @"select name from SysEnumeration where parentid=(select TOP 1 EnumerationID from SysEnumeration WHERE Code = 'PayType') order by sortindex asc "; dt = DataHelper.QueryDataTable(sql); Response.Write("{rows:" + JsonHelper.GetJsonStringFromDataTable(dt) + "}"); Response.End(); break; case "loadbyorderid": soEnt = SaleOrder.Find(Request["orderid"]); Response.Write("{data:" + JsonHelper.GetJsonString(soEnt) + "}"); Response.End(); break; case "create": soEnt = SaleOrder.Find(Request["orderid"]); piEnt = JsonHelper.GetObject <PaymentInvoice>(Request["formdata"]); piEnt.BillType = "订单"; piEnt.CorrespondState = "已对应"; piEnt.CollectionType = "销售收款"; piEnt.Name = "手动销账"; piEnt.CorrespondInvoice = soEnt.Number + "_" + soEnt.TotalMoney; piEnt.DoCreate(); //创建完付款单后,更新订单状态 soEnt.PayState = "已付款"; soEnt.DoUpdate(); break; } }
protected void Page_Load(object sender, EventArgs e) { op = RequestData.Get <string>("op"); id = RequestData.Get <string>("id"); CId = RequestData.Get <string>("CId"); switch (RequestActionString) { case "create": ent = this.GetPostedData <PaymentInvoice>(); ent.BillType = "发票"; ent.CreateId = UserInfo.UserID; ent.CreateName = UserInfo.Name; ent.CreateTime = DateTime.Now; ent.CollectionType = "销售收款"; ent.DoCreate(); UpdateOrderInvoice(); break; default: DoSelect(); break; } }
protected void Page_Load(object sender, EventArgs e) { op = RequestData.Get <string>("op"); id = RequestData.Get <string>("id"); CId = RequestData.Get <string>("CId"); switch (RequestActionString) { case "create": ent = this.GetPostedData <PaymentInvoice>(); ent.BillType = "收据"; ent.CreateId = UserInfo.UserID; ent.CreateName = UserInfo.Name; ent.CreateTime = DateTime.Now; ent.DoCreate(); UpdateSaleOrder(); break; case "AutoCorrespond": sql = @"select sum(TotalMoney-isnull(DiscountAmount,0)-isnull(ReturnAmount,0)-isnull(ReceiptAmount,0)) from SHHG_AimExamine..SaleOrders where CId='" + CId + "' and State is null and InvoiceType='收据' and (PayState is null or PayState='部分付款')"; decimal TotalArrearage = DataHelper.QueryValue <decimal>(sql); if (TotalArrearage >= RequestData.Get <decimal>("PayAmount")) { PageState.Add("Result", "T"); } else { PageState.Add("Result", "F"); } break; default: DoSelect(); break; } }