现在的位置: 首页 > 综合 > 正文

FormView个事件

2013年06月12日 ⁄ 综合 ⁄ 共 755字 ⁄ 字号 评论关闭
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);
            }
            }

 

抱歉!评论已关闭.