Esempio n. 1
0
        private void SetupOrganizationActivity(XElement elm, RarOurCompany ourCompany)
        {
            if (elm == null || ourCompany == null)
            {
                return;
            }

            if (elm.Element("Лицензируемая") != null)
            {
                foreach (XNode node in elm.Element("Лицензируемая").Elements("Лицензия"))
                {
                    RarLicense license = new RarLicense();
                    XElement   el      = (XElement)node;
                    license.SeriesNumber = GetAttributeStringValue(el.Attribute("СерНомЛиц"));
                    license.DateFrom     = DateTime.Parse(el.Attribute("ДатаНачЛиц").Value);
                    license.DateTo       = DateTime.Parse(el.Attribute("ДатаОконЛиц").Value);
                    license.BusinesType  = GetAttributeStringValue(el.Attribute("ВидДеят"));
                    ourCompany.LicenseList.Add(license);
                }
            }

            XElement nolactivity = elm.Element("Нелицензируемая");

            if (elm.Element("Нелицензируемая") != null)
            {
                ourCompany.UnLisenseActivity = GetAttributeStringValue(elm.Element("Нелицензируемая").Attribute("ВидДеят"));
            }
        }
Esempio n. 2
0
 public RarTurnoverData()
 {
     Subdevision  = new RarSubdevision();
     Manufacturer = new RarCompany();
     Buyer        = new RarCompany();
     License      = new RarLicense();
 }
Esempio n. 3
0
 public RarLicense(RarLicense license)
 {
     ID           = license.ID;
     SeriesNumber = license.SeriesNumber;
     Issuer       = license.Issuer;
     BusinesType  = license.BusinesType;
     DateFrom     = license.DateFrom;
     DateTo       = license.DateTo;
 }
Esempio n. 4
0
        private void SetupTurnoverData(XElement turnoverdata, RarFormF6 formF6)
        {
            RarSubdevision subdevision = new RarSubdevision();

            subdevision.Name = (string)turnoverdata.Attribute("Наим");
            subdevision.KPP  = (string)turnoverdata.Attribute("КППЮЛ");
            //subdevision.SalePresented = (bool)turnoverdata.Attribute("НаличиеПоставки");
            //subdevision.ReturnPresented = (bool)turnoverdata.Attribute("НаличиеВозврата");
            subdevision.Adress = SetupAdress(turnoverdata.Element("АдрОрг"));
            formF6.OurCompany.SubdevisionList.Add(subdevision);
            foreach (XNode nodeAlcoCode in turnoverdata.Elements("Оборот"))
            {
                XElement elAlcoCode = (XElement)nodeAlcoCode;
                foreach (XNode nodeManufacturer in elAlcoCode.Elements("СведПроизвИмпорт"))
                {
                    XElement   elManufacturer = (XElement)nodeManufacturer;
                    string     manufacturID   = (string)elManufacturer.Attribute("ИдПроизвИмп");
                    RarCompany manufacturer   = formF6.ManufacturerList.Where(p => p.ID == manufacturID).First();
                    foreach (XNode nodeBuyer in elManufacturer.Elements("Получатель"))
                    {
                        XElement   elBuyer = (XElement)nodeBuyer;
                        string     buyerID = (string)elBuyer.Attribute("ИдПолучателя");
                        RarCompany buyer   = formF6.BuyerList.Where(p => p.ID == buyerID).First();
                        buyer.IsUsed = true;
                        string     licenseID = (string)elBuyer.Attribute("ИдЛицензии");
                        RarLicense license   = buyer.LicenseList.Where(s => s.ID == licenseID).FirstOrDefault();

                        foreach (XNode nodeDocument in elBuyer.Elements("Поставка"))
                        {
                            XElement elDocument = (XElement)nodeDocument;

                            RarTurnoverData data = new RarTurnoverData();
                            data.Subdevision  = subdevision;
                            data.AlcoCode     = (string)elAlcoCode.Attribute("П000000000003");
                            data.Manufacturer = manufacturer;
                            data.Buyer        = buyer;
                            data.License      = license;

                            //data.NotificationDate=      DateTime.Parse(el.Element("СведПроизвИмпорт").Element("Получатель").Element("Поставка").Attribute("П000000000015").Value);
                            //data.NotificationNumber =   (string)el.Element("СведПроизвИмпорт").Element("Получатель").Element("Поставка").Attribute("П000000000016");
                            //data.NotificationTurnover = (double)el.Element("СведПроизвИмпорт").Element("Получатель").Element("Поставка").Attribute("П000000000017");
                            data.DocumentDate   = DateTime.Parse(elDocument.Attribute("П000000000018").Value);
                            data.DocumentNumber = (string)elDocument.Attribute("П000000000019");
                            //data.CustomsDeclarationNumber = (string)el.Element("СведПроизвИмпорт").Element("Получатель").Element("Поставка").Attribute("П000000000020");
                            data.Turnover = (double)elDocument.Attribute("П000000000021");
                            formF6.TurnoverDataList.Add(data);
                        }
                    }
                }
            }
        }
Esempio n. 5
0
 public RarTurnoverData(RarTurnoverData turnoverData)
 {
     AlcoCode                 = turnoverData.AlcoCode;
     NotificationDate         = turnoverData.NotificationDate;
     NotificationNumber       = turnoverData.NotificationNumber;
     NotificationTurnover     = turnoverData.NotificationTurnover;
     DocumentDate             = turnoverData.DocumentDate;
     DocumentNumber           = turnoverData.DocumentNumber;
     CustomsDeclarationNumber = turnoverData.CustomsDeclarationNumber;
     Turnover                 = turnoverData.Turnover;
     Subdevision              = turnoverData.Subdevision;
     Manufacturer             = turnoverData.Manufacturer;
     Buyer   = turnoverData.Buyer;
     License = turnoverData.License;
 }
Esempio n. 6
0
        private void SetupLisences(XElement lisenses, RarCompany rc)
        {
            if (lisenses == null || rc == null)
            {
                return;
            }

            foreach (XNode node in lisenses.Elements("Лицензия"))
            {
                RarLicense license = new RarLicense();
                XElement   el      = (XElement)node;
                license.ID           = GetAttributeStringValue(el.Attribute("ИдЛицензии"));
                license.SeriesNumber = GetAttributeStringValue(el.Attribute("П000000000011"));
                license.DateFrom     = DateTime.Parse(el.Attribute("П000000000012").Value);
                license.DateTo       = DateTime.Parse(el.Attribute("П000000000013").Value);
                license.Issuer       = GetAttributeStringValue(el.Attribute("П000000000014"));
                rc.LicenseList.Add(license);
            }
        }