public async Task <IActionResult> Create([Bind("Id,CompanyName,StreetAddress,ZipCode,County,Country,PhoneNumber1,PhoneNumber2")] Company company) { if (ModelState.IsValid) { _context.Add(company); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(company)); }
public async Task <IActionResult> Create([Bind("Id,Name,Description,TimeStamp,Url,PersonId")] Document document) { if (ModelState.IsValid) { _context.Add(document); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["PersonId"] = new SelectList(_context.Set <Person>(), "Id", "FullName", document.PersonId); return(View(document)); }
public async Task <IActionResult> Create([Bind("Id,BusinessCentreId,ReportDate,Version,PersonId,TimeOnSite,AccessPoints,AccessPointsBrandModel,A,B,C,D,E,F,G")] DworkinWiFiSurveyResult dworkinWiFiSurveyResult) { if (ModelState.IsValid) { _context.Add(dworkinWiFiSurveyResult); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["PersonId"] = new SelectList(_context.Person, "Id", "STString", dworkinWiFiSurveyResult.PersonId); ViewData["BusinessCentreId"] = new SelectList(_context.BusinessCentre, "Id", "WiFiSurvString", dworkinWiFiSurveyResult.BusinessCentreId); return(View(dworkinWiFiSurveyResult)); }
public async Task <IActionResult> Create([Bind("Id,TimeStamp,CompanyId,CentreNumber,CentreName,StreetAddress,ZipCode,County,Country,NumberOfFloors,PersonId,PersonId1,CentreNotes")] BusinessCentre businessCentre) { if (ModelState.IsValid) { _context.Add(businessCentre); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["PersonId"] = new SelectList(_context.Person, "Id", "FullName", businessCentre.PersonId); ViewData["PersonId1"] = new SelectList(_context.Person, "Id", "FullName", businessCentre.PersonId1); ViewData["CompanyId"] = new SelectList(_context.Company, "Id", "CompanyName", businessCentre.CompanyId); return(View(businessCentre)); }
public async Task <IActionResult> Create([Bind("Id,TimeStampCreated,TimeStampResolved,TimeStampClosed,BusinessCentreId,PersonId,PersonId1,FaultDescription,FaultReport,TicketLog")] SupportTicket supportTicket) { if (ModelState.IsValid) { _context.Add(supportTicket); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["PersonId1"] = new SelectList(_context.Person, "Id", "STString", supportTicket.PersonId1); ViewData["BusinessCentreId"] = new SelectList(_context.BusinessCentre, "Id", "CName", supportTicket.BusinessCentreId); ViewData["PersonId"] = new SelectList(_context.Person, "Id", "STString", supportTicket.PersonId); return(View(supportTicket)); }