Esempio n. 1
0
 public List <RapDto> GetListCustomer(string customer)
 {
     try
     {
         using (var context = new RAPEntities())
         {
             List <RAP_View> list    = context.RAP_View.Where(c => c.ClientNM == customer).ToList();
             List <RapDto>   listRap = _converter.DB2DTO_RAP(list);
             return(listRap);
         }
     }
     catch (Exception ex)
     {
         new Notification {
             Message = ex.Message
         };
         return(new List <RapDto>());
     }
 }
Esempio n. 2
0
 public List <RapDto> GetListSale(string sale)
 {
     try
     {
         using (var context = new RAPEntities())
         {
             List <RAP_View> list    = context.RAP_View.Where(s => s.SaleNM == sale).ToList();
             List <RapDto>   listRap = _converter.DB2DTO_RAP(list);
             return(listRap);
         }
     }
     catch (Exception ex)
     {
         new Notification {
             Message = ex.Message
         };
         return(new List <RapDto>());
     }
 }
Esempio n. 3
0
 public List <RapDto> GetRapListReport(out Notification notification)
 {
     try
     {
         using (var context = new RAPEntities())
         {
             var list    = new List <RAP_View>();
             var listRap = _converter.DB2DTO_RAP(list);
             notification = new Notification {
                 Message = "success", Type = NotificationType.Success
             };
             return(listRap);
         }
     }
     catch (Exception ex)
     {
         notification = new Notification {
             Message = ex.Message, Type = NotificationType.Error
         };
         return(new List <RapDto>());
     }
 }