Ejemplo n.º 1
0
        private void UpdateData()
        {
            DataTable dt  = new DataTable();
            DataTable dtM = new DataTable();

            dtM = grdReserve.DataSource as DataTable;
            DataView dv = new DataView(dtM);

            if (dtM == null)
            {
                return;
            }
            string sStr = "";

            dv.RowFilter = "Sel = " + true + "";
            dt           = dv.ToTable();
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                sStr = String.Format("{0}{1},", sStr, dt.Rows[i]["FlatId"]);
            }
            if (sStr != "")
            {
                sStr = sStr = sStr.Substring(0, sStr.Length - 1);
            }
            AllotBL.InsertReserveFlats(m_iCCId, sStr);
            dt.Dispose();
            dtM.Dispose();
        }
Ejemplo n.º 2
0
        private void btnSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Flat-Cancellation-Create") == false)
            {
                MessageBox.Show("You don't have Rights to Flat-Cancellation-Create");
                return;
            }
            string date = UnitDirBL.FoundCancelDate(m_iFlatId);

            if (Convert.ToDateTime(txtDate.EditValue) >= Convert.ToDateTime(CommFun.IsNullCheck(date, CommFun.datatypes.VarTypeDate)))
            {
            }
            else
            {
                MessageBox.Show("Date Earlier Than Current Date"); txtDate.Focus(); return;
            }
            if (txtAmt.EditValue == null || txtAmt.EditValue.ToString() == "")
            {
                MessageBox.Show("Enter Penalty Amount"); txtAmt.Focus(); return;
            }

            if (m_sStatus == "S")
            {
                DialogResult Result = MessageBox.Show("Are you sure, do you want to Cancel the Flat?", "CRM", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
                {
                    if (Result == DialogResult.Yes)
                    {
                        DataTable dtTmp = new DataTable();
                        dtTmp = AllotBL.GetPaySchFlat(m_iFlatId);
                        if (dtTmp.Rows.Count > 0)
                        {
                            if (MessageBox.Show("PaymentSchedule Exists, You want to Cancel the Unit ?", "CRM", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                            {
                                decimal  dNetAmt     = Convert.ToDecimal(CommFun.IsNullCheck(txtRecvAmt.EditValue, CommFun.datatypes.vartypenumeric));
                                decimal  dPaidAmt    = Convert.ToDecimal(CommFun.IsNullCheck(txtRecdAmt.EditValue, CommFun.datatypes.vartypenumeric));
                                decimal  dPenaltyAmt = Convert.ToDecimal(CommFun.IsNullCheck(txtAmt.EditValue, CommFun.datatypes.vartypenumeric));
                                decimal  dBalAmt     = Convert.ToDecimal(CommFun.IsNullCheck(txtBalAmt.EditValue, CommFun.datatypes.vartypenumeric));
                                DateTime dDate       = Convert.ToDateTime(txtDate.EditValue);
                                string   sRemarks    = CommFun.IsNullCheck(txtRemarks.Text, CommFun.datatypes.vartypestring).ToString();

                                AllotBL.InsertAllotment(m_iCCId, m_iFlatId, m_iBuyerId, dNetAmt, dPaidAmt, dPenaltyAmt, dBalAmt, dDate, m_sCancelType, sRemarks, m_iBlockId, m_sFlatNo, dtChk, m_bChkSend, m_sCCName);
                            }
                        }

                        MessageBox.Show("Allotment Cancelled", "Flat Cancellation", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
            }
            else
            {
                MessageBox.Show("For Cancellation a Flat, You Should Select Sold Unit", "Flat Cancellation", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            Close();
        }
Ejemplo n.º 3
0
        private void btnOK_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (cboProject.EditValue == null || Convert.ToInt32(cboProject.EditValue) < 0)
            {
                MessageBox.Show("Select Project"); return;
            }
            if (cboExec.EditValue == null || Convert.ToInt32(cboExec.EditValue) < 0)
            {
                MessageBox.Show("Select Executive"); return;
            }

            AllotBL.UpdateMultipleAllot(m_iExecId, m_iCCId, m_sType);
            m_bOK = true;
            Close();
        }
Ejemplo n.º 4
0
        private void PopulateGrid()
        {
            DataTable dt = new DataTable();

            dt = AllotBL.GetReserveFlats(m_iCCId);
            grdReserve.DataSource = dt;
            grdReserveView.PopulateColumns();
            grdReserveView.Columns["FlatId"].Visible        = false;
            grdReserveView.Columns["BlockName"].Width       = 200;
            grdReserveView.Columns["FlatNo"].Width          = 200;
            grdReserveView.Columns["Sel"].Width             = 50;
            grdReserveView.Appearance.HeaderPanel.Font      = new Font(grdReserveView.Appearance.HeaderPanel.Font, FontStyle.Bold);
            grdReserveView.Appearance.FocusedCell.BackColor = Color.Teal;
            grdReserveView.Appearance.FocusedCell.ForeColor = Color.White;
            grdReserveView.Appearance.FocusedRow.ForeColor  = Color.Teal;
            grdReserveView.Appearance.FocusedRow.BackColor  = Color.White;

            grdReserveView.OptionsSelection.EnableAppearanceHideSelection = false;
        }
Ejemplo n.º 5
0
 private void PopulateExecutive()
 {
     try
     {
         DataTable dtE = new DataTable();
         dtE = AllotBL.GetAllotExecutive(m_iCCId);
         cboExec.Properties.NullText   = "--Select Executive--";
         cboExec.Properties.DataSource = null;
         cboExec.Properties.DataSource = dtE;
         cboExec.Properties.PopulateColumns();
         cboExec.Properties.ForceInitialize();
         cboExec.Properties.DisplayMember = "ExecutiveName";
         cboExec.Properties.ValueMember   = "ExecutiveId";
         cboExec.Properties.Columns["ExecutiveId"].Visible = false;
         cboExec.Properties.ShowFooter = false;
         cboExec.Properties.ShowHeader = false;
     }
     catch (Exception ex)
     {
         BsfGlobal.CustomException(ex.Message, ex.StackTrace);
     }
 }