protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         ViewState["PageCount"]   = 0;
         ViewState["CurrentPage"] = 0;
         GA             Gadmin    = new GA();
         GAController   gadmin    = new GAController();
         List <ImgInfo> Furniture = new List <ImgInfo>();
         Furniture = gadmin.HomePage(Gadmin);
         cblistUpdate.DataSource     = Furniture;
         cblistUpdate.DataTextField  = "ImgTitle";
         cblistUpdate.DataValueField = "GoodID";
         cblistUpdate.DataBind();
         dlistPictureShow.DataSource = Furniture;
         dlistPictureShow.DataBind();
         if (gadmin.UpdatePictureShow(Gadmin, 1).Count > 1)
         {
             drpdownlist.DataSource     = gadmin.UpdatePictureShow(Gadmin, 1);
             drpdownlist.DataTextField  = "ImgTitle";
             drpdownlist.DataValueField = "GoodID";
             drpdownlist.DataBind();
             drpdownlist.Items.Insert(0, new ListItem("请选择替换商品"));
         }
         int lPageCount = 0;
         lPageCount = Convert.ToInt32(gadmin.HomeCount(Gadmin));
         mPageCount = lPageCount;
         info       = new string[mPageCount];
         if (lPageCount / 10 == 0)
         {
             lPageCount = lPageCount / 10;
         }
         if (lPageCount / 10 < 1)
         {
             lPageCount = 1;
         }
         if (lPageCount % 10 > 1)
         {
             int lPage = lPageCount % 10;
             lPageCount = (lPageCount + (10 - lPage)) / 10;
         }
         lbPage.Text            = "第1页共 " + lPageCount.ToString() + "页";
         ViewState["PageCount"] = lPageCount;
         if (mPageCount <= 10)
         {
             btnUpPage.Enabled   = false;
             btnDownPage.Enabled = false;
         }
         else
         {
             btnUpPage.Enabled = false;
         }
     }
 }