private void DELETE_Click(object sender, EventArgs e) { DataGridViewRow viewRow = DGview.CurrentRow; if (viewRow != null) { DGview.Rows.Remove(viewRow); } Clear(); DGview.Refresh(); }
private void btn_timkiem_Click(object sender, EventArgs e) { if (tim_kiem.Text == "") { (DGview.DataSource as DataTable).DefaultView.RowFilter = null; DGview.Refresh(); } else { (DGview.DataSource as DataTable).DefaultView.RowFilter = string.Format("[{0}] like '%{1}%'", table.Columns[0], tim_kiem.Text); } }
private void lamMoi_Click(object sender, EventArgs e) { Clear(); DGview.Refresh(); }
private void ADD_Click(object sender, EventArgs e) { table.Rows.Add(maBay.Text, noiDi.Text, noiDen.Text, ngayBay.Text, gioBay.Text); DGview.Refresh(); Clear(); }