public ActionResult login() { Employee employee = new Employee(); EmployeeLoginQuery.populateCustomerList(employee); foreach (var c in employee.cList) { CustomerLoginQuerys.populateRequests(c); CustomerLoginQuerys.populateServices(c); } return(View("EmployeeLoggedIn", employee)); }
//VERIFIES LOGIN INFORMATION AND POPULATES PROFILES public ActionResult LoggedIn(string Login, string Password) { customer = new Customer_info(); CustomerLoginQuerys.customerLogin(Login, Password, customer); CustomerLoginQuerys.populateRequests(customer); CustomerLoginQuerys.populateServices(customer); //if login fails if (customer.FName == null) { return(RedirectToAction("Index", "Home")); } ViewBag.CustomerID = customer.ID; ViewBag.Login = customer.Login; ViewBag.Password = customer.Password; return(View("LoggedIn", customer)); }
public IActionResult Submit(IFormCollection collection) { string vid = Request.Form["vid"]; string notes = Request.Form["ServiceNotes"]; string[] list = Service.getServiceList(); foreach (var x in list) { Debug.WriteLine(notes + " <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"); if (collection.ContainsKey(x) && collection[x] != "false") { EmployeeQuerys.UpdateServices(vid, x, true); } else if (collection.ContainsKey(x) && collection[x] == "false") { EmployeeQuerys.UpdateServices(vid, x, false); } } if (notes != null && notes != "" && notes != " ") { EmployeeQuerys.UpdateRequestNotes(vid, notes); } Employee employee = new Employee(); EmployeeLoginQuery.populateCustomerList(employee); foreach (var c in employee.cList) { CustomerLoginQuerys.populateRequests(c); CustomerLoginQuerys.populateServices(c); } return(View("EmployeeLoggedIn", employee)); }