Example #1
0
        private void BindData()
        {
            if (ProductID != 0)
            {
                GroupProductModel model = bll.GetModel(ProductID);

                this.Title = model.ProductName + "-团购-鼎鼎商城";

                Literal_ProductName.Text  = model.ProductName;
                Image_Small.ImageUrl      = GroupShoppingImageRule.GetImageUrl(model.MediumImage);
                Image_Big.ImageUrl        = GroupShoppingImageRule.GetImageUrl(model.LargeImage);
                Literal_Count.Text        = model.SuccedLine.ToString();
                Literal_CurrentCount.Text = "";
                Literal_GroupPrice.Text   = model.GroupPrice.ToString("0.00");
                Literal_MarketPrice.Text  = model.MarketPrice.ToString("0.00");
                Literal_Time.Text         = "";
                Literal_Brief.Text        = model.Description;

                if (model.ProductType == (int)GroupShoppingProductType.解决方案)
                {
                    Literal_Detail.Text    = String.Format("<div class=\"box7\" runat=\"server\"><div class=\"title\">解决方案明细</div><div class=\"content\"><p class=\"description\">{0}</p></div></div>", model.Detail);
                    Literal_Detail.Visible = true;
                }

                if (Session["group-product-apply"] != null)
                {
                    TextBox_Message.Text = Session["group-product-apply"].ToString();
                    TextBox_Message.Focus();
                }

                Repeater_ApplyList.DataSource = abll.GetList(ProductID);
                Repeater_ApplyList.DataBind();
            }
        }
Example #2
0
        private void BindData()
        {
            DropDown_ProductType.DataSource     = DataTableUtil.GetEnumKeyValue(typeof(GroupShoppingProductType));
            DropDown_ProductType.DataTextField  = "key";
            DropDown_ProductType.DataValueField = "value";
            DropDown_ProductType.DataBind();

            if (GroupProductID != 0)
            {
                GroupProductModel model = bll.GetModel(GroupProductID);


                TextBox_ProductName.Text           = model.ProductName;
                DropDown_ProductType.SelectedValue = model.ProductType.ToString();
                TextBox_ProductCode.Text           = model.ProductCode;
                TextBox_MarketPrice.Text           = model.MarketPrice.ToString("0.00");
                TextBox_GroupPrice.Text            = model.GroupPrice.ToString("0.00");
                TextBox_PrePaidPrice.Text          = model.PrePaidPrice.ToString("0.00");
                TextBox_Detail.Text        = model.Detail;
                TextBox_Brief.Text         = model.Description;
                TextBox_SuccedLine.Text    = model.SuccedLine.ToString();
                CheclBox_Recommend.Checked = model.IsRecommend;

                Image_ProductImage.ImageUrl = GroupShoppingImageRule.GetImageUrl(model.SmallImage);
            }
        }