/// <summary> /// 初始化方法 /// </summary> protected void DataInit(string incomePro, string incomeMan, string incomeTime) { EyouSoft.Model.FinanceStructure.OtherCostQuery searchModel = new EyouSoft.Model.FinanceStructure.OtherCostQuery(); searchModel.CompanyId = SiteUserInfo.CompanyID; searchModel.ItemName = incomePro; searchModel.Payee = incomeMan; searchModel.StartTime = Utils.GetDateTimeNullable(incomeTime); searchModel.EndTime = Utils.GetDateTimeNullable(incomeTime); searchModel.TourCode = Utils.GetQueryStringValue("tcode"); searchModel.LSDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("lsdate")); searchModel.LEDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("ledate")); EyouSoft.BLL.FinanceStructure.OtherCost bll = new EyouSoft.BLL.FinanceStructure.OtherCost(SiteUserInfo); IList <EyouSoft.Model.FinanceStructure.OtherIncomeInfo> list = bll.GetOtherIncomeList(searchModel, pageSize, pageIndex, ref recordCount); #region 合计 bll.GetOtherIncomeList(searchModel, ref totalAmount); #endregion if (list != null && list.Count > 0) { this.rptList.DataSource = list; this.rptList.DataBind(); BindPage(); } else { this.ExportPageInfo1.Visible = false; this.lblMsg.Text = "未找到相关数据!"; } list = null; }
/// <summary> /// 绑定信息 /// </summary> /// <param name="id"></param> void BindInfo(string id) { EyouSoft.BLL.FinanceStructure.OtherCost bll = new EyouSoft.BLL.FinanceStructure.OtherCost(SiteUserInfo); EyouSoft.Model.FinanceStructure.OtherIncomeInfo model = bll.GetOtherIncomeInfo(id); if (model != null) { txt_date.Text = model.PayTime.ToString("yyyy-MM-dd"); txt_com.Value = model.CustromCName; txt_ziqu.Text = model.Item; txt_sendUser.Text = model.Payee; SiteUserInfo.ID = model.OperatorId; txt_Remarks.Value = model.Remark; txt_money.Value = Utils.FilterEndOfTheZeroDecimal(model.TotalAmount); this.txtAddMoney.Value = model.AddAmount.ToString("0.00"); this.txtCutMoney.Value = model.ReduceAmount.ToString("0.00"); DdlPayTypeInit(((int)model.PayType).ToString()); if (model.Status) { ddlStatus.SelectedIndex = 0; } else { ddlStatus.SelectedIndex = 1; } } }
/// <summary> /// 按钮保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lbtn_Submit_Click(object sender, EventArgs e) { EyouSoft.BLL.FinanceStructure.OtherCost bll = new EyouSoft.BLL.FinanceStructure.OtherCost(SiteUserInfo); EyouSoft.Model.FinanceStructure.OtherIncomeInfo model = null; #region 获取初始数据 if (Utils.GetQueryStringValue("id") != "") { model = bll.GetOtherIncomeInfo(Request.QueryString["id"]); if (model == null) { Utils.ShowAndRedirect("无该条记录信息!", Request.Url.ToString()); return; } } else { model = new EyouSoft.Model.FinanceStructure.OtherIncomeInfo(); } model.CompanyId = CurrentUserCompanyID; model.CustromCName = txt_com.Value; model.Item = txt_ziqu.Text; model.OperatorId = SiteUserInfo.ID; model.Remark = txt_Remarks.Value; model.CreateTime = DateTime.Now; model.PayTime = Utils.GetDateTime(this.txt_date.Text); model.Amount = Utils.GetDecimal(txt_money.Value); model.Payee = this.txt_sendUser.Text.Trim(); model.AddAmount = Utils.GetDecimal(this.txtAddMoney.Value); model.ReduceAmount = Utils.GetDecimal(this.txtCutMoney.Value); model.PayType = (EyouSoft.Model.EnumType.TourStructure.RefundType)Utils.GetInt(Utils.GetFormValue(this.ddlPayType.UniqueID)); model.TotalAmount = model.Amount + model.AddAmount - model.ReduceAmount; model.Status = Utils.GetFormValue(this.ddlStatus.UniqueID).Trim() == "True"; #endregion #region 提交数据库 if (Utils.GetQueryStringValue("id") != "") { model.IncomeId = Request.QueryString["id"]; bll.UpdateOtherIncome(model); EyouSoft.Common.Function.MessageBox.ResponseScript(this, "javascript:alert('修改成功!');parent.Boxy.getIframeDialog('" + Request.QueryString["iframeid"] + "').hide();parent.window.location.reload();"); } else { model.TourId = Request.QueryString["tourid"]; bll.AddOtherIncome(model); EyouSoft.Common.Function.MessageBox.ResponseScript(this, "javascript:alert('添加成功!');parent.Boxy.getIframeDialog('" + Request.QueryString["iframeid"] + "').hide();parent.window.location.reload();"); } #endregion }
/// <summary> /// 提交 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lbtn_Submit_Click(object sender, EventArgs e) { EyouSoft.BLL.FinanceStructure.OtherCost bll = new EyouSoft.BLL.FinanceStructure.OtherCost(SiteUserInfo); EyouSoft.Model.FinanceStructure.OtherOutInfo model = null; if (Utils.GetQueryStringValue("id") != "") { model = bll.GetOtherOutInfo(Utils.GetQueryStringValue("id")); } else { model = new EyouSoft.Model.FinanceStructure.OtherOutInfo(); } model.CompanyId = CurrentUserCompanyID; model.CustromCName = txt_com.Value; model.Item = txt_ziqu.Text; model.OperatorId = SiteUserInfo.ID; model.Remark = txt_Remarks.Value; model.Amount = Utils.GetDecimal(txt_money.Value); model.CreateTime = DateTime.Now; model.PayTime = Utils.GetDateTime(txt_date.Text); model.Payee = txt_sendUser.Text; model.PayType = (EyouSoft.Model.EnumType.TourStructure.RefundType)Utils.GetInt(Utils.GetFormValue(this.ddlPayType.ClientID)); model.AddAmount = Utils.GetDecimal(hd_addMoney.Value); model.ReduceAmount = Utils.GetDecimal(hd_subMoney.Value); model.TotalAmount = model.Amount + model.AddAmount - model.ReduceAmount; model.Status = model.Status = Utils.GetFormValue(this.ddlStatus.UniqueID).Trim() == "True";; if (Utils.GetQueryStringValue("id") != "") { int i = bll.UpdateOtherOut(model); if (i > 0) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, "javascript:alert('修改成功!');parent.Boxy.getIframeDialog('" + Request.QueryString["iframeid"] + "').hide();parent.window.location.reload();"); } } else { model.TourId = Request.QueryString["tourid"]; int i = bll.AddOtherOut(model); if (i > 0) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, "javascript:alert('保存成功!');parent.Boxy.getIframeDialog('" + Request.QueryString["iframeid"] + "').hide();parent.window.location.reload();"); } } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; context.Response.ContentType = "text/plain"; string id = context.Request.QueryString["id"]; string type = context.Request.QueryString["type"]; string tourId = context.Request.QueryString["tourId"]; string verifyType = context.Request.QueryString["verifyType"];//审核类型 in:收入 out:支出 //登录公司ID EyouSoft.SSOComponent.Entity.UserInfo userModel = EyouSoft.Security.Membership.UserProvider.GetUser(); //如果公司ID为0表示没有公司登录 并返回false if (userModel == null) { context.Response.Write("{Islogin:false}"); return; } if (!string.IsNullOrEmpty(verifyType)) { if (verifyType == "in" && !userModel.PermissionList.Contains((int)TravelPermission.财务管理_杂费收入_收入审核)) { context.Response.Write("{\"retcode\":1000}"); return; } if (verifyType == "out" && !userModel.PermissionList.Contains((int)TravelPermission.财务管理_杂费支出_支出审核)) { context.Response.Write("{\"retcode\":1000}"); return; } } EyouSoft.BLL.FinanceStructure.OtherCost bll = null; string cat = Utils.GetQueryStringValue("cat"); if (cat.Length > 0) { bll = new EyouSoft.BLL.FinanceStructure.OtherCost(userModel); switch (cat) { case "status": int SetOtherCostStatusint = 0; string status = Utils.GetQueryStringValue("status"); string otherCostId = Utils.GetQueryStringValue("IncomeId"); switch (status) { case "True": SetOtherCostStatusint = bll.SetOtherCostStatus(false, otherCostId); break; case "False": SetOtherCostStatusint = bll.SetOtherCostStatus(true, otherCostId); break; default: context.Response.Write("Error"); break; } if (SetOtherCostStatusint == 1) { context.Response.Write("OK"); } else { context.Response.Write("Error"); } break; default: context.Response.Write("Error"); break; } context.Response.End(); } if (id != null && id.Trim() != "" && type != null && type.Trim() != "") { //REMOVE MODEL bll = new EyouSoft.BLL.FinanceStructure.OtherCost(userModel); string[] idArray = new string[] { id }; switch (type) { //杂费收入 case "income": if (bll.DeleteOtherIncome(tourId, idArray) > 0) { context.Response.Write("OK"); return; } else { context.Response.Write("Error"); return; } //杂费支出 case "expend": if (bll.DeleteOtherOut(tourId, idArray) > 0) { context.Response.Write("OK"); return; } else { context.Response.Write("Error"); return; } } context.Response.Write("Error"); } else { context.Response.Write("Error"); } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="travelId">行程单ID</param> protected void DataInit(string tourId) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明团队计划对象 EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId); if (model != null && model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { this.Page.Title = "散拼结算明细单"; EyouSoft.Model.TourStructure.TourInfo teamModel = (EyouSoft.Model.TourStructure.TourInfo)model; //收款单位 this.txtBuyerCName.Text = teamModel.BuyerCName; EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(model.BuyerCId); if (cusModel != null) { //收款人 txtContact.Text = cusModel.ContactName; //电话 txtPbone.Text = cusModel.Phone; //传真 txtFax.Text = cusModel.Fax; } //线路 this.txtAreaName.Text = teamModel.RouteName; //人数 this.txtCount.Text = teamModel.PlanPeopleNumber.ToString(); //日期 this.txtDataTime.Text = DateTime.Now.ToString("yyyy-MM-dd"); //价格组成 tbMoney.Visible = false; tbMoneySP.Visible = true; EyouSoft.BLL.TourStructure.TourOrder tobll = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo); IList <EyouSoft.Model.TourStructure.TourOrder> lorder = new List <EyouSoft.Model.TourStructure.TourOrder>(); EyouSoft.Model.TourStructure.TourOrder orderModel = tobll.GetOrderModel(SiteUserInfo.CompanyID, orderId); if (orderModel != null) { lorder.Add(orderModel); EyouSoft.BLL.CompanyStructure.Customer cinfo = new EyouSoft.BLL.CompanyStructure.Customer(); EyouSoft.Model.CompanyStructure.CustomerInfo cm = cinfo.GetCustomerModel(orderModel.BuyCompanyID); if (cm != null) { txtBuyerCName.Text = cm.Name; } txtPbone.Text = orderModel.ContactTel; txtContact.Text = orderModel.ContactName; txtFax.Text = orderModel.ContactFax; rpt_orderList.DataSource = lorder; rpt_orderList.DataBind(); } //收入 IList <EyouSoft.Model.TourStructure.OrderFinanceExpense> fristList = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetOrderList(SiteUserInfo.CompanyID, tourId); if (fristList != null && fristList.Count > 0) { allCount += fristList.Count; this.rptFrist.DataSource = fristList; this.rptFrist.DataBind(); } //其它收入 EyouSoft.Model.FinanceStructure.OtherCostQuery otherCostQueryModel = new EyouSoft.Model.FinanceStructure.OtherCostQuery(); otherCostQueryModel.TourId = tourId; IList <EyouSoft.Model.FinanceStructure.OtherIncomeInfo> secoundList = new EyouSoft.BLL.FinanceStructure.OtherCost(SiteUserInfo).GetOtherIncomeList(otherCostQueryModel); if (secoundList != null && secoundList.Count > 0) { allCount += secoundList.Count; this.rptSecound.DataSource = secoundList; this.rptSecound.DataBind(); } //支出 IList <EyouSoft.Model.PlanStructure.PaymentList> thirdList = new EyouSoft.BLL.PlanStruture.TravelAgency().GetSettleList(tourId); if (thirdList != null && thirdList.Count > 0) { allCount += thirdList.Count; this.rptThird.DataSource = thirdList; this.rptThird.DataBind(); } //其它支出 IList <EyouSoft.Model.FinanceStructure.OtherOutInfo> forthList = new EyouSoft.BLL.FinanceStructure.OtherCost(SiteUserInfo).GetOtherOutList(otherCostQueryModel); if (forthList != null && forthList.Count > 0) { allCount += forthList.Count; this.rptForth.DataSource = forthList; this.rptForth.DataBind(); } } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="travelId">行程单ID</param> protected void DataInit(string tourId) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明团队计划对象 EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId); if (model != null && model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { EyouSoft.Model.TourStructure.TourTeamInfo teamModel = (EyouSoft.Model.TourStructure.TourTeamInfo)model; //收款单位 this.txtBuyerCName.Text = teamModel.BuyerCName; EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(model.BuyerCId); if (cusModel != null) { //收款人 txtContact.Text = cusModel.ContactName; //电话 txtPbone.Text = cusModel.Phone; //传真 txtFax.Text = cusModel.Fax; } //线路 this.txtAreaName.Text = teamModel.RouteName; //人数 this.txtCount.Text = teamModel.PlanPeopleNumber.ToString(); //日期 this.txtDataTime.Text = DateTime.Now.ToString("yyyy-MM-dd"); //价格组成 if (teamModel.Services != null && teamModel.Services.Count > 0) { this.servicesCount = teamModel.Services.Count; this.rptProject.DataSource = teamModel.Services; this.rptProject.DataBind(); } //收入 IList <EyouSoft.Model.TourStructure.OrderFinanceExpense> fristList = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetOrderList(SiteUserInfo.CompanyID, tourId); if (fristList != null && fristList.Count > 0) { allCount += fristList.Count; this.rptFrist.DataSource = fristList; this.rptFrist.DataBind(); } //其它收入 EyouSoft.Model.FinanceStructure.OtherCostQuery otherCostQueryModel = new EyouSoft.Model.FinanceStructure.OtherCostQuery(); otherCostQueryModel.TourId = tourId; IList <EyouSoft.Model.FinanceStructure.OtherIncomeInfo> secoundList = new EyouSoft.BLL.FinanceStructure.OtherCost(SiteUserInfo).GetOtherIncomeList(otherCostQueryModel); if (secoundList != null && secoundList.Count > 0) { allCount += secoundList.Count; this.rptSecound.DataSource = secoundList; this.rptSecound.DataBind(); } //支出 IList <EyouSoft.Model.PlanStructure.PaymentList> thirdList = new EyouSoft.BLL.PlanStruture.TravelAgency().GetSettleList(tourId); if (thirdList != null && thirdList.Count > 0) { allCount += thirdList.Count; this.rptThird.DataSource = thirdList; this.rptThird.DataBind(); } //其它支出 IList <EyouSoft.Model.FinanceStructure.OtherOutInfo> forthList = new EyouSoft.BLL.FinanceStructure.OtherCost(SiteUserInfo).GetOtherOutList(otherCostQueryModel); if (forthList != null && forthList.Count > 0) { allCount += forthList.Count; this.rptForth.DataSource = forthList; this.rptForth.DataBind(); } } }
protected void btnSave_Click(object sender, EventArgs e) { string tourId = Utils.InputText(this.hidePlanID.Value); bool isUpdate = true; #region 收入 //订单号 string[] hideFrist = Utils.GetFormValues("hideFrist"); if (hideFrist != null && hideFrist.Count() > 0) { IList <EyouSoft.Model.TourStructure.OrderFinanceExpense> list = new List <EyouSoft.Model.TourStructure.OrderFinanceExpense>(); for (int i = 0; i < hideFrist.Count(); i++) { EyouSoft.Model.TourStructure.OrderFinanceExpense model = new EyouSoft.Model.TourStructure.OrderFinanceExpense(); //ID string id = hideFrist[i]; //公司名称 //string hideFristCompanyName = Utils.GetFormValue("hideFristCompanyName_" + id); //收入金额 string hideFristIncome = Utils.GetFormValue("hideFristIncome_" + id); //增加费用 string incomeAdd = Utils.GetFormValue("txtIncomeAdd_" + id); //减少费用 string incomeReduc = Utils.GetFormValue("txtIncomeReduc_" + id); //备注 string incomeRemarks = Utils.GetFormValue("txtIncomeRemarks_" + id); model.OrderId = id; //model.CompanyName = hideFristCompanyName; model.SumPrice = Utils.GetDecimal(hideFristIncome); model.FinanceAddExpense = Utils.GetDecimal(incomeAdd); model.FinanceRedExpense = Utils.GetDecimal(incomeReduc); //计算小计 model.FinanceSum = model.SumPrice + model.FinanceAddExpense - model.FinanceRedExpense; model.FinanceRemark = incomeRemarks; list.Add(model); } isUpdate = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).UpdateFinanceExpense(list, tourId); } #endregion #region 其它收入 string[] hideSecond = Utils.GetFormValues("hideSecond"); if (hideSecond != null && hideSecond.Count() > 0) { IList <EyouSoft.Model.FinanceStructure.OtherIncomeInfo> list = new List <EyouSoft.Model.FinanceStructure.OtherIncomeInfo>(); for (int i = 0; i < hideSecond.Count(); i++) { EyouSoft.Model.FinanceStructure.OtherIncomeInfo model = new EyouSoft.Model.FinanceStructure.OtherIncomeInfo(); string id = hideSecond[i]; //收入金额 string hideOtherIncome = Utils.GetFormValue("hideOtherIncome_" + id); //增加费用 string otherAdd = Utils.GetFormValue("txtOtherAdd_" + id); //减少费用 string otherReduc = Utils.GetFormValue("txtOtherReduc_" + id); //备注 string otherRemarks = Utils.GetFormValue("txtOtherRemarks_" + id); model.IncomeId = id; model.Amount = Utils.GetDecimal(hideOtherIncome); model.AddAmount = Utils.GetDecimal(otherAdd); model.ReduceAmount = Utils.GetDecimal(otherReduc); model.TotalAmount = model.Amount + model.AddAmount - model.ReduceAmount; model.Remark = otherRemarks; model.TourId = tourId; list.Add(model); } int count = new EyouSoft.BLL.FinanceStructure.OtherCost(SiteUserInfo).UpdateOtherIncome(list); if (count <= 0) { isUpdate = false; } } #endregion #region 团队计划 && 散拼计划 支出 string[] hideThird = Utils.GetFormValues("hideThird"); if (hideThird != null && hideThird.Count() > 0) { IList <EyouSoft.Model.PlanStructure.PaymentList> list = new List <EyouSoft.Model.PlanStructure.PaymentList>(); for (int i = 0; i < hideThird.Count(); i++) { EyouSoft.Model.PlanStructure.PaymentList model = new EyouSoft.Model.PlanStructure.PaymentList(); string id = hideThird[i]; //金额 string hideExpendIncome = Utils.GetFormValue("hideExpendIncome_" + id); //增加费用 string expendAdd = Utils.GetFormValue("txtExpendAdd_" + id); //减少费用 string expendLess = Utils.GetFormValue("txtExpendLess_" + id); //备注 string expendRemarks = Utils.GetFormValue("txtExpendRemarks_" + id); //类型 string supplierType = Utils.GetFormValue("hideSupplierType_" + id); model.Id = id; model.PayAmount = Utils.GetDecimal(hideExpendIncome); model.AddAmount = Utils.GetDecimal(expendAdd); model.ReduceAmount = Utils.GetDecimal(expendLess); model.TotalAmount = model.PayAmount + model.AddAmount - model.ReduceAmount; model.FRemark = expendRemarks; model.SupplierType = (EyouSoft.Model.EnumType.CompanyStructure.SupplierType)Enum.Parse(typeof(EyouSoft.Model.EnumType.CompanyStructure.SupplierType), supplierType); list.Add(model); } bool result = new EyouSoft.BLL.PlanStruture.TravelAgency().UpdateSettle(list, tourId); if (!result) { isUpdate = false; } } #endregion #region 单项服务 string[] hideThird_S = Utils.GetFormValues("hideThird-S"); if (hideThird_S != null && hideThird_S.Count() > 0) { IList <EyouSoft.Model.TourStructure.PlanSingleInfo> list = new List <EyouSoft.Model.TourStructure.PlanSingleInfo>(); for (int i = 0; i < hideThird_S.Count(); i++) { EyouSoft.Model.TourStructure.PlanSingleInfo model = new EyouSoft.Model.TourStructure.PlanSingleInfo(); string id = hideThird_S[i]; //金额 string hideExpendIncome = Utils.GetFormValue("hideExpendIncome-S_" + id); //增加费用 string expendAdd = Utils.GetFormValue("txtExpendAdd-S_" + id); //减少费用 string expendLess = Utils.GetFormValue("txtExpendLess-S_" + id); //备注 string expendRemarks = Utils.GetFormValue("txtExpendRemarks-S_" + id); //类型 string serviceType = Utils.GetFormValue("hideSupplierType-S_" + id); model.PlanId = id; model.Amount = Utils.GetDecimal(hideExpendIncome); model.AddAmount = Utils.GetDecimal(expendAdd); model.ReduceAmount = Utils.GetDecimal(expendLess); model.TotalAmount = model.Amount + model.AddAmount - model.ReduceAmount; model.FRemark = expendRemarks; model.ServiceType = (EyouSoft.Model.EnumType.TourStructure.ServiceType)Enum.Parse(typeof(EyouSoft.Model.EnumType.TourStructure.ServiceType), serviceType); list.Add(model); } int result = new EyouSoft.BLL.PlanStruture.PlanSingle().SetSingleAccounting(tourId, list); if (result <= 0) { isUpdate = false; } } #endregion #region 其它支出 string[] hideForth = Utils.GetFormValues("hideForth"); if (hideForth != null && hideForth.Count() > 0) { IList <EyouSoft.Model.FinanceStructure.OtherOutInfo> list = new List <EyouSoft.Model.FinanceStructure.OtherOutInfo>(); for (int i = 0; i < hideForth.Count(); i++) { EyouSoft.Model.FinanceStructure.OtherOutInfo model = new EyouSoft.Model.FinanceStructure.OtherOutInfo(); string id = hideForth[i]; //支出金额 string hideOutIncome = Utils.GetFormValue("hideOutIncome_" + id); //增加费用 string outAdd = Utils.GetFormValue("txtOutAdd_" + id); //减少费用 string outLess = Utils.GetFormValue("txtOutLess_" + id); //备注 string outRemarks = Utils.GetFormValue("txtOutRemarks_" + id); model.OutId = id; model.Amount = Utils.GetDecimal(hideOutIncome); model.AddAmount = Utils.GetDecimal(outAdd); model.ReduceAmount = Utils.GetDecimal(outLess); model.TotalAmount = model.Amount + model.AddAmount - model.ReduceAmount; model.Remark = outRemarks; model.TourId = tourId; list.Add(model); } int count = new EyouSoft.BLL.FinanceStructure.OtherCost(SiteUserInfo).UpdateOtherOut(list); if (count <= 0) { isUpdate = false; } } #endregion #region 利润分配 string[] hideFifth = Utils.GetFormValues("hideFifth"); if (hideFifth != null && hideFifth.Count() > 0) { IList <EyouSoft.Model.FinanceStructure.TourProfitShareInfo> list = new List <EyouSoft.Model.FinanceStructure.TourProfitShareInfo>(); for (int i = 0; i < hideFifth.Count(); i++) { EyouSoft.Model.FinanceStructure.TourProfitShareInfo model = new EyouSoft.Model.FinanceStructure.TourProfitShareInfo(); string id = hideFifth[i]; //分配金额 string shareCost = Utils.GetFormValue("txtShareCost_" + id); //备注 string profitAll = Utils.GetFormValue("txtProfitRemarks_" + id); model.ShareId = id; model.ShareCost = Utils.GetDecimal(shareCost); model.CompanyId = SiteUserInfo.CompanyID; model.TourId = tourId; model.Remark = profitAll; model.CompanyId = SiteUserInfo.CompanyID; list.Add(model); } int count = new EyouSoft.BLL.FinanceStructure.TourProfitSharer(SiteUserInfo).UpdateTourShare(list); if (count <= 0) { isUpdate = false; } } if (isUpdate) { Utils.ShowAndRedirect("修改成功!", Request.Url.ToString()); } else { Utils.ShowAndRedirect("修改失败!", Request.Url.ToString()); } #endregion }