public ActionResult Create(int ID = 1, int FlightID = 0) { //if (FlightID == 0) Int32.TryParse(Request["FlightID"], out FlightID); ViewBag.Title = "Create Checklist"; DroneCheckListForm CheckList = new DroneCheckListForm(ID); CheckList.FlightID = FlightID; return View(CheckList); }//Index
public ActionResult PostValidation(int CheckListID = 0, int DroneID = 0) { //if (FlightID == 0) Int32.TryParse(Request["FlightID"], out FlightID); ViewBag.Title = "Create Checklist"; DroneCheckListForm CheckList = new DroneCheckListForm(CheckListID, DroneID); CheckList.saveValidation(); return RedirectToAction("Detail", "Drone", new { ID = DroneID }); }
public ActionResult PostCreate(int ID = 0 ) { //Process to save Checklist files DroneCheckListForm CheckList = new DroneCheckListForm(ID); CheckList.FlightID = Int32.Parse(Request["FlightID"]); int DroneCheckListID = CheckList.saveCheckList(); //return RedirectToAction("Details",new { ID = DroneCheckListID }); //return RedirectToAction("Detail", "DroneFlight", new { ID = CheckList.FlightID }); return RedirectToAction("Complete", "DroneCheckList", new { ID = DroneCheckListID }); }//Index
public ActionResult Validation([Bind(Prefix = "ID")] int CheckListID = 0, int DroneID = 0) { if (!exLogic.User.hasAccess("CHECKLIST.SETUP")) return RedirectToAction("NoAccess", "Home"); //if (FlightID == 0) Int32.TryParse(Request["FlightID"], out FlightID); DroneCheckListForm CheckList = new DroneCheckListForm(CheckListID, DroneID); ViewBag.Title = "Set Up " + CheckList.CheckListTitle + (CheckList.CheckListSubTitle == "" ? "" : " (" + CheckList.CheckListSubTitle + ")"); CheckList.DroneID = DroneID; return View(CheckList); }
}//Index public ActionResult View([Bind(Prefix = "ID")] int ThisCheckListID = 0) { //if (FlightID == 0) Int32.TryParse(Request["FlightID"], out FlightID); var Result = Util.getDBRow("SELECT [DroneCheckListID],[FlightID] FROM [DroneCheckList] WHERE [ID]=" + ThisCheckListID); if (!(bool)Result["hasRows"]) { return RedirectToAction("Error", "Home"); } else { int CheckListID = Int32.Parse(Result["DroneCheckListID"].ToString()); ViewBag.Title = "View Checklist"; ViewBag.FlightID = Result["FlightID"].ToString(); DroneCheckListForm CheckList = new DroneCheckListForm(CheckListID); CheckList.getValidationMessages(ThisCheckListID); return View(CheckList); } }//Index
}//Index public ActionResult Complete([Bind(Prefix = "ID")] int ThisCheckListID = 0) { var Result = Util.getDBRow("SELECT [DroneCheckListID],[FlightID] FROM [DroneCheckList] WHERE [ID]=" + ThisCheckListID); List<ValidationMap> Validated = new List<ValidationMap>(); if (!(bool)Result["hasRows"]) { return RedirectToAction("Error", "Home"); } else { int CheckListID = Int32.Parse(Result["DroneCheckListID"].ToString()); ViewBag.FlightID = Result["FlightID"].ToString(); ViewBag.ThisCheckListID = ThisCheckListID; DroneCheckListForm CheckList = new DroneCheckListForm(CheckListID); CheckList.ThisCheckListID = ThisCheckListID; Validated = CheckList.getValidationMessages(ThisCheckListID); //Process to save Checklist files ViewBag.Title = "Confirm Checklist Action - " + CheckList.CheckListTitle; } return View(Validated); }//Index