예제 #1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            FormThemLoaiSP them = new FormThemLoaiSP();

            them.ShowDialog();
            if (them.DialogResult == DialogResult.Cancel)
            {
                load();
            }
        }
예제 #2
0
        private void btnAddLoaiSP_Click(object sender, EventArgs e)
        {
            FormThemLoaiSP them = new FormThemLoaiSP();

            them.ShowDialog();
            if (them.DialogResult == DialogResult.Cancel)
            {
                cbbLoaiSP.DataSource    = lo.LayLoaiSP();
                cbbLoaiSP.DisplayMember = "TenLoaiSP";
                cbbLoaiSP.ValueMember   = "MaLoaiSP";
            }
        }
예제 #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            malsp = Int16.Parse(dataGridView1.CurrentRow.Cells[0].Value.ToString());
            FormThemLoaiSP them  = new FormThemLoaiSP(malsp);

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