コード例 #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();
 }