public async Task <IActionResult> Create([Bind("Id,UserId,Date,FlexBalance,UpdatedAt")] FlexTimeModel flexTimeModel) { if (ModelState.IsValid) { flexTimeModel.Id = Guid.NewGuid(); _context.Add(flexTimeModel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(flexTimeModel)); }
public async Task <IActionResult> Create([Bind("Id,UserId,BillingRate,Date,UpdatedAt")] BillingRateModel billingRateModel) { if (ModelState.IsValid) { billingRateModel.Id = Guid.NewGuid(); _context.Add(billingRateModel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(billingRateModel)); }
public async Task <IActionResult> Create([Bind("Id,UserId,StartTime,EndTime,WorkedTime,ProjectId,Note,Billable,CreatedAt,UpdatedAt,UpdatedBy")] WorkHourModel workHourModel) { if (ModelState.IsValid) { workHourModel.Id = Guid.NewGuid(); _context.Add(workHourModel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(workHourModel)); }