Beispiel #1
0
 public ActionResult Index2()
 {
     ViewBag.Rooms        = new SelectList(dbRoom.ToList(), "Id", "Name");
     ViewBag.Patients     = new SelectList(dbPatient.ToList(), "Id", "Name");
     ViewBag.ServiceTypes = new SelectList(dbServiceType.ToList(), "Id", "Name");
     ViewBag.Doctors      = new SelectList(dbDoctor.ToList(), "Id", "Name");
     return(View());
 }
Beispiel #2
0
        public AllServiceTypesResponse GetAll()
        {
            try
            {
                var response = new AllServiceTypesResponse();
                var bc       = new ServiceTypeComponent();
                response.Result = bc.ToList();

                return(response);
            }
            catch (Exception ex)
            {
                var httpError = new HttpResponseMessage()
                {
                    StatusCode   = (HttpStatusCode)422,
                    ReasonPhrase = ex.Message
                };
                throw new HttpResponseException(httpError);
            }
        }
Beispiel #3
0
        public ActionResult GetData()
        {
            List <ServiceType> data = db.ToList();

            return(Json(new { data = data }, JsonRequestBehavior.AllowGet));
        }