Ejemplo n.º 1
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);
            }
        }
Ejemplo n.º 2
0
        public void InitializeCompaniesList()
        {
            List <RarCompany> companiesList = TurnoverDataList.Where(s => s.Buyer == SelectedBuyer).Select(p => p.Manufacturer).Distinct().ToList();

            foreach (RarCompany company in companiesList)
            {
                string Inn = company.INN == null ? "" :  company.INN.Trim();
                string Kpp = company.KPP == null ? "" :  company.KPP.Trim();
                if ((Inn.Length != 10) || (Kpp.Length != 9))
                {
                    continue;
                }
                if (IsInnValid(Inn) && IsKppValid(Kpp))
                {
                    company.CounryID        = "643";
                    company.Adress.RegionId = "77";
                }
            }
            SavingCompaniesList = new ObservableCollection <RarCompany>(companiesList);
        }