Example #1
0
        public static HomeIndexViewModel ForUserPage(string username, int Page_ID)
        {
            IInfastructureService infastructure = new InfastructureService();
            IPlannerService plannerService = new PlannerService();

            return new HomeIndexViewModel {
                navSection = infastructure.PageStructure_GetBySelected(Page_ID),
                events = plannerService.Event_GetByUser(username)
            };
        }
Example #2
0
        static void Main(string[] args)
        {
            Repository.Configuration.connString = "Server=localhost;Database=ApplicationData;Trusted_Connection=True;";

            IPlannerService service = new PlannerService();

            IEnumerable<Event> events = service.Event_Delete(new DEvent{
                key = 1,
                Date=DateTime.Today,
                End_Time=DateTime.Today,
                Start_Time =DateTime.Today,
                Event_Type_ID = 2,
                Urgency_ID = 2,
                Place_ID = 2,
                username = "******",
                Name = "Name",
                Description = "Description"
            }, "user");

            Console.WriteLine(events.Count());
        }