示例#1
0
        public ActionResult Index()

        {
            using (Repository <ProductEntity> rep = new RepositoryProduct())
            {
                return(View(rep.GetAll().ToList()));
            }
        }
示例#2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Page.Title = "View Product Page";
     if (Session["UserName"] == null)
     {
         Response.Redirect("../HomePage.aspx");
     }
     _allproduct.DataSource = RepositoryProduct.GetAll();
     _allproduct.DataBind();
 }
示例#3
0
 private void refresh()
 {
     _allproduct.DataSource = RepositoryProduct.GetAll();
     _allproduct.DataBind();
 }