public async Task<IActionResult> Create([Bind("ID,Title,Status,CreateDate,EditDate")] Contract contract) { if (ModelState.IsValid) { _context.Add(contract); await _context.SaveChangesAsync(); return RedirectToAction("Index"); } return View(contract); }
public async Task <IActionResult> Create([Bind("ID,Title,State,ExpiredDate")] Contractor contractor) { if (ModelState.IsValid) { _context.Add(contractor); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(contractor)); }
public async Task <IActionResult> Create([Bind("ID,Title,CreateDate,EditDate,File")] Attachment attachment) { if (ModelState.IsValid) { _context.Add(attachment); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(attachment)); }
public async Task <IActionResult> Create([Bind("ID,Title,Status,CreateDate,EditDate,Description,Deadline")] CMSTask cMSTask) { if (ModelState.IsValid) { cMSTask.Initialize(); _context.Add(cMSTask); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(cMSTask)); }