예제 #1
0
        private void btnNovo_Click(object sender, EventArgs e)
        {
            IUContrato tela = new IUContrato(0, this, null);

            tela.Show();
            this.Hide();
        }
예제 #2
0
        private void dgvDados_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            int        id   = Convert.ToInt32(dgvDados.Rows[e.RowIndex].Cells[0].Value.ToString());
            IUContrato tela = new IUContrato(id, this, null);

            tela.Show();
            this.Hide();
        }
예제 #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;
            }
        }
예제 #4
0
 private void btnEditar_Click(object sender, EventArgs e)
 {
     if (dgvDados.SelectedRows.Count == 1)
     {
         int        id   = Convert.ToInt32(dgvDados.CurrentRow.Cells[0].Value.ToString());
         IUContrato tela = new IUContrato(id, this, null);
         tela.Show();
         this.Hide();
     }
     else
     {
         MessageBox.Show("Selecione apenas um Registro!!!");
     }
 }
예제 #5
0
 public BuscaServico(IUContrato contr, IUConfigMovimento config)
 {
     InitializeComponent();
     this.contr  = contr;
     this.config = config;
 }