Beispiel #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("ВидДеят"));
            }
        }
Beispiel #2
0
        private void SetupOrganizationDetails(XElement elm, RarOurCompany ourCompany)
        {
            if (elm == null || ourCompany == null)
            {
                return;
            }
            //Реквизиты
            ourCompany.Name  = GetAttributeStringValue(elm.Attribute("Наим"));
            ourCompany.Phone = GetAttributeStringValue(elm.Attribute("ТелОрг"));
            ourCompany.Email = GetAttributeStringValue(elm.Attribute("EmailОтпр"));

            ourCompany.Adress = SetupAdress(elm.Element("АдрОрг"));

            XElement company = elm.Element("ЮЛ");

            if (company != null)
            {
                ourCompany.INN = GetAttributeStringValue(company.Attribute("ИННЮЛ"));
                ourCompany.KPP = GetAttributeStringValue(company.Attribute("КППЮЛ"));
            }
            else
            {
                XElement individual = elm.Element("ФЛ");
                if (individual != null)
                {
                    ourCompany.INN = GetAttributeStringValue(individual.Attribute("ИННФЛ"));
                }
            }
        }
Beispiel #3
0
        private void SetupOrganization(XElement organization, RarOurCompany ourCompany)
        {
            if (organization == null || ourCompany == null)
            {
                return;
            }

            //Реквизиты
            SetupOrganizationDetails(organization.Element("Реквизиты"), ourCompany);

            //ОтветЛицо
            if (organization.Element("ОтветЛицо") != null)
            {
                SetupOrganizationBigBoss(organization.Element("ОтветЛицо").Element("Руководитель"), ourCompany.Director);
                SetupOrganizationBigBoss(organization.Element("ОтветЛицо").Element("Главбух"), ourCompany.Accountant);
            }

            //Деятельность
            SetupOrganizationActivity(organization.Element("Деятельность"), ourCompany);
        }