Beispiel #1
0
 /// <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;
         }
     }
 }
Beispiel #2
0
        /// <summary>
        /// 修改杂费收入信息(修改所有值)
        /// </summary>
        /// <param name="list">杂费收入信息集合</param>
        /// <returns>返回1表示成功,其他失败</returns>
        public int UpdateOtherIncome(EyouSoft.Model.FinanceStructure.OtherIncomeInfo model)
        {
            if (model == null)
            {
                return(0);
            }

            int Result = 0;

            Result = idal.UpdateOtherIncome(model);
            if (Result == 1)
            {
                IList <Model.StatisticStructure.IncomeItemIdAndType> list = new List <Model.StatisticStructure.IncomeItemIdAndType>();
                list.Add(new EyouSoft.Model.StatisticStructure.IncomeItemIdAndType()
                {
                    ItemId = model.IncomeId, ItemType = EyouSoft.Model.EnumType.TourStructure.ItemType.团款其他收入
                });
                UtilityBll.CalculationTourIncome(model.TourId, list);

                HandleLogsBll.Add(
                    new EyouSoft.Model.CompanyStructure.SysHandleLogs()
                {
                    ModuleId     = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.财务管理_杂费收入,
                    EventCode    = Model.CompanyStructure.SysHandleLogsNO.EventCode,
                    EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + Model.EnumType.CompanyStructure.SysPermissionClass.财务管理_杂费收入.ToString() + "修改了杂费收入数据!编号为:" + model.IncomeId,
                    EventTitle   = "修改" + Model.EnumType.CompanyStructure.SysPermissionClass.财务管理_杂费收入.ToString() + "数据"
                });
            }

            return(Result);
        }
Beispiel #3
0
        /// <summary>
        /// 添加杂费收入信息
        /// </summary>
        /// <param name="model">杂费收入信息实体</param>
        /// <param name="modelRefund">如果要同时写一条收款明细,请构造此实体;不需赋值null</param>
        /// <returns>返回1表示成功,其他失败</returns>
        public int AddOtherIncome(EyouSoft.Model.FinanceStructure.OtherIncomeInfo model)
        {
            if (model == null)
            {
                return(0);
            }

            IList <EyouSoft.Model.FinanceStructure.OtherIncomeInfo> list = new List <EyouSoft.Model.FinanceStructure.OtherIncomeInfo>();

            list.Add(model);

            return(AddOtherIncome(list));
        }
Beispiel #4
0
 /// <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
 }
Beispiel #5
0
        /// <summary>
        /// 获取杂费收入信息
        /// </summary>
        /// <param name="model">杂费信息查询实体</param>
        /// <param name="HaveUserIds">用户Id集合,半角逗号分割</param>
        /// <param name="PageSize">每页条数</param>
        /// <param name="PageIndex">当前页数</param>
        /// <param name="RecordCount">总记录数</param>
        /// <returns>杂费收入信息集合</returns>
        public IList <EyouSoft.Model.FinanceStructure.OtherIncomeInfo> GetOtherIncomeList(EyouSoft.Model.FinanceStructure.OtherCostQuery model, string HaveUserIds, int PageSize, int PageIndex, ref int RecordCount)
        {
            IList <EyouSoft.Model.FinanceStructure.OtherIncomeInfo> list = new List <EyouSoft.Model.FinanceStructure.OtherIncomeInfo>();
            string strFiles = " [Id],[CompanyId],[TourId],[CostType],[CustromCName],[CustromCId],[ProceedItem],[Proceed],[IncreaseCost],[ReduceCost],[SumCost],[Remark],[OperatorId],[CreateTime],[PayTime],[Payee],[PayType],[Status] ";
            string strOrder = string.Empty;
            string strWhere = this.GetSqlWhereByQueryModel(model, HaveUserIds
                                                           , EyouSoft.Model.EnumType.FinanceStructure.CostType.收入, ref strOrder);

            using (IDataReader dr = DbHelper.ExecuteReader(_db, PageSize, PageIndex, ref RecordCount, "tbl_TourOtherCost"
                                                           , "Id", strFiles, strWhere, strOrder))
            {
                EyouSoft.Model.FinanceStructure.OtherIncomeInfo tmpModel = null;
                while (dr.Read())
                {
                    tmpModel          = new EyouSoft.Model.FinanceStructure.OtherIncomeInfo();
                    tmpModel.IncomeId = dr["Id"].ToString();
                    if (!dr.IsDBNull(dr.GetOrdinal("CompanyId")))
                    {
                        tmpModel.CompanyId = dr.GetInt32(dr.GetOrdinal("CompanyId"));
                    }
                    tmpModel.TourId       = dr["TourId"].ToString();
                    tmpModel.CustromCName = dr["CustromCName"].ToString();
                    if (!dr.IsDBNull(dr.GetOrdinal("CustromCId")))
                    {
                        tmpModel.CustromCId = dr.GetInt32(dr.GetOrdinal("CustromCId"));
                    }
                    tmpModel.Item = dr["ProceedItem"].ToString();
                    if (!dr.IsDBNull(dr.GetOrdinal("Proceed")))
                    {
                        tmpModel.Amount = dr.GetDecimal(dr.GetOrdinal("Proceed"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("IncreaseCost")))
                    {
                        tmpModel.AddAmount = dr.GetDecimal(dr.GetOrdinal("IncreaseCost"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("ReduceCost")))
                    {
                        tmpModel.ReduceAmount = dr.GetDecimal(dr.GetOrdinal("ReduceCost"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("SumCost")))
                    {
                        tmpModel.TotalAmount = dr.GetDecimal(dr.GetOrdinal("SumCost"));
                    }
                    tmpModel.Remark = dr["Remark"].ToString();
                    if (!dr.IsDBNull(dr.GetOrdinal("OperatorId")))
                    {
                        tmpModel.OperatorId = dr.GetInt32(dr.GetOrdinal("OperatorId"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("CreateTime")))
                    {
                        tmpModel.CreateTime = dr.GetDateTime(dr.GetOrdinal("CreateTime"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("PayTime")))
                    {
                        tmpModel.PayTime = dr.GetDateTime(dr.GetOrdinal("PayTime"));
                    }
                    tmpModel.Payee = dr["Payee"].ToString();
                    if (!dr.IsDBNull(dr.GetOrdinal("PayType")))
                    {
                        tmpModel.PayType = (EyouSoft.Model.EnumType.TourStructure.RefundType)dr.GetByte(dr.GetOrdinal("PayType"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("Status")))
                    {
                        if (dr.GetString(dr.GetOrdinal("Status")) == "1" || dr.GetString(dr.GetOrdinal("Status")).ToLower() == "true")
                        {
                            tmpModel.Status = true;
                        }
                        else
                        {
                            tmpModel.Status = false;
                        }
                    }

                    list.Add(tmpModel);
                }
            }

            return(list);
        }
Beispiel #6
0
        /// <summary>
        /// 获取杂费收入信息
        /// </summary>
        /// <param name="model">杂费信息查询实体</param>
        /// <returns>杂费收入信息集合</returns>
        public IList <EyouSoft.Model.FinanceStructure.OtherIncomeInfo> GetOtherIncomeList(EyouSoft.Model.FinanceStructure.OtherCostQuery model)
        {
            IList <EyouSoft.Model.FinanceStructure.OtherIncomeInfo> list = new List <EyouSoft.Model.FinanceStructure.OtherIncomeInfo>();
            StringBuilder strSql   = new StringBuilder(Sql_OtherCost_Select);
            string        strOrder = string.Empty;

            strSql.AppendFormat(" where {0} {1} ", GetSqlWhereByQueryModel(model, string.Empty, EyouSoft.Model.EnumType.FinanceStructure.CostType.收入, ref strOrder), string.IsNullOrEmpty(strOrder) ? string.Empty : " order by " + strOrder);

            DbCommand dc = _db.GetSqlStringCommand(strSql.ToString());

            using (IDataReader dr = DbHelper.ExecuteReader(dc, _db))
            {
                EyouSoft.Model.FinanceStructure.OtherIncomeInfo rModel = null;
                while (dr.Read())
                {
                    rModel          = new EyouSoft.Model.FinanceStructure.OtherIncomeInfo();
                    rModel.IncomeId = dr["Id"].ToString();
                    if (!dr.IsDBNull(dr.GetOrdinal("CompanyId")))
                    {
                        rModel.CompanyId = dr.GetInt32(dr.GetOrdinal("CompanyId"));
                    }
                    rModel.TourId       = dr["TourId"].ToString();
                    rModel.CustromCName = dr["CustromCName"].ToString();
                    if (!dr.IsDBNull(dr.GetOrdinal("CustromCId")))
                    {
                        rModel.CustromCId = dr.GetInt32(dr.GetOrdinal("CustromCId"));
                    }
                    rModel.Item = dr["ProceedItem"].ToString();
                    if (!dr.IsDBNull(dr.GetOrdinal("Proceed")))
                    {
                        rModel.Amount = dr.GetDecimal(dr.GetOrdinal("Proceed"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("IncreaseCost")))
                    {
                        rModel.AddAmount = dr.GetDecimal(dr.GetOrdinal("IncreaseCost"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("ReduceCost")))
                    {
                        rModel.ReduceAmount = dr.GetDecimal(dr.GetOrdinal("ReduceCost"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("SumCost")))
                    {
                        rModel.TotalAmount = dr.GetDecimal(dr.GetOrdinal("SumCost"));
                    }
                    rModel.Remark = dr["Remark"].ToString();
                    if (!dr.IsDBNull(dr.GetOrdinal("OperatorId")))
                    {
                        rModel.OperatorId = dr.GetInt32(dr.GetOrdinal("OperatorId"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("CreateTime")))
                    {
                        rModel.CreateTime = dr.GetDateTime(dr.GetOrdinal("CreateTime"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("PayTime")))
                    {
                        rModel.PayTime = dr.GetDateTime(dr.GetOrdinal("PayTime"));
                    }
                    rModel.Payee = dr["Payee"].ToString();
                    if (!dr.IsDBNull(dr.GetOrdinal("PayType")))
                    {
                        rModel.PayType = (EyouSoft.Model.EnumType.TourStructure.RefundType)dr.GetByte(dr.GetOrdinal("PayType"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("Status")))
                    {
                        if (dr.GetString(dr.GetOrdinal("Status")) == "1" || dr.GetString(dr.GetOrdinal("Status")).ToLower() == "true")
                        {
                            rModel.Status = true;
                        }
                        else
                        {
                            rModel.Status = false;
                        }
                    }

                    list.Add(rModel);
                }
            }
            return(list);
        }
Beispiel #7
0
        /// <summary>
        /// 获取杂费收入信息
        /// </summary>
        /// <param name="OtherIncomeId">杂费收入信息Id</param>
        /// <returns>杂费收入信息</returns>
        public EyouSoft.Model.FinanceStructure.OtherIncomeInfo GetOtherIncomeInfo(string OtherIncomeId)
        {
            if (string.IsNullOrEmpty(OtherIncomeId))
            {
                return(null);
            }

            DbCommand dc = _db.GetSqlStringCommand(Sql_OtherCost_Select + " where Id = @Id ");

            _db.AddInParameter(dc, "Id", DbType.AnsiStringFixedLength, OtherIncomeId);

            EyouSoft.Model.FinanceStructure.OtherIncomeInfo rModel = new EyouSoft.Model.FinanceStructure.OtherIncomeInfo();
            using (IDataReader dr = DbHelper.ExecuteReader(dc, _db))
            {
                if (dr.Read())
                {
                    rModel.IncomeId = dr["Id"].ToString();
                    if (!dr.IsDBNull(dr.GetOrdinal("CompanyId")))
                    {
                        rModel.CompanyId = dr.GetInt32(dr.GetOrdinal("CompanyId"));
                    }
                    rModel.TourId       = dr["TourId"].ToString();
                    rModel.CustromCName = dr["CustromCName"].ToString();
                    if (!dr.IsDBNull(dr.GetOrdinal("CustromCId")))
                    {
                        rModel.CustromCId = dr.GetInt32(dr.GetOrdinal("CustromCId"));
                    }
                    rModel.Item = dr["ProceedItem"].ToString();
                    if (!dr.IsDBNull(dr.GetOrdinal("Proceed")))
                    {
                        rModel.Amount = dr.GetDecimal(dr.GetOrdinal("Proceed"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("IncreaseCost")))
                    {
                        rModel.AddAmount = dr.GetDecimal(dr.GetOrdinal("IncreaseCost"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("ReduceCost")))
                    {
                        rModel.ReduceAmount = dr.GetDecimal(dr.GetOrdinal("ReduceCost"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("SumCost")))
                    {
                        rModel.TotalAmount = dr.GetDecimal(dr.GetOrdinal("SumCost"));
                    }
                    rModel.Remark = dr["Remark"].ToString();
                    if (!dr.IsDBNull(dr.GetOrdinal("OperatorId")))
                    {
                        rModel.OperatorId = dr.GetInt32(dr.GetOrdinal("OperatorId"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("CreateTime")))
                    {
                        rModel.CreateTime = dr.GetDateTime(dr.GetOrdinal("CreateTime"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("PayTime")))
                    {
                        rModel.PayTime = dr.GetDateTime(dr.GetOrdinal("PayTime"));
                    }
                    rModel.Payee = dr["Payee"].ToString();
                    if (!dr.IsDBNull(dr.GetOrdinal("PayType")))
                    {
                        rModel.PayType = (EyouSoft.Model.EnumType.TourStructure.RefundType)dr.GetByte(dr.GetOrdinal("PayType"));
                    }
                    if (!dr.IsDBNull(dr.GetOrdinal("Status")))
                    {
                        if (dr.GetString(dr.GetOrdinal("Status")) == "1" || dr.GetString(dr.GetOrdinal("Status")).ToLower() == "true")
                        {
                            rModel.Status = true;
                        }
                        else
                        {
                            rModel.Status = false;
                        }
                    }
                }
            }

            return(rModel);
        }
Beispiel #8
0
        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
        }