Exemplo n.º 1
0
        public void PopulateLevel()
        {
            DataTable dtLevel = new DataTable();

            dtLevel = FlatUnitBL.GetSOLevel(m_iCCId);

            Level.DataSource = dtLevel;
            Level.PopulateColumns();
            Level.DisplayMember = "LevelName";
            Level.ValueMember   = "LevelId";
            Level.Columns["LevelId"].Visible = false;
            Level.ShowFooter = false;
            Level.ShowHeader = false;
        }
Exemplo n.º 2
0
        public void PopulateBlock()
        {
            DataTable dtBlock = new DataTable();

            dtBlock = FlatUnitBL.GetSOBlock(m_iCCId);

            Block.DataSource = dtBlock;
            Block.PopulateColumns();
            Block.DisplayMember = "BlockName";
            Block.ValueMember   = "BlockId";
            Block.Columns["BlockId"].Visible = false;
            Block.ShowFooter = false;
            Block.ShowHeader = false;
        }
Exemplo n.º 3
0
        private void PopulateData()
        {
            DataTable dtB = new DataTable();
            DataTable dtL = new DataTable();
            DataTable dtT = new DataTable();

            dtB = FlatUnitBL.GetBlock(m_iCCId);
            if (dtB.Rows.Count > 0)
            {
                cboBlock.Properties.DataSource = dtB;
                cboBlock.Properties.PopulateColumns();
                cboBlock.Properties.DisplayMember = "BlockName";
                cboBlock.Properties.ValueMember   = "BlockId";
                cboBlock.Properties.Columns["BlockId"].Visible = false;
                cboBlock.Properties.ShowFooter = false;
                cboBlock.Properties.ShowHeader = false;
            }

            dtL = FlatUnitBL.GetLevel(m_iCCId);
            if (dtL.Rows.Count > 0)
            {
                cboLevel.Properties.DataSource = dtL;
                cboLevel.Properties.PopulateColumns();
                cboLevel.Properties.DisplayMember = "LevelName";
                cboLevel.Properties.ValueMember   = "LevelId";
                cboLevel.Properties.Columns["LevelId"].Visible = false;
                cboLevel.Properties.ShowFooter = false;
                cboLevel.Properties.ShowHeader = false;
            }

            dtT = FlatUnitBL.GetFlatType(m_iCCId);
            if (dtT.Rows.Count > 0)
            {
                cboFlatType.Properties.DataSource = dtT;
                cboFlatType.Properties.PopulateColumns();
                cboFlatType.Properties.DisplayMember = "TypeName";
                cboFlatType.Properties.ValueMember   = "FlatTypeId";
                cboFlatType.Properties.Columns["FlatTypeId"].Visible = false;
                cboFlatType.Properties.ShowFooter = false;
                cboFlatType.Properties.ShowHeader = false;
            }
        }
Exemplo n.º 4
0
        private void PopulateFlat()
        {
            grdSort.DataSource = null;

            DataTable dt = new DataTable();

            dt = FlatUnitBL.GetSOFlat(m_iCCId, m_iBlockId, m_iLevelId);
            grdSort.DataSource = dt;
            grdViewSort.PopulateColumns();
            grdViewSort.Columns["FlatId"].Visible = false;

            grdViewSort.Appearance.HeaderPanel.Font = new Font(grdViewSort.Appearance.HeaderPanel.Font, FontStyle.Bold);

            grdViewSort.Appearance.FocusedCell.BackColor = Color.Teal;
            grdViewSort.Appearance.FocusedCell.ForeColor = Color.White;
            grdViewSort.Appearance.FocusedRow.ForeColor  = Color.Teal;
            grdViewSort.Appearance.FocusedRow.BackColor  = Color.White;

            grdViewSort.OptionsSelection.EnableAppearanceHideSelection = false;
        }
Exemplo n.º 5
0
        private void btnOK_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (cboBlock.EditValue == DBNull.Value || cboBlock.EditValue == null)
            {
                MessageBox.Show("Select Block");
                cboBlock.Focus();
                return;
            }
            if (cboLevel.EditValue == DBNull.Value || cboLevel.EditValue == null)
            {
                MessageBox.Show("Select Level");
                cboLevel.Focus();
                return;
            }
            if (cboFlatType.EditValue == DBNull.Value || cboFlatType.EditValue == null)
            {
                MessageBox.Show("Select FlatType");
                cboFlatType.Focus();
                return;
            }

            if (CommFun.IsNullCheck(txtFlatNo.EditValue, CommFun.datatypes.vartypestring).ToString() == "")
            {
                MessageBox.Show("Enter Flat No");
                txtFlatNo.Focus();
                return;
            }
            bool bAns = FlatUnitBL.GetFlatNoFound(m_iCCId, txtFlatNo.EditValue.ToString());

            if (bAns == true)
            {
                MessageBox.Show("Flat No Already Exist"); txtFlatNo.Text = ""; txtFlatNo.Focus(); return;
            }

            int iBlockId    = Convert.ToInt32(cboBlock.EditValue);
            int ilevelId    = Convert.ToInt32(cboLevel.EditValue);
            int iFlatTypeId = Convert.ToInt32(cboFlatType.EditValue);

            FlatUnitBL.InsertFlatUnit(m_iCCId, iBlockId, ilevelId, iFlatTypeId, txtFlatNo.EditValue.ToString());
            Close();
        }
Exemplo n.º 6
0
 private void UpdateSortOrder(DataTable argdt)
 {
     FlatUnitBL.UpdateSortOrder(argdt);
 }