Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                Place pl = new Place();
                ratingList = pl.GetTop3Rating();

                DatalistRating.DataSource = ratingList;
                DatalistRating.DataBind();

                string reg = ddlRegion.SelectedItem.Value;
                regionList = pl.SelectByRegion(reg);
                DatalistRegion.DataSource = regionList;
                DatalistRegion.DataBind();
            }
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                Place pl = new Place();
                pll = pl.GetAllPlaces();

                DDLPlaces.Items.Clear();
                DDLPlaces.Items.Insert(0, new ListItem("--Select--", "0"));
                DDLPlaces.AppendDataBoundItems = true;
                DDLPlaces.DataTextField        = "PName";
                DDLPlaces.DataValueField       = "PlId";
                DDLPlaces.DataSource           = pll;
                DDLPlaces.DataBind();

                Place ppl = new Place();
                rll = ppl.GetTop3Rating();

                DatalistRating.DataSource = rll;
                DatalistRating.DataBind();

                if (Session["ItinId"] != null)
                {
                    int       id = Convert.ToInt32(Session["ItinId"]);
                    Itinerary ii = new Itinerary();
                    ii = ii.selectbyidd(id);
                    if (ii != null)
                    {
                        NameTB.Text = ii.IName;

                        DDLPlaces.SelectedValue = ii.PlId.ToString();
                    }
                    else
                    {
                        Response.Redirect("TimeAndDate.aspx");
                    }
                }
            }
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                //CalendarDate.Visible = false;
                Place pl = new Place();
                pll = pl.GetAllPlaces();

                DDLPlaces.Items.Clear();
                DDLPlaces.Items.Insert(0, new ListItem("--Select--", "0"));
                DDLPlaces.AppendDataBoundItems = true;
                DDLPlaces.DataTextField        = "PName";
                DDLPlaces.DataValueField       = "PlId";
                DDLPlaces.DataSource           = pll;
                DDLPlaces.DataBind();

                Place ppl = new Place();
                rll = ppl.GetTop3Rating();

                DatalistRating.DataSource = rll;
                DatalistRating.DataBind();
            }
        }