public static int CenterLoginAdd(CenterLogin clObject) { Database dbDCenter = DatabaseFactory.CreateDatabase(sConn); DbCommand dcCenterLogin = dbDCenter.GetStoredProcCommand("SP_CenterLogin_Add"); dbDCenter.AddInParameter(dcCenterLogin, "@userid", DbType.Int32, clObject.UserID); dbDCenter.AddInParameter(dcCenterLogin, "@loginip", DbType.String, clObject.LoginIp); dbDCenter.AddInParameter(dcCenterLogin, "@account", DbType.String, clObject.Account); dbDCenter.AddInParameter(dcCenterLogin, "@fromurl", DbType.String, clObject.FromUrl); return(dbDCenter.ExecuteNonQuery(dcCenterLogin)); }
public ActionResult CenterLoginAuthentication(CenterLogin model) { var centerLogins = _centerLoginManager.GetAll().ToList(); CenterLogin centerLogin = (CenterLogin)centerLogins.FirstOrDefault(m => m.Code == model.Code && m.Password == model.Password); if (centerLogin != null) { return(RedirectToAction("CenterLoginClickView", "Center", new { centerId = centerLogin.Id })); } ViewBag.message = "Sorry Login Failed!!! Please input correct Login Code and Password"; return(View()); }
public static int CenterLoginAdd(int iUserID, string sLoginIP, string sAccount, string sFromUrl) { //if(iUserID > 999) //{ // CenterLoginTodayBLL.CenterLoginAdd(iUserID, sLoginIP); //} CenterLogin clObject = new CenterLogin(); clObject.UserID = iUserID; clObject.LoginIp = sLoginIP; clObject.Account = sAccount; clObject.FromUrl = sFromUrl; return(CenterLoginDAL.CenterLoginAdd(clObject)); }
public ActionResult CreateCenterLogin(CenterLogin model) { _centerLoginManager.Add(model); ViewBag.message = "Center Login Created"; return(View()); }
public ActionResult CenterLoginClickView(int centerId) { CenterLogin login = _centerLoginManager.GetAll().ToList().Find(m => m.CenterId == centerId); return(View(login)); }
public static int CenterLoginAdd(CenterLogin clObject) { return(CenterLoginDAL.CenterLoginAdd(clObject)); }