Esempio n. 1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            FormThemDVTinh them = new FormThemDVTinh();

            them.ShowDialog();
            if (them.DialogResult == DialogResult.Cancel)
            {
                load();
            }
        }
Esempio n. 2
0
        private void btnAddKieuSP_Click(object sender, EventArgs e)
        {
            FormThemDVTinh them = new FormThemDVTinh();

            them.ShowDialog();
            if (them.DialogResult == DialogResult.Cancel)
            {
                cbbDV.DataSource    = dv.LayDVTinh();
                cbbDV.DisplayMember = "TenDonViTinh";
                cbbDV.ValueMember   = "MaDonViTinh";
            }
        }
Esempio n. 3
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            if (dataGridView1.CurrentRow == null)
            {
                MessageBox.Show("Bạn phải chọn một dòng để sửa");
                return;
            }
            int            madv = Int16.Parse(dataGridView1.CurrentRow.Cells[0].Value.ToString());
            FormThemDVTinh them = new FormThemDVTinh(madv);

            them.ShowDialog();
            if (them.DialogResult == DialogResult.Cancel)
            {
                load();
            }
        }