コード例 #1
0
        /// <summary>
        ///  to get the data from the database and bind it to the DrpUse dropdown
        /// </summary>
        private void BindUse()
        {
            LandUseBLL objUseBLL = new LandUseBLL();

            DrpUse.DataSource     = objUseBLL.GetLandUse();
            DrpUse.DataTextField  = "LANDUSE";
            DrpUse.DataValueField = "LND_USEID";
            DrpUse.DataBind();
        }
コード例 #2
0
        /// <summary>
        /// to clear the land holding data
        /// </summary>

        private void ClearLandHolding()
        {
            txttenure.Text      = string.Empty;
            txttotal.Text       = string.Empty;
            ChkPrimary.Checked  = false;
            ChkAffected.Checked = false;

            DrpType.ClearSelection();
            DrpUse.ClearSelection();
            ddlTenureType.ClearSelection();

            DrpDistrict.ClearSelection();
            BindCounties(DrpDistrict.SelectedItem.Value);
            BindSubCounty(DrpCounty.SelectedItem.Value);
            uplSubCounty.Update();
            BindVillages(DrpSubCounty.SelectedItem.Value);
            uplVillage.Update();
            ViewState["LND_HOLDINGID"] = "0";
            btn_ClearRes.Text          = "Clear";
            btn_SaveRes.Text           = "Save";
        }
コード例 #3
0
        /// <summary>
        /// to get the Land info Respondant
        /// </summary>
        private void getLandInfoRespondant()
        {
            LandInfoRespondentsBO  LIR       = new LandInfoRespondentsBO();
            LandInfoRespondentsBLL objLIRBLL = new LandInfoRespondentsBLL();

            LIR = objLIRBLL.GetLandInfoRespondentsByID(Convert.ToInt32(ViewState["LND_HOLDINGID"]));

            if (LIR != null)
            {
                DrpType.ClearSelection();
                if (LIR.LND_TYPEID > 0)
                {
                    DrpType.SelectedValue = LIR.LND_TYPEID.ToString();
                }

                DrpUse.ClearSelection();
                if (LIR.LND_USEID > 0)
                {
                    DrpUse.SelectedValue = LIR.LND_USEID.ToString();
                }

                DrpDistrict.ClearSelection();
                if (DrpDistrict.Items.FindByText(LIR.DISTRICT) != null)
                {
                    DrpDistrict.Items.FindByText(LIR.DISTRICT).Selected = true;
                }

                BindCounties(DrpDistrict.SelectedItem.Value);
                DrpCounty.ClearSelection();
                if (DrpCounty.Items.FindByText(LIR.COUNTY) != null)
                {
                    DrpCounty.Items.FindByText(LIR.COUNTY).Selected = true;
                }

                BindSubCounty(DrpCounty.SelectedItem.Value);
                DrpSubCounty.ClearSelection();
                if (DrpSubCounty.Items.FindByText(LIR.SUBCOUNTY) != null)
                {
                    DrpSubCounty.Items.FindByText(LIR.SUBCOUNTY).Selected = true;
                }

                BindVillages(DrpSubCounty.SelectedItem.Value);
                DrpVillage.ClearSelection();
                if (DrpVillage.Items.FindByText(LIR.VILLAGE) != null)
                {
                    DrpVillage.Items.FindByText(LIR.VILLAGE).Selected = true;
                }

                //DrpType.SelectedItem.Value = Convert.ToString(LIR.LND_TYPEID);
                //DrpUse.SelectedItem.Value = Convert.ToString(LIR.LND_USEID);
                //DrpDistrict.SelectedItem.Value = Convert.ToString(LIR.DISTRICT);
                //DrpCounty.SelectedItem.Value = Convert.ToString(LIR.COUNTY);
                //DrpSubCounty.SelectedItem.Value = Convert.ToString(LIR.SUBCOUNTY);
                //DrpVillage.SelectedItem.Value = Convert.ToString(LIR.VILLAGE);

                ddlTenureType.ClearSelection();
                if (ddlTenureType.Items.FindByValue(LIR.TenureId.ToString()) != null)
                {
                    ddlTenureType.SelectedValue = LIR.TenureId.ToString();
                }

                if (LIR.ISPRIMARYRESIDENCE.ToLower() == "Yes".ToLower())
                {
                    ChkPrimary.Checked = true;
                }
                else
                {
                    ChkPrimary.Checked = false;
                }

                if (LIR.ISAFFECTED.ToLower() == "Yes".ToLower())
                {
                    ChkAffected.Checked = true;
                }
                else
                {
                    ChkAffected.Checked = false;
                }

                if (LIR.TOTALSIZE != -1)
                {
                    txttotal.Text = Convert.ToString(LIR.TOTALSIZE);
                }
                else
                {
                    txttotal.Text = string.Empty;
                }

                if (LIR.TENURE != null)
                {
                    txttenure.Text = LIR.TENURE;
                }
                else
                {
                    txttenure.Text = string.Empty;
                }
            }
        }