Exemplo n.º 1
0
        private void AtualizarSiege()
        {
            //TODO: pegar da config
            string sfile = txtDiretorio.Text + "\\tempDemonOrange.txt";

            WSArquivo.WSArquivoSoapClient wsArquivo = new WSArquivo.WSArquivoSoapClient();

            FileStream objfilestream = new FileStream(sfile, FileMode.Open, FileAccess.Read);
            int        len           = (int)objfilestream.Length;

            Byte[] mybytearray = new Byte[len];
            objfilestream.Read(mybytearray, 0, len);

            //new Dados.BLO.BLO_Arquivo().CarregarSiege();
            wsArquivo.SaveDocument(mybytearray, "741852963", 2);

            objfilestream.Close();


            if (pictureBox1.InvokeRequired)
            {
                this.Invoke(new HabilitaObjetosGVGDelegate(this.HabilitaObjetosSiege), new object[] { });
                return;
            }
        }
Exemplo n.º 2
0
        void AtualizaGVG()
        {
            try
            {
                //System.Threading.Thread t = new System.Threading.Thread(() => UpdateStatus("Aguarde \nEnviando Arquivo para o Servidor"));
                //t.Start();

                string sfile = @txtDiretorio.Text + "\\tempDemonOrange.txt";


                WSArquivo.WSArquivoSoapClient wsArquivo = new WSArquivo.WSArquivoSoapClient();


                FileStream objfilestream = new FileStream(sfile, FileMode.Open, FileAccess.Read);
                int        len           = (int)objfilestream.Length;
                Byte[]     mybytearray   = new Byte[len];
                objfilestream.Read(mybytearray, 0, len);

                //new Dados.BLO.BLO_Arquivo().CarregarGVG();
                wsArquivo.SaveDocument(mybytearray, "741852963", 1);

                objfilestream.Close();


                if (pictureBox2.InvokeRequired)
                {
                    this.Invoke(new HabilitaObjetosGVGDelegate(this.HabilitaObjetosGVG), new object[] { });
                    return;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 3
0
        private void btnEfetivarCargaDefesa_Click(object sender, EventArgs e)
        {
            lblMsgDefesa.Text = "Enviando arquivo para o Servidor.";

            string sfile = txtDiretorio.Text + "\\full_log.txt";

            WSArquivo.WSArquivoSoapClient wsArquivo = new WSArquivo.WSArquivoSoapClient();

            FileStream objfilestream = new FileStream(sfile, FileMode.Open, FileAccess.Read);
            int        len           = (int)objfilestream.Length;

            Byte[] mybytearray = new Byte[len];
            objfilestream.Read(mybytearray, 0, len);

            wsArquivo.SaveDocument(mybytearray, "741852963", 3);

            objfilestream.Close();


            lblMsgDefesa.Text = "Arquivo enviado com sucesso, dentro de alguns minutos estará disponível no site.";
        }