Exemplo n.º 1
0
        public static void Citeste_FileLocation()
        {
            FileLocation.DataBase             = XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/FileLocation", "DataBase").InnerText.ToString();
            FileLocation.System               = XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/FileLocation", "System").InnerText.ToString();
            FileLocation.ReportDefinitionPath = XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/FileLocation", "ReportDefinitionPath").InnerText.ToString();
            FileLocation.DirectorSalvare      = XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/FileLocation", "DirectorSalvare").InnerText.ToString();

            if (FileLocation.DataBase.Substring(FileLocation.DataBase.Length - 1, 1) != "\\")
            {
                FileLocation.DataBase = FileLocation.DataBase + "\\";
            }
            if (FileLocation.System.Substring(FileLocation.System.Length - 1, 1) != "\\")
            {
                FileLocation.System = FileLocation.System + "\\";
            }

            if (FileLocation.ReportDefinitionPath.Substring(FileLocation.ReportDefinitionPath.Length - 1, 1) != "\\")
            {
                FileLocation.ReportDefinitionPath = FileLocation.ReportDefinitionPath + "\\";
            }

            if (FileLocation.DirectorSalvare.Substring(FileLocation.DirectorSalvare.Length - 1, 1) != "\\")
            {
                FileLocation.DirectorSalvare = FileLocation.DirectorSalvare + "\\";
            }
        }
Exemplo n.º 2
0
        public static void Citeste_Diverse()
        {
            Diverse.UpdateCurs  = Verifica_Null.VER(XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Diverse", "UpdateCurs").InnerText.ToString(), "0");
            Diverse.VerificaNet = Verifica_Null.VER(XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Diverse", "VerificaNet").InnerText.ToString(), "0");

            Diverse.VerificaUpdate = Verifica_Null.VER(XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Diverse", "VerificaUpdate").InnerText.ToString(), "0");
            CONSTANTE.wwwRadacina  = Verifica_Null.VERs(XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Diverse", "www").InnerText.ToString(), "http://www.e-intrastat.ro");
        }
Exemplo n.º 3
0
 public static void Citeste_CUlori()
 {
     EuCulori.EvenRowStyle_BackColor      = Convert.ToInt64((XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Culori", "EvenRowStyle_BackColor").InnerText.ToString()));
     EuCulori.OddRowStyle_BackColor       = Convert.ToInt64((XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Culori", "OddRowStyle_BackColor").InnerText.ToString()));
     EuCulori.HighlightRowStyle_BackColor = Convert.ToInt64((XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Culori", "HighlightRowStyle_BackColor").InnerText.ToString()));
     EuCulori.HighlightRowStyle_ForeColor = Convert.ToInt64((XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Culori", "HighlightRowStyle_ForeColor").InnerText.ToString()));
     EuCulori.Meniu_Color = Convert.ToInt64((XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Culori", "Meniu_Color").InnerText.ToString()));
 }
Exemplo n.º 4
0
        public static void Citeste_Zecimale()
        {
            Rot.NrZecLei     = Convert.ToByte((XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Zecimale", "ZecRotLEI").InnerText.ToString()));
            Rot.NrZecValuta  = Convert.ToByte((XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Zecimale", "ZecRotValuta").InnerText.ToString()));
            Rot.NrZecCalcule = Convert.ToByte((XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Zecimale", "ZecRotCalcule").InnerText.ToString()));
            Rot.NrZecTaxare  = Convert.ToByte((XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Zecimale", "NrZecTaxare").InnerText.ToString()));
            bool result = false;

            if (XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Zecimale", "UseFormat").InnerText.ToString() == "1")
            {
                result = true;
            }

            CONSTANTE.UseFormat = result;
        }
Exemplo n.º 5
0
        public static void Setari_Default_XML()
        {
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat", "ValoareLocal", "125", true);
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat", "AppPath", Environment.CurrentDirectory, true);
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat", "Moneda", "EUR", true);
            //create_XML Settings _XML file


            try
            {
                XmlNode asd = XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat", "ValoareLocal");
                string  ast = asd.InnerText.ToString();
                CONSTANTE.eu.ValLicLocal = ast;
                CONSTANTE.eu.Moneda      = XML_Operatii.Citeste_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat", "Moneda").InnerText.ToString();
            }
            catch (Exception exp)
            {
                //MessageBox.Show("Frm_Pornire_Loaded Error: " + exp.Message);
                //Application.Current.Shutdown();
            }


            //setari culori
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Culori", "EvenRowStyle_BackColor", "14737632", false);
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Culori", "HighlightRowStyle_BackColor", "16711680", false);
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Culori", "HighlightRowStyle_ForeColor", "16777215", false);
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Culori", "OddRowStyle_BackColor", "12648447", false);
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Culori", "Meniu_Color", "12648447", false);


            //setari diverse
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Diverse", "UpdateCurs", "1", false);
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Diverse", "VerificareUpdate", "1", false);
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Diverse", "VerificareNet", "0", false);
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Diverse", "www", "https://www.e-intrastat.ro", false);

            //setari FileLocation
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/FileLocation", "DataBase", "C:\\E_intrastat\\System\\DataBase\\", false);
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/FileLocation", "ReportDefinitionPath", "C:\\E_intrastat\\System\\ReportDefinition\\", false);
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/FileLocation", "System", "C:\\E_intrastat\\System", false);

            try
            {
                XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/FileLocation", "DirectorSalvare", "C:\\Program Files\\INTRASTAT\\declaratii\\", false);
            }

            catch
            {
                try
                {
                    XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/FileLocation", "DirectorSalvare", "C:\\Program Files (x86)\\INTRASTAT\\declaratii\\", false);
                }
                catch
                {
                    XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/FileLocation", "DirectorSalvare", "C:\\E_intrastat\\System\\DeclaratiiXML", false);
                }
            }


            //Setari Zecimale
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Zecimale", "NrZecTaxare", "0", false);
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Zecimale", "UseFormat", "1", false);
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Zecimale", "ZecRotCalcule", "4", false);
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Zecimale", "ZecRotLEI", "0", false);
            XML_Operatii.Creaza_XML(CONSTANTE.Setting_XML_file, "/Settings/E_Intrastat/Setari/Zecimale", "ZecRotValuta", "2", false);
        }