예제 #1
0
파일: dengji.aspx.cs 프로젝트: windygu/bbl
        /// <summary>
        /// 页面初始
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!CheckGrant(global::Common.Enum.TravelPermission.财务管理_团款支出_付款登记))
                {
                    Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.财务管理_团款支出_付款登记, false);
                }
                DdlPayTypeInit("");
                BindInfo();
            }
            #region ajax修改
            if (Utils.GetQueryStringValue("act") == "update")
            {
                Response.Clear();

                EyouSoft.BLL.FinanceStructure.OutRegister       regist = new EyouSoft.BLL.FinanceStructure.OutRegister(SiteUserInfo);
                EyouSoft.Model.FinanceStructure.OutRegisterInfo model  = regist.GetOutRegisterList(new EyouSoft.Model.FinanceStructure.QueryOutRegisterInfo()
                {
                    ReceiveId = Utils.GetQueryStringValue("id")
                }).SingleOrDefault(x => x.RegisterId == Utils.GetFormValue("registid"));
                model.BillNo             = Utils.GetFormValue("billno");
                model.IsBill             = Utils.GetFormValue("isbill") == "1" ? true : false;
                model.PaymentAmount      = Utils.GetDecimal(Utils.GetFormValue("payMoney"));
                model.PaymentDate        = Utils.GetDateTime(Utils.GetFormValue("payDate"));
                model.PaymentType        = (EyouSoft.Model.EnumType.TourStructure.RefundType)(Utils.GetInt(Utils.GetFormValue("payType")));
                model.Remark             = Utils.GetFormValue("desc");
                model.StaffName          = Utils.GetFormValue("staffname");
                model.ReceiveCompanyId   = Utils.GetInt(Utils.GetFormValue("comId"));
                model.ReceiveCompanyName = Utils.GetFormValue("comName");
                if (!string.IsNullOrEmpty(Utils.GetFormValue("IsJidiao")))
                {
                    model.ReceiveType = Utils.GetEnumValue <EyouSoft.Model.EnumType.FinanceStructure.OutPlanType>(Utils.GetFormValue("jidiaoleibie"), (EyouSoft.Model.EnumType.FinanceStructure.OutPlanType)Utils.GetInt(Utils.GetFormValue("jidiaoleibie")));
                }
                else
                {
                    model.ReceiveType = Utils.GetEnumValue <EyouSoft.Model.EnumType.FinanceStructure.OutPlanType>(Utils.GetFormValue("jidiaoleibie"), EyouSoft.Model.EnumType.FinanceStructure.OutPlanType.单项服务供应商安排);
                }

                int j = regist.UpdateOutRegister(model);
                if (j > 0)
                {
                    Response.Write("修改成功!");
                }
                else if (j == -1)
                {
                    Response.Write("计调项目支出所有登记金额不能大于计调项目支出金额!");
                }
                else
                {
                    Response.Write("修改失败!");
                }

                Response.End();
            }
            #endregion
        }
예제 #2
0
파일: Payment.aspx.cs 프로젝트: windygu/bbl
        protected void Page_Load(object sender, EventArgs e)
        {
            #region 权限判断
            string type = Utils.GetQueryStringValue("tourType");
            if (type != "")
            {
                this.hideTourType.Value = type;
                //团队计划
                if (type == "team")
                {
                    //团队计划:团队结算权限判断
                    if (CheckGrant(TravelPermission.团队计划_团队计划_栏目))
                    {
                        if (!CheckGrant(TravelPermission.团队计划_团队计划_团队结算))
                        {
                            Utils.ResponseNoPermit(TravelPermission.团队计划_团队计划_团队结算, false);
                            return;
                        }
                    }
                    else
                    {
                        Utils.ResponseNoPermit(TravelPermission.团队计划_团队计划_栏目, false);
                    }
                }
                //财务管理
                if (type == "account")
                {
                    //财务管理:权限判断
                    if (!CheckGrant(TravelPermission.财务管理_团队核算_栏目))
                    {
                        Utils.ResponseNoPermit(TravelPermission.财务管理_团队核算_栏目, false);
                        return;
                    }
                }
                //散拼计划
                if (type == "san")
                {
                    //团队计划:团队结算权限判断
                    if (CheckGrant(TravelPermission.散拼计划_散拼计划_栏目))
                    {
                        if (!CheckGrant(TravelPermission.散拼计划_散拼计划_团队结算))
                        {
                            Utils.ResponseNoPermit(TravelPermission.散拼计划_散拼计划_团队结算, false);
                        }
                    }
                    else
                    {
                        Utils.ResponseNoPermit(TravelPermission.散拼计划_散拼计划_栏目, false);
                    }
                }
            }
            #endregion


            if (!IsPostBack)
            {
                if (!CheckGrant(global::Common.Enum.TravelPermission.财务管理_团款支出_付款登记))
                {
                    Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.财务管理_团款支出_付款登记, false);
                }
                DdlPayTypeInit("");
                BindInfo();
            }

            if (Utils.GetQueryStringValue("act") == "update")
            {
                Response.Clear();

                EyouSoft.BLL.FinanceStructure.OutRegister       regist = new EyouSoft.BLL.FinanceStructure.OutRegister(SiteUserInfo);
                EyouSoft.Model.FinanceStructure.OutRegisterInfo model  = regist.GetOutRegisterList(new EyouSoft.Model.FinanceStructure.QueryOutRegisterInfo()
                {
                    ReceiveId = Utils.GetQueryStringValue("id")
                }).SingleOrDefault(x => x.RegisterId == Utils.GetFormValue("registid"));
                model.BillNo        = Utils.GetFormValue("billno");
                model.IsBill        = Utils.GetFormValue("isbill") == "1" ? true : false;
                model.PaymentAmount = Utils.GetDecimal(Utils.GetFormValue("payMoney"));
                model.PaymentDate   = Utils.GetDateTime(Utils.GetFormValue("payDate"));
                model.PaymentType   = (EyouSoft.Model.EnumType.TourStructure.RefundType)(Utils.GetInt(Utils.GetFormValue("payType")));
                model.Remark        = Utils.GetFormValue("desc");
                model.StaffName     = Utils.GetFormValue("staffname");
                int j = regist.UpdateOutRegister(model);
                if (j > 0)
                {
                    Response.Write("修改成功!");
                }
                else if (j == -1)
                {
                    Response.Write("计调项目支出所有登记金额不能大于计调项目支出金额!");
                }
                else
                {
                    Response.Write("修改失败!");
                }

                Response.End();
            }
        }