Esempio n. 1
0
        private void Bind()
        {
            //查询条件
            GetSearchItem();

            int  totalRecords = 0;
            HWTV bll          = new HWTV();

            rpData.DataSource = bll.GetList(pageIndex, pageSize, out totalRecords, sqlWhere, parms == null ? null : parms.ToArray());
            rpData.DataBind();

            myDataAppend.Append("<div id=\"myDataForPage\" style=\"display:none;\">[{\"PageIndex\":\"" + pageIndex + "\",\"PageSize\":\"" + pageSize + "\",\"TotalRecord\":\"" + totalRecords + "\",\"QueryStr\":\"" + queryStr + "\"}]</div>");
        }
Esempio n. 2
0
        private void Bind()
        {
            if (!Id.Equals(Guid.Empty))
            {
                Page.Title = "编辑电视台视频";
                HWTV bll   = new HWTV();
                var  model = bll.GetModel(Id);
                if (model != null)
                {
                    txtName.Value       = model.HWTVName;
                    hId.Value           = Id.ToString();
                    hTurnTo.Value       = model.IsTurnTo.ToString();
                    txtSort.Value       = model.Sort.ToString();
                    txtProgramURL.Value = model.ProgramAddress;

                    if (model.HWTVIcon != null && !string.IsNullOrEmpty(model.HWTVIcon.ToString()))
                    {
                        CommunionPictureInfo md = new CommunionPictureInfo();// GetModel(object Id)
                        CommunionPicture     communionPicture = new CommunionPicture();
                        md = communionPicture.GetModel(Guid.Parse(model.HWTVIcon.ToString()));
                        if (md != null)
                        {
                            imgSinglePicture.Src = string.Format("{0}{1}/PC/{1}_1{2}", md.FileDirectory, md.RandomFolder, md.FileExtension);
                            hdimg.Value          = md.Id.ToString();
                        }
                    }

                    if (model.IsDisable)
                    {
                        rdFalse.Checked = false;
                        rdTrue.Checked  = true;
                    }
                    else
                    {
                        rdFalse.Checked = true;
                        rdTrue.Checked  = false;
                    }
                }
            }
        }