コード例 #1
0
        public JsonResult GetClinicList()
        {
            var clinicList = _manager.GetAll()
                             .Select(clinic => new ClinicItem
            {
                Id                = clinic.Id,
                Name              = clinic.BusinessName,
                ShortName         = clinic.ShortName,
                Address           = clinic.Address,
                State             = clinic.State,
                City              = clinic.City,
                Phone             = clinic.Phone,
                WorkHours         = clinic.WorkHours,
                IsActive          = clinic.IsActive,
                Email             = clinic.Email,
                ContactPerson     = clinic.ContactPerson,
                Location          = clinic.Location,
                Comments          = clinic.Comments,
                BankAccountName   = clinic.BankAccountName,
                BankBsb           = clinic.BankBsb,
                BankAccountNumber = clinic.BankAccountNumber
            })
                             .OrderByDescending(c => c.Id)
                             .ToList();

            return(Json(clinicList, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        // 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"));
        }