コード例 #1
0
        public ActionResult Login(string returnUrl, string jobNumber, string password)
        {
            ViewBag.ReturnUrl = returnUrl;

            UserLoginModel model = new UserLoginModel
            {
                Password = password,
                LoginType = LoginType.Veteran,
                JobNumber = jobNumber
            };

            var result = securityBusinesscs.UserVerify(model);

            Session["UserInfo"] = new FakeUserInfo(result.UserId);

            if (returnUrl != null && returnUrl.Contains("Register"))
            {
                return RedirectToAction("Register", "Home");
            }
            if (!string.IsNullOrWhiteSpace(jobNumber) && !string.IsNullOrWhiteSpace(password))
            {
                return RedirectToAction("Index", "Community", null);
            }
            return View();
        }
コード例 #2
0
ファイル: HomeController.cs プロジェクト: chinaboard/CoralSea
        public ActionResult Register(string identify, string jobNumber)
        {
            UserLoginModel model = new UserLoginModel
            {
                IdNumber = identify,
                LoginType = LoginType.Novice,
                JobNumber = jobNumber
            };

            var result = securityBusinesscs.UserVerify(model);

            Session["UserInfo"] = new FakeUserInfo(result.UserId);

            return RedirectToAction("IndexPic", "Home", null);
        }