Exemplo n.º 1
0
        private void grdCheckView_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            if (barEditItem1.EditValue.ToString() == "Finalisation" && m_sType == "Flat")
            {
                m_sCType = "F";

                int i_CheckListId = Convert.ToInt32(CommFun.IsNullCheck(grdCheckView.GetFocusedRowCellValue("CheckListId"), CommFun.datatypes.vartypenumeric));
                if (i_CheckListId == 1)
                {
                    panelBuyerDetails.Visible = true;

                    string s_Status = UnitDirBL.FlatRegCheckList(m_iId, m_sCType);
                    if (s_Status == "ND")
                    {
                        m_bRegAns = false;
                    }
                    else if (s_Status == "D")
                    {
                        m_bRegAns = true;
                    }
                    else if (s_Status == "CND")
                    {
                        m_bRegAns = false;
                    }

                    if (m_sType == "Flat" && m_bRegAns == true)
                    {
                        DataTable dt = new DataTable();
                        dt = UnitDirBL.FlatBuyer(m_iId);
                        if (dt == null)
                        {
                            return;
                        }
                        if (dt.Rows.Count > 0)
                        {
                            m_iLeadId = Convert.ToInt32(dt.Rows[0]["LeadId"]);
                            txtBuyerName.EditValue = CommFun.IsNullCheck(dt.Rows[0]["LeadName"], CommFun.datatypes.vartypestring).ToString();
                            txtCoAppli.EditValue   = CommFun.IsNullCheck(dt.Rows[0]["CoApplicantName"], CommFun.datatypes.vartypestring).ToString();
                        }
                    }

                    if (m_bRegAns == true)
                    {
                        txtBuyerName.Enabled = false;
                        txtCoAppli.Enabled   = false;
                    }
                    else
                    {
                        txtBuyerName.Enabled = true;
                        txtCoAppli.Enabled   = true;
                    }
                }
                else
                {
                    m_bRegAns = true;
                    panelBuyerDetails.Visible = false;
                }
            }
        }
Exemplo n.º 2
0
        private void barEditItem1_EditValueChanged(object sender, EventArgs e)
        {
            m_sCType = "";
            if (barEditItem1.EditValue.ToString() == "Handing Over")
            {
                m_sCType = "H";
                panelBuyerDetails.Visible = false;
                m_bRegAns = false;
            }
            else if (barEditItem1.EditValue.ToString() == "Works")
            {
                m_sCType = "W";
                panelBuyerDetails.Visible = false;
                m_bRegAns = false;
            }
            else if (barEditItem1.EditValue.ToString() == "Finalisation")
            {
                m_sCType = "F";
                panelBuyerDetails.Visible = false;

                string s_Status = UnitDirBL.FlatRegCheckList(m_iId, m_sCType);
                if (s_Status == "ND")
                {
                    m_bRegAns = false;
                }
                else if (s_Status == "D")
                {
                    m_bRegAns = true;
                }
                else if (s_Status == "CND")
                {
                    m_bRegAns = false;
                }
            }
            else if (barEditItem1.EditValue.ToString() == "Cancellation")
            {
                m_sCType = "C";
                panelBuyerDetails.Visible = false;
                m_bRegAns = false;
            }

            FillCheck();
        }