Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request.QueryString["ImageAddress"] == null)
         {
             Response.Redirect("../GoodDisplay/ProductShow.aspx");
         }
         else
         {
             if (Session["UserName"] == null || Session["UserName"] == "")
             {
                 mUserName = null;
             }
             else
             {
                 mUserName = Session["UserName"].ToString();
             }
             StoreUser           User  = new StoreUser();
             StoreUserController User1 = new StoreUserController();
             string ImageAddress       = Request.QueryString["ImageAddress"];
             imgGoodShow.Src = ImageAddress;
             ImgInfo imgInfo = new ImgInfo();
             imgInfo.ImgAddress = ImageAddress;
             int            GoodID         = ImgInfo.ImgAddressGetGoodID(imgInfo);
             SingleGoodInfo singleGoodinfo = new SingleGoodInfo();
             singleGoodinfo.GoodID = GoodID;
             int SingleGoodID = SingleGoodInfo.mGoodIDGetSingleGoodID(singleGoodinfo);
             mSingleGoodID = SingleGoodID;
             if (GoodID == 0 || GoodID == null)
             {
                 Response.Redirect("../GoodDisplay/ProductShow.aspx");
             }
             List <Good>     goodInfo = new List <Good>();
             List <ImgInfo>  imgTiele = new List <ImgInfo>();
             Order           Goodinfo = new Order();
             OrderController GoodInfo = new OrderController();
             goodInfo                            = GoodInfo.Goodinfo(Goodinfo, GoodID);
             imgTiele                            = GoodInfo.GoodTitle(Goodinfo, GoodID);
             lbGoodPrice.Text                    = goodInfo[0].GoodPrice;
             lbGoodID.Text                       = goodInfo[0].GoodID.ToString();
             lbFirstName.Text                    = goodInfo[0].GoodName;
             lbSecondName.Text                   = imgTiele[0].ImgTitle;
             lbMoney.Text                        = lbGoodPrice.Text;
             mGoodCount                          = Convert.ToDouble(lbGoodPrice.Text);
             mGoodIncontory                      = goodInfo[0].GoodIncentory;
             this.linkbtn_FirstName.Text         = Good.GoodIDGetFirstClassName(GoodID);
             this.linkbtn_SecondName.Text        = Good.GoodIDGetSecondClassName(GoodID);
             this.linkbtn_ThirdName.Text         = Good.GoodIDGetThirdClassName(GoodID);
             this.linkbtn_FirstName.PostBackUrl  = "~/formerstage/GoodDisplay/FirstClass.aspx?FirstName=" + this.linkbtn_FirstName.Text + "";
             this.linkbtn_SecondName.PostBackUrl = "~/formerstage/GoodDisplay/SecondClass.aspx?SecondName=" + this.linkbtn_SecondName.Text + "";
             this.linkbtn_ThirdName.PostBackUrl  = "~/formerstage/GoodDisplay/ThirdClass.aspx?ThirdName=" + this.linkbtn_ThirdName.Text + "";
             this.DataList1.DataSource           = SingleGoodInfo.GetSingleGoodInfo(GoodID);
             DataList1.DataBind();
         }
     }
 }