public ActionResult Login() { userService = ServiceBuilder.BuildUserService(); UserStatus us = null; ResponseStatus rspStatus = userService.Login(Request, conTa_status, ref us); if (rspStatus == ResponseStatus.SUCCESS) { CookieFactory cf = CookieFactory.Instance(); cf.CreateCookie(GLB.userId, us.UserID, DateTime.Now.AddYears(1), Response); cf.CreateCookie(GLB.userName, us.UserName, DateTime.Now.AddYears(1), Response); cf.CreateCookie(GLB.id, us.ID.ToString(), DateTime.Now.AddYears(1), Response); cf.CreateCookie(GLB.depId, us.Dep.ID.ToString(), DateTime.Now.AddYears(1), Response); GLB.Instance().GetActivitiesIdCookies(Response, DateTime.Now.AddYears(1)); return(RedirectToAction("PersonalHome")); } else if (rspStatus == ResponseStatus.NOT_PASS) { return(RedirectToAction("Message", "Other", new { msg = Msg.NotPass })); } else if (rspStatus == ResponseStatus.NOT_REGISTER) { return(RedirectToAction("Message", "Other", new { msg = Msg.NotReg })); } else if (rspStatus == ResponseStatus.REQFORM_COUNT_ISZERO) { return(View()); } return(View()); }
public static CookieFactory Instance() { if (c_factory == null) { c_factory = new CookieFactory(); } return c_factory; }
public static CookieFactory Instance() { if (c_factory == null) { c_factory = new CookieFactory(); } return(c_factory); }