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

            them.ShowDialog();
            if (them.DialogResult == DialogResult.Cancel)
            {
                load();
            }
        }
        private void btnAddKieuSP_Click(object sender, EventArgs e)
        {
            FormThemKieuSP them = new FormThemKieuSP();

            them.ShowDialog();
            if (them.DialogResult == DialogResult.Cancel)
            {
                cbbKieuSP.DataSource    = k.LayKieuSP();
                cbbKieuSP.DisplayMember = "TenKieuSP";
                cbbKieuSP.ValueMember   = "MaKieuSP";
            }
        }
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            maksp = Int16.Parse(dataGridView1.CurrentRow.Cells[0].Value.ToString());
            FormThemKieuSP them  = new FormThemKieuSP(maksp);

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