Example #1
0
        private void TelaPrincipal_Load(object sender, EventArgs e)
        {
            btnEntrada.Focus();
            while (usr == null)
            {
                this.Hide();
                Login tela = new Login(this);
                tela.ShowDialog();
            }
            if (usr.Idfuncionario == 0)
            {
                Application.Exit();
            }
            else
            {
                string[] nomeSplit = usr.Nome.Split(' ');
                lblUser.Text = nomeSplit[0];
                this.Show();
            }
            while (est == null && usr.Idfuncionario != 0)
            {
                IUEstabelecimento tela = new IUEstabelecimento(0, this);
                tela.ShowDialog();
                BuscaEstabelecimento();
            }

            while (config == null && usr.Idfuncionario != 0)
            {
                IUConfigMovimento tela = new IUConfigMovimento(est);
                tela.ShowDialog();
                BuscaConfiguracao();
            }

            CarregaGrid();
        }
Example #2
0
        private void configuraĆ§Ć£oToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IUConfigMovimento tela = new IUConfigMovimento(est);

            tela.ShowDialog();
            BuscaConfiguracao();
        }
Example #3
0
        public IUServico(int id, Form lista, IUContrato contr, IUConfigMovimento config)
        {
            InitializeComponent();
            oDAO        = new ServicoDAO();
            obj         = new Servicos();
            this.lista  = lista;
            this.contr  = contr;
            this.config = config;

            cboTipoCobranca.SelectedIndex = 0;

            if (id != 0)
            {
                obj = oDAO.GetById(id);

                txtIdServico.Text   = obj.Idservico.ToString();
                txtDescricao.Text   = obj.Descricao;
                txtQuantidade.Value = obj.Quantidade;
                txtVCarro.Text      = obj.ValorCarro.ToString();
                txtVMoto.Text       = obj.ValorMoto.ToString();
                txtVOutros.Text     = obj.ValorOutros.ToString();

                chkAtivo.Checked = (obj.Ativo == 1) ? true : false;

                switch (obj.TipoCobranca)
                {
                case 'H':
                {
                    cboTipoCobranca.SelectedIndex = 0;
                    break;
                }

                case 'I':
                {
                    cboTipoCobranca.SelectedIndex = 1;
                    break;
                }

                case 'D':
                {
                    cboTipoCobranca.SelectedIndex = 2;
                    break;
                }

                case 'M':
                {
                    cboTipoCobranca.SelectedIndex = 3;
                    break;
                }
                }
                btnLimpar.Enabled = false;
            }
        }
Example #4
0
 public BuscaServico(IUContrato contr, IUConfigMovimento config)
 {
     InitializeComponent();
     this.contr  = contr;
     this.config = config;
 }