public async Task <IActionResult> Create([Bind("Id,CustomerName,Phone,Adress,Email,Deleted")] Customer customer) { if (ModelState.IsValid) { _context.Add(customer); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(customer)); }
public async Task <IActionResult> Create([Bind("Id,BusinessName,Time,Status,Explanation,TaskExplanation,StartDate,EndDate,CreatorPersonel,CreationDate,PersonelId,Deleted,CustomerId,ProjectDescriptionId,BusinessPriority,StatusId,IsApproved,LastDateStudied")] BusinessList businessList) { if (ModelState.IsValid) { _context.Add(businessList); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(businessList)); }
public async Task <IActionResult> Create([Bind("Id,Name,Email,Mission,Phone,Adress,UserName,Password,Deleted")] Personel personel) { if (ModelState.IsValid) { _context.Add(personel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(personel)); }
public async Task <IActionResult> Create([Bind("Id,Name,StartTime,FinishTime,Area,PersonelId,Deleted,WorkConfirmation,Explanation")] Work work) { if (ModelState.IsValid) { _context.Add(work); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["PersonelId"] = new SelectList(_context.Personel, "Id", "Adress", work.PersonelId); return(View(work)); }
public async Task <IActionResult> Create([Bind("Id,ProjectName,CustomerId,Deleted")] ProjectDescription projectDescription) { if (ModelState.IsValid) { _context.Add(projectDescription); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["CustomerId"] = new SelectList(_context.Customer, "Id", "Adress", projectDescription.CustomerId); return(View(projectDescription)); }
public async Task <IActionResult> Create([Bind("Id,CreateUser,PersonelId,Explanation,UpdateDate,UpdateUser,Status,BusinessId,Deleted,CreateDate,StartTime,EndTime,Time,EndDate,StatusId,TotalTime")] Activity activity) { if (ModelState.IsValid) { _context.Add(activity); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["BusinessId"] = new SelectList(_context.BusinessList, "Id", "BusinessName", activity.BusinessId); return(View(activity)); }