Exemple #1
0
        /// <summary>
        /// Search the widget parameters
        /// </summary>
        /// <param name="si"></param>
        /// <param name="widget"></param>
        /// <returns></returns>
        public JqGridSearchOut SearchWidgetParameters(JqSearchIn si, string widget)
        {
            var data =
                GetAllWidgets()
                .FirstOrDefault(c => c.Widget.Equals(widget, StringComparison.CurrentCultureIgnoreCase));

            if (data != null)
            {
                return(si.Search(data.Parameters.AsQueryable()));
            }
            return(si.Search(new List <WidgetParameter>().AsQueryable()));
        }
        /// <summary>
        /// Search the protected document logs
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchProtectedDocumentLogs(JqSearchIn si)
        {
            var data = GetAll();
            var protectedDocumentLogs = Maps(data);

            return(si.Search(protectedDocumentLogs));
        }
        /// <summary>
        /// Search the rotating image groups
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchRotatingImageGroups(JqSearchIn si)
        {
            var data = GetAll();
            var rotatingImageGroups = Maps(data);

            return(si.Search(rotatingImageGroups));
        }
Exemple #4
0
        /// <summary>
        /// Search the form tabs
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchFormTabs(JqSearchIn si)
        {
            var data     = GetAll();
            var formTabs = Maps(data);

            return(si.Search(formTabs));
        }
Exemple #5
0
        /// <summary>
        /// search the users.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchUsers(JqSearchIn si)
        {
            var users = GetAll().ToList().Select(u => new UserModel
            {
                Id             = u.Id,
                Email          = u.Email,
                Password       = u.Password,
                FirstName      = u.FirstName,
                LastName       = u.LastName,
                AvatarFileName = u.AvatarFileName,
                LastLogin      = u.LastLogin,
                Phone          = u.Phone,
                IdentityNumber = u.IdentityNumber,
                Status         = u.Status,
                UserGroups     = u.UserInGroups.Any() ? string.Join(",", u.UserInGroups.Select(g => g.UserGroup.Name)) : string.Empty,
                RecordActive   = u.RecordActive,
                RecordOrder    = u.RecordOrder,
                Created        = u.Created,
                CreatedBy      = u.CreatedBy,
                Updated        = u.Updated,
                UpdatedBy      = u.UpdatedBy
            }).AsQueryable();

            return(si.Search(users));
        }
Exemple #6
0
        /// <summary>
        /// Search the link trackers for monthly click through
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchLinkTrackers(JqSearchIn si, LinkTrackerMonthlyClickThroughSearchModel searchModel)
        {
            var data         = SearchLinkTrackers(searchModel);
            var linkTrackers = Maps(data, searchModel);

            return(si.Search(linkTrackers));
        }
        /// <summary>
        /// Search group permission
        /// </summary>
        /// <param name="si"></param>
        /// <param name="userGroupId"></param>
        /// <returns></returns>
        public JqGridSearchOut SearchGroupPermissions(JqSearchIn si, int userGroupId)
        {
            var groupPermissionModel = GetPermissionSettings(userGroupId);
            var permissions          = groupPermissionModel.Permissions.Where(m => m.HasPermission).AsQueryable();

            return(si.Search(permissions));
        }
        /// <summary>
        /// Search the user login histories.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchUserLoginHistories(JqSearchIn si, UserLoginHistorySearchModel model)
        {
            var data = SearchUserLoginHistories(model);

            var userLoginHistories = Maps(data);

            return(si.Search(userLoginHistories));
        }
        /// <summary>
        /// Search the subscription logs.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchSubscriptionLogs(JqSearchIn si)
        {
            var data = GetAll();

            var subscriptionLogs = Maps(data);

            return(si.Search(subscriptionLogs));
        }
        /// <summary>
        /// Search the slide in helps
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchSlideInHelps(JqSearchIn si, int languageId)
        {
            var data = SearchSlideInHelps(languageId);

            var slideInHelps = Maps(data);

            return(si.Search(slideInHelps));
        }
        /// <summary>
        /// Search the localized resources
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchLocalizedResources(JqSearchIn si, LocalizedResourceSearchModel model)
        {
            var data = SearchLocalizedResources(model);

            var localizedResources = Maps(data);

            return(si.Search(localizedResources));
        }
Exemple #12
0
        /// <summary>
        /// Search the toolbars.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchToolbars(JqSearchIn si)
        {
            var data = GetAll();

            var toolbar = Maps(data);

            return(si.Search(toolbar));
        }
        /// <summary>
        /// Search the event schedules
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchEventSchedules(JqSearchIn si, int?eventId)
        {
            var data = SearchEventSchedules(eventId);

            var eventSchedules = Maps(data);

            return(si.Search(eventSchedules));
        }
        /// <summary>
        /// Search the testimonials
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchTestimonials(JqSearchIn si)
        {
            var data = GetAll();

            var testimonials = Maps(data);

            return(si.Search(testimonials));
        }
Exemple #15
0
        /// <summary>
        /// Search the link trackers
        /// </summary>
        /// <param name="si"></param>
        /// <param name="pageId"></param>
        /// <returns></returns>
        public JqGridSearchOut SearchLinkTrackersByPage(JqSearchIn si, int pageId)
        {
            var data = SearchLinkTrackers(pageId);

            var linkTrackers = Maps(data, new LinkTrackerSearchModel());

            return(si.Search(linkTrackers));
        }
Exemple #16
0
        /// <summary>
        /// Search the templates
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchTemplates(JqSearchIn si, WidgetTemplateSearchModel model)
        {
            var data = SearchTemplates(model);

            var templates = Maps(data);

            return(si.Search(templates));
        }
Exemple #17
0
        /// <summary>
        /// Search the client Navigations
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchClientNavigations(JqSearchIn si)
        {
            var data = GetAll();

            var clientNavigations = Maps(data);

            return(si.Search(clientNavigations));
        }
Exemple #18
0
        /// <summary>
        /// Search the languages
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchLanguages(JqSearchIn si)
        {
            var data = GetAll();

            var languages = Maps(data);

            return(si.Search(languages));
        }
Exemple #19
0
        /// <summary>
        /// Search the remote authenticate configurations
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchRemoteAuthentications(JqSearchIn si)
        {
            var data = GetAll();

            var remoteAuthentications = Maps(data);

            return(si.Search(remoteAuthentications));
        }
Exemple #20
0
        /// <summary>
        /// Search location types
        /// </summary>
        /// <param name="si"></param>
        /// <param name="locationId"></param>
        /// <returns></returns>
        public JqGridSearchOut SearchLocationTypes(JqSearchIn si, int?locationId)
        {
            var data = SearchLocationTypesByLocation(locationId);

            var locationTypes = Maps(data);

            return(si.Search(locationTypes));
        }
        /// <summary>
        /// Search the Associates.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchAssociates(JqSearchIn si, AssociateSearchModel model)
        {
            var data = SearchAssociates(model);

            var associates = Maps(data);

            return(si.Search(associates));
        }
Exemple #22
0
        /// <summary>
        /// Search the anonymous contacts
        /// </summary>
        /// <param name="si"></param>
        /// <param name="model"></param>
        /// <returns></returns>
        public JqGridSearchOut SearchAnonymousContacts(JqSearchIn si, AnonymousContactSearchModel model)
        {
            var data = SearchAnonymousContacts(model);

            var anonymousContactts = Maps(data);

            return(si.Search(anonymousContactts));
        }
Exemple #23
0
        /// <summary>
        /// Search contacts
        /// </summary>
        /// <param name="si"></param>
        /// <param name="contactGroupId"></param>
        /// <returns></returns>
        public JqGridSearchOut SearchContactsByContactGroup(JqSearchIn si, int contactGroupId)
        {
            var data = SearchContactsByContactGroup(contactGroupId);

            var contacts = Maps(data);

            return(si.Search(contacts));
        }
Exemple #24
0
        /// <summary>
        /// Search the Locations.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchLocations(JqSearchIn si, LocationSearchModel model)
        {
            var data = SearchLocations(model);

            var locations = Maps(data);

            return(si.Search(locations));
        }
Exemple #25
0
        /// <summary>
        /// Search contacts
        /// </summary>
        /// <param name="si"></param>
        /// <param name="searchModel"></param>
        /// <returns></returns>
        public JqGridSearchOut SearchContacts(JqSearchIn si, ContactSearchModel searchModel)
        {
            var data = SearchContacts(searchModel);

            var contacts = Maps(data);

            return(si.Search(contacts));
        }
Exemple #26
0
        /// <summary>
        /// Search company user contacts
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchCompanyUserContacts(JqSearchIn si, int userId)
        {
            var data = SearchCompanyContacts().Where(x => x.UserId.HasValue && x.UserId == userId);

            var contacts = Maps(data);

            return(si.Search(contacts));
        }
Exemple #27
0
        /// <summary>
        /// Search the email accounts
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchEmailAccounts(JqSearchIn si)
        {
            var data = GetAll();

            var emailAccounts = Maps(data);

            return(si.Search(emailAccounts));
        }
Exemple #28
0
        /// <summary>
        /// Search the background tasks
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchBackgroundTasks(JqSearchIn si)
        {
            var data = GetAll();

            var backgroundTasks = Maps(data);

            return(si.Search(backgroundTasks));
        }
        /// <summary>
        /// Search the body templates.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchBodyTemplates(JqSearchIn si)
        {
            var data = GetAll();

            var bodyTemplates = Maps(data);

            return(si.Search(bodyTemplates));
        }
Exemple #30
0
        /// <summary>
        /// Search contacts
        /// </summary>
        /// <param name="si"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        public JqGridSearchOut SearchContactsByUser(JqSearchIn si, int userId)
        {
            var data = SearchContactsByUser(userId);

            var contacts = Maps(data);

            return(si.Search(contacts));
        }
        /// <summary>
        /// search the testimonials.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchTestimonials(JqSearchIn si)
        {
            var testimonials = GetAll().Select(u => new TestimonialModel
            {
                Id = u.Id,
                Author = u.Author,
                Content = u.Content,
                AuthorDescription = u.AuthorDescription,
                AuthorImageUrl = u.AuthorImageUrl,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(testimonials);
        }
        /// <summary>
        /// search the HotelBookings.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchHotelBookings(JqSearchIn si)
        {
            var hotelBookings = GetAll().Select(u => new HotelBookingModel
            {
                Id = u.Id,
                TotalMoney = u.TotalMoney,
                Note = u.Note,
                Status = u.Status,
                HotelCustomerId = u.HotelCustomerId,
                HotelCustomerName = u.HotelCustomer.FullName,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(hotelBookings);
        }
        /// <summary>
        /// search the PageTemplates.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchPageTemplates(JqSearchIn si)
        {
            var pageTemplates = GetAll().Select(u => new PageTemplateModel
            {
                Id = u.Id,
                Name = u.Name,
                ParentId = u.ParentId,
                ParentName = u.ParentId.HasValue ? u.PageTemplate1.Name : string.Empty,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(pageTemplates);
        }
        /// <summary>
        /// search the rotating image groups.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchRotatingImageGroups(JqSearchIn si)
        {
            var rotatingImageGroups = GetAll().Select(u => new RotatingImageGroupModel
                {
                    Id = u.Id,
                    Name = u.Name,
                    Settings = u.Settings,
                    RecordActive = u.RecordActive,
                    RecordOrder = u.RecordOrder,
                    Created = u.Created,
                    CreatedBy = u.CreatedBy,
                    Updated = u.Updated,
                    UpdatedBy = u.UpdatedBy
                });

            return si.Search(rotatingImageGroups);
        }
        /// <summary>
        /// search the rotating images.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchRotatingImages(JqSearchIn si)
        {
            var rotatingImages = GetAll().Select(u => new RotatingImageModel
            {
                Id = u.Id,
                ImageUrl = u.ImageUrl,
                Url = u.Url,
                GroupId = u.GroupId,
                GroupName = u.RotatingImageGroup.Name,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(rotatingImages);
        }
Exemple #36
0
        /// <summary>
        /// search the Languages.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchLanguages(JqSearchIn si)
        {
            var languages = GetAll().Select(u => new LanguageModel
            {
                Id = u.Id,
                Name = u.Name,
                ShortName = u.ShortName,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(languages);
        }
        /// <summary>
        /// search the HotelServices.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchHotelServices(JqSearchIn si)
        {
            var hotelServices = GetAll().Select(u => new HotelServiceModel
            {
                Id = u.Id,
                Name = u.Name,
                ServiceIcon = u.ServiceIcon,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(hotelServices);
        }
Exemple #38
0
        /// <summary>
        /// search the banners.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchBanners(JqSearchIn si)
        {
            var banners = GetAll().Select(b => new BannerModel
            {
                Id = b.Id,
                Text = b.Text,
                Url = b.Url,
                ImageUrl = b.ImageUrl,
                GroupName = b.GroupName,
                RecordActive = b.RecordActive,
                RecordOrder = b.RecordOrder,
                Created = b.Created,
                CreatedBy = b.CreatedBy,
                Updated = b.Updated,
                UpdatedBy = b.UpdatedBy
            });

            return si.Search(banners);
        }
Exemple #39
0
        /// <summary>
        /// search the users.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchUsers(JqSearchIn si)
        {
            var users = GetAll().ToList().Select(u => new UserModel
            {
                Id = u.Id,
                Email = u.Email,
                Password = u.Password,
                FirstName = u.FirstName,
                LastName = u.LastName,
                AvatarFileName = u.AvatarFileName,
                LastLogin = u.LastLogin,
                Phone = u.Phone,
                IdentityNumber = u.IdentityNumber,
                Status = u.Status,
                UserGroups = u.UserInGroups.Any() ? string.Join(",", u.UserInGroups.Select(g => g.UserGroup.Name)) : string.Empty,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            }).AsQueryable();

            return si.Search(users);
        }
Exemple #40
0
        /// <summary>
        /// search the Menus.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchMenus(JqSearchIn si)
        {
            var menus = GetAll().Select(u => new MenuModel
            {
                Id = u.Id,
                Url = u.Url,
                Controller = u.Controller,
                Action = u.Action,
                Name = u.Name,
                Hierarchy = u.Hierarchy,
                MenuIcon = u.MenuIcon,
                ParentId = u.ParentId,
                ParentName = u.Menu1.Name,
                Visible = u.Visible,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(menus);
        }
Exemple #41
0
        /// <summary>
        /// search the user groups.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchNews(JqSearchIn si)
        {
            var news = GetAll().ToList().Select(u => new NewsModel
            {
                Id = u.Id,
                Title = u.Title,
                Description = u.Description,
                ImageUrl = u.ImageUrl,
                Content = u.Content,
                Status = u.Status,
                IsHotNews = u.IsHotNews,
                Categories = string.Join(",", u.NewsNewsCategories.Select(c => c.NewsCategory.Name)),
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            }).AsQueryable();

            return si.Search(news);
        }
        /// <summary>
        /// search the email accounts.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchEmailAccounts(JqSearchIn si)
        {
            var emailAccounts = GetAll().Select(u => new EmailAccountModel
            {
                Id = u.Id,
                Email = u.Email,
                DisplayName = u.DisplayName,
                IsDefault = u.IsDefault,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(emailAccounts);
        }
Exemple #43
0
        /// <summary>
        /// search the HotelCustomers.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchHotelCustomers(JqSearchIn si)
        {
            var hotelCustomers = GetAll().Select(u => new HotelCustomerModel
            {
                Id = u.Id,
                FullName = u.FullName,
                Email = u.Email,
                IndentityNumber = u.IndentityNumber,
                Address = u.Address,
                Country = u.Country,
                Phone = u.Phone,
                Note = u.Note,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(hotelCustomers);
        }
        /// <summary>
        /// search the FileTemplates.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchFileTemplates(JqSearchIn si)
        {
            var fileTemplates = GetAll().Select(u => new FileTemplateModel
            {
                Id = u.Id,
                Name = u.Name,
                Controller = u.Controller,
                Action = u.Action,
                Parameters = u.Parameters,
                PageTemplateId = u.PageTemplateId,
                PageTemplateName = u.PageTemplateId.HasValue ? u.PageTemplate.Name : string.Empty,
                ParentId = u.ParentId,
                ParentName = u.ParentId.HasValue ? u.FileTemplate1.Name : string.Empty,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(fileTemplates);
        }
Exemple #45
0
        /// <summary>
        /// search the HotelRooms.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchHotelRooms(JqSearchIn si)
        {
            var hotelRooms = GetAll().Select(u => new HotelRoomModel
            {
                Id = u.Id,
                Name = u.Name,
                Status = u.Status,
                HotelRoomTypeId = u.HotelRoomTypeId,
                HotelRoomTypeName = u.HotelRoomType.Name,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(hotelRooms);
        }
        /// <summary>
        /// search the testimonials.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchCommands(JqSearchIn si)
        {
            var testimonials = GetAll().Select(c => new SQLCommandHistoryModel
            {
                Id = c.Id,
                Query = c.Query,
                RecordActive = c.RecordActive,
                RecordOrder = c.RecordOrder,
                Created = c.Created,
                CreatedBy = c.CreatedBy,
                Updated = c.Updated,
                UpdatedBy = c.UpdatedBy
            });

            return si.Search(testimonials);
        }
        /// <summary>
        /// search the user groups.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchSettingTypes(JqSearchIn si)
        {
            var settingTypes = GetAll().Select(u => new SettingTypeModel
            {
                Id = u.Id,
                Name = u.Name,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(settingTypes);
        }
Exemple #48
0
        /// <summary>
        /// search the ClientMenus.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchClientMenus(JqSearchIn si)
        {
            var clientMenus = GetAll().Select(u => new ClientMenuModel
            {
                Id = u.Id,
                Url = u.Url,
                Name = u.Name,
                StartPublishingDate = u.StartPublishingDate,
                EndPublishingDate = u.EndPublishingDate,
                IsPageMenu = u.PageId.HasValue,
                Hierarchy = u.Hierarchy,
                ParentId = u.ParentId,
                ParentName = u.ClientMenu1.Name,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(clientMenus);
        }
Exemple #49
0
        /// <summary>
        /// search the user groups.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchPageLogs(JqSearchIn si)
        {
            var pageLogs = GetAll().Select(audit => new PageLogModel
                {
                    Id = audit.Id,
                    PageId = audit.PageId,
                    Title = audit.Title,
                    ChangeLog = audit.ChangeLog,
                    FileTemplateId = audit.FileTemplateId,
                    PageTemplateId = audit.PageTemplateId,
                    Status = audit.Status,
                    FriendlyUrl = audit.FriendlyUrl,
                    ParentId = audit.ParentId,
                    Created = audit.Created,
                    CreatedBy = audit.CreatedBy
                });

            return si.Search(pageLogs);
        }
        /// <summary>
        /// search the room types.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchHotelRoomTypes(JqSearchIn si)
        {
            var hotelRoomTypes = GetAll().Select(u => new HotelRoomTypeModel
            {
                Id = u.Id,
                Name = u.Name,
                Description = u.Description,
                Price = u.Price,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(hotelRoomTypes);
        }
        /// <summary>
        /// search the LocalizedResources.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchLocalizedResources(JqSearchIn si, string language)
        {
            var localizedResources = Fetch(l => l.LanguageId.Equals(language)).Select(u => new LocalizedResourceModel
            {
                Id = u.Id,
                TextKey = u.TextKey,
                LanguageId = u.LanguageId,
                DefaultValue = u.DefaultValue,
                TranslatedValue = u.TranslatedValue,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(localizedResources);
        }
 /// <summary>
 /// Search curly brackets
 /// </summary>
 /// <param name="si"></param>
 /// <returns></returns>
 public JqGridSearchOut SearchCurlyBrackets(JqSearchIn si)
 {
     var curlyBrackets = GetAllCurlyBracketsOfApplication().AsQueryable();
     return si.Search(curlyBrackets);
 }
Exemple #53
0
        /// <summary>
        /// search the user groups.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchTemplates(JqSearchIn si)
        {
            var templates = GetAll().Select(u => new TemplateModel
            {
                Id = u.Id,
                Name = u.Name,
                DataType = u.DataType,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(templates);
        }
Exemple #54
0
        /// <summary>
        /// search the tags.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchTags(JqSearchIn si)
        {
            var tags = GetAll().Select(u => new TagModel
            {
                Id = u.Id,
                Name = u.Name,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(tags);
        }
        /// <summary>
        /// search the NewsCategories.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchNewsCategories(JqSearchIn si)
        {
            var newsCategories = GetAll().Select(u => new NewsCategoryModel
            {
                Id = u.Id,
                Name = u.Name,
                Description = u.Description,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                ParentId = u.ParentId,
                ParentName = u.NewsCategory1.Name,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(newsCategories);
        }
Exemple #56
0
        /// <summary>
        /// search the user groups.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchUserGroups(JqSearchIn si)
        {
            var userGroups = GetAll().Select(u => new UserGroupModel
            {
                Id = u.Id,
                Name = u.Name,
                Description = u.Description,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            });

            return si.Search(userGroups);
        }
Exemple #57
0
        /// <summary>
        /// search the Pages.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchPages(JqSearchIn si)
        {
            var pages = GetAll().Select(p => new PageModel
            {
                Id = p.Id,
                PageTemplateId = p.PageTemplateId,
                Title = p.Title,
                PageTemplateName = p.PageTemplate.Name,
                ParentName = p.ParentId.HasValue ? p.Page1.Title : string.Empty,
                FriendlyUrl = p.FriendlyUrl,
                Status = p.Status,
                RecordActive = p.RecordActive,
                RecordOrder = p.RecordOrder,
                Created = p.Created,
                CreatedBy = p.CreatedBy,
                Updated = p.Updated,
                UpdatedBy = p.UpdatedBy,
                IsHomePage = p.IsHomePage
            });

            return si.Search(pages);
        }
Exemple #58
0
        /// <summary>
        /// search the user groups.
        /// </summary>
        /// <returns></returns>
        public JqGridSearchOut SearchService(JqSearchIn si)
        {
            var services = GetAll().ToList().Select(u => new ServiceModel
            {
                Id = u.Id,
                Title = u.Title,
                Description = u.Description,
                ImageUrl = u.ImageUrl,
                Content = u.Content,
                Status = u.Status,
                RecordActive = u.RecordActive,
                RecordOrder = u.RecordOrder,
                Created = u.Created,
                CreatedBy = u.CreatedBy,
                Updated = u.Updated,
                UpdatedBy = u.UpdatedBy
            }).AsQueryable();

            return si.Search(services);
        }