Exemple #1
0
 private void ProductInfomation_Load(object sender, EventArgs e)
 {
     {
         string sql = "select SupplierID,CompanyName from dbo.Suppliers";
         tableSuppliers = GuGuGuHelper.ExecuteReaderDataTable(sql);
         GuGuGuHelper.BindCombo(this.CbxCompanyName, tableSuppliers, "SupplierID", "CompanyName", true);
     }
     {
         string sql = "select CategoryID,CategoryName from dbo.Categories";
         tableCategories = GuGuGuHelper.ExecuteReaderDataTable(sql);
         GuGuGuHelper.BindCombo(this.CbxCategoryName, tableCategories, "CategoryID", "CategoryName", true);
     }
     ProRefresh();
     DGVProduct.AutoSizeColumnsMode        = DataGridViewAutoSizeColumnsMode.Fill;
     DGVProduct.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
     DGVProduct.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
     SetEnable(false, false, false, false, false, false, false, "请选择操作模式", false, "确定", false, "other");
 }