/// <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(); }
/// <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>"); } } }