Esempio n. 1
0
 public static void InitFileLoad(string strApplicationID, FormTypes action, FileUpLoad.FileControl control, bool AllowDelete)
 {
     SMT.FileUpLoad.Classes.UserConfig uc = new SMT.FileUpLoad.Classes.UserConfig();
     uc.CompanyCode = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
     uc.SystemCode = "WF";
     uc.ModelCode = "FLOW_FLOWRECORDDETAIL_T";
     uc.UserID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
     uc.ApplicationID = strApplicationID;
     uc.NotShowThumbailChckBox = true;
     if (action == FormTypes.Browse || action == FormTypes.Audit)
     {
         uc.NotShowUploadButton = true;
         uc.NotShowDeleteButton = true;
         uc.NotAllowDelete = true;
     }
     if (!AllowDelete)
     {
         uc.NotShowDeleteButton = true;
     }
     uc.Multiselect = true;
     uc.Filter = "所有文件 (*.*)|*.*";
     //uc.Filter = "图片文件(*.jpg,*.gif,*.bmp)|*.jpg;*.gif;*.bmp";
     uc.MaxConcurrentUploads = 5;
     uc.MaxSize = "20.MB";
     uc.CreateName = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeName;
     uc.PageSize = 20;
     control.Init(uc);
 }
Esempio n. 2
0
      /// <summary>
 /// 新上传控件调用
 /// </summary>
 /// <param name="strModelCode">模块编码,一般为表名</param>
 /// <param name="strApplicationID">表单ID</param>
 /// <param name="action">动作</param>
 /// <param name="control">上传控件</param>
 /// <param name="AllowDelete">是否允许删除</param>
 public static void InitFileLoad(string strApplicationID, ViewState action, FileUpLoad.FileControl control, bool AllowDelete)
 {
     SMT.FileUpLoad.Classes.UserConfig uc = new SMT.FileUpLoad.Classes.UserConfig();
     uc.CompanyCode = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
     uc.SystemCode = "Platform";
     uc.ModelCode = "News";
     uc.UserID = Common.CurrentLoginUserInfo.EmployeeID;
     uc.ApplicationID = strApplicationID;
     uc.NotShowThumbailChckBox = true;
     //if (action == ViewState.Browse || action == ViewState.Audit)
     //{
     //    uc.NotShowUploadButton = true;
     //    uc.NotShowDeleteButton = true;
     //    uc.NotAllowDelete = true;
     //}
     if (!AllowDelete)
     {
         uc.NotShowDeleteButton = true;
     }
     uc.Multiselect = true;
     uc.Filter = "图片文件(*.png, *.jpg)|*.png;*.jpg";
     //uc.Filter = "图片文件(*.jpg,*.gif,*.bmp)|*.jpg;*.gif;*.bmp";
     uc.MaxConcurrentUploads = 1;
     uc.MaxSize = "20.MB";
     uc.CreateName = Common.CurrentLoginUserInfo.EmployeeName;
     uc.PageSize = 20;
     control.Init(uc);
 }