// GET: User public ActionResult Index() { ServiceReference1.BlankettService1Client ser = new ServiceReference1.BlankettService1Client(); int formid = ser.GetFormIdFromUsername(Session["usr"].ToString()); Userpage f1 = new Userpage(); ServiceReference1.Blankett b1 = ser.GetFormWithId(formid); List <string> tempList = new List <string>(); int userId = ser.GetUserIdWithUsername(Session["usr"].ToString()); string[] tempString = new string[3]; tempList = ser.GetBookedTimeWithUserId(userId).ToList(); foreach (var i in tempList) { tempString = i.Split(' '); f1.Date = tempString[0]; f1.Time = tempString[1]; } f1.FormId = b1.FormId; f1.InmateSSN = b1.InmateSSN; f1.VisitorFName = b1.VisitorFName; f1.VisitorLName = b1.VisitorLName; f1.PersonOfInterestFName = b1.PersonOfInterestFName; f1.PersonOfInterestLName = b1.PersonOfInterestLName; f1.PhoneNumber = b1.PhoneNumber; f1.EMail = b1.EMail; f1.Status = b1.Status; return(View(f1)); }
public ActionResult Edit(FormClass f1, string status) { ServiceReference1.BlankettService1Client client = new ServiceReference1.BlankettService1Client(); //STATUS = ACCEPTED, PENDING OR DECLINED ServiceReference1.Blankett b1 = new ServiceReference1.Blankett(); b1.FormId = f1.FormId; b1.InmateSSN = f1.InmateSSN; b1.VisitorFName = f1.VisitorFName; b1.VisitorLName = f1.VisitorLName; b1.PersonOfInterestFName = f1.PersonOfInterestFName; b1.PersonOfInterestLName = f1.PersonOfInterestLName; b1.PhoneNumber = f1.PhoneNumber; b1.EMail = f1.EMail; b1.Status = status; client.ChangeStatusForm(b1, status); return(RedirectToAction("Index", "Admin")); }
public ActionResult Edit(FormClass f1, int id) { if (id == null) { return(RedirectToAction("Index", "Admin")); } ServiceReference1.BlankettService1Client client = new ServiceReference1.BlankettService1Client(); ServiceReference1.Blankett b1 = client.GetFormWithId(id); f1.FormId = b1.FormId; f1.InmateSSN = b1.InmateSSN; f1.VisitorFName = b1.VisitorFName; f1.VisitorLName = b1.VisitorLName; f1.PersonOfInterestFName = b1.PersonOfInterestFName; f1.PersonOfInterestLName = b1.PersonOfInterestLName; f1.PhoneNumber = b1.PhoneNumber; f1.EMail = b1.EMail; f1.Status = b1.Status; return(View(f1)); }
public ActionResult Form(FormClass form) { ServiceReference1.BlankettService1Client asd = new ServiceReference1.BlankettService1Client(); //form id status form.FormId = 0; form.Status = ""; ServiceReference1.Blankett asd1 = new ServiceReference1.Blankett(); asd1.FormId = form.FormId; asd1.VisitorFName = form.VisitorFName; asd1.VisitorLName = form.VisitorLName; asd1.PersonOfInterestFName = form.PersonOfInterestFName; asd1.PersonOfInterestLName = form.PersonOfInterestLName; asd1.InmateSSN = form.InmateSSN; asd1.PhoneNumber = form.PhoneNumber; asd1.EMail = form.EMail; asd1.Status = form.Status; form.Status = asd.SaveForm(asd1); return(View(form)); }