コード例 #1
0
        protected void grdProducts_SelectedIndexChanged(object sender, EventArgs e)
        {
            Models.ProductView view = new Models.ProductView();
            view.ProductID   = grdProducts.SelectedValue.ToString();
            view.ProductName = grdProducts.SelectedRow.Cells[2].Text;
            view.CategoryID  = ddlCategory.SelectedValue.ToString();
            view.ViewCount   = 1;

            Application.Lock();
            ProductViewList viewlist = (ProductViewList)Application[APP_KEY];

            viewlist.Add(view);

            BindViewGrid(viewlist.Display());
        }