Example #1
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (grvData.FocusedRowHandle < 0)
            {
                return;
            }
            MisMatchModel model = (MisMatchModel)MisMatchBO.Instance.FindByPK(TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID)));

            if (model.CreatedBy != Global.LoginName)
            {
                MessageBox.Show("Bạn không có quyền sửa sự không phù hợp này!", TextUtils.Caption, MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return;
            }

            if (model.ConfirmTK == 1)
            {
                MessageBox.Show("Bạn không thể sửa sự không phù hợp này.\nDo sự không phù hợp này đã được thiết kế xác nhận.", TextUtils.Caption, MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return;
            }

            frmMisMatch frm = new frmMisMatch();

            frm.MisMatch = (MisMatchModel)MisMatchBO.Instance.FindByPK(TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID)));

            if (frm.ShowDialog() == DialogResult.OK)
            {
                _rownIndex = grvData.FocusedRowHandle;
                loadGrid();
            }
        }
Example #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmMisMatch frm = new frmMisMatch();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                loadGrid();
            }
        }
Example #3
0
        private void btnShowImage_Click(object sender, EventArgs e)
        {
            if (grvData.FocusedRowHandle < 0)
            {
                return;
            }
            MisMatchModel model = (MisMatchModel)MisMatchBO.Instance.FindByPK(TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID)));
            frmMisMatch   frm   = new frmMisMatch();

            frm.MisMatch      = (MisMatchModel)MisMatchBO.Instance.FindByPK(TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID)));
            frm.OnlyShowImage = true;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                _rownIndex = grvData.FocusedRowHandle;
                loadGrid();
            }
        }