private void Orders_Load(object sender, EventArgs e) { string query = "select * from Order_View"; dataGridView1.DataSource = DBConnect.getTableAsDT(query); dataGridView1.Columns[0].Visible = false; }
private void Employee_Load(object sender, EventArgs e) { var query = "select id, name from Department"; cbDep.DisplayMember = "name"; cbDep.ValueMember = "id"; cbDep.DataSource = DBConnect.getTableAsDT(query); query = "select id,name from Post"; cbPost.DisplayMember = "name"; cbPost.ValueMember = "id"; cbPost.DataSource = DBConnect.getTableAsDT(query); }
public void refreshComboBox() { var query = "select id,name from Employee"; cbEmployee.DisplayMember = "name"; cbEmployee.ValueMember = "id"; cbEmployee.DataSource = DBConnect.getTableAsDT(query); query = "select id,name from Post"; cbPost.DisplayMember = "name"; cbPost.ValueMember = "id"; cbPost.DataSource = DBConnect.getTableAsDT(query); query = "select id,name from Department"; cbDep.DisplayMember = "name"; cbDep.ValueMember = "id"; cbDep.DataSource = DBConnect.getTableAsDT(query); }
private void Employees_Load(object sender, EventArgs e) { var query = "select * from Workers_View"; dataGridView1.DataSource = DBConnect.getTableAsDT(query); }