예제 #1
0
        public DTO.ProductMng.SearchFilterData GetFilterData(out Library.DTO.Notification notification)
        {
            notification = new Library.DTO.Notification()
            {
                Type = Library.DTO.NotificationType.Success
            };
            DTO.ProductMng.SearchFilterData data = new DTO.ProductMng.SearchFilterData();
            data.ConfirmStatuses = new List <DTO.Support.YesNo>();
            data.ProductTypes    = new List <DTO.Support.ProductType>();
            data.Seasons         = new List <DTO.Support.Season>();

            //try to get data
            try
            {
                data.Seasons         = supportFactory.GetSeason().ToList();
                data.ProductTypes    = supportFactory.GetProductType().ToList();
                data.ConfirmStatuses = supportFactory.GetYesNo().ToList();
            }
            catch (Exception ex)
            {
                notification.Type    = Library.DTO.NotificationType.Error;
                notification.Message = ex.Message;
            }

            return(data);
        }
예제 #2
0
 public IHttpActionResult GetSearchSupportData()
 {
     BLL.ProductMng                  bll = new BLL.ProductMng(Helper.AuthHelper.GetCurrentUserFolder(ControllerContext));
     Library.DTO.Notification        notification;
     DTO.ProductMng.SearchFilterData data = bll.GetFilterData(out notification);
     return(Ok(new Library.DTO.ReturnData <DTO.ProductMng.SearchFilterData>()
     {
         Data = data, Message = notification, TotalRows = 0
     }));
 }