void frmProductManage_Shown(object sender, EventArgs e) { ProductCategoryCtl ctlProductCategory = new ProductCategoryCtl(); DataTable table = null; table = ctlProductCategory.GetCategoryTable(); if (table != null && table.Rows.Count > 0) { foreach (DataRow dr in table.Rows) { this.cmbFactory.Items.Add(dr[0]); } } this.refreshDGV(); }
void frmEditEPC_Shown(object sender, EventArgs e) { ProductCategoryCtl ctlProductCategory = new ProductCategoryCtl(); DataTable table = null; table = ctlProductCategory.GetCategoryTable(); if (table != null && table.Rows.Count > 0) { foreach (DataRow dr in table.Rows) { this.comboBox1.Items.Add(dr[0].ToString()); this.categoryCodeIDList.Add(dr[1].ToString()); } } }