Пример #1
0
 public IDataResult <List <Customer> > GetAll()
 {
     if (DateTime.Now.Hour == 23)
     {
         return(new ErrorDataResult <List <Customer> >(Messages.MaintenanceTime));
     }
     return(new SuccessDataResult <List <Customer> >(_customerDAL.GetAll(), Messages.UsersListed));
 }
Пример #2
0
 public Customers Add(Customers entity)
 {
     try
     {
         var customer = _CustomerDAL.GetAll();
         var IsThere  = (from c in customer where c.Email == entity.Email && c.FirstName == entity.FirstName && c.LastName == entity.LastName select c.ID).FirstOrDefault();
         if (IsThere == 0)
         {
             _CustomerDAL.Add(entity);
             return(entity);
         }
         else
         {
             return(Get(IsThere));
         }
     }
     catch (Exception)
     {
         return(entity);
     }
 }
Пример #3
0
 public IDataResult <List <NCustomer> > GetAll()
 {
     return(new SuccessDataResult <List <NCustomer> >(_iCustomerDal.GetAll()));
 }
Пример #4
0
 public IDataResult <List <Customer> > GetAll()
 {
     return(new SuccessDataResult <List <Customer> >(_customerDAL.GetAll()));
 }
Пример #5
0
 public IDataResult <List <Customer> > GetAll()
 {
     return(new SuccessDataResult <List <Customer> >(_customerDAL.GetAll(), Messages.CustomersListed));
 }
 public IEnumerable <Course> GetAll()
 {
     return(customerDAL.GetAll());
 }
Пример #7
0
 public IDataResult <List <Customer> > GetAll()
 {
     return(new SuccessDataResult <List <Customer> >(_iCustomerDal.GetAll(), Messages.ListAll));
 }
Пример #8
0
 public async Task <IEnumerable <CustomerViewModel> > GetAll()
 {
     return(await _CustomerDAL.GetAll());
 }