void LoadCountry()
    {
        List <ATTCountry> LSTCountry = BLLCountry.GetCountries(null, 2);

        chkBoxListCountry.DataSource     = LSTCountry;
        chkBoxListCountry.DataTextField  = "CountryNepName";
        chkBoxListCountry.DataValueField = "CountryId";
        chkBoxListCountry.DataBind();
    }
 void LoadCountry()
 {
     try
     {
         this.ddlCountry_Rqd.DataSource     = BLLCountry.GetCountries(null, 0);
         this.ddlCountry_Rqd.DataTextField  = "CountryNepName";
         this.ddlCountry_Rqd.DataValueField = "COuntryID";
         this.ddlCountry_Rqd.DataBind();
     }
     catch (Exception ex)
     {
         this.lblStatusMessage.Text = ex.Message;
         this.programmaticModalPopup.Show();
     }
 }
 void LoadCountries()
 {
     try
     {
         List <ATTCountry> lstCountries;
         lstCountries                 = BLLCountry.GetCountries(null, 1);
         Session["Countries"]         = lstCountries;
         this.grdCountries.DataSource = lstCountries;
         this.grdCountries.DataBind();
     }
     catch (Exception ex)
     {
         this.lblStatusMessage.Text = ex.Message;
         this.programmaticModalPopup.Show();
     }
 }
    //Following code has been disabled since ddlReligion not required. Ashok.
    //void LoadReligions()
    //{
    //    try
    //    {
    //        List<ATTReligion> lstReligions;
    //        lstReligions = BLLReligion.GetReligions(null, 0);
    //        this.ddlReligion.DataSource = lstReligions;
    //        this.ddlReligion.DataTextField = "ReligionNepName";
    //        this.ddlReligion.DataValueField = "ReligionId";
    //        this.ddlReligion.SelectedIndex = 0;
    //        this.ddlReligion.DataBind();
    //    }
    //    catch (Exception ex)
    //    {
    //        throw ex;
    //    }
    //}


    void LoadCountries()
    {
        try
        {
            List <ATTCountry> lstCountries;
            lstCountries = BLLCountry.GetCountries(null, 0);
            this.ddlCountry.DataSource     = lstCountries;
            this.ddlCountry.DataTextField  = "CountryEngName";
            this.ddlCountry.DataValueField = "CountryId";
            this.ddlCountry.SelectedIndex  = 0;
            this.ddlCountry.DataBind();
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = ex.Message;
            this.programmaticModalPopup.Show();
        }
    }
    void GetCountry()
    {
        try
        {
            List <ATTCountry> CountryList = BLLCountry.GetCountries(null, 0);

            ddlCountry_Rqd.DataSource     = CountryList;
            ddlCountry_Rqd.DataTextField  = "CountryEngName";
            ddlCountry_Rqd.DataValueField = "CountryID";
            ddlCountry_Rqd.DataBind();
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = ex.Message;
            this.programmaticModalPopup.Show();
            return;
        }
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            lblStatusMessage.Text = "";

            List <ATTCountry> lstCountries = (List <ATTCountry>)Session["Countries"];

            int CountryID = 0;
            if (this.grdCountries.SelectedIndex > -1)
            {
                CountryID = lstCountries[this.grdCountries.SelectedIndex].CountryId;
            }

            ATTCountry objCountries = new ATTCountry(CountryID, this.txtCountryNepName_rqd.Text.Trim(), this.txtCountryEngName.Text.Trim(), this.txtCountryCode.Text.Trim());
            CountryID = BLLCountry.SaveCountries(objCountries);

            if (this.grdCountries.SelectedIndex > -1)
            {
                lstCountries[this.grdCountries.SelectedIndex].CountryId      = CountryID;
                lstCountries[this.grdCountries.SelectedIndex].CountryNepName = this.txtCountryNepName_rqd.Text.Trim();
                lstCountries[this.grdCountries.SelectedIndex].CountryEngName = this.txtCountryEngName.Text.Trim();
                lstCountries[this.grdCountries.SelectedIndex].CountryCode    = this.txtCountryCode.Text.Trim();
            }
            else
            {
                ATTCountry objNewCountries = new ATTCountry(CountryID, this.txtCountryNepName_rqd.Text.Trim(), this.txtCountryEngName.Text.Trim(), this.txtCountryCode.Text.Trim());
                lstCountries.Add(objNewCountries);
            }


            Session["Countries"]         = lstCountries;
            this.grdCountries.DataSource = lstCountries;
            ClearComponents();
            this.lblStatusMessage.Text = "Successfully Saved";
            this.programmaticModalPopup.Show();
            this.grdCountries.DataBind();
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = ex.Message;
            this.programmaticModalPopup.Show();
        }
    }
 void LoadCountry()
 {
     try
     {
         List <ATTCountry> lst = BLLCountry.GetCountries(null, 1);
         //if (lst.Count > 0)
         //{
         //    lst.Insert(0, new ATTDegree(0, 0, "--- Select Degree ---", "Y"));
         //}
         this.lstVisit.DataSource     = lst;
         this.lstVisit.DataTextField  = "CountryNepName";
         this.lstVisit.DataValueField = "CountryID";
         this.lstVisit.DataBind();
     }
     catch (Exception ex)
     {
         this.lblStatusMessage.Text = ex.Message;
         this.programmaticModalPopup.Show();
     }
 }