Beispiel #1
0
 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();
 }
Beispiel #2
0
        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));
        }
Beispiel #3
0
 public async Task DeleteSoHistoryDetail(SohistoryDetail sohistoryDetail)
 {
     await _soHistoryDetailRepository.DeleteAsync(sohistoryDetail);
 }
Beispiel #4
0
        public async Task <SohistoryDetail> UpdateSoHistoryDetail(SohistoryDetail sohistoryDetail)
        {
            sohistoryDetail = await _soHistoryDetailRepository.UpdateAsync(sohistoryDetail);

            return(sohistoryDetail);
        }
Beispiel #5
0
        public async Task <SohistoryDetail> InsertSoHistoryDetail(SohistoryDetail sohistoryDetail)
        {
            sohistoryDetail = await _soHistoryDetailRepository.InsertAsync(sohistoryDetail);

            return(sohistoryDetail);
        }