public async Task <IActionResult> Create([Bind("OrderItemsID,OrderItemsName")] OrderItems orderItems) { if (ModelState.IsValid) { _context.Add(orderItems); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(orderItems)); }
public async Task <IActionResult> Create([Bind("ClientID,Documents,Branding,ClientContacts")] Client client) { if (ModelState.IsValid) { _context.Add(client); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(client)); }
public async Task <IActionResult> Create([Bind("Owner,OwnerName")] Owner owner) { if (ModelState.IsValid) { _context.Add(owner); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(owner)); }
public async Task <IActionResult> Create([Bind("TaskManagementId,Status,Owner,RelatedTo,RelatedToName,RequestType,Priority,CreateBy,CreatedTime,UpdatedBy,UpdatedTime")] TaskManagement taskManagement) { if (ModelState.IsValid) { _context.Add(taskManagement); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["Owner"] = new SelectList(_context.OwnerNames, "Owner", "OwnerName"); ViewData["RequestType"] = new SelectList(_context.RequestTypes, "RequestTypeId", "RequestTypeDescription"); ViewData["Status"] = new SelectList(_context.Statuses, "StatusId", "StatusDescription"); ViewData["Priority"] = new SelectList(_context.Priorities, "PriorityId", "PriorityName"); ViewData["RelatedTo"] = new SelectList(_context.RelatedTos, "RelatedToId", "RelatedToName"); return(View(taskManagement)); }
public async Task <IActionResult> Create([Bind("SupplyRequestId,Status,StatusComments,OrderItems,SupplyRequestOrigin,RequestType,Client,Owner,CreatedBy,CreateTime,UpdatedBy,UpdatedTime")] SupplyRequest supplyRequest) { if (ModelState.IsValid) { _context.Add(supplyRequest); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["ClientSupplierID"] = new SelectList(_context.ClientSuppliers, "ClientSupplierID", "ClientSupplierName"); ViewData["OrderItems"] = new SelectList(_context.OrderItems, "OrderItemsID", "OrderItemsName"); ViewData["Owner"] = new SelectList(_context.OwnerNames, "OwnerId", "OwnerName"); ViewData["RequestType"] = new SelectList(_context.RequestTypes, "RequestTypeId", "RequestTypeDescription"); ViewData["Status"] = new SelectList(_context.Statuses, "StatusId", "StatusDescription"); ViewData["RequestOrigin"] = new SelectList(_context.RequestOrigins, "RequestOriginId", "RequestOriginDescription"); return(View(supplyRequest)); }