public ActionResult Create([Bind(Include = "Id,ProfileId,SegmentSeqNum,ActionId,CommentAnnotation,DateOfCertifiedRecord,DriversLocationDesc,DurationSeconds,MPH")] TestProfileSegment testProfileSegment) { if (ModelState.IsValid) { db.TestProfileSegments.Add(testProfileSegment); db.SaveChanges(); return(RedirectToAction("Index", new { profileId = testProfileSegment.ProfileId })); } ViewBag.ActionsList = new SelectList(db.Actions, "ActionId", "ActionDesc"); ViewBag.ProfileId = testProfileSegment.ProfileId; return(View(testProfileSegment)); }
public ActionResult Create([Bind(Include = "ProfileId,ProfileName,PollingIntervalSeconds,StartingDateTime,StartingEngineHours,StartingOdometer,CarrierUSDOTNumber,BluetoothId,CMVUnitNumber, CMVTrailerNumbers,ShippingDocumentNumber,VIN,CarrierMultiDayBasis,DeviceId,CurrentDriverId,Driver1Id,Driver1FirstName,Driver1LastName,Driver1IsExempt,Driver1DayStartHour,Driver1DriverLicenseIssuingStateCode,Driver1DriverLicenseNumber,Driver1PersonalUseOfCMVAllowed,Driver1YardMovesAllowed,Driver1TimeZoneId,Driver2Id,Driver2FirstName,Driver2LastName,Driver2IsExempt,Driver2DayStartHour,Driver2DriverLicenseIssuingStateCode,Driver2DriverLicenseNumber,Driver2YardMovesAllowed,Driver2PersonalUseOfCMVAllowed,Driver2TimeZoneId")] TestProfile testProfile) { if (ModelState.IsValid) { db.TestProfiles.Add(testProfile); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CarrierMultiDayBasisList = getMultiDaySelectList(); ViewBag.TimeZonesList = new SelectList(db.TimeZones, "TimeZoneId", "TimeZoneId"); ViewBag.StartingHourList = getStartingHourList(); return(View(testProfile)); }