private void load_GridView() { data = new DataTable(); bll = new BLL_Person(); person = new DTO_Person_Notatry(); data = bll.loadDataPersonToGrid(ref err); dt_customer.DataSource = data; }
private void btn_deleteInfo_Click(object sender, EventArgs e) { BLL_Person bll = new BLL_Person(); for (int i = dt_customer.Rows.Count - 1; i >= 0; i--) { if (dt_customer.Rows[i].Cells["col_check"].Selected) { string del = dt_customer.Rows[i].Cells["col_check"].Value.ToString().Trim(); if (del.Equals("1")) { string s = dt_customer.Rows[i].Cells["col_id_code"].Value.ToString().Trim(); bll.deleteCustomer(ref err, s); } } } load_GridView(); }