Example #1
0
        public int AddLocalSocialSecurity(InsuranceAdd2ViewModel model)
        {
            SocialSecurity       socialSecurity = new SocialSecurity();
            SocialSecurityPeople people         = (SocialSecurityPeople)Session["SocialSecurityPeople"];

            socialSecurity.SocialSecurityPeopleID = people.SocialSecurityPeopleID;
            //socialSecurity.SocialSecurityPeopleID = 49;

            //socialSecurity.InsuranceArea = string.Format("{0}|{1}",Request["provinceText"], Request["city"]);
            socialSecurity.InsuranceArea     = "山东省|青岛市|崂山区";
            socialSecurity.HouseholdProperty = people.HouseholdProperty;
            //socialSecurity.HouseholdProperty = "本市城镇";

            socialSecurity.SocialSecurityBase  = model.SocialSecurityBase;
            socialSecurity.PayProportion       = 0;
            socialSecurity.PayTime             = model.PayTime;
            socialSecurity.PayMonthCount       = model.PayMonthCount;
            socialSecurity.PayBeforeMonthCount = model.PayBeforeMonthCount;
            socialSecurity.BankPayMonth        = model.BankPayMonth;
            socialSecurity.EnterprisePayMonth  = model.EnterprisePayMonth;
            socialSecurity.Note = model.Note;
            socialSecurity.RelationEnterprise = 0;
            //保存数据到数据库
            int id = socialSv.AddSocialSecurity(socialSecurity);

            return(id);
        }
Example #2
0
        /// <summary>
        /// 添加社保下一步
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public ActionResult Add2Next(InsuranceAdd2ViewModel model)
        {
            if (ModelState.IsValid)
            {
                int id = AddLocalSocialSecurity(model);

                if (id > 0)
                {
                    //保存数据到数据库
                    return(RedirectToAction("Add3"));
                }
                else
                {
                    return(RedirectToAction("Add2"));
                }
            }
            else
            {
                return(RedirectToAction("Add2"));
            }
        }
Example #3
0
        public ActionResult Add2(InsuranceAdd2ViewModel model)
        {
            if (ModelState.IsValid)
            {
                //保存数据到数据库
                int id = AddLocalSocialSecurity(model);

                if (id > 0)
                {
                    SocialSecurityPeople people = (SocialSecurityPeople)Session["SocialSecurityPeople"];
                    //跳转到确认页面
                    return(Redirect("/UserOrder/Create/" + people.SocialSecurityPeopleID));
                }
                else
                {
                    return(RedirectToAction("Add2"));
                }
            }
            else
            {
                return(RedirectToAction("Add2"));
            }
        }