Esempio n. 1
0
        /// <summary>
        /// 获取原上传文件信息集合
        /// </summary>
        /// <returns></returns>
        IList<MFileInfo> GetYuanFiles()
        {
            IList<MFileInfo> items = new List<MFileInfo>();

            string[] fileid = Utils.GetFormValues(YuanFileIdClientName);
            string[] filename = Utils.GetFormValues(YuanFileNameClientName);
            string[] filepath = Utils.GetFormValues(YuanFilePathClientName);
            if (fileid == null || filename == null || filepath == null) return items;
            if (fileid.Length != filename.Length || fileid.Length != filepath.Length) return items;

            for (int i = 0; i < fileid.Length; i++)
            {
                var item = new MFileInfo();
                item.FileId = fileid[i];
                item.FileName = filename[i];
                item.FilePath = filepath[i];
                items.Add(item);
            }

            return items;
        }
Esempio n. 2
0
        /// <summary>
        /// 获取上传的文件信息
        /// </summary>
        /// <returns></returns>
        IList<MFileInfo> GetFiles()
        {
            IList<MFileInfo> items = new List<MFileInfo>();

            string[] file = Utils.GetFormValues(ClientHideID);

            if (file == null || file.Length == 0) return items;

            for (int i = 0; i < file.Length; i++)
            {
                if (string.IsNullOrEmpty(file[i])) continue;
                var s = file[i].Split('|');
                if (s.Length != 2) continue;

                var item = new MFileInfo();
                item.FileId = string.Empty;
                item.FileName = s[0];
                item.FilePath = s[1];
                items.Add(item);
            }

            return items;
        }