public static void InitFileLoad(FormTypes action, FileUpLoad.FileControl control, string StrApplicationId, 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 = "FB"; uc.IsLimitCompanyCode = false; 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 = Common.CurrentLoginUserInfo.EmployeeName; uc.PageSize = 20; control.Init(uc); }
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); }
/// <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); }
public MainPage() { InitializeComponent(); //SMT.FileUpLoad.Classes. FileList.Init("LM", "CUSTOME", "Fuyicheng", "d027ed66-48c5-46cb-b24d-866b17704728"); // SMT.FileUpLoad.FileControl ss = new SMT.FileUpLoad.FileControl(bol); SMT.FileUpLoad.FileControl fc = (SMT.FileUpLoad.FileControl)sMTFileUpload1.FindName("FileList"); // ((Button)ss.FindName("btnUp")).Visibility = Visibility.Collapsed; SMT.FileUpLoad.Classes.UserConfig uc = new SMT.FileUpLoad.Classes.UserConfig(); uc.CompanyCode = "aa"; uc.IsLimitCompanyCode = false; uc.SystemCode = "OA"; uc.ModelCode = "考勤管理"; // uc.UserID = "LONGKC"; uc.ApplicationID = "smt-90156487"; // uc.NotShowDeleteButton = true; uc.NotShowThumbailChckBox = true; uc.Multiselect = true; uc.Filter = "所有文件 (*.*)|*.*"; //uc.Filter = "图片文件(*.jpg,*.gif,*.bmp)|*.jpg;*.gif;*.bmp"; uc.MaxConcurrentUploads = 5; uc.MaxSize = "10.MB"; uc.CreateName = "龙康才"; uc.OnlyShowMySelf = true; uc.PageSize = 10; // uc.NotAllowDelete = true; // uc.NotShowUploadButton = true; // uc.NotAllowDownload = true; // uc.NotAllowDelete = true; // uc.NotShowUploadButton = true; // uc.NotAllowDownload = true; fc.Init(uc); // fc.GetFileListByCompanyCode(uc.CompanyCode); // fc.GetFileListByApplicationID(uc.ApplicationID); // ss.DeleteFileByApplicationID(uc.CompanyCode, uc.SystemCode, uc.ModelCode, uc.ApplicationID); }