I modified the code behind file for the EventSimpleViewExt
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MonoSoftware.MonoX.Utilities;
using MonoSoftware.MonoX.ModuleGallery;
using MonoSoftware.MonoX.Controls;
using MonoSoftware.MonoX.Repositories;
using SD.LLBLGen.Pro.ORMSupportClasses;
using MonoSoftware.MonoX.DAL.HelperClasses;
using MonoSoftware.MonoX.DAL.EntityClasses;
namespace TheScene.Web.TheScene.WebParts.EventModuleExt
{
public partial class EventSimpleViewExt : MonoSoftware.MonoX.ModuleGallery.EventSimpleView
{
public override void DataBind()
{
// Fetch filter, we can ignore module filter in this case as we have full control over fetching
IRelationPredicateBucket filter = new RelationPredicateBucket();
filter.PredicateExpression.Add(CalendarEventFields.CalendarId == this.CalendarId);
filter.PredicateExpression.Add(CalendarEventFields.StartTime >= this.SelectedDate.Date);
filter.PredicateExpression.Add(CalendarEventFields.StartTime < this.SelectedDate.Date.AddDays(1));
// Set sorter, here you'll change sort direction by changing SortOperator
ISortExpression sorter = new SortExpression(new SortClause(CalendarEventFields.StartTime, null, SortOperator.Descending));
EntityCollection<CalendarEventEntity> items = new EntityCollection<CalendarEventEntity>();
BaseMonoXRepository.GetInstance().FetchEntityCollection(items, filter, 0, sorter, null, pager.CurrentPageIndex + 1, pager.PageSize);
int recordCount = this.GetDbCount(items, filter);
PagerUtility.BindPager(pager, DataBind, lvItems, items, recordCount);
}
}
}
Im closer.. but still not there..
Errors :
Error 12 The name 'Mode' does not exist in the current context C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventModuleExt.ascx.cs 34 13 Portal
Error 5 The best overloaded method match for 'SD.LLBLGen.Pro.ORMSupportClasses.IPredicateExpression.Add(SD.LLBLGen.Pro.ORMSupportClasses.IPredicate)' has some invalid arguments C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 24 13 Portal
Error 8 The best overloaded method match for 'SD.LLBLGen.Pro.ORMSupportClasses.IPredicateExpression.Add(SD.LLBLGen.Pro.ORMSupportClasses.IPredicate)' has some invalid arguments C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 25 13 Portal
Error 6 Argument 1: cannot convert from 'bool' to 'SD.LLBLGen.Pro.ORMSupportClasses.IPredicate' C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 24 44 Portal
Error 9 Argument 1: cannot convert from 'bool' to 'SD.LLBLGen.Pro.ORMSupportClasses.IPredicate' C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 25 44 Portal
Error 13 'TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt' does not contain a definition for 'SelectedDay' and no extension method 'SelectedDay' accepting a first argument of type 'TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt' could be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventModuleExt.ascx.cs 42 49 Portal
Error 7 'TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt' does not contain a definition for 'SelectedDate' and no extension method 'SelectedDate' accepting a first argument of type 'TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt' could be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 24 82 Portal
Error 10 'TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt' does not contain a definition for 'SelectedDate' and no extension method 'SelectedDate' accepting a first argument of type 'TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt' could be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 25 81 Portal
Error 11 'TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt' does not contain a definition for 'GetDbCount' and no extension method 'GetDbCount' accepting a first argument of type 'TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt' could be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 32 36 Portal
Not sure.. Im down to 9 errors..
am I still missing using decs or is there a problem with the code ?