Exemplo n.º 1
0
        public ActionResult Index(int id)
        {
            ConsulationModel    model = new ConsulationModel();
            ConsulationProvider cp    = new ConsulationProvider();

            model.ListConsulationModels = cp.GetSelectedData(id);
            model.EmergencyMasterId     = id;
            return(PartialView("_Index", model));
        }
Exemplo n.º 2
0
        public ActionResult Edit(int id)
        {
            ConsulationModel    model = new ConsulationModel();
            ConsulationProvider cp    = new ConsulationProvider();


            model = cp.GetListForConsulation().Where(x => x.Id == id).FirstOrDefault();
            return(PartialView("_Edit", model));
        }
Exemplo n.º 3
0
        public ActionResult Edit(ConsulationModel model)
        {
            ConsulationProvider cp = new ConsulationProvider();

            if (ModelState.IsValid)
            {
                cp.Update(model);
                model.ListConsulationModels = cp.GetSelectedData((int)model.EmergencyMasterId);
            }
            return(PartialView("_Index", model));
        }
Exemplo n.º 4
0
        public ActionResult Create(ConsulationModel model)
        {
            if (ModelState.IsValid)
            {
                ConsulationProvider cp = new ConsulationProvider();
                cp.Insertvitals(model);

                int id = (int)model.EmergencyMasterId;
                model.ListConsulationModels = cp.GetSelectedData(id);
            }
            return(PartialView("_Index", model));
        }