Exemplo n.º 1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            FormThemLoaiSP them = new FormThemLoaiSP();

            them.ShowDialog();
            if (them.DialogResult == DialogResult.Cancel)
            {
                load();
            }
        }
Exemplo n.º 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";
            }
        }
Exemplo 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            malsp = Int16.Parse(dataGridView1.CurrentRow.Cells[0].Value.ToString());
            FormThemLoaiSP them  = new FormThemLoaiSP(malsp);

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