Example #1
0
 public string Registrar(EMA_CUSTOMER ee)
 {
     if (MA_CUSTOMERDA.GetByid(ee) == null)
     {
         return(MA_CUSTOMERDA.Insert(ee));
     }
     else
     {
         return(MA_CUSTOMERDA.Update(ee));
     }
 }
Example #2
0
 public EMA_CUSTOMER ListarPorDocumento(EMA_CUSTOMER ee)
 {
     if (ee.NUMBER_DOCUMENT == "9z")
     {
         return(MA_CUSTOMERDA.GetByid(ee));
     }
     else
     {
         return(MA_CUSTOMERDA.GetAll(ee).Where(p => p.NUMBER_DOCUMENT.ToLower().
                                               Equals(ee.NUMBER_DOCUMENT.ToLower())).SingleOrDefault());
     }
 }
Example #3
0
 public List <EMA_CUSTOMER> ListarPorNombre(EMA_CUSTOMER ee)
 {
     if (ee.DESCRIPTION_CUSTOMER == "9z")
     {
         return(MA_CUSTOMERDA.GetAll(ee).ToList());
     }
     else
     {
         return(MA_CUSTOMERDA.GetAll(ee).Where(p => p.DESCRIPTION_CUSTOMER.ToLower().
                                               Contains(ee.DESCRIPTION_CUSTOMER.ToLower())).OrderBy(x => x.DESCRIPTION_CUSTOMER).ToList());
     }
 }
Example #4
0
 public EMA_CUSTOMER ListarxId(EMA_CUSTOMER ee) => MA_CUSTOMERDA.GetByid(ee);
Example #5
0
 public List <EMA_CUSTOMER> Listar(EMA_CUSTOMER ee)
 {
     return(MA_CUSTOMERDA.GetAll(ee));
 }
Example #6
0
 public string Eliminar(EMA_CUSTOMER ee)
 {
     return(MA_CUSTOMERDA.Delete(ee));
 }