예제 #1
0
        public ActionResult Agreement(string agree, int BusinessType)
        {
            if (agree.Equals("on"))
            {
                var seller = ShopApplication.AddSellerManager(CurrentUser.UserName, CurrentUser.Password, CurrentUser.PasswordSalt);

                base.SetSellerAdminLoginCookie(seller.Id, DateTime.Now.AddDays(7));

                var model = ShopApplication.GetShop(CurrentSellerManager.ShopId);
                if (model.Stage == Entities.ShopInfo.ShopStage.Agreement)
                {
                    model.BusinessType = (ShopBusinessType)BusinessType;
                    model.Stage        = Entities.ShopInfo.ShopStage.CompanyInfo;
                    ShopApplication.UpdateShop(model);
                }
                else
                {
                    ShopApplication.SetBusinessType(model.Id, (ShopBusinessType)BusinessType);
                }
                return(RedirectToAction("EditProfile1"));
            }
            else
            {
                return(RedirectToAction("EditProfile0"));
            }
        }
예제 #2
0
        public ActionResult Agreement(string agree, int businessType)
        {
            if (agree.Equals("on"))
            {
                var seller = ShopApplication.AddSellerManager(CurrentUser.UserName, CurrentUser.Password, CurrentUser.PasswordSalt);
                base.SetSellerAdminLoginCookie(seller.Id, DateTime.Now.AddDays(7));
                var model = ShopApplication.GetShop(CurrentSellerManager.ShopId);

                if ((model.Stage != Entities.ShopInfo.ShopStage.Finish || model.ShopStatus == Entities.ShopInfo.ShopAuditStatus.WaitConfirm))
                {
                    if (model.Stage == 0 || model.Stage == Entities.ShopInfo.ShopStage.CompanyInfo)
                    {
                        model.BusinessType = businessType == 0 ? ShopBusinessType.Enterprise : ShopBusinessType.Personal;
                        model.Stage        = Entities.ShopInfo.ShopStage.CompanyInfo;
                        ShopApplication.UpdateShop(model);
                    }
                    return(RedirectToAction("step3"));
                }
                else
                {
                    throw new HimallException("注册流程异常,请联系管理员");
                }
            }
            else
            {
                return(RedirectToAction("step2"));
            }
        }
예제 #3
0
 public ActionResult Agreement(string agree, int businessType)
 {
     if (agree.Equals("on"))
     {
         var seller = ShopApplication.AddSellerManager(CurrentUser.UserName, CurrentUser.Password, CurrentUser.PasswordSalt);
         base.SetSellerAdminLoginCookie(seller.Id, DateTime.Now.AddDays(7));
         var model = ShopApplication.GetShop(CurrentSellerManager.ShopId);
         model.BusinessType = (Himall.CommonModel.ShopBusinessType)businessType;
         model.Stage        = Himall.Model.ShopInfo.ShopStage.CompanyInfo;
         ShopApplication.UpdateShop(model);
         return(RedirectToAction("step3"));
     }
     else
     {
         return(RedirectToAction("step2"));
     }
 }