FormView个事件

protected void Suppliers_ItemCommand(object sender, FormViewCommandEventArgs e)
            {
            
if (e.CommandName.CompareTo("DiscontinueProducts"== 0)
            {
            
// The "Discontinue All Products" Button was clicked.
            
// Invoke the ProductsBLL.DiscontinueAllProductsForSupplier(supplierID) method
            
// First, get the SupplierID selected in the FormView
            int supplierID = (int)Suppliers.SelectedValue;
            
// Next, create an instance of the ProductsBLL class
            ProductsBLL productInfo = new ProductsBLL();
            
// Finally, invoke the DiscontinueAllProductsForSupplier(supplierID) method
            productInfo.DiscontinueAllProductsForSupplier(supplierID);
            }
            }

 

posted @ 2010-03-02 16:38  三颗屎  阅读(163)  评论(0)    收藏  举报