private void button3_Click(object sender, EventArgs e) { var sc = new SearchCustomer(); sc.ShowDialog(); dataGridView1.DataSource = sc.GetClient(); }
private void button1_Click(object sender, EventArgs e) { var sc = new SearchCustomer(); sc.ShowDialog(); dataGridView1.DataSource = sc.GetClient(); if (dataGridView1.CurrentRow != null) { dataGridView2.DataSource = Baza.SQLmanager.GetCustomerObject(dataGridView1.CurrentRow.Cells[0].Value); this.dataGridView2.Columns["id_client"].Visible = false; //this.dataGridView2.Columns["obj_type"].Visible = false; this.dataGridView2.Columns["OBJ_TYPE1"].Visible = false; this.dataGridView2.Columns["CLIENT"].Visible = false; } else { var result0 = Baza.SQLmanager.SearchCustomers("", "", ""); dataGridView1.DataSource = result0; } }