Example #1
0
        public JsonResult DeleteImmunization()
        {
            try
            {
                ImmunizationRepository immunizationRepo = new ImmunizationRepository();
                immunizationRepo.Remove(immunizationRepo.Get(int.Parse(Request.Form["Immunization"])));

                return(Json(new
                {
                    error = "false"
                }));
            }
            catch
            {
                return(Json(new
                {
                    error = "true"
                }));
            }
        }
Example #2
0
        public JsonResult EditImmunization()
        {
            try
            {
                ImmunizationRepository immunizationRepo = new ImmunizationRepository();
                Immunization           immunization     = immunizationRepo.Get(int.Parse(Request.Form["Immunization"]));
                immunization.VaccineType = Request.Form["EditImmunization"];

                return(Json(new
                {
                    error = "false"
                }));
            }
            catch
            {
                return(Json(new
                {
                    error = "true"
                }));
            }
        }