Ejemplo n.º 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;
            }
        }
Ejemplo n.º 2
0
 void ManageCountry()
 {
     objCountry = new Store.Country.BusinessObject.Country();
     oblCountry = new Store.Country.BusinessLogic.Country();
     try
     {
         if (cmdMode == Store.Common.CommandMode.M)
         {
             objCountry.CountryID = Convert.ToInt32(txtCountryId.Text);
             //objCountry.ModifiedBy = Convert.ToInt32(Session["UserId"].ToString());
         }
         else
         {
             objCountry.CountryID = 0;
             //objCountry.CreatedBy = Convert.ToInt32(Session["UserId"].ToString());
         }
         objCountry.CountryName = Convert.ToString(txtCountry.Text);
         objMessageInfo         = oblCountry.ManageItemMaster(objCountry, cmdMode);
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Country).FullName, 1);
     }
     finally
     {
         objCountry = null;
         oblCountry = null;
     }
 }
Ejemplo n.º 3
0
 protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e)
 {
     cmdMode        = CommandMode.D;
     objCountry     = new Store.Country.BusinessObject.Country();
     oblCountry     = new Store.Country.BusinessLogic.Country();
     objMessageInfo = new MessageInfo();
     try
     {
         ImageButton btndetails = sender as ImageButton;
         GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
         objCountry.CountryID   = Convert.ToInt32(dgvCountry.DataKeys[gvrow.RowIndex].Value.ToString());
         objCountry.CountryName = "";
         //objCountry.CreatedBy = Convert.ToInt32(Session["UserId"].ToString());
         objMessageInfo = oblCountry.ManageItemMaster(objCountry, cmdMode);
         BindCountry();
         updateCountryBdInfo.Update();
         ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('" + objMessageInfo.TranMessage + "')", true);
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Country).FullName, 1);
     }
     finally
     {
         objCountry     = null;
         oblCountry     = null;
         objMessageInfo = null;
     }
 }
Ejemplo n.º 4
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;
     }
 }