Example #1
0
        private void BOTAOLOCALIZAR_Click(object sender, EventArgs e)
        {
            FservicosLoc servicoLocFrm = new FservicosLoc();

            servicoLocFrm.ShowDialog();

            if (servicoLocFrm.codigoretornado != "" && servicoLocFrm.codigoretornado != null)
            {
                ServicoModelo   serivco     = new ServicoModelo();
                ServicoControle srvControle = new ServicoControle();
                serivco.codigo = int.Parse(servicoLocFrm.codigoretornado);
                if (serivco.codigo > 0)
                {
                    serivco = srvControle.atualizatela(serivco);

                    EDITCODIGO.Text    = Convert.ToString(serivco.codigo);
                    EDITDESCRICAO.Text = serivco.descricao;
                }
            }
            BOTAONOVO_Click(sender, e);
        }
Example #2
0
        private void BOTAOLOCALIZASERVICO_Click(object sender, EventArgs e)
        {
            FservicosLoc servicosFrmLoc = new FservicosLoc();

            servicosFrmLoc.ShowDialog();
            if (servicosFrmLoc.codigoretornado != "" && servicosFrmLoc.codigoretornado != null)
            {
                ServicoModelo servico = new ServicoModelo();
                servico.codigo = int.Parse(servicosFrmLoc.codigoretornado);
                ServicoControle servicocontrole = new ServicoControle();
                servico = servicocontrole.atualizatela(servico);
                if (servico.codigo > 0)
                {
                    EDITMANUTENCAOSERVICOCODIGO.Text         = Convert.ToString(servico.codigo);
                    EDITMANUTENCAOSERVICODESCRICAO.Text      = servico.descricao;
                    EDITMANUTENCAOSERVICOQTDE.Enabled        = true;
                    EDITMANUTENCAOSERVICOVLRUNITARIO.Enabled = true;
                    EDITMANUTENCAOSERVICOVLRTOTAL.Enabled    = true;
                    BOTAOSERVICOINCLUIR.Enabled = true;
                }
            }
        }