コード例 #1
0
ファイル: frmChequeList.cs プロジェクト: SDivyaprabha/CRM1
        private void grdViewDoc_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
        {
            if (m_bAns == true)
            {
                return;
            }
            int iId = 0;

            if (BsfGlobal.FindPermission("Check List-Modify") == false)
            {
                MessageBox.Show("You don't have Rights to Check List-Modify");
                return;
            }

            if (grdViewDoc.IsNewItemRow(grdViewDoc.FocusedRowHandle) == true)
            {
                m_bAdd = true;
            }
            else
            {
                iId    = Convert.ToInt32(grdViewDoc.GetRowCellValue(grdViewDoc.FocusedRowHandle, "CheckListId"));
                m_bAdd = false;
            }

            string sCheckName = CommFun.IsNullCheck(grdViewDoc.GetRowCellValue(grdViewDoc.FocusedRowHandle, "CheckListName").ToString(), CommFun.datatypes.vartypestring).ToString().Trim();

            if (sCheckName == "")
            {
                grdViewDoc.CancelUpdateCurrentRow();
                return;
            }

            if (BankBL.CheckListFound(iId, sCheckName, m_sType) == true)
            {
                MessageBox.Show("CheckListName Already Found");
                grdViewDoc.CancelUpdateCurrentRow();
                return;
            }

            UpdateChecklIst();
        }