예제 #1
0
        private void btnThemLSP_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmLSP frm = new frmLSP();

            frm.MdiParent = this;
            frm.Show();
            frm.Focus();
        }
        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 MaLSP = (int)gridView1.GetRowCellValue(selected[0], "MaLSP");
            var item  = lspBLL.Lay(MaLSP);

            frmLSP frm = new frmLSP(item, this);

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