Example #1
0
        public ActionResult Supplier()
        {
            List <Supplier> SupplierList = new List <Supplier>();
            Property        p            = new Property();
            DataSet         ds           = new DataSet();

            p.OnTable = "FetchSupplier";

            ds = dl.FetchSupplier_sp(p);

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

                    m.SupplierId      = item["SupplierId"].ToString();
                    m.SupplierName    = item["SupplierName"].ToString();
                    m.SupplierContact = item["SupplierContact"].ToString();
                    m.PersonName      = item["PersonName"].ToString();
                    m.PersonNo        = item["PersonNo"].ToString();
                    m.Address         = item["Address"].ToString();
                    m.AddedBy         = item["AddedBy"].ToString();
                    m.AddedOn         = item["AddedOn"].ToString();
                    m.IsActive        = item["IsActive"].ToString();
                    SupplierList.Add(m);
                }
                ViewBag.SupplierList = SupplierList;
            }
            catch (Exception e)
            {
            }
            return(View());
        }