private void btnThemSP_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmSP frm = new frmSP();

            frm.MdiParent = this;
            frm.Show();
            frm.Focus();
        }
示例#2
0
        private void btnSua_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var selected = gridView1.GetSelectedRows();

            if (selected.Count() == 0)
            {
                MessageBox.Show("Vui lòng chọn 1 dòng để sửa.");
                return;
            }

            int MaSP = (int)gridView1.GetRowCellValue(selected[0], "MaSP");
            var item = spBLL.Lay(MaSP);

            frmSP frm = new frmSP(item, this);

            frm.MdiParent = this.MdiParent;
            frm.Show();
            frm.Focus();
        }