private void BindData()
        {
            RentProductModel rent = bll.GetModel(RentID);

            if (CategoryID == -1)
            {
                CategoryID = rent.CategoryID;
            }
            MagicCategoryModel Cate = new MagicCategoryBll().GetModel(CategoryID);

            Label_Category.Text       = Cate.CategoryName;
            Hidden_CategoryPath.Value = Cate.CategoryPath;

            TextBox_RentName.Text    = rent.RentName;
            TextBox_RentPrice.Text   = rent.RentPrice.ToString();
            TextBox_MaxRentDays.Text = rent.MaxRentTime.ToString();
            TextBox_Stock.Text       = rent.Stock.ToString();
            TextBox_Keywords.Text    = rent.Keywords;
            TextBox_Brief.Text       = rent.Brief;
            Image_MainImage.ImageUrl = MagicWorldImageRule.GetMainImageUrl(rent.SmallImage);
        }
Example #2
0
        private void BindData()
        {
            RentProductModel model = bll.GetModel(RentID);

            if (model == null)
            {
                Response.End();
            }
            MagicCategoryModel cate = new MagicCategoryBll().GetModel(model.CategoryID);

            Image_Big.ImageUrl   = MagicWorldImageRule.GetMainImageUrl(model.MediumImage);
            Image_Small.ImageUrl = MagicWorldImageRule.GetMainImageUrl(model.SmallImage);

            Literal_ProductName.Text = model.RentName;
            Literal_Category.Text    = cate.CategoryName;
            Literal_RentPrice.Text   = model.RentPrice.ToString("0.00");
            Literal_Pledge.Text      = model.CashPledge.ToString("0.00");
            Literal_Brief.Text       = model.Brief;

            Repeater_Comment.DataSource = new CommentBll().GetList(AppType.MagicWorld, RentID);
            Repeater_Comment.DataBind();
        }