/// <summary> /// 绑定 /// </summary> void BindInfo() { EyouSoft.BLL.FinanceStructure.CashierRegister bll = new EyouSoft.BLL.FinanceStructure.CashierRegister(SiteUserInfo); int sumcount = 0; EyouSoft.Model.FinanceStructure.QueryCashierRegisterInfo model = new EyouSoft.Model.FinanceStructure.QueryCashierRegisterInfo(); model.CompanyId = CurrentUserCompanyID; model.CustomerId = Utils.GetInt(Utils.GetQueryStringValue("comid")); //model.EndTime = Utils.GetDateTime( txt_date.Value); model.PaymentBank = Utils.GetQueryStringValue("bank"); model.StartTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("begin")); txt_bank.Value = model.PaymentBank; txt_com.Value = Utils.GetQueryStringValue("com"); hd_comId.Value = Utils.GetQueryStringValue("comid"); txt_date.Value = Utils.GetQueryStringValue("begin"); IList <EyouSoft.Model.FinanceStructure.CashierRegisterInfo> ilist = bll.GetList(model, 20, Utils.GetInt(Request.QueryString["page"], 1), ref sumcount); rpt_list.DataSource = ilist; rpt_list.DataBind(); //合计 bll.GetCashierRegisterMoney(model, ref paymentCount, ref totalAmount); ExportPageInfo1.intPageSize = 20; ExportPageInfo1.intRecordCount = sumcount; ExportPageInfo1.PageLinkURL = Request.Path + "?"; ExportPageInfo1.UrlParams = Request.QueryString; ExportPageInfo1.CurrencyPage = EyouSoft.Common.Utils.GetInt(Request.QueryString["page"], 1); }
/// <summary> /// 销账操作 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void LinkButton1_Click(object sender, EventArgs e) { string[] chk = Utils.GetFormValues("chk"); EyouSoft.BLL.FinanceStructure.CashierRegister bll = new EyouSoft.BLL.FinanceStructure.CashierRegister(SiteUserInfo); IList <EyouSoft.Model.FinanceStructure.CancelRegistInfo> list = new List <EyouSoft.Model.FinanceStructure.CancelRegistInfo>(); for (int i = 0; i < chk.Length; i++) { EyouSoft.Model.FinanceStructure.CancelRegistInfo model = new EyouSoft.Model.FinanceStructure.CancelRegistInfo(); model.CompanyId = Utils.GetInt(Utils.GetFormValues("hd_comId")[Utils.GetInt(chk[i])]); model.Money = Utils.GetDecimal(Utils.GetFormValues("txt_money")[Utils.GetInt(chk[i])]); model.OrderId = Utils.GetFormValues("hd_orderId")[Utils.GetInt(chk[i])]; list.Add(model); } int j = bll.CancelRegist(Utils.GetInt(Request.QueryString["id"]), SiteUserInfo.ID, SiteUserInfo.UserName, list); if (j > 0) { Response.Write("<script>alert('销账成功');location.href=location.href;parent.location.href='chunadz_list.aspx';</script>"); } else { Response.Write("<script>alert('销账失败');location.href=location.href;</script>"); } Bind(); }
protected void lbtn_Submit_Click(object sender, EventArgs e) { EyouSoft.BLL.FinanceStructure.CashierRegister bll = new EyouSoft.BLL.FinanceStructure.CashierRegister(SiteUserInfo); EyouSoft.Model.FinanceStructure.CashierRegisterInfo model = new EyouSoft.Model.FinanceStructure.CashierRegisterInfo(); model.CompanyId = CurrentUserCompanyID; model.Contacter = txt_sendUser.Text; model.ContactTel = Utils.GetFormValue("txt_phone"); model.CreateTime = DateTime.Now; model.CustomerId = Utils.GetInt(Utils.GetFormValue("hd_teamId")); model.CustomerName = Utils.GetFormValue("txt_teamName"); model.OperatorId = SiteUserInfo.ID; model.PaymentBank = Utils.GetFormValue("txt_bank"); model.PaymentCount = Utils.GetDecimal(Utils.GetFormValue("txt_money")); model.PaymentTime = Utils.GetDateTime(Utils.GetFormValue(txt_date.UniqueID), DateTime.Now); model.Remark = Utils.GetFormValue(txt_Remarks.UniqueID); int k = bll.AddCashierRegister(model); if (k > 0) { Response.Write("<script>alert('登记成功');parent.Boxy.getIframeDialog('" + Request.QueryString["iframeid"] + "').hide();parent.location.reload();</script>"); } else { Response.Write("<script>alert('登记失败');location.href=location.href;</script>"); } }
/// <summary> /// 销账操作 /// </summary> /// <param name="source"></param> /// <param name="e"></param> protected void rpt_list_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "update") { EyouSoft.Model.FinanceStructure.CashierRegisterInfo model = e.Item.DataItem as EyouSoft.Model.FinanceStructure.CashierRegisterInfo; EyouSoft.BLL.FinanceStructure.CashierRegister bll = new EyouSoft.BLL.FinanceStructure.CashierRegister(SiteUserInfo); IList <EyouSoft.Model.FinanceStructure.CancelRegistInfo> list = new List <EyouSoft.Model.FinanceStructure.CancelRegistInfo>(); list.Add(new EyouSoft.Model.FinanceStructure.CancelRegistInfo() { Money = model.PaymentCount, CompanyId = CurrentUserCompanyID, OrderId = "" }); int i = bll.CancelRegist(model.RegisterId, SiteUserInfo.ID, SiteUserInfo.UserName, list); if (i > 0) { Response.Write("<script>alert(\"销账成功!\");</script>"); } } }