protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string nick = ""; if (Request.Cookies["nick"] != null) { nick = HttpUtility.UrlDecode(Request.Cookies["nick"].Value); //"nick"; } else { nick = Session["snick"].ToString(); } if (nick == "") { Response.Write("请重新登录"); return; } DDL_App.DataSource = CacheCollection.GetAllSiteList(); DDL_App.DataTextField = "SiteName"; DDL_App.DataValueField = "SiteId"; DDL_AdsType.DataSource = CacheCollection.GetAllAdsInfo(); DDL_AdsType.DataTextField = "AdsName"; DDL_AdsType.DataValueField = "AdsId"; DDL_App.DataBind(); DDL_App.Items.Insert(0, new ListItem("请选择", Guid.Empty.ToString())); DDL_AdsType.DataBind(); DDL_AdsType.Items.Insert(0, new ListItem("请选择", Guid.Empty.ToString())); IList <CateInfo> cateList = new CateService().SelectAllCateByNick(nick); DDL_GoodsClass.DataSource = cateList; DDL_GoodsClass.DataTextField = "CateName"; DDL_GoodsClass.DataValueField = "CateId"; DDL_GoodsClass.DataBind(); DDL_GoodsClass.Items.Insert(0, new ListItem("全部", "0")); //IList<GoodsInfo> list = goodsDal.SelectAllGoodsByNick(nick); //Rpt_GoodsList.DataSource = list; //Rpt_GoodsList.DataBind(); if (string.IsNullOrEmpty(Request.QueryString["start"])) { Bind(Request.QueryString["goods"], Request.QueryString["gclass"], DateTime.MinValue, DateTime.MinValue); } else { Bind(Request.QueryString["goods"], Request.QueryString["gclass"], DateTime.Parse(Request.QueryString["start"]), DateTime.Parse(Request.QueryString["end"])); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string nick = ""; if (Request.Cookies["nick"] != null) { nick = HttpUtility.UrlDecode(Request.Cookies["nick"].Value); //"nick"; } else { nick = Session["snick"].ToString(); } if (nick == "") { Response.Write("请重新登录"); return; } DDL_App.DataSource = CacheCollection.GetAllSiteList(); DDL_App.DataTextField = "SiteName"; DDL_App.DataValueField = "SiteId"; DDL_AdsType.DataSource = CacheCollection.GetAllAdsInfo(); DDL_AdsType.DataTextField = "AdsName"; DDL_AdsType.DataValueField = "AdsId"; DDL_App.DataBind(); DDL_App.Items.Insert(0, new ListItem("请选择", Guid.Empty.ToString())); DDL_AdsType.DataBind(); DDL_AdsType.Items.Insert(0, new ListItem("请选择", Guid.Empty.ToString())); TaoBaoShopInfo info = new ShopService().SelectShopByNick(nick); ViewState["shopcid"] = "50023878"; if (info != null) { ViewState["shopcid"] = info.CateId; TB_ShppName.Text = info.Name; TB_Description.Text = info.Description; TB_ShowUrl.Text = "http://shop" + info.ShopId + ".taobao.com/"; ViewState["logourl"] = " http://logo.taobao.com/shop-logo" + info.ShopLogo; } } }