예제 #1
0
        public ActionResult Category()
        {
            List <PharmacyCategory> CategoryList = new List <PharmacyCategory>();
            Property p  = new Property();
            DataSet  ds = new DataSet();

            p.OnTable = "FetchPharmacyCategory";

            ds = dl.FetchPharmacyCategory_sp(p);

            try
            {
                foreach (DataRow item in ds.Tables[0].Rows)
                {
                    PharmacyCategory m = new PharmacyCategory();

                    m.CategoryId   = item["CategoryId"].ToString();
                    m.CategoryName = item["CategoryName"].ToString();
                    m.AddedBy      = item["AddedBy"].ToString();
                    m.AddedOn      = item["AddedOn"].ToString();
                    m.IsActive     = item["IsActive"].ToString();
                    CategoryList.Add(m);
                }
                ViewBag.CategoryList = CategoryList;
            }
            catch (Exception e)
            {
            }
            return(View());
        }