Ejemplo n.º 1
0
 private void EntityToTela(Entity.Configuracao c)
 {
     txtRazao.Text       = c.Razao;
     txtFantasia.Text    = c.Fantasia;
     txtCNPJ.Text        = c.CNPJ;
     txtEndereco.Text    = c.Endereco;
     txtNumero.Text      = c.Numero;
     txtTelefone.Text    = c.Telefone;
     txtResponsavel.Text = c.Responsavel;
     txtQtdVeiculos.Text = c.QtdVeiculos;
     txtQtdAreas.Text    = c.QtdAreas;
 }
Ejemplo n.º 2
0
        public Configuracao()
        {
            InitializeComponent();

            ConfiguracoesBLL BLL = new ConfiguracoesBLL();

            conf = BLL.Busca();

            if (conf != null)
            {
                EntityToTela(conf);
            }
        }
Ejemplo n.º 3
0
        private Entity.Configuracao TelaToEntity()
        {
            Entity.Configuracao c = new Entity.Configuracao();
            c.Razao       = txtRazao.Text;
            c.Fantasia    = txtFantasia.Text;
            c.CNPJ        = txtCNPJ.Text;
            c.Endereco    = txtEndereco.Text;
            c.Numero      = txtNumero.Text;
            c.Telefone    = txtTelefone.Text;
            c.Responsavel = txtResponsavel.Text;
            c.QtdVeiculos = txtQtdVeiculos.Text;
            c.QtdAreas    = txtQtdAreas.Text;

            return(c);
        }
Ejemplo n.º 4
0
        public CadChaves()
        {
            InitializeComponent();

            ConfiguracoesBLL BLL3 = new ConfiguracoesBLL();

            conf = BLL3.Busca();

            if (conf != null)
            {
                int qtd;
                try { qtd = Convert.ToInt32(conf.QtdAreas); } catch { qtd = 1; }
                for (int i = 1; i <= qtd; i++)
                {
                    comboArea.Items.Add(i);
                }
            }
        }
Ejemplo n.º 5
0
        private void btnSalvar_Click(object sender, EventArgs e)
        {
            Entity.Configuracao co  = new Entity.Configuracao();
            ConfiguracoesBLL    BLL = new ConfiguracoesBLL();

            co = TelaToEntity();

            if (BLL.Atualiza(co))
            {
                MessageBox.Show("Sistema Atualizado");
            }
            else
            {
                MessageBox.Show("Verifique os campos Obrigatórios");
                MensagemErro();
            }

            MensagemErro();
        }
Ejemplo n.º 6
0
        public CheckList()
        {
            InitializeComponent();

            ConfiguracoesBLL BLL3 = new ConfiguracoesBLL();

            conf = BLL3.Busca();

            if (conf != null)
            {
                int qtd;
                try { qtd = Convert.ToInt32(conf.QtdAreas); } catch { qtd = 1; }
                for (int i = 1; i <= qtd; i++)
                {
                    comboArea.Items.Add(i);
                }
            }



            OleoBLL BLL = new OleoBLL();

            veiculos = BLL.ListaVeiculos();
            if (veiculos != null)
            {
                foreach (Veiculo p in veiculos)
                {
                    if (p.Situacao == 0)
                    {
                        comboPlaca.Items.Add(p.Placa);
                        veiculosB.Add(p);
                    }
                }
            }

            CadItemBLL BLL2 = new CadItemBLL();

            item = BLL2.ListaItem();


            if (item != null)
            {
                check1.Visible = true;
                check1.Text    = item[0].Nome;

                if (item.Count > 1)
                {
                    check2.Visible = true;
                    check2.Text    = item[1].Nome;
                }
                if (item.Count > 2)
                {
                    check3.Visible = true;
                    check3.Text    = item[2].Nome;
                }
                if (item.Count > 3)
                {
                    check4.Visible = true;
                    check4.Text    = item[3].Nome;
                }
                if (item.Count > 4)
                {
                    check5.Visible = true;
                    check5.Text    = item[4].Nome;
                }
                if (item.Count > 5)
                {
                    check6.Visible = true;
                    check6.Text    = item[5].Nome;
                }
                if (item.Count > 6)
                {
                    check7.Visible = true;
                    check7.Text    = item[6].Nome;
                }
                if (item.Count > 7)
                {
                    check8.Visible = true;
                    check8.Text    = item[7].Nome;
                }
                if (item.Count > 8)
                {
                    check9.Visible = true;
                    check9.Text    = item[8].Nome;
                }
                if (item.Count > 9)
                {
                    check10.Visible = true;
                    check10.Text    = item[9].Nome;
                }
                if (item.Count > 10)
                {
                    check11.Visible = true;
                    check11.Text    = item[10].Nome;
                }
                if (item.Count > 11)
                {
                    check12.Visible = true;
                    check12.Text    = item[11].Nome;
                }
                if (item.Count > 12)
                {
                    check13.Visible = true;
                    check13.Text    = item[12].Nome;
                }
                if (item.Count > 13)
                {
                    check14.Visible = true;
                    check14.Text    = item[13].Nome;
                }
                if (item.Count > 14)
                {
                    check15.Visible = true;
                    check15.Text    = item[14].Nome;
                }
                if (item.Count > 15)
                {
                    check16.Visible = true;
                    check16.Text    = item[15].Nome;
                }
                if (item.Count > 16)
                {
                    check17.Visible = true;
                    check17.Text    = item[16].Nome;
                }
                if (item.Count > 17)
                {
                    check18.Visible = true;
                    check18.Text    = item[17].Nome;
                }
                if (item.Count > 18)
                {
                    check19.Visible = true;
                    check19.Text    = item[18].Nome;
                }
                if (item.Count > 19)
                {
                    check20.Visible = true;
                    check20.Text    = item[19].Nome;
                }
                if (item.Count > 20)
                {
                    check21.Visible = true;
                    check21.Text    = item[20].Nome;
                }
                if (item.Count > 21)
                {
                    check22.Visible = true;
                    check22.Text    = item[21].Nome;
                }
            }



            dateTimeInicio.Value = DateTime.Now;

            txtTatico.Text = Autenticacao.GetApelido();

            MensagemErro();
        }