Ejemplo n.º 1
0
        private void BindType()
        {
            TypeBLL objTypeBLL = new TypeBLL();

            DrpType.DataSource     = objTypeBLL.GetLandType();
            DrpType.DataTextField  = "LANDTYPE";
            DrpType.DataValueField = "LND_TYPEID";
            DrpType.DataBind();
            //DrpType.Items.Insert(0, "--Select--");
        }
Ejemplo n.º 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";
        }
Ejemplo n.º 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;
                }
            }
        }
Ejemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            StudentRegistrationDAL P = new StudentRegistrationDAL();
            DrpCalendar.DataSource     = P.BindCalenderDropdown("CalName", Convert.ToInt32(Session["EMPID"]), "", 0, "");
            DrpCalendar.DataTextField  = "Cal_Name";
            DrpCalendar.DataValueField = "Cal_Name";
            DrpCalendar.DataBind();
            if (Convert.ToInt32(Session["UserId"]) == 1619)
            {
                DrpCalendar.Items.Insert(0, new ListItem("Select", ""));
            }

            PopulateCat();
            PopulateEvents();

            DataTable dt = new DataTable();
            DBH.CreateDataTable_TPS(dt, "SELECT  Cal_Name=ltrim(rtrim(Cal_Name)) ,Department=ltrim(rtrim(Department)) ,Category1=ltrim(rtrim(Category1)),Category2=ltrim(rtrim(Category2)) ,EventTitle=ltrim(rtrim(EventTitle)),ItemType=ltrim(rtrim(ItemType)),Year=ltrim(rtrim(Year)),Semester=ltrim(rtrim(Semester))  FROM [DB_SkylineCalendarEvents].[dbo].[Cal_Master] ");

            //DrpCalendar.DataSource = dt.DefaultView.ToTable(true, "Cal_Name");
            //DrpCalendar.DataTextField = "Cal_Name";
            //DrpCalendar.DataValueField = "Cal_Name";
            //DrpCalendar.DataBind();
            //DrpCalendar.Items.Insert(0, new ListItem("Select", ""));


            //DrpCat1.DataSource = dt.DefaultView.ToTable(true, "Category1");
            //DrpCat1.DataTextField = "Category1";
            //DrpCat1.DataValueField = "Category1";
            //DrpCat1.DataBind();
            //DrpCat1.Items.Insert(0, new ListItem("Select", ""));

            drpCat2.DataSource     = dt.DefaultView.ToTable(true, "Category2");
            drpCat2.DataTextField  = "Category2";
            drpCat2.DataValueField = "Category2";
            drpCat2.DataBind();
            drpCat2.Items.Insert(0, new ListItem("Select", ""));

            //drpEvent.DataSource = dt.DefaultView.ToTable(true, "EventTitle");
            //drpEvent.DataTextField = "EventTitle";
            //drpEvent.DataValueField = "EventTitle";
            //drpEvent.DataBind();
            //drpEvent.Items.Insert(0, new ListItem("Select", ""));

            DrpType.DataSource     = dt.DefaultView.ToTable(true, "ItemType");
            DrpType.DataTextField  = "ItemType";
            DrpType.DataValueField = "ItemType";
            DrpType.DataBind();
            DrpType.Items.Insert(0, new ListItem("Select", ""));

            drpYear.DataSource     = dt.DefaultView.ToTable(true, "Year");
            drpYear.DataTextField  = "Year";
            drpYear.DataValueField = "Year";
            drpYear.DataBind();
            drpYear.Items.Insert(0, new ListItem("Select", ""));

            drpSem.DataSource     = dt.DefaultView.ToTable(true, "Semester");
            drpSem.DataTextField  = "Semester";
            drpSem.DataValueField = "Semester";
            drpSem.DataBind();
            drpSem.Items.Insert(0, new ListItem("Select", ""));

            if (Convert.ToString(Session["Role"]) == "Dean" || Convert.ToString(Session["Role"]) == "COEC" || Convert.ToString(Session["Role"]) == "Admin")
            {
                PnlConsolidate.Visible = true;
            }
        }
    }