Esempio n. 1
0
        private void ExecutarConsulta()
        {
            serializarNegocios.SerializarObjeto(infoComp, Form1.FileNameComp);

            //o código abaixo eu utilizo para baixar um novo arquivo phone.lvt
            //negocioServ = new ServicoNegocio(Form1.Empresa.empconexao);
            //IphoneModeloColecao colecao = negocioServ.ConsultarIphoneColecao();
            //serializarNegocios.SerializarObjeto(colecao, "Novo" + Form1.FileIphone);
            //FormMessage.ShowMessegeWarning("Download concluído!");

            string path  = Directory.GetCurrentDirectory();
            string path1 = path;

            if (!serializarNegocios.ArquivoExiste(Form1.FileIphoneCores))
            {
                path += @"\" + Form1.FileIphoneCores;
                File.Copy(path, Path.Combine(Path.GetDirectoryName(Form1.Caminho), Form1.FileIphoneCores));
            }

            if (!serializarNegocios.ArquivoExiste(Form1.FileIphone))
            {
                path1 += @"\" + Form1.FileIphone;
                File.Copy(path1, Path.Combine(Path.GetDirectoryName(Form1.Caminho), Form1.FileIphone));
            }

            Form1.encerrarThread = true;
            this.DialogResult    = DialogResult.Yes;
        }
Esempio n. 2
0
        private void ExecutarConsulta()
        {
            serializarNegocios.SerializarObjeto(infoComp, Form1.FileNameComp);

            negocioServ = new ServicoNegocio(Form1.Empresa.empconexao);

            string path  = Directory.GetCurrentDirectory();
            string path1 = path;

            if (!serializarNegocios.ArquivoExiste(Form1.FileIphoneCores))
            {
                path += @"\" + Form1.FileIphoneCores;
                File.Copy(path, Path.Combine(Path.GetDirectoryName(Form1.Caminho), Form1.FileIphoneCores));
            }

            if (!serializarNegocios.ArquivoExiste(Form1.FileIphone))
            {
                path1 += @"\" + Form1.FileIphone;
                File.Copy(path1, Path.Combine(Path.GetDirectoryName(Form1.Caminho), Form1.FileIphone));
            }

            Form1.encerrarThread = true;
            this.DialogResult    = DialogResult.Yes;
        }
Esempio n. 3
0
        public FormLogin()
        {
            InitializeComponent();

            if (serializarNegocios.ArquivoExiste(FileNameLogin))
            {
                UserInfo user = (serializarNegocios.DesserializarObjeto(FileNameLogin) as UserInfo);

                if (user != null)
                {
                    textBoxLogin.Text           = user.uselogin;
                    maskedTextBoxSenha.Text     = user.usesenha;
                    checkBoxSalvarLogin.Checked = true;
                }
            }
        }
        private void FormProdEstoque_Load(object sender, EventArgs e)
        {
            for (int i = 0; i < dataGridViewLancarEstoqueDetalhes.ColumnCount; i++)
            {
                dataGridViewLancarEstoqueDetalhes.Columns[i].AutoSizeMode = DataGridViewAutoSizeColumnMode.NotSet;
            }

            if (serializarNegocios.ArquivoExiste(FileName))
            {
                gridLancarEstoqueColecao = (serializarNegocios.DesserializarObjeto(FileName) as GridLancarEstoqueColecao);

                if (gridLancarEstoqueColecao != null)
                {
                    negocioEstoque        = new EstoqueNegocios(Form1.Empresa.empconexao, Form1.Unidade.uniassistencia);
                    estoqueLancamentoInfo = negocioEstoque.ConsultarEstoqueLancamento(gridLancarEstoqueColecao[0].id);

                    if (estoqueLancamentoInfo != null && estoqueLancamentoInfo.estoquelancamentoidunid == Form1.Unidade.uniid)
                    {
                        labelValorCod.Text             = string.Format("{0:000000}", estoqueLancamentoInfo.estoquelancamentoid);
                        labelValorData.Text            = estoqueLancamentoInfo.estoquelancamentodatahora.ToLongDateString() + " " + estoqueLancamentoInfo.estoquelancamentodatahora.ToShortTimeString();
                        textBoxFornecedorCod.Text      = string.Format("{0:000}", 0);
                        labelFornecedorDescricao.Text  = "*FORNECEDORES DIVERSOS*";
                        textBoxFornecedorCod.Enabled   = false;
                        buttonAddFornecedor.Enabled    = false;
                        buttonBuscarFornecedor.Enabled = false;
                        Cancelar          = true;
                        buttonFechar.Text = "Cancel.";

                        groupBoxItem.Enabled      = true;
                        buttonRemover.Enabled     = true;
                        buttonInicializar.Enabled = false;
                        PreencherGrid();
                        textBoxProdutoCod.Select();
                    }
                }
            }

            textBoxFornecedorCod.Select();
        }