Esempio n. 1
0
        public ActionResult ComplaintTypes()
        {
            //var result = complaintType.GetComplaintTypes();
            ComplaintDetailsVM cdvm = new ComplaintDetailsVM
            {
                complaintTypes      = this.complaintType.GetComplaintTypes(),
                complaintAssistance = this.complaintAssistance.GetComplaintAssistance()
            };

            return(View(cdvm));
        }
Esempio n. 2
0
        async public Task <IHttpActionResult> GetDetails(int Id)
        {
            var complaint = await Db.ComplaintManagements.Include(e => e.Employee).Include(a => a.Project).SingleOrDefaultAsync(e => e.Id == Id);

            var stockEquiOut = await Db.StockEquipmentOut.Include(e => e.Equipment).Include(a => a.EquipmentType).Where(s => s.ForComplaintManagement == true && s.ProjectId == complaint.ProjectId && s.Date == complaint.ComplaintEntertainedDate).ToListAsync();

            var stockCableOut = await Db.StockCableOut.Include(e => e.CableRoll).Where(c => c.ForComplaintManagement == true && c.ProjectId == complaint.ProjectId && c.Date == complaint.ComplaintEntertainedDate).ToListAsync();

            var ComplaintVm = new ComplaintDetailsVM()
            {
                Complaint          = complaint,
                StockCablesOut     = stockCableOut,
                StockEquipmentsOut = stockEquiOut
            };

            return(Ok(ComplaintVm));
        }