public ActionResult LogInPage() { bool b_rc = true; try { if (Session[LogController.s_sta_user_email] == null) { this.m_c_user = new Models.cUser(); } } catch (Exception) { b_rc = false; System.Diagnostics.Debugger.Break(); } finally { } return(View(this.m_c_user)); }
public ActionResult LogInPage(wa_panel_store.Models.cUser c_user) { bool b_rc = true; bool b_user_is_valid = false; try { if (ModelState.IsValid) { b_rc = b_rc && c_user.pb__is_user_valid(this.m_c_db, ref b_user_is_valid); if (b_user_is_valid) { Session.Timeout = 15; Session[LogController.s_sta_user_id] = c_user.p_i_user_id; Session[LogController.s_sta_user_email] = c_user.p_s_user_email.ToString(); Session[LogController.s_sta_user_name] = c_user.p_s_user_name.ToString(); Session[LogController.s_sta_user_surname] = c_user.p_s_user_surname.ToString(); Session[LogController.s_sta_user_company] = c_user.p_s_user_company.ToString(); Session[LogController.s_sta_user_alias] = c_user.p_s_user_alias.ToString(); return(RedirectToAction("Index", "Home")); } else { //ModelState.AddModelError("","Error on auth"); } this.m_c_user = c_user; } } catch (Exception) { b_rc = false; System.Diagnostics.Debugger.Break(); } finally { } return(View(this.m_c_user)); }