Exemple #1
0
        private void frmAllotment_Load(object sender, EventArgs e)
        {
            if (m_bViewScreen == false)
            {
                txtAmt.Enabled       = false;
                txtBalAmt.Enabled    = false;
                txtBuyerName.Enabled = false;
                txtCCName.Enabled    = false;
                txtDate.Enabled      = true;
                txtFlatNo.Enabled    = false;
                txtRecdAmt.Enabled   = false;
                txtRecvAmt.Enabled   = false;
                txtRemarks.Enabled   = true;
                btnSave.Visibility   = DevExpress.XtraBars.BarItemVisibility.Always;
                btnCancel.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
            }
            else
            {
                txtAmt.Enabled       = false;
                txtBalAmt.Enabled    = false;
                txtBuyerName.Enabled = false;
                txtCCName.Enabled    = false;
                txtDate.Enabled      = false;
                txtFlatNo.Enabled    = false;
                txtRecdAmt.Enabled   = false;
                txtRecvAmt.Enabled   = false;
                txtRemarks.Enabled   = false;
                btnSave.Visibility   = DevExpress.XtraBars.BarItemVisibility.Never;
                btnCancel.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            }
            if (BsfGlobal.FindPermission("Flat-Cancellation-Rate-Change") == false)
            {
                //MessageBox.Show("You don't have Rights to Flat-Cancellation-Rate-Change");
                txtAmt.Enabled = false;
            }
            else
            {
                txtAmt.Enabled = true;
            }
            txtRecvAmt.Properties.Mask.EditMask = BsfGlobal.g_sDigitFormat;
            txtRecdAmt.Properties.Mask.EditMask = BsfGlobal.g_sDigitFormat;
            txtBalAmt.Properties.Mask.EditMask  = BsfGlobal.g_sDigitFormat;
            txtAmt.Properties.Mask.EditMask     = BsfGlobal.g_sDigitFormat;
            txtRecvAmt.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
            txtRecdAmt.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
            txtBalAmt.Properties.Appearance.TextOptions.HAlignment  = DevExpress.Utils.HorzAlignment.Far;
            txtAmt.Properties.Appearance.TextOptions.HAlignment     = DevExpress.Utils.HorzAlignment.Far;

            if (m_sType == "A")
            {
                btnCancelChkList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                bAns = UnitDirBL.FoundProgressBill(m_iFlatId);
                if (bAns == true)
                {
                    m_sCancelType = "F";
                }
                else
                {
                    m_sCancelType = "B";
                }
                GetData();
            }
            else
            {
                //if (m_iFlatId != 0)
                //{
                GetEditData();
                btnCancelChkList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                //}
            }
        }