public void loginButton() { if (validUserandPassword()) { int id = int.Parse(txtEmployeeID.Text); string pass = txtPassword.Text; tblPassword = adpPassword.GetDataBy(id, pass); var row = tblPassword; if (row.Count > 0) { if (row != null) { if (row[0].PasswordExpire.ToString() == "Y") { threatNewPassword(row[0].Password.ToString()); } else { createSession(); } } } else { lblMessageError.Text = " User or Password Invalid"; lblMessageError.ForeColor = System.Drawing.Color.Red; } } }
public IActionResult Index(string Id, string password) { var model = new TablePassword(); model.TableNum = Id; model.Password = password; return(RedirectToAction("ResturantSerVice", model)); }
public async Task <IActionResult> ResturantSerVice(TablePassword tablePassword) { var _tableNumbers = _context.RestoranSecurityDatas; foreach (var item in _tableNumbers) { if (tablePassword.Password == item.Password) { var CurrentTable = await _context.Tables.FirstOrDefaultAsync(i => i.TableNumber == tablePassword.TableNum); if (CurrentTable != null) { return(View(CurrentTable)); } } } return(RedirectToAction("About")); }
public IActionResult Index() { var model = new TablePassword(); return(View(model)); }