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

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

            return(sohistoryDetail);
        }