本文整理汇总了C#中Products.RetrieveProductInfo方法的典型用法代码示例。如果您正苦于以下问题:C# Products.RetrieveProductInfo方法的具体用法?C# Products.RetrieveProductInfo怎么用?C# Products.RetrieveProductInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Products
的用法示例。
在下文中一共展示了Products.RetrieveProductInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
divSuccess.Visible = false;
divError.Visible = false;
if (!Page.IsPostBack)
{
Products product = new Products();
product._productid = new Guid(Request.QueryString.Get("ProductID").ToString());
productInfoDt = product.RetrieveProductInfo();
lblProductName.Text = productInfoDt.Rows[0]["name"].ToString();
lblPrice.Text = productInfoDt.Rows[0]["price"].ToString();
lblDescription.Text = productInfoDt.Rows[0]["description"].ToString();
imgMainPicture.ImageUrl = productInfoDt.Rows[0]["photo1"].ToString();
imgPictureOne.ImageUrl = productInfoDt.Rows[0]["photo1"].ToString();
imgPictureTwo.ImageUrl = productInfoDt.Rows[0]["photo2"].ToString();
imgPictureThree.ImageUrl = productInfoDt.Rows[0]["photo3"].ToString();
imgPictureFour.ImageUrl = productInfoDt.Rows[0]["photo4"].ToString();
Bids bid = new Bids();
bid._productid = new Guid(Request.QueryString.Get("ProductID").ToString());
bid._clientid = new Guid(Session["id"].ToString());
BidsStatusDt = bid.RetrieveBidsStatus();
if (BidsStatusDt.Rows.Count == 0)
{
newbid.Visible = true;
modify.Visible = false;
changebid.Visible = false;
checkout.Visible = false;
Remove.Visible = false;
}
else if (BidsStatusDt.Rows[0]["status"].ToString() == "Pending")
{
newbid.Visible = false;
modify.Visible = true;
modifyamount.Text = BidsStatusDt.Rows[0]["amount"].ToString();
changebid.Visible = false;
checkout.Visible = false;
Remove.Visible = false;
}
else if (BidsStatusDt.Rows[0]["status"].ToString() == "Rejected")
{
newbid.Visible = false;
modify.Visible = false;
changebid.Visible = true;
checkout.Visible = false;
Remove.Visible = false;
}
else if (BidsStatusDt.Rows[0]["status"].ToString() == "Accepted")
{
newbid.Visible = false;
modify.Visible = false;
changebid.Visible = false;
checkout.Visible = true;
Remove.Visible = false;
}
else if (BidsStatusDt.Rows[0]["status"].ToString() == "Sold")
{
newbid.Visible = false;
modify.Visible = false;
changebid.Visible = false;
checkout.Visible = false;
Remove.Visible = true;
}
}
}