コード例 #1
0
    }//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
コード例 #2
0
    }//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