/// <summary> /// /// </summary> /// <param name="html"></param> /// <param name="name">控件id</param> /// <param name="selectFileButtonText">选择文件按钮文字</param> /// <param name="stratUpFileButtonText">开始上传按钮文字</param> /// <param name="objectType">表单类型</param> /// <param name="multiple">是否支持多文件</param> /// <param name="allowedFileExtensions">允许上传的格式 如"png,jpg,pdf"</param> /// <param name="fileCount">最大文件数</param> /// <param name="fileSize">最大单文件大小,以KB为单位</param> /// <param name="selectEnvet">选中触发的事件</param> ///// <param name="uploadedEnvet">上传后触发的事件</param> /// <param name="readOnly">上传后触发的事件</param> /// <returns></returns> public static MvcHtmlString MovitUploader(this HtmlHelper html, string name, string objectType, string selectFileButtonText = "选择文件", string stratUpFileButtonText = "开始上传", bool multiple = true, string keyValue = null, int fileCount = 100, long fileSize = 10240, string allowedFileExtensions = "gif,jpg,jpeg,bmp,png,doc,docx,xls,xlsx,pdf,rar,zip", string selectEnvet = null, bool readOnly = false, string uploadedEnvet = null, bool isSingel = false, bool duplicate = true ) { UploaderModel model = new UploaderModel(); model.name = name; model.multiple = multiple == true ? 1 : 0; model.selectFileButtonText = selectFileButtonText; model.stratUpFileButtonText = stratUpFileButtonText; model.objectType = objectType; model.fileCount = fileCount; model.allowedFileExtensions = allowedFileExtensions; model.fileSize = fileSize * 1024; model.selectEnvet = selectEnvet; model.uploadedEnvet = uploadedEnvet; model.duplicate = duplicate; model.keyValue = keyValue; if (!string.IsNullOrEmpty(keyValue)) { T_AttachmentBLL attBll = new T_AttachmentBLL(); model.attachments = attBll.GetFormList(keyValue, objectType); } else { model.attachments = new List <T_AttachmentEntity>(); } if (isSingel) { html.RenderPartial("~/Views/ControlScripts/_UploaderSingleScripts.cshtml", model); } else { if (readOnly) { html.RenderPartial("~/Views/ControlScripts/_UploaderReadonlyScripts.cshtml", model); } else { html.RenderPartial("~/Views/ControlScripts/_UploaderScripts.cshtml", model); } } return(MvcHtmlString.Create(string.Empty)); }
public EC_Income_GetInfoMessageHandler(MessageContext ctx) : base(ctx) { dataItemCache = new DataItemCache(); cfBll = new T_CapitalFlowBLL(); cfnbll = new T_CapitalFlow_NodeBLL(); tabll = new T_AttachmentBLL(); }
public EC_Contract_Add_GetInfoMessageHandler(MessageContext ctx) : base(ctx) { dataItemCache = new DataItemCache(); eprBll = new EcommerceProjectRelationBLL(); edpbll = new EcommerceDiscountProgramBLL(); op_parcelbll = new OP_ParcelBLL(); tabll = new T_AttachmentBLL(); }