Exemplo n.º 1
0
        public ActionResult Index()

        {
            using (Repository <ProductEntity> rep = new RepositoryProduct())
            {
                return(View(rep.GetAll().ToList()));
            }
        }
Exemplo n.º 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();
 }
Exemplo n.º 3
0
 private void refresh()
 {
     _allproduct.DataSource = RepositoryProduct.GetAll();
     _allproduct.DataBind();
 }