Esempio n. 1
0
 public bool CadastrarManobrista(ManobristaDTO manobrista)
 {
     using (var manobr = new Manobrista())
     {
         return manobr.CadastrarManobrista(manobrista);
     }
 }
Esempio n. 2
0
 public static bool CadastrarManobrista(ManobristaDTO manobrista)
 {
     using (var client = new LRBusiness())
     {
         return client.CadastrarManobrista(manobrista);
     }
 }
Esempio n. 3
0
 public static LR_MANOBRISTA DtoToEntity(ManobristaDTO empresa)
 {
     return new LR_MANOBRISTA
     {
         ID_MANOBRISTA = empresa.idManobrista,
         NM_MANOBRISTA = empresa.nmManobrista,
         ID_LOJA = empresa.idLoja
     };
 }
Esempio n. 4
0
 public bool CadastrarManobrista(ManobristaDTO empresa)
 {
     try
     {
         context.LR_MANOBRISTA.Add(ManobristaDTO.DtoToEntity(empresa));
         context.SaveChanges();
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return true;
 }
Esempio n. 5
0
        private void btnNovoManobrista_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtNovoManobrista.Text.Trim()))
            {
                errorProvider1.SetError(txtNovoManobrista, "Campo obrigatório");
                return;
            }
            else
            {
                var manobrista = new ManobristaDTO { nmManobrista = txtNovoManobrista.Text.Trim().ToUpper(), idLoja = this.idLoja };

                if (Manobrista.CadastrarManobrista(manobrista))
                {
                    this.Close();
                }
            }
        }