示例#1
0
 public RarViewModel()
 {
     _RarFile            = new RarFormF6();
     AlcoCodesList       = new ObservableCollection <string>(ParserF6.GetAlcoCodesListFromXSD());
     TurnoverDataList    = new ObservableCollection <RarTurnoverData>(_RarFile.TurnoverDataList);
     BuyersList          = new ObservableCollection <RarCompany>(_RarFile.BuyersList);
     ManufacturersList   = new ObservableCollection <RarCompany>(_RarFile.ManufacturersList);
     SavingCompaniesList = new ObservableCollection <RarCompany>();
 }
示例#2
0
        private void SaveTurnoverFile()
        {
            List <RarTurnoverData> TurnoverList = TurnoverDataList.Where(s => s.Buyer == SelectedBuyer).ToList();

            SaveFileDialog saveFileDialog = new SaveFileDialog();

            saveFileDialog.FileName   = "Form11";                     // Default file name
            saveFileDialog.DefaultExt = ".xml";                       // Default file extension
            saveFileDialog.Filter     = "Xml documents (.xml)|*.xml"; // Filter files by extension
            if (saveFileDialog.ShowDialog() == true)
            {
                ParserF6.SaveTurnoverData(TurnoverList, saveFileDialog.FileName);
            }
        }
示例#3
0
        private void SaveCompaniesFile()
        {
            //List<RarCompany> CompaniesList = TurnoverDataList.Where(s => s.Buyer == SelectedBuyer).Select(p => p.Manufacturer).Distinct().ToList();

            SaveFileDialog saveFileDialog = new SaveFileDialog();

            saveFileDialog.FileName   = "Companies";                  // Default file name
            saveFileDialog.DefaultExt = ".xml";                       // Default file extension
            saveFileDialog.Filter     = "Xml documents (.xml)|*.xml"; // Filter files by extension
            if (saveFileDialog.ShowDialog() == true)
            {
                ParserF6.SaveCompanies(SavingCompaniesList.ToList(), saveFileDialog.FileName);
            }
        }