public Response Update(Request <AttributeGroupUpdate> request)
 {
     try
     {
         ValidateBaseRequest(request);
         var attributeGroupService = AttributeGroupService.GetInstance();
         return(attributeGroupService.Update(request));
     }
     catch (RestaurantException ex)
     {
         return(new Response
         {
             ErrorCode = ex.ErrorCode
         });
     }
     catch (Exception e)
     {
         return(new Response
         {
             ErrorCode = new ErrorCode
             {
                 ErrorMessage = e.Message,
                 ErrorNumber = ErrorNumber.GeneralError
             }
         });
     }
 }
Пример #2
0
 public static List <AttributeGroup> GetAttributeGroups(Request <BaseList> request)
 {
     try
     {
         if (AttributeGroups == null)
         {
             var attributeGroupService = AttributeGroupService.GetInstance();
             var response = attributeGroupService.List(new Request());
             AttributeGroups = response.Data;
         }
         return(AttributeGroups.Where(m => CheckBasicFilter(m, request)).ToList());
     }
     catch (RestaurantException ex)
     {
         throw ex;
     }
     catch (Exception e)
     {
         throw e;
     }
 }