private void filldata() { T_StockDL bdl = new T_StockDL(); DataTable dt = bdl.SelectAllt_Stock(2, commonFunctions.GlobalCompany, commonFunctions.GlobalLocation); foreach (DataRow drow in dt.Rows) { txt_code.AutoCompleteCustomSource.Add(drow["ProductId"].ToString()); listBox1.Items.Add(drow["ProductId"].ToString()); } }
private void GetData() { try { T_StockDL bdl = new T_StockDL(); dataGridView1.DataSource = bdl.SelectAllt_Stock(2, commonFunctions.GlobalCompany, commonFunctions.GlobalLocation); if (dataGridView1.DataSource != null) { dataGridView1.Columns[0].Width = 120; dataGridView1.Columns[1].Width = 585; } } catch (Exception ex) { throw ex; } }