Example #1
0
        public void InterfaceDMS()
        {
            config = XMLRW.Readxml("SFTP");

            DataRow rowtp = config.Rows[0];

            //HOST = Convert.ToString(rowtp["HOST"]);
            //USER = Convert.ToString(rowtp["USER"]);
            //SFTPKEY = Encripter.Desencriptar(Convert.ToString(rowtp["SFTPKEY"]));
            //textBox8.Text = Convert.ToString(rowtp["PUERTO"]);
            AUTOMATICO = Convert.ToString(rowtp["AUTOMATICO"]);


            if (AUTOMATICO == "YES")
            {
                load_data_empresa_suc(11);

                ImportRegionUser.Columns.Add("cdRegion", typeof(string));
                ImportRegionUser.Columns.Add("cdRegionType", typeof(string));
                ImportRegionUser.Columns.Add("dsRegion", typeof(string));
                ImportRegionUser.Columns.Add("cdRegionStatus", typeof(string));
                ImportRegionUser.Columns.Add("cdParentRegion", typeof(string));
                ImportRegionUser.Columns.Add("cdUser", typeof(string));
                ImportRegionUser.Columns.Add("nmFirstName", typeof(string));
                ImportRegionUser.Columns.Add("nmLastName", typeof(string));
                ImportRegionUser.Columns.Add("nrPhone1", typeof(string));
                ImportRegionUser.Columns.Add("nrPhone2", typeof(string));
                ImportRegionUser.Columns.Add("Email", typeof(string));
                ImportRegionUser.Columns.Add("cdUserStatus", typeof(string));

                ImportStore.Columns.Add("cdStore", typeof(string));
                ImportStore.Columns.Add("cdStatus", typeof(string));
                ImportStore.Columns.Add("cdStoreBrand", typeof(string));
                ImportStore.Columns.Add("dsName", typeof(string));
                ImportStore.Columns.Add("dsCorporateName", typeof(string));
                ImportStore.Columns.Add("cdClass1", typeof(string));
                ImportStore.Columns.Add("cdClass2", typeof(string));
                ImportStore.Columns.Add("cdCity", typeof(string));
                ImportStore.Columns.Add("cdRegion", typeof(string));
                ImportStore.Columns.Add("nmAdress", typeof(string));
                ImportStore.Columns.Add("nrAdress", typeof(string));
                ImportStore.Columns.Add("nmAddresComplement", typeof(string));
                ImportStore.Columns.Add("nrZipCode", typeof(string));
                ImportStore.Columns.Add("nmNeighborthood", typeof(string));

                ImportStorerror.Columns.Add("cdStore", typeof(string));
                ImportStorerror.Columns.Add("cderror", typeof(string));

                Proceso = 1;

                procesamiento();
            }
            else //Si el Correct.XML AUTOMATICO esta configurado como NO (osea que Manual) carga el formulario
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new CORECTX_APP.Informatica.Unilever.InterfaceDMS());
            }
        }
Example #2
0
        private void InterfaceDMS_Load(object sender, EventArgs e)
        {
            config = XMLRW.Readxml("SFTP");

            DataRow rowtp = config.Rows[0];

            //HOST = Convert.ToString(rowtp["HOST"]);
            //USER = Convert.ToString(rowtp["USER"]);
            //SFTPKEY = Encripter.Desencriptar(Convert.ToString(rowtp["SFTPKEY"]));
            //textBox8.Text = Convert.ToString(rowtp["PUERTO"]);
            AUTOMATICO = Convert.ToString(rowtp["AUTOMATICO"]);

            load_data_empresa_suc(11);

            ImportRegionUser.Columns.Add("cdRegion", typeof(string));
            ImportRegionUser.Columns.Add("cdRegionType", typeof(string));
            ImportRegionUser.Columns.Add("dsRegion", typeof(string));
            ImportRegionUser.Columns.Add("cdRegionStatus", typeof(string));
            ImportRegionUser.Columns.Add("cdParentRegion", typeof(string));
            ImportRegionUser.Columns.Add("cdUser", typeof(string));
            ImportRegionUser.Columns.Add("nmFirstName", typeof(string));
            ImportRegionUser.Columns.Add("nmLastName", typeof(string));
            ImportRegionUser.Columns.Add("nrPhone1", typeof(string));
            ImportRegionUser.Columns.Add("nrPhone2", typeof(string));
            ImportRegionUser.Columns.Add("Email", typeof(string));
            ImportRegionUser.Columns.Add("cdUserStatus", typeof(string));

            ImportStore.Columns.Add("cdStore", typeof(string));
            ImportStore.Columns.Add("cdStatus", typeof(string));
            ImportStore.Columns.Add("cdStoreBrand", typeof(string));
            ImportStore.Columns.Add("dsName", typeof(string));
            ImportStore.Columns.Add("dsCorporateName", typeof(string));
            ImportStore.Columns.Add("cdClass1", typeof(string));
            ImportStore.Columns.Add("cdClass2", typeof(string));
            ImportStore.Columns.Add("cdCity", typeof(string));
            ImportStore.Columns.Add("cdRegion", typeof(string));
            ImportStore.Columns.Add("nmAdress", typeof(string));
            ImportStore.Columns.Add("nrAdress", typeof(string));
            ImportStore.Columns.Add("nmAddresComplement", typeof(string));
            ImportStore.Columns.Add("nrZipCode", typeof(string));
            ImportStore.Columns.Add("nmNeighborthood", typeof(string));

            ImportStorerror.Columns.Add("cdStore", typeof(string));
            ImportStorerror.Columns.Add("cderror", typeof(string));


            if (AUTOMATICO == "YES")
            {
                Proceso = 1;

                dateTimePicker1.Enabled = false;
                dateTimePicker2.Enabled = false;
                checkBox1.Checked       = true;
                checkBox2.Checked       = true;
                checkBox3.Checked       = true;
                checkBox4.Checked       = true;
                checkBox5.Checked       = true;
                checkBox6.Checked       = true;
                checkBox7.Checked       = true;
                checkBox8.Checked       = true;
                //  button1_Click(null, null);
                button1.Enabled = false;

                procesamiento();
            }
            else
            {
                Proceso = 2;
            }
        }