コード例 #1
0
        public RelatorioManutencao()
        {
            InitializeComponent();

            OleoBLL BLL = new OleoBLL();

            veiculos = BLL.ListaVeiculos();

            if (veiculos != null)
            {
                comboPlaca.Items.Add("TODAS");
                foreach (Veiculo p in veiculos)
                {
                    comboPlaca.Items.Add(p.Placa);
                }
            }

            //SETA O FINAL DO DATEPIKER PARA HOJE
            dateFim.Value = DateTime.Now;

            //SETA O INICIO DO DATEPIKER PARA INICIO DO MES

            DateTime dia = new DateTime();

            dia = DateTime.Now;
            dia = new DateTime(dia.Year, dia.Month, 1);

            dateInicio.Value = dia.Date;
        }
コード例 #2
0
        public List <ProblemasVTR> buscar()
        {
            OleoBLL             BLL              = new OleoBLL();
            List <Veiculo>      Veiculos         = BLL.ListaVeiculos();
            List <Problema>     Problemas        = ListaProblemas();
            List <ProblemasVTR> ListaDeProblemas = new List <ProblemasVTR>();



            if (Veiculos != null)
            {
                foreach (var v in Veiculos)
                {
                    ProblemasVTR p = new ProblemasVTR();
                    p.Placa = v.Placa;
                    p.VTR   = v;
                    if (Problemas != null)
                    {
                        foreach (var l in Problemas)
                        {
                            if (l.Placa.Equals(p.Placa))
                            {
                                p.Problemas.Add(l);
                            }
                        }
                    }
                    ListaDeProblemas.Add(p);
                }
            }

            return(ListaDeProblemas);
        }
コード例 #3
0
ファイル: Oleo.cs プロジェクト: fernandolfla/checklist-win
        public Oleo()
        {
            InitializeComponent();

            OleoBLL BLL = new OleoBLL();

            veiculos = BLL.ListaVeiculos();

            if (veiculos != null)
            {
                foreach (Veiculo p in veiculos)
                {
                    comboPlaca.Items.Add(p.Placa);
                }
            }
        }
コード例 #4
0
ファイル: Oleo.cs プロジェクト: fernandolfla/checklist-win
        private void btnSalvar_Click(object sender, EventArgs e)
        {
            OleoBD  c   = new OleoBD();
            OleoBLL BLL = new OleoBLL();

            c = TelaToEntity();
            ManutencaoBD m = OleoToManutencao(c);


            if (BLL.Cadastra(c, m))
            {
                MessageBox.Show("Cadastro Realizado com Sucesso");
                LimpaTela();
            }
            else
            {
                MessageBox.Show("Verifique os campos Obrigatórios");
                MensagemErro();
            }
            MensagemErro();
        }
コード例 #5
0
        public MovSaidas(MovCaixa mv)
        {
            InitializeComponent();

            m = mv;

            ApenasNumerico(txtCupom);
            ApenasNumerico(txtKM);
            AplicarEventos(txtValor);

            OleoBLL BLL = new OleoBLL();

            veiculos = BLL.ListaVeiculos();

            if (veiculos != null)
            {
                foreach (Veiculo p in veiculos)
                {
                    comboPlaca.Items.Add(p.Placa);
                }
            }

            MensagemErro();
        }
コード例 #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();
        }
コード例 #7
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);



            Button button = new Button(this);

            SetContentView(Resource.Layout.CheckList);


            RadioButton Vtr1  = FindViewById <RadioButton>(Resource.Id.VTR1);
            RadioButton Vtr2  = FindViewById <RadioButton>(Resource.Id.VTR2);
            RadioButton Vtr3  = FindViewById <RadioButton>(Resource.Id.VTR3);
            RadioButton Area1 = FindViewById <RadioButton>(Resource.Id.Area1);
            RadioButton Area2 = FindViewById <RadioButton>(Resource.Id.Area2);

            //AO CLICAR NOS SELETORES ELE ABAIXA O TECLADO
            Area1.Click += delegate { HideKeybord(); };
            Area2.Click += delegate { HideKeybord(); };
            Vtr1.Click  += delegate { HideKeybord(); };
            Vtr2.Click  += delegate { HideKeybord(); };
            Vtr3.Click  += delegate { HideKeybord(); };

            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);
                        if (p.Id.Equals("1"))
                        {
                            Vtr1.Visibility = ViewStates.Visible;
                        }
                        else if (p.Id.Equals("2"))
                        {
                            Vtr2.Visibility = ViewStates.Visible;
                        }
                        else if (p.Id.Equals("3"))
                        {
                            Vtr3.Visibility = ViewStates.Visible;
                        }
                    }
                }
            }


            TextView tatico = FindViewById <TextView>(Resource.Id.Tatico);

            tatico.Text = "TÁTICO   " + Autenticacao.GetApelido();

            //TELA TO ENTITY


            Button btnProximo = FindViewById <Button>(Resource.Id.btnPro);

            btnProximo.Click += delegate {
                Aguarde.MostraAguarde(true, this);


                var task = Task.Factory.StartNew(() =>
                {
                    result = CheckChaves();
                });
                task.ContinueWith(
                    t =>
                {
                    Aguarde.MostraAguarde(false, this);
                    if (result)
                    {
                        var activity = new Intent(this, typeof(CheckChavesActivity));
                        StartActivity(activity);
                    }
                    else
                    {
                        Toast.MakeText(this, "VERIFIQUE OS CAMPOS OBRIGATÓRIOS", ToastLength.Long).Show();
                    }
                }, TaskScheduler.FromCurrentSynchronizationContext());


                //Toast.MakeText(this, "IR PARA TELA DE CHECKCHAVES", ToastLength.Long).Show();
            };
        }