예제 #1
0
        /// <summary>
        /// 读写文件记录数据的相关信息
        /// </summary>
        public static string  RedFileTxt(DownloadInfoModel model, string filepath)
        {
            StreamReader sr   = new StreamReader(filepath + "\\" + model.RndPrefix + ".txt", Encoding.Default);
            String       line = sr.ReadToEnd();

            sr.Close();
            return(line);
        }
예제 #2
0
        /// <summary>
        /// 创建一个文件记录数据的相关信息
        /// </summary>
        public static void AppendFileTxt(DownloadInfoModel model, string filepath, string text)
        {
            FileStream   fs = new FileStream(filepath + "\\" + model.RndPrefix + ".txt", FileMode.Append);
            StreamWriter sw = new StreamWriter(fs);

            //开始写入
            sw.WriteLine(text);
            //清空缓冲区
            sw.Flush();
            //关闭流
            sw.Close();
            fs.Close();
        }
예제 #3
0
 public ArchivesData Init(DownloadInfoModel model)
 {
     return(new ArchivesData(model));
 }
예제 #4
0
 public ArchivesData(DownloadInfoModel model)
 {
     _model = model;
 }
예제 #5
0
 public static HealthExamResult Init(DownloadInfoModel model)
 {
     return(new HealthExamResult(model));
 }
예제 #6
0
 public HealthExamResult(DownloadInfoModel model)
 {
     _model = model;
 }
예제 #7
0
 public static string GetFileDowLoadUrl(DownloadInfoModel model)
 {
     return(ConfigurationManager.AppSettings["FileDowLoadUrl"] + model.Yljgbm + "/createfile/" + model.RndPrefix + "/delete/");
 }
예제 #8
0
 public BaseData Init(DownloadInfoModel model)
 {
     return(new BaseData(model));
 }
예제 #9
0
 public BaseData(DownloadInfoModel model)
 {
     _model = model;
 }