コード例 #1
0
        private void BindData(int PageIndex)
        {
            int RecordCount = 0;

            DataTable dt = new DataTable();

            if (CategoryID == 0)
            {
                dt = bll.GetList(PageIndex, AspNetPager.PageSize, String.Empty, out RecordCount).Tables[0];
            }
            else
            {
                dt = new BrandCategoryRelationBll().GetCategoryBrandList(CategoryID);
            }

            foreach (DataRow row in dt.Rows)
            {
                row["brandlogo"] = CommonImageUpload.GetCommonImageFullUrl(Convert.ToString(row["brandlogo"]));
            }


            Repeater_Brand.DataSource = dt;
            Repeater_Brand.DataBind();

            AspNetPager.RecordCount = RecordCount;
        }
コード例 #2
0
        private void BindData()
        {
            SolutionDemandModel model = bll.GetModel(DemandID);

            Literal_Demand.Text     = model.DemandDetail;
            Literal_Field.Text      = model.FieldSituation;
            Literal_Effect.Text     = model.EffectSituation;
            Literal_Budget.Text     = model.Budget.ToString("0.00");
            Literal_Contact.Text    = model.Contactor;
            Literal_Phone.Text      = model.ContactPhone;
            Literal_Postcode.Text   = model.Postcode;
            Literal_Region.Text     = model.Region;
            Literal_Address.Text    = model.Address;
            Literal_CreateTime.Text = model.CreateTime.ToString("yyyy-MM-dd HH:mm:ss");
            Literal1_Status.Text    = Enum.GetName(typeof(SolutionDemandStatus), model.Status);

            if (model.FieldPhotoes.Contains(","))
            {
                foreach (string s in model.FieldPhotoes.Split(','))
                {
                    fieldImages.InnerHtml += String.Format("<img src=\"{0}\"/>", CommonImageUpload.GetCommonImageFullUrl(s));
                }
            }
            else
            {
                fieldImages.InnerHtml += String.Format("<img src=\"{0}\"/>", CommonImageUpload.GetCommonImageFullUrl(model.FieldPhotoes));
            }
        }
コード例 #3
0
        private void BindData()
        {
            BrandModel brand = bll.GetModel(BrandID);

            if (brand != null)
            {
                txtBrandName.Text     = brand.BrandName;
                imgBrandLogo.ImageUrl = CommonImageUpload.GetCommonImageFullUrl(brand.BrandLogo);
                txtBrief.Text         = brand.Brief;
            }
        }
コード例 #4
0
        private void BindData(int PageIndex)
        {
            int       RecordCount = 0;
            DataTable dt          = bll.GetList(PageIndex, AspNetPager.PageSize, SearchCondition, out RecordCount).Tables[0];

            foreach (DataRow row in dt.Rows)
            {
                row["brandlogo"] = CommonImageUpload.GetCommonImageFullUrl(row["brandlogo"].ToString());
            }

            GridView1.DataSource = dt;
            GridView1.DataBind();
            AspNetPager.RecordCount      = RecordCount;
            AspNetPager.CurrentPageIndex = PageIndex;
        }
コード例 #5
0
        public XmlNode GetBrandInfo()
        {
            XmlNode BrandInfoNode = xdoc.CreateElement("brandinfo");

            DataTable dt = dal.GetBrandInfo(Parameter.BrandID);

            if (dt.Rows.Count > 0)
            {
                XmlUtility.AddNewNode(BrandInfoNode, "brandid", Convert.ToString(dt.Rows[0]["brandid"]));
                XmlUtility.AddNewNode(BrandInfoNode, "categoryid", Convert.ToString(Parameter.CategoryID));
                XmlUtility.AddNewNode(BrandInfoNode, "ordertype", Convert.ToString(Parameter.OrderType));
                XmlUtility.AddNewNode(BrandInfoNode, "brandname", Convert.ToString(dt.Rows[0]["brandname"]));
                XmlUtility.AddNewNode(BrandInfoNode, "brandlogo", CommonImageUpload.GetCommonImageFullUrl(Convert.ToString(dt.Rows[0]["brandlogo"])));
                XmlUtility.AddNewNode(BrandInfoNode, "brief", Convert.ToString(dt.Rows[0]["brief"]));
            }

            return(BrandInfoNode);
        }
コード例 #6
0
        private void BindData(int PageIndex)
        {
            DataTable SuiteList   = new DataTable();
            int       RecordCount = 0;

            if (ScenceID != 0)
            {
                SuiteList = bll.GetList(PageIndex, AspNetPager.PageSize, " and scenceid = " + ScenceID, "", out RecordCount);
            }
            else
            {
                SuiteList = bll.GetList(PageIndex, AspNetPager.PageSize, "", "", out RecordCount);
            }

            foreach (DataRow row in SuiteList.Rows)
            {
                row["smallimage"]  = CommonImageUpload.GetCommonImageFullUrl(row["smallimage"].ToString());
                row["mediumimage"] = CommonImageUpload.GetCommonImageFullUrl(row["mediumimage"].ToString());
                row["largeimage"]  = CommonImageUpload.GetCommonImageFullUrl(row["largeimage"].ToString());
            }

            Repeater_Suites.DataSource = SuiteList;
            Repeater_Suites.DataBind();
        }