Example #1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            Diablog_KH d = new Diablog_KH();

            d.ShowDialog();
            View();
        }
Example #2
0
        private void dataGid_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            string id;

            if (dataGid.Columns[e.ColumnIndex].Name == "Sua")
            {
                id = dataGid.Rows[e.RowIndex].Cells["MaKH"].Value.ToString();
                //MessageBox.Show(dataGrid.Rows[e.RowIndex].Cells["Id"].Value.ToString());
                Diablog_KH d = new Diablog_KH(id);
                d.ShowDialog(this);
                View();
            }
            if (dataGid.Columns[e.ColumnIndex].Name == "Xoa")
            {
                id = dataGid.Rows[e.RowIndex].Cells["MaKH"].Value.ToString();
                bus.Delete(id);
                View();
            }
        }