public WOHistoryModel() { AvailableServiceContract = new List <SelectListItem>(); AvailableEmployee = new List <SelectListItem>(); AvailableLocation = new List <SelectListItem>(); AvailableGL = new List <SelectListItem>(); sohistoryDetails = new List <SohistoryDetail>(); SohistoryDetail = new SohistoryDetail(); }
public async Task <IActionResult> EditWONote(SohistoryDetail model) { var sohistoryDetail = await _workorderService.GetHistoryDetailById(model.SohistoryDetailId); if (sohistoryDetail == null) { return(RedirectToAction("WorkOrderHistory")); } if (ModelState.IsValid) { sohistoryDetail.Notes = model.Notes; sohistoryDetail.Date = model.Date; await _workorderService.UpdateSoHistoryDetail(sohistoryDetail); SuccessNotification("The note data has been updated successfully."); return(RedirectToAction("EditWONote", "WorkOrders", new { SOHistoryDetailID = model.SohistoryDetailId })); } return(View(model)); }
public async Task DeleteSoHistoryDetail(SohistoryDetail sohistoryDetail) { await _soHistoryDetailRepository.DeleteAsync(sohistoryDetail); }
public async Task <SohistoryDetail> UpdateSoHistoryDetail(SohistoryDetail sohistoryDetail) { sohistoryDetail = await _soHistoryDetailRepository.UpdateAsync(sohistoryDetail); return(sohistoryDetail); }
public async Task <SohistoryDetail> InsertSoHistoryDetail(SohistoryDetail sohistoryDetail) { sohistoryDetail = await _soHistoryDetailRepository.InsertAsync(sohistoryDetail); return(sohistoryDetail); }