static void Main(string[] args) { var listMess = new List <string>(); //Gen new data List <string> outMessGen; GenerateDefaultData.ExcuteGenerate(out outMessGen); //kiem tra data co change List <string> outCheckChange; var exportNew = CheckChangeNumberRecordChange(out outCheckChange); List <string> outMessZip = new List <string>(); List <string> outMessCopyFile = new List <string>(); if (exportNew) { //Gen file zip to Tool ZipFile_Compression(out outMessZip); //Copy file tu Tool to Notificatin aand rename to PcstUpdate.zip ZipFile_CopyFileToNotification(out outMessCopyFile); } if (outMessGen.Count > 0) { listMess.AddRange(outMessGen); } if (outCheckChange.Count > 0) { listMess.AddRange(outCheckChange); } if (outMessZip.Count > 0) { listMess.AddRange(outMessZip); } if (outMessCopyFile.Count > 0) { listMess.AddRange(outMessCopyFile); } listMess.Add("Export new version: " + exportNew); WriteFileLog(listMess); Console.WriteLine("Success!!! "); //Console.ReadKey(); Thread.Sleep(2000); Environment.Exit(0); }
public void LoadDefaultData(DefaultDataViewModel model) { byte[] fileBytes = new byte[] { }; using (var ms = new MemoryStream()) { model.File.CopyTo(ms); fileBytes = ms.ToArray(); } DefaultData defaultData = GenerateDefaultData.LoadXml <DefaultData>(fileBytes); SaveDefaultData(defaultData); }