/// <summary> /// Inserts the custom. /// </summary> /// <param name="pageItem">The page item.</param> /// <returns></returns> public PageItemModel InsertCustom(PageItemModel pageItem) { PageItemModel result = new PageItemModel(); try { IQueryDataRepository query = new QueryDataRepository <NJFairgroundDBEntities>(); SqlParameter[] param = new SqlParameter[] { InitParam("@PageId", pageItem.PageId), InitParam("@PageItemType", 100), InitParam("@PageHeaderText", pageItem.PageHeaderText), InitParam("@PageSubHeaderText", pageItem.PageSubHeaderText), InitParam("@PageItemImage", pageItem.PageItemImage), InitParam("@PageItemDetailText", pageItem.PageItemDetailText), InitParam("@PageItemSubDetail", pageItem.PageItemSubDetail), //new SqlParameter("@PageItemSubDetail", string.IsNullOrEmpty(pageItem.PageItemSubDetail) // ?DBNull.Value:pageItem.PageItemSubDetail), InitParam("@StatusId", pageItem.StatusId), InitParam("@CreatedOn", pageItem.CreatedOn), InitParam("@ActivatedOn", pageItem.ActivatedOn), InitParam("@ItemOrder", pageItem.ItemOrder) }; result = query.ExecuteQuery <PageItemModel>("EXEC InsertPageItem @PageId, @PageItemType, @PageHeaderText, @PageSubHeaderText, @PageItemImage, @PageItemDetailText, @PageItemSubDetail, @StatusId, @CreatedOn, @ActivatedOn, @ItemOrder", param).FirstOrDefault(); } catch (Exception ex) { ex.ExceptionValueTracker(pageItem); } return(result); }
/// <summary> /// Marks the read notification log. /// </summary> /// <returns></returns> /// <exception cref="System.NotImplementedException"></exception> public IList <NotificationLogViewModel> GetNotificationLog() { IList <NotificationLogViewModel> result = new List <NotificationLogViewModel>(); try { IQueryDataRepository query = new QueryDataRepository <NJFairgroundDBEntities>(); result = query.ExecuteQuery <NotificationLogViewModel>("EXEC GetNotificationDetail").ToList(); } catch (Exception ex) { ex.ExceptionValueTracker(); } return(result); }