Пример #1
0
        public ActionResult Index(int?Id)
        {
            List <ClaimService>       serviceModel = new List <ClaimService>();
            DB_A0009D_NovoHubEntities DbServices   = new DB_A0009D_NovoHubEntities();

            serviceModel = DbServices.ClaimServices.Where(x => x.ClaimId == Id).ToList();
            return(View(serviceModel));
        }
Пример #2
0
        // GET: Drugs
        public ActionResult Index(int?Id)
        {
            List <ClaimDrug>          drugModel = new List <ClaimDrug>();
            DB_A0009D_NovoHubEntities DbDrugs   = new DB_A0009D_NovoHubEntities();


            drugModel = DbDrugs.ClaimDrugs.Where(x => x.ClaimId == Id).ToList();
            return(View(drugModel));
        }
Пример #3
0
        public ActionResult Index(int?id, int?Id, List <ClaimDrug> drugList)
        {
            if (ModelState.IsValid)
            {
                using (DB_A0009D_NovoHubEntities DbDrugs = new DB_A0009D_NovoHubEntities())
                {
                    foreach (var i in drugList)
                    {
                        ClaimDrug drugRows = DbDrugs.ClaimDrugs.Where(a => a.ClaimId == i.Id).FirstOrDefault();

                        if (drugRows != null)
                        {
                            drugRows.ClaimId         = i.ClaimId;
                            drugRows.costofdrug      = i.costofdrug;
                            drugRows.DrugDescription = i.DrugDescription;
                            drugRows.DrugId          = i.DrugId;
                            drugRows.DrugName        = i.DrugName;

                            drugRows.InitialAmount  = i.InitialAmount;
                            drugRows.Quantity       = i.Quantity;
                            drugRows.rate           = i.rate;
                            drugRows.status         = i.status;
                            drugRows.VettedAmount   = i.VettedAmount;
                            drugRows.VettingComment = i.VettingComment;
                        }
                    }
                    DbDrugs.SaveChanges();
                }

                // ViewBag.Message = "Records have been Updated Successfully. '<a href='~/Services?Id = i.Id'> Next >>> </a>'";

                return(RedirectToAction("Index", "Services", new { id }));
            }
            else
            {
                ViewBag.Message = "Failed ! Please try again.";
                return(View(drugList));
            }
        }
Пример #4
0
        public ActionResult Index(int?id, int?Id, List <ClaimService> serviceList)
        {
            if (ModelState.IsValid)
            {
                using (DB_A0009D_NovoHubEntities DbServices = new DB_A0009D_NovoHubEntities())
                {
                    foreach (var y in serviceList)
                    {
                        ClaimService serviceRows = DbServices.ClaimServices.Where(a => a.ClaimId == y.Id).FirstOrDefault();

                        if (serviceRows != null)
                        {
                            serviceRows.ClaimId            = y.ClaimId;
                            serviceRows.costofdrug         = y.costofdrug;
                            serviceRows.ServiceDescription = y.ServiceDescription;
                            serviceRows.ServiceId          = y.ServiceId;
                            serviceRows.ServiceName        = y.ServiceName;

                            serviceRows.InitialAmount  = y.InitialAmount;
                            serviceRows.Duration       = y.Duration;
                            serviceRows.rate           = y.rate;
                            serviceRows.status         = y.status;
                            serviceRows.VettedAmount   = y.VettedAmount;
                            serviceRows.VettingComment = y.VettingComment;
                        }
                    }
                    DbServices.SaveChanges();
                }

                ViewBag.Message = "Records have been Updated Successfully.";

                return(RedirectToAction("Index", "VetClaim", new { id }));
            }
            else
            {
                ViewBag.Message = "Failed ! Please try again.";
                return(View(serviceList));
            }
        }