示例#1
0
        void BindCountry()
        {
            oblCountry = new Store.Country.BusinessLogic.Country();

            try
            {
                objCountrylist = oblCountry.GetAllCountryList(0, 0, "");
                if (objCountrylist != null)
                {
                    ListItem al = new ListItem("<-Select Country->", "0", true);
                    ddlCountry.DataSource     = objCountrylist;
                    ddlCountry.DataValueField = "CountryID";
                    ddlCountry.DataTextField  = "CountryName";
                    ddlCountry.DataBind();
                    ddlCountry.Items.Insert(0, al);
                    //ddlCountry.Items.Add()
                }
                else
                {
                    ddlCountry.DataSource = null;
                    ddlCountry.DataBind();
                }
            }
            catch (Exception ex)
            {
                Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(State).FullName, 1);
            }
            finally
            {
                oblCountry     = null;
                objCountrylist = null;
            }
        }
示例#2
0
 void BindCountry()
 {
     oblCountry = new Store.Country.BusinessLogic.Country();
     try
     {
         objCountrylist = oblCountry.GetAllCountryList(0, 0, "");
         if (objCountrylist != null)
         {
             dgvCountry.DataSource = objCountrylist;
             dgvCountry.DataBind();
         }
         else
         {
             dgvCountry.DataSource = null;
             dgvCountry.DataBind();
         }
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Country).FullName, 1);
     }
     finally
     {
         oblCountry     = null;
         objCountrylist = null;
     }
 }