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

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

            return(sohistoryDetail);
        }