예제 #1
0
        /// <summary>
        /// to see Spouse details for selected Pap
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Chkspouse_CheckedChanged(object sender, EventArgs e)
        {
            //for getting spouse name we r passing id
            int HHH_ID = Convert.ToInt32(Session["HH_ID"]);

            if (Chkspouse.Checked == true)
            {
                //PAP_Relation objPAPR = new PAP_Relation();
                PAP_RelationBLL objPAPRBLL         = new PAP_RelationBLL();
                PAPRelationList objPAPRelationList = new PAPRelationList();
                objPAPRelationList = objPAPRBLL.GetRelations(HHH_ID, 1);
                if (objPAPRelationList.Count > 0)
                {
                    Chkspouselist.DataSource     = objPAPRelationList;
                    Chkspouselist.DataTextField  = "HOLDERNAME";
                    Chkspouselist.DataValueField = "RelationID";
                    Chkspouselist.DataBind();
                }
                else
                {
                    chkmsg1.Text = "Spouses Not Available";
                }
            }
            else
            {
                Chkspouselist.Items.Clear();
                chkmsg1.Text = "";
            }
        }
예제 #2
0
        /// <summary>
        /// Bind Child Data to Chkchildrenlist
        /// </summary>
        /// <param name="HHHH_ID"></param>
        protected void BindChild(int HHHH_ID)
        {
            PAP_RelationBLL objPAPRBLL          = new PAP_RelationBLL();
            PAPRelationList objPAPRelationList  = new PAPRelationList();
            PAPRelationList objPAPRelationList2 = new PAPRelationList();

            objPAPRelationList  = objPAPRBLL.GetRelations(HHHH_ID, 2);
            objPAPRelationList2 = objPAPRBLL.GetRelations(HHHH_ID, 3);
            PAP_RelationBO objRelation = null;

            for (int i = 0; i < objPAPRelationList2.Count; i++)
            {
                objRelation = new PAP_RelationBO();

                objRelation.RelationID           = objPAPRelationList2[i].RelationID;
                objRelation.HouseholdID          = objPAPRelationList2[i].HouseholdID;
                objRelation.HolderName           = objPAPRelationList2[i].HolderName;
                objRelation.ResideOnAffectedLand = objPAPRelationList2[i].ResideOnAffectedLand;
                objRelation.DateOfBirth          = objPAPRelationList2[i].DateOfBirth;
                objRelation.LiteracyStatus       = objPAPRelationList2[i].LiteracyStatus;
                objRelation.IsDeleted            = objPAPRelationList2[i].IsDeleted;

                objPAPRelationList.Add(objRelation);
            }
            if (objPAPRelationList.Count > 0)
            {
                Chkchildrenlist.DataSource     = objPAPRelationList;
                Chkchildrenlist.DataTextField  = "HOLDERNAME";
                Chkchildrenlist.DataValueField = "RelationID";
                Chkchildrenlist.DataBind();
            }
            else
            {
                chkmsg.Text = "Children Not Available";
            }
        }
예제 #3
0
        /// <summary>
        ///  Get Land Info Details for Selected PAP
        /// </summary>
        private void GetLandInfo()
        {
            LandInfoBLL      objLandInfoBLL = new LandInfoBLL();
            PublicLandInfoBO objLandInfo    = objLandInfoBLL.GetLandInfo(Convert.ToInt32(Session["HH_ID"]));

            if (objLandInfo != null)
            {
                ddlLandTenure.ClearSelection();
                if (ddlLandTenure.Items.FindByValue(objLandInfo.LND_TENUREID.ToString()) != null)
                {
                    ddlLandTenure.Items.FindByValue(objLandInfo.LND_TENUREID.ToString()).Selected = true;
                }

                ddlReceivedFromWhom.ClearSelection();
                if (ddlReceivedFromWhom.Items.FindByValue(objLandInfo.LandRecivedfromid.ToString()) != null)
                {
                    ddlReceivedFromWhom.Items.FindByValue(objLandInfo.LandRecivedfromid.ToString()).Selected = true;
                }
                if (ddlReceivedFromWhom.SelectedItem.Text == "Other" || ddlReceivedFromWhom.SelectedItem.Text == "Individual")
                {
                    txtfromwhom.Enabled = true;
                }
                else
                {
                    txtfromwhom.Enabled = false;
                }
                txtyear.Text     = objLandInfo.YEAROFACQUISITION;
                txtfromwhom.Text = objLandInfo.FROMWHOM;
                txtcoments.Text  = objLandInfo.COMMENTS;
                txtland.Text     = objLandInfo.WHOCLAIMSLAND;

                if (objLandInfo.HASTITLEDETAILS.ToUpper() == "YES")
                {
                    Chkhasitdetails.Checked = true;
                }

                if (objLandInfo.LIVEDSINCEBIRTH.ToUpper() == "YES")
                {
                    chkLivedSinceBirth.Checked = true;
                }

                if (objLandInfo.ISMORTGAGED.ToUpper() == "YES")
                {
                    ChkMortagelies.Checked = true;
                }

                txtyearmoved.Text      = objLandInfo.MOVEDYEAR;
                txtwherebefore.Text    = objLandInfo.WHERELIVEDBEFORE;
                txtmortagedetails.Text = objLandInfo.MORTGAGEDETAILS;

                pnlPublic.Visible = true;
                //ddlLandTenure.Enabled = false;
            }
            else
            {
                LandInfoPrivateBLL objLandInfoPrivBLL = new LandInfoPrivateBLL();
                PrivateLandInfoBO  objPrivLandInfo    = objLandInfoPrivBLL.GetLandInfoPriv(Convert.ToInt32(Session["HH_ID"]));

                if (objPrivLandInfo != null)
                {
                    ddlLandTenure.ClearSelection();
                    if (ddlLandTenure.Items.FindByValue(objPrivLandInfo.Lnd_TENUREIDPriv.ToString()) != null)
                    {
                        ddlLandTenure.Items.FindByValue(objPrivLandInfo.Lnd_TENUREIDPriv.ToString()).Selected = true;
                    }

                    txtlandlord.Text      = objPrivLandInfo.LANDLORDNAME;
                    txtwhoclaims.Text     = objPrivLandInfo.CLAIMANTNAME;
                    txtwhenbeginfarm.Text = objPrivLandInfo.WHENFARMINGBEGAN;
                    txtwheredidfarm.Text  = objPrivLandInfo.WHEREFARMEDBEFORE;

                    if (objPrivLandInfo.DOSPOUSESFARM.ToUpper() == "YES")
                    {
                        Chkspouse.Checked = true;
                        PAP_RelationBLL objPAPRBLL         = new PAP_RelationBLL();
                        PAPRelationList objPAPRelationList = new PAPRelationList();
                        objPAPRelationList = objPAPRBLL.GetRelations(Convert.ToInt32(Session["HH_ID"]), 1);
                        if (objPAPRelationList.Count > 0)
                        {
                            Chkspouselist.DataSource     = objPAPRelationList;
                            Chkspouselist.DataTextField  = "HOLDERNAME";
                            Chkspouselist.DataValueField = "RelationID";
                            Chkspouselist.DataBind();
                        }
                        else
                        {
                            chkmsg1.Text = "Spouses Not Available";
                        }
                        if (Chkspouselist.Items.Count > 0)
                        {
                            PAPRelationList RelationsSpose = objLandInfoPrivBLL.GetLandInfoPrivSpose(Convert.ToInt32(objPrivLandInfo.PRIVATELANDID));
                            if (RelationsSpose != null)
                            {
                                for (int i = 0; i < RelationsSpose.Count; i++)
                                {
                                    Chkspouselist.Items.FindByValue(RelationsSpose[i].RelationID.ToString()).Selected = true;
                                }
                            }
                        }
                    }

                    if (objPrivLandInfo.DOCHILDRENFARM.ToUpper() == "YES")
                    {
                        ChkChildren.Checked = true;
                        BindChild(Convert.ToInt32(Session["HH_ID"]));


                        if (Chkchildrenlist.Items.Count > 0)
                        {
                            PAPRelationList RelationsSpose = objLandInfoPrivBLL.GetLandInfoPrivChild(Convert.ToInt32(objPrivLandInfo.PRIVATELANDID));
                            if (RelationsSpose != null)
                            {
                                for (int i = 0; i < RelationsSpose.Count; i++)
                                {
                                    Chkchildrenlist.Items.FindByValue(RelationsSpose[i].RelationID.ToString()).Selected = true;
                                }
                            }
                        }
                    }

                    txtagrrement.Text = objPrivLandInfo.AGREEMENTTYPE;
                    txtprodutive.Text = objPrivLandInfo.PRODASSETOPPORTUNITIES;

                    pnlMailo.Visible = true;
                    //ddlLandTenure.Enabled = false;
                }
            }
        }