}//setSubItems() public int saveCheckList() { String SQL = ""; String UserID = Session["UserID"] == null ? "1" : Session["UserID"].ToString(); //Save the header of checklist SQL = "INSERT INTO [DroneCheckList](\n" + " [DroneCheckListID],\n" + " [DroneID],\n" + " [FlightID],\n" + " [CreatedBy],\n" + " [CreatedOn]\n" + ") VALUES(\n" + " " + CheckListID.ToString() + ",\n" + " 0,\n" + " " + FlightID.ToString() + ",\n" + " '" + UserID + "',\n" + " GETDATE()\n" + ")"; var DroneCheckListID = Util.InsertSQL(SQL); foreach (var item in HeaderCheckItems) { item.saveCheckListItem(DroneCheckListID); } foreach (var item in CheckItems) { item.saveCheckListItem(DroneCheckListID); } return DroneCheckListID; }
public IDictionary <string, object> AsKeyValuePairs() { return(new Dictionary <string, object> { ["Date Earned"] = DateEarned.HasValue() ? DateEarned.YMDString() : null, ["Flight ID"] = FlightID.ToString(CultureInfo.InvariantCulture), ["Checkride Type"] = CheckrideType.ToString(), ["Privilege"] = Privilege, ["License Kind"] = LicenseKind.ToString(), ["Level"] = Level.ToString() }); }