Ejemplo n.º 1
0
        private void btnOK_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            //if (Convert.ToDecimal(CommFun.IsNullCheck(txtNewGuide.EditValue, CommFun.datatypes.vartypenumeric)) == 0) { MessageBox.Show("Enter New GuideLineValue"); return; }
            //if (Convert.ToDecimal(CommFun.IsNullCheck(txtNewRate.EditValue, CommFun.datatypes.vartypenumeric)) == 0) { MessageBox.Show("Enter New Market Value"); return; }
            Cursor.Current = Cursors.WaitCursor;

            bool bChkGLV = Convert.ToBoolean(CommFun.IsNullCheck(chkGLV.EditValue, CommFun.datatypes.varTypeBoolean));
            bool bChkMLV = Convert.ToBoolean(CommFun.IsNullCheck(chkMLV.EditValue, CommFun.datatypes.varTypeBoolean));
            bool bChkReg = Convert.ToBoolean(CommFun.IsNullCheck(chkReg.EditValue, CommFun.datatypes.varTypeBoolean));

            if (bChkGLV == true || bChkMLV == true || bChkReg == true)
            {
                if (cboBlock.EditValue == null || Convert.ToInt32(cboBlock.EditValue) <= 0)
                {
                    MessageBox.Show("Select Block Name"); return;
                }
            }
            string sDate = UnitDirBL.FoundDate();

            if (sDate != "")
            {
                if (Convert.ToDateTime(CommFun.IsNullCheck(sDate, CommFun.datatypes.VarTypeDate)) > Convert.ToDateTime(dEDate.EditValue))
                {
                    MessageBox.Show("Enter Valid Date"); return;
                }
            }
            //if (Convert.ToDecimal(txtNewGuide.EditValue) > Convert.ToDecimal(txtNewRate.EditValue))
            //{ MessageBox.Show("Market Land Value should be > than GuideLineValue"); return; }
            if (Convert.ToDecimal(txtNewReg.EditValue) > 100)
            {
                MessageBox.Show("Percentage should not > than 100"); return;
            }
            AssignData();
            UnitDirBL.InsertLandRateChange(bChkGLV, bChkMLV, bChkReg, m_iBlockId);
            m_dNewGuideLine       = LandRateChangeBO.NewGuideValue;
            m_dNewMarketLandValue = LandRateChangeBO.NewMarketValue;
            m_dNewRegistration    = LandRateChangeBO.NewRegistration;
            this.Close();
            Cursor.Current = Cursors.Default;
        }