public IActionResult opsCreate(OpsManager ops) { if (ModelState.IsValid) { objOps.AddOps(ops); return(RedirectToAction("AllOps", "OpsManager")); } return(View(ops)); }
public IActionResult opsEdit(int OpsManagerID, [Bind] OpsManager ops) { if (OpsManagerID != ops.OpsManagerID) { return(NotFound()); } if (ModelState.IsValid) { objOps.UpdateOps(ops); return(RedirectToAction("opsDetails", "OpsManager", new { ops.OpsManagerID })); } return(View(ops)); }
public IActionResult cLogin(string UserName, string Password, string UserType) { if (ModelState.IsValid) { if (UserType == null || UserType == "Customer") { Customer customer = objLogin.CustomerLogin(UserName, Password); if (customer.CustomerID != 0) { Session.CustomerID = customer.CustomerID; return(RedirectToAction("Index", "Checkout")); } else { return(RedirectToAction("Index")); } } if (UserType == "Employee") { Employee employee = objLogin.EmployeeLogin(UserName, Password); if (employee.EmployeeID != 0) { Session.EmployeeID = employee.EmployeeID; return(RedirectToAction("Index", "Employee", new { employee.EmployeeID })); } else { return(RedirectToAction("Index")); } } if (UserType == "OpsManager") { OpsManager opsManager = objLogin.OpsManagerLogin(UserName, Password); if (opsManager.OpsManagerID != 0) { Session.EmployeeID = opsManager.OpsManagerID; return(RedirectToAction("Index", "OpsManager", new { opsManager.OpsManagerID })); } else { return(RedirectToAction("Index")); } } } return(RedirectToAction("Index")); }
public IActionResult OpsDelete(int?OpsManagerID) { if (OpsManagerID == null) { return(NotFound()); } OpsManager ops = objOps.GetOpsManager(OpsManagerID); if (OpsManagerID == null) { return(NotFound()); } return(View(ops)); }
//controls for OPS MANAGER --------------------------------------------------------------- public IActionResult Index() { OpsManager ops = objOps.GetOpsManager(Convert.ToInt32(Session.OpsManagerID)); return(View(ops)); }