Exemplo n.º 1
0
    //Get All the country
    private void GetAllCountry()
    {
        try
        {
            DataTable dtCountryShowAll = countryBLLObj.BLLShowAllCountry();

            gvCountry.DataSource = dtCountryShowAll;
            gvCountry.DataBind();
        }
        catch (Exception ex)
        {
            string m = ex.Message;
        }
    }
Exemplo n.º 2
0
 //Bind the Dropdown data in Country name
 private void ShowAllState1()
 {
     try
     {
         DataTable dtCountryShowAll = countryBLLObj.BLLShowAllCountry();
         ddlCountry.DataSource     = dtCountryShowAll;
         ddlCountry.DataTextField  = "countryName";
         ddlCountry.DataValueField = "countryId";
         ddlCountry.DataBind();
         ddlCountry.Items.Add("---Select---");
         ddlCountry.SelectedIndex = ddlCountry.Items.Count - 1;
         ddlCountry.Items[ddlCountry.Items.Count - 1].Value = "";
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }