public ActionResult Login(UserInfo pInfo) { Session[Define.Session.ID] = pInfo.UserId; UserInfo userinfo = userInfoDao.SelectUserInfo(pInfo.UserId, pInfo.Password); if (userinfo == null) { LanguageType?lType = (LanguageType?)Session[Define.Session.LANGUAGE_TYPE]; if (Object.Equals(lType, LanguageType.Korea)) { Session[Define.Session.ERROR_MESSAGE] = "아이디 또는 패스워드를 확인해 주십시오."; } else { Session[Define.Session.ERROR_MESSAGE] = "ユーザIDまたはパスワードを確認してください。"; } return(Redirect(FormsAuthentication.LoginUrl)); } FormsAuthentication.SetAuthCookie(userinfo.UserId, false); Session[Define.Session.USER_INFO] = userinfo; CompanyInfo compnayInfo = companyInfoDao.SelectCompanyInfo(userinfo.CompanyCode); compnayInfo.NumberSplit(); Session[Define.Session.COMPANY_INFO] = compnayInfo; Connect conn = new Connect(); conn.UserId = userinfo.UserId; conn.ConnectDate = DateTime.Now; conn.IpAddress = Request.UserHostAddress; connectDao.InsertConnect(conn); LogWriter.Instance().LogWrite(pInfo.UserId, "Login Start"); return(Redirect(MAIN)); }