コード例 #1
0
        /// <summary>
        /// 获取公积金详情
        /// </summary>
        /// <param name="SocialSecurityPeopleID"></param>
        /// <returns></returns>

        public AccumulationFund GetAccumulationFundDetail(int SocialSecurityPeopleID)
        {
            string           sql   = $"select AccumulationFund.*,SocialSecurityPeople.SocialSecurityPeopleName from AccumulationFund left join SocialSecurityPeople on SocialSecurityPeople.SocialSecurityPeopleID = AccumulationFund.SocialSecurityPeopleID   where AccumulationFund.SocialSecurityPeopleID ={SocialSecurityPeopleID}";
            AccumulationFund model = DbHelper.QuerySingle <AccumulationFund>(sql);

            return(model);
        }
コード例 #2
0
        public ActionResult ChangeFund(AccumulationFund af)
        {
            SocialSecurityViewModel      socialSecurity = localSocialSv.GetAccumulationFundDetail(af.SocialSecurityPeopleID);
            Dictionary <string, decimal> dict           = socialSecurity.SocialAccumulationDict;
            decimal minBase = dict["AFMinBase"];
            decimal maxBase = dict["AFMaxBase"];

            if (af.AccumulationFundBase < minBase || af.AccumulationFundBase > maxBase)
            {
                assignMessage("基数范围错误", false);
                return(RedirectToAction("ChangeFund"));
            }


            AdjustingBaseParameter adjustParam = new AdjustingBaseParameter();

            adjustParam.AccumulationFundBaseAdjusted = af.AccumulationFundBase;
            adjustParam.SocialSecurityPeopleID       = af.SocialSecurityPeopleID;
            adjustParam.IsPayAccumulationFund        = true;

            if (socialSv.AddAdjustingBase(adjustParam))
            {
                assignMessage("变更成功", true);
                return(RedirectToAction("RecFund"));
            }

            assignMessage("变更失败", false);

            return(RedirectToAction("ChangeFund"));
        }
コード例 #3
0
        public override bool Equals(object obj)
        {
            EmployeeWelfare employeeWelfare = obj as EmployeeWelfare;

            if (employeeWelfare == null)
            {
                if (SocialSecurity.EqualsNull() && AccumulationFund.EqualsNull())
                {
                    return(true);
                }
            }
            else
            {
                if (SocialSecurity.Equals(employeeWelfare.SocialSecurity) &&
                    AccumulationFund.Equals(employeeWelfare.AccumulationFund))
                {
                    return(true);
                }
            }
            return(false);
        }
コード例 #4
0
        public ActionResult Confirm(InsuranceAdd3ViewModel model)
        {
            if (ModelState.IsValid)
            {
                SocialSecurityPeople people = (SocialSecurityPeople)Session["SocialSecurityPeople"];

                AccumulationFund accumulationFund = new AccumulationFund();

                accumulationFund.SocialSecurityPeopleID = people.SocialSecurityPeopleID;
                //accumulationFund.SocialSecurityPeopleID = 49;
                //accumulationFund.AccumulationFundArea = string.Format("{0}|{1}", Request["provinceText"], Request["city"]);
                accumulationFund.AccumulationFundArea = "山东省|青岛市|崂山区";
                accumulationFund.AccumulationFundBase = model.AccumulationFundBase;
                accumulationFund.PayProportion        = 0;
                accumulationFund.PayTime             = model.PayTime;
                accumulationFund.PayMonthCount       = model.PayMonthCount;
                accumulationFund.PayBeforeMonthCount = model.PayBeforeMonthCount;
                accumulationFund.Note = model.Note;
                accumulationFund.RelationEnterprise = 0;

                int id = socialSv.AddAccumulationFund(accumulationFund);

                if (id > 0)
                {
                    //跳转到确认页面
                    return(Redirect("/UserOrder/Create/" + people.SocialSecurityPeopleID));
                }
                else
                {
                    return(RedirectToAction("Add3"));
                }
            }
            else
            {
                return(RedirectToAction("Add3"));
            }
        }
コード例 #5
0
        /// <summary>
        /// 查询公积金详情
        /// </summary>
        /// <param name="SocialSecurityPeopleID"></param>
        /// <returns></returns>
        public ActionResult AccumulationFundDetail(int SocialSecurityPeopleID)
        {
            AccumulationFund model = _accumulationFundService.GetAccumulationFundDetail(SocialSecurityPeopleID);

            return(View(model));
        }