예제 #1
0
        public ActionResult ManageMedicineDetails(MedicineDetails MD)
        {
            try
            {
                AdminDetails admObj = (AdminDetails)Session["UserDetails"];
                if (MD.MedicineType != "OTH")
                {
                    MD.MedicineName = MD.MedicineType + " " + MD.MedicineName;
                }
                else
                {
                    MD.MedicineName = MD.MedicineName;
                }
                MD.CreatedBy  = admObj.UserId.ToString();
                MD.HospitalId = admObj.HospitalId;

                int Flag = BL.ManageMedicineDetails(MD);

                MD = BL.ViewAllMedicine(admObj.HospitalId);
                ModelState.Clear();
                return(View("MedicineDetails", MD));
            }
            catch (Exception ex)
            {
                throw;
            }
        }
예제 #2
0
        public ActionResult Med(string Prefix)
        {
            Bal_MedicineDetails    BL  = new Bal_MedicineDetails();
            MedicineDetails        MD  = new MedicineDetails();
            List <MedicineDetails> lst = new List <MedicineDetails>();

            AdminDetails admObj = (AdminDetails)Session["UserDetails"];

            MD = BL.ViewAllMedicine(admObj.HospitalId);
            //lst = MD.lst;
            lst = MD.lst.Where(x => x.MedicineName.ToUpper().Contains(Prefix.ToUpper())).ToList();
            return(Json(lst, JsonRequestBehavior.AllowGet));
        }