Example #1
0
        public ActionResult AdminClinicSummary()
        {
            var treatmentList = _treatmentManager.GetAll()
                                .Select(t => new SelectListItem
            {
                Value = t.Id.ToString(),
                Text  = t.Name
            })
                                .OrderBy(c => c.Text)
                                .ToList();

            ViewBag.TreatmentList = treatmentList;

            return(View("AdminClinicSummaryView"));
        }
Example #2
0
        public JsonResult GetTreatmentList()
        {
            var treatmentList = Manager.GetAll()
                                .Select(t => new TreatmentItem
            {
                Id                    = t.Id,
                Name                  = t.Name,
                Description           = t.Description,
                PictureUrl            = t.PictureUrl,
                Price                 = t.Price,
                TreatmentCategoryName = t.TreatmentCategory.Name,
                TreatmentCategoryId   = t.TreatmentCategory.Id,
                IsActive              = t.IsActive
            })
                                .OrderBy(c => c.Name)
                                .ToList();

            return(Json(treatmentList, JsonRequestBehavior.AllowGet));
        }
        // GET: All payments
        public ActionResult AllPaymentsView()
        {
            var treatmentList = treatmentManager.GetAll()
                                .Select(t => new SelectListItem
            {
                Value = t.Id.ToString(),
                Text  = t.Name
            })
                                .OrderBy(c => c.Text)
                                .ToList();

            ViewBag.TreatmentList = treatmentList;

            var treatmentCategoryList = treatmentCategoryManager.GetAll()
                                        .Select(t => new SelectListItem
            {
                Value = t.Id.ToString(),
                Text  = t.Name
            })
                                        .OrderBy(c => c.Text)
                                        .ToList();

            ViewBag.TreatmentCategoryList = treatmentCategoryList;

            var clinicList = clinicManager.GetAll()
                             .Select(t => new SelectListItem
            {
                Value = t.Id.ToString(),
                Text  = t.BusinessName
            })
                             .OrderBy(c => c.Text)
                             .ToList();

            ViewBag.ClinicList = clinicList;

            return(View("AllPayments"));
        }