コード例 #1
0
 private void SetValues(DNNGo_LayerGallery_Files PhotoItem, int fileLength, PortalSettings ps, String ModulePath)
 {
     name          = WebHelper.leftx(PhotoItem.Name, 35, "...");
     type          = "image/png";
     size          = PhotoItem.FileSize * 1024;
     progress      = "1.0";
     url           = ViewPicture(PhotoItem, ps, ModulePath);
     thumbnail_url = GetPhotoExtension(PhotoItem.FileExtension, PhotoItem.FilePath, ps, ModulePath);
     delete_url    = String.Format("{2}Resource_jQueryFileUpload.ashx?ID={0}&type=DELETE&{1}", PhotoItem.ID, WebHelper.GetScriptNameQueryString, ModulePath);
     delete_type   = "POST";
 }
コード例 #2
0
        /// <summary>
        /// 显示内容并截取数据
        /// </summary>
        /// <param name="FieldName">字段名</param>
        /// <param name="DataItem">数据项</param>
        /// <param name="Lenght">显示长度</param>
        /// <param name="Suffix">终止符号</param>
        /// <returns></returns>
        public String ViewContent(String FieldName, DNNGo_LayerGallery_Content DataItem, Int32 Lenght, String Suffix)
        {
            String Content = ViewContent(FieldName, DataItem);//先取内容

            return(WebHelper.leftx(Content, Lenght, Suffix));
        }