From 04304ac0c3396c45b1a6c057f18baa90c6581d40 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sat, 16 May 2015 00:50:11 +0200 Subject: [PATCH] * CalendarController.cs: * Web.csproj: * Global.asax.cs: * instdb.sql: * TemplateException.cs: * ValidateAjaxAttribute.cs: * TemplateException.cs: * WorkFlowController.cs: * NFCircle.cs: * Circle.cs: * NFEventPub.cs: * Period.cs: * OpenDay.cs: * NFUserPrefs.cs: * YaEvent.cs: * WeekDay.cs: * Position.cs: * EventPub.cs: * Resources.Designer.cs: * Schedule.cs: * Period.cs: * NFEvent.cs: * EventType.cs: * WeekDay.cs: * OpenDay.cs: * FrontOfficeApiController.cs: * UserPrefs.cs: * Position.cs: * Schedule.cs: * Publishing.cs: * EventType.cs: * Periodicity.cs: * Publishing.cs: * Periodicity.cs: * ProvidedEvent.cs: * ProvidedEvent.cs: * NightFlashController.cs: * EstablishmentType.cs: * ProviderPublicInfo.cs: * EstablishmentType.cs: * PositionAndKeyphrase.cs: * ProviderPublicInfo.cs: * PositionAndKeyphrase.cs: refactoring --- .../CalendarController.cs} | 31 +++--- web/ApiControllers/Calendar/Model/Circle.cs | 35 ++++++ .../Calendar/Model/EstablishmentType.cs | 62 +++++++++++ web/ApiControllers/Calendar/Model/EventPub.cs | 35 ++++++ .../Model/EventType.cs} | 53 ++++----- .../{NightFlash => Calendar}/Model/OpenDay.cs | 7 +- .../{NightFlash => Calendar}/Model/Period.cs | 10 +- .../Model/Periodicity.cs | 17 ++- .../Model/Position.cs | 3 +- .../Model/PositionAndKeyphrase.cs | 2 +- .../Model/ProvidedEvent.cs | 4 +- .../Model/ProviderPublicInfo.cs | 2 +- .../Model/Publishing.cs | 2 +- .../Model/Schedule.cs | 6 +- .../Calendar/Model/UserPrefs.cs | 34 ++++++ .../{NightFlash => Calendar}/Model/WeekDay.cs | 2 +- web/ApiControllers/Calendar/Model/YaEvent.cs | 101 ++++++++++++++++++ .../FrontOfficeApiController.cs | 2 +- web/ApiControllers/WorkFlowController.cs | 7 +- web/App_GlobalResources/Resources.Designer.cs | 62 ----------- web/Global.asax.cs | 12 ++- web/{ => Helpers}/TemplateException.cs | 3 +- web/ValidateAjaxAttribute.cs | 5 +- web/Web.csproj | 38 +++---- web/install/instdb.sql | 1 - 25 files changed, 387 insertions(+), 149 deletions(-) rename web/ApiControllers/{NightFlash/NightFlashController.cs => Calendar/CalendarController.cs} (84%) create mode 100644 web/ApiControllers/Calendar/Model/Circle.cs create mode 100644 web/ApiControllers/Calendar/Model/EstablishmentType.cs create mode 100644 web/ApiControllers/Calendar/Model/EventPub.cs rename web/ApiControllers/{NightFlash/Model/NFEvent.cs => Calendar/Model/EventType.cs} (54%) rename web/ApiControllers/{NightFlash => Calendar}/Model/OpenDay.cs (91%) rename web/ApiControllers/{NightFlash => Calendar}/Model/Period.cs (82%) rename web/ApiControllers/{NightFlash => Calendar}/Model/Periodicity.cs (78%) rename web/ApiControllers/{NightFlash => Calendar}/Model/Position.cs (96%) rename web/ApiControllers/{NightFlash => Calendar}/Model/PositionAndKeyphrase.cs (96%) rename web/ApiControllers/{NightFlash => Calendar}/Model/ProvidedEvent.cs (92%) rename web/ApiControllers/{NightFlash => Calendar}/Model/ProviderPublicInfo.cs (97%) rename web/ApiControllers/{NightFlash => Calendar}/Model/Publishing.cs (95%) rename web/ApiControllers/{NightFlash => Calendar}/Model/Schedule.cs (90%) create mode 100644 web/ApiControllers/Calendar/Model/UserPrefs.cs rename web/ApiControllers/{NightFlash => Calendar}/Model/WeekDay.cs (96%) create mode 100644 web/ApiControllers/Calendar/Model/YaEvent.cs delete mode 100644 web/App_GlobalResources/Resources.Designer.cs rename web/{ => Helpers}/TemplateException.cs (95%) delete mode 100644 web/install/instdb.sql diff --git a/web/ApiControllers/NightFlash/NightFlashController.cs b/web/ApiControllers/Calendar/CalendarController.cs similarity index 84% rename from web/ApiControllers/NightFlash/NightFlashController.cs rename to web/ApiControllers/Calendar/CalendarController.cs index 87390129..86710f92 100644 --- a/web/ApiControllers/NightFlash/NightFlashController.cs +++ b/web/ApiControllers/Calendar/CalendarController.cs @@ -21,14 +21,14 @@ using System; using System.Web.Http; using System.ComponentModel.DataAnnotations; -using Yavsc.ApiControllers.NightFlash.Model; +using Yavsc.ApiControllers.Calendar.Model; -namespace Yavsc.ApiControllers.NightFlash +namespace Yavsc.ApiControllers.Calendar { /// /// Night flash controller. /// - public class NightFlashController: ApiController + public class CalendarController: ApiController { /// /// List events according the specified search arguments. @@ -36,19 +36,18 @@ namespace Yavsc.ApiControllers.NightFlash /// Arguments. [ValidateAjaxAttribute] [HttpGet] - public NFEvent[] List ([FromUri] PositionAndKeyphrase args) + public YaEvent[] List ([FromUri] PositionAndKeyphrase args) { - return new NFEvent[] { - new NFEvent () { - Title = "Test", + return new YaEvent[] { + new YaEvent () { Description = "Test Descr", - EventType = "Night club special bubble party", + Title = "Night club special bubble party", Location = new Position() { Longitude = 0, Latitude = 0 } }, - new NFEvent () { + new YaEvent () { Title = "Test2", ImgLocator = "http://bla/im.png", Location = new Position() { @@ -56,16 +55,15 @@ namespace Yavsc.ApiControllers.NightFlash Latitude = 0 } }, - new NFEvent () { - Title = "Test", + new YaEvent () { Description = "Test Descr", - EventType = "Night club special bubble party", + Title = "Night club special bubble party", Location = new Position() { Longitude = 0, Latitude = 0 } }, - new NFEvent () { + new YaEvent () { Title = "Test2", ImgLocator = "http://bla/im.png", Location = new Position() { @@ -81,7 +79,7 @@ namespace Yavsc.ApiControllers.NightFlash /// /// Provider identifier. [HttpGet] - public ProviderPublicInfo Provider ([FromUri] string ProviderId) + public ProviderPublicInfo ProviderInfo ([FromUri] string ProviderId) { return new ProviderPublicInfo () { DisplayName = "Yavsc clubing", @@ -123,6 +121,11 @@ namespace Yavsc.ApiControllers.NightFlash { return -1; } + + [Authorize] + void NotifyEvent(EventPub evpub) { + throw new NotImplementedException(); + } } } diff --git a/web/ApiControllers/Calendar/Model/Circle.cs b/web/ApiControllers/Calendar/Model/Circle.cs new file mode 100644 index 00000000..855397e6 --- /dev/null +++ b/web/ApiControllers/Calendar/Model/Circle.cs @@ -0,0 +1,35 @@ +// +// NightFlashController.cs +// +// Author: +// Paul Schneider +// +// Copyright (c) 2015 Paul Schneider +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +using System; +using System.Web.Http; +using System.ComponentModel.DataAnnotations; + +namespace Yavsc.ApiControllers.Calendar.Model +{ + class Circle + { + public string Title { get; set; } + string [] Users { get; set; } + } + +} + + diff --git a/web/ApiControllers/Calendar/Model/EstablishmentType.cs b/web/ApiControllers/Calendar/Model/EstablishmentType.cs new file mode 100644 index 00000000..2d5da9e5 --- /dev/null +++ b/web/ApiControllers/Calendar/Model/EstablishmentType.cs @@ -0,0 +1,62 @@ +// +// NFEvent.cs +// +// Author: +// Paul Schneider +// +// Copyright (c) 2015 Paul Schneider +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . + +using System; +using System.Web.Http; +using System.ComponentModel.DataAnnotations; + +namespace Yavsc.ApiControllers.Calendar.Model +{ + /// + /// Establishment type. + /// + public enum EstablishmentType + { + /// + /// The discotheque. + /// + Discotheque, + /// + /// The piano bar. + /// + PianoBar, + /// + /// The bar. + /// + Bar, + /// + /// The place publique. + /// + PlacePublique, + /// + /// The maison privee. + /// + MaisonPrivee, + /// + /// The domaine publique. + /// + DomainePublique, + /// + /// The domaine prive. + /// + DomainePrive + } +} diff --git a/web/ApiControllers/Calendar/Model/EventPub.cs b/web/ApiControllers/Calendar/Model/EventPub.cs new file mode 100644 index 00000000..ad340995 --- /dev/null +++ b/web/ApiControllers/Calendar/Model/EventPub.cs @@ -0,0 +1,35 @@ +// +// NightFlashController.cs +// +// Author: +// Paul Schneider +// +// Copyright (c) 2015 Paul Schneider +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +using System; +using System.Web.Http; +using System.ComponentModel.DataAnnotations; +using Yavsc.ApiControllers.Calendar.Model; + +namespace Yavsc.ApiControllers.Calendar.Model +{ + class EventPub: YaEvent + { + Circle[] Circles { get; set; } + } + +} + + diff --git a/web/ApiControllers/NightFlash/Model/NFEvent.cs b/web/ApiControllers/Calendar/Model/EventType.cs similarity index 54% rename from web/ApiControllers/NightFlash/Model/NFEvent.cs rename to web/ApiControllers/Calendar/Model/EventType.cs index 8f7b0bc3..64187483 100644 --- a/web/ApiControllers/NightFlash/Model/NFEvent.cs +++ b/web/ApiControllers/Calendar/Model/EventType.cs @@ -1,5 +1,5 @@ // -// NFEvent.cs +// EventType.cs // // Author: // Paul Schneider @@ -23,58 +23,49 @@ using System; using System.Web.Http; using System.ComponentModel.DataAnnotations; -namespace Yavsc.ApiControllers.NightFlash.Model +namespace Yavsc.ApiControllers.Calendar.Model { - /// - /// NF event. + /// Event type. /// - public class NFEvent + public enum EventType { /// - /// The title. + /// The concert gratuit. /// - [Required] public string Title { get; set; } + ConcertGratuit, /// - /// The description. + /// The concert prive. /// - [Required] public string Description { get; set; } + ConcertPrive, /// - /// The type of the event. + /// The distraciton. /// - [Required] public string EventType { get; set; } + Distraciton, /// - /// The location. + /// The rencontre. /// - [Required] public Position Location { get; set; } + Rencontre, /// - /// The start date. + /// The assemblee. /// - [Required] public DateTime StartDate { get; set; } + Assemblee, /// - /// The name of the NF provider. + /// The reunion. /// - [Required] public string NFProviderName { get; set; } + Reunion, /// - /// The NF provider identifier. + /// The bureau. /// - [Required] public string NFProviderId { get; set; } + Bureau, /// - /// The type of the location. + /// The manifestation. /// - [Required] public string LocationType { get; set; } + Manifestation, /// - /// The promotion code. + /// The zone de danger. /// - public string PromotionCode { get; set; } - /// - /// The event web page. - /// - public string EventWebPage { get; set; } - /// - /// The image locator. - /// - public string ImgLocator { get; set; } + ZoneDeDanger } } diff --git a/web/ApiControllers/NightFlash/Model/OpenDay.cs b/web/ApiControllers/Calendar/Model/OpenDay.cs similarity index 91% rename from web/ApiControllers/NightFlash/Model/OpenDay.cs rename to web/ApiControllers/Calendar/Model/OpenDay.cs index 5236183a..0644f707 100644 --- a/web/ApiControllers/NightFlash/Model/OpenDay.cs +++ b/web/ApiControllers/Calendar/Model/OpenDay.cs @@ -23,7 +23,7 @@ using System; using System.Web.Http; using System.ComponentModel.DataAnnotations; -namespace Yavsc.ApiControllers.NightFlash.Model +namespace Yavsc.ApiControllers.Calendar.Model { /// @@ -35,6 +35,11 @@ namespace Yavsc.ApiControllers.NightFlash.Model /// [Required] public WeekDay Day; + + /// + /// Gets or sets the s. + /// + /// The s. public TimeSpan S { get; set; } // ASSERT Start <= End diff --git a/web/ApiControllers/NightFlash/Model/Period.cs b/web/ApiControllers/Calendar/Model/Period.cs similarity index 82% rename from web/ApiControllers/NightFlash/Model/Period.cs rename to web/ApiControllers/Calendar/Model/Period.cs index 826d8260..fd55a86e 100644 --- a/web/ApiControllers/NightFlash/Model/Period.cs +++ b/web/ApiControllers/Calendar/Model/Period.cs @@ -23,14 +23,22 @@ using System; using System.Web.Http; using System.ComponentModel.DataAnnotations; -namespace Yavsc.ApiControllers.NightFlash.Model +namespace Yavsc.ApiControllers.Calendar.Model { /// /// Hollydays. /// public class Period { + /// + /// Gets or sets the start. + /// + /// The start. [Required] public DateTime Start { get; set; } + /// + /// Gets or sets the end. + /// + /// The end. [Required] public DateTime End { get; set; } } diff --git a/web/ApiControllers/NightFlash/Model/Periodicity.cs b/web/ApiControllers/Calendar/Model/Periodicity.cs similarity index 78% rename from web/ApiControllers/NightFlash/Model/Periodicity.cs rename to web/ApiControllers/Calendar/Model/Periodicity.cs index f35fd823..9e4ba353 100644 --- a/web/ApiControllers/NightFlash/Model/Periodicity.cs +++ b/web/ApiControllers/Calendar/Model/Periodicity.cs @@ -23,7 +23,7 @@ using System; using System.Web.Http; using System.ComponentModel.DataAnnotations; -namespace Yavsc.ApiControllers.NightFlash.Model +namespace Yavsc.ApiControllers.Calendar.Model { /// /// Periodicity. @@ -33,10 +33,25 @@ namespace Yavsc.ApiControllers.NightFlash.Model /// The daily. /// Daily, + /// + /// The weekly. + /// Weekly, + /// + /// The monthly. + /// Monthly, + /// + /// The three m. + /// ThreeM, + /// + /// The six m. + /// SixM, + /// + /// The yearly. + /// Yearly } diff --git a/web/ApiControllers/NightFlash/Model/Position.cs b/web/ApiControllers/Calendar/Model/Position.cs similarity index 96% rename from web/ApiControllers/NightFlash/Model/Position.cs rename to web/ApiControllers/Calendar/Model/Position.cs index fb1679f9..4b83002d 100644 --- a/web/ApiControllers/NightFlash/Model/Position.cs +++ b/web/ApiControllers/Calendar/Model/Position.cs @@ -23,7 +23,7 @@ using System; using System.Web.Http; using System.ComponentModel.DataAnnotations; -namespace Yavsc.ApiControllers.NightFlash.Model +namespace Yavsc.ApiControllers.Calendar.Model { /// /// Position. @@ -38,6 +38,7 @@ namespace Yavsc.ApiControllers.NightFlash.Model /// The latitude. /// public double Latitude { get; set; } + } } diff --git a/web/ApiControllers/NightFlash/Model/PositionAndKeyphrase.cs b/web/ApiControllers/Calendar/Model/PositionAndKeyphrase.cs similarity index 96% rename from web/ApiControllers/NightFlash/Model/PositionAndKeyphrase.cs rename to web/ApiControllers/Calendar/Model/PositionAndKeyphrase.cs index 025eef21..8171d75b 100644 --- a/web/ApiControllers/NightFlash/Model/PositionAndKeyphrase.cs +++ b/web/ApiControllers/Calendar/Model/PositionAndKeyphrase.cs @@ -23,7 +23,7 @@ using System; using System.Web.Http; using System.ComponentModel.DataAnnotations; -namespace Yavsc.ApiControllers.NightFlash.Model +namespace Yavsc.ApiControllers.Calendar.Model { /// /// Position and keyphrase. diff --git a/web/ApiControllers/NightFlash/Model/ProvidedEvent.cs b/web/ApiControllers/Calendar/Model/ProvidedEvent.cs similarity index 92% rename from web/ApiControllers/NightFlash/Model/ProvidedEvent.cs rename to web/ApiControllers/Calendar/Model/ProvidedEvent.cs index d01b9dfe..550a5d4d 100644 --- a/web/ApiControllers/NightFlash/Model/ProvidedEvent.cs +++ b/web/ApiControllers/Calendar/Model/ProvidedEvent.cs @@ -23,13 +23,13 @@ using System; using System.Web.Http; using System.ComponentModel.DataAnnotations; -namespace Yavsc.ApiControllers.NightFlash.Model +namespace Yavsc.ApiControllers.Calendar.Model { /// /// Provided event. /// - public class ProvidedEvent : NFEvent { + public class ProvidedEvent : YaEvent { /// /// The privacy. /// diff --git a/web/ApiControllers/NightFlash/Model/ProviderPublicInfo.cs b/web/ApiControllers/Calendar/Model/ProviderPublicInfo.cs similarity index 97% rename from web/ApiControllers/NightFlash/Model/ProviderPublicInfo.cs rename to web/ApiControllers/Calendar/Model/ProviderPublicInfo.cs index 50f2339b..6a1503ef 100644 --- a/web/ApiControllers/NightFlash/Model/ProviderPublicInfo.cs +++ b/web/ApiControllers/Calendar/Model/ProviderPublicInfo.cs @@ -23,7 +23,7 @@ using System; using System.Web.Http; using System.ComponentModel.DataAnnotations; -namespace Yavsc.ApiControllers.NightFlash.Model +namespace Yavsc.ApiControllers.Calendar.Model { /// /// Provider public info. diff --git a/web/ApiControllers/NightFlash/Model/Publishing.cs b/web/ApiControllers/Calendar/Model/Publishing.cs similarity index 95% rename from web/ApiControllers/NightFlash/Model/Publishing.cs rename to web/ApiControllers/Calendar/Model/Publishing.cs index b70d7e3d..e4ffbd4a 100644 --- a/web/ApiControllers/NightFlash/Model/Publishing.cs +++ b/web/ApiControllers/Calendar/Model/Publishing.cs @@ -23,7 +23,7 @@ using System; using System.Web.Http; using System.ComponentModel.DataAnnotations; -namespace Yavsc.ApiControllers.NightFlash.Model +namespace Yavsc.ApiControllers.Calendar.Model { /// diff --git a/web/ApiControllers/NightFlash/Model/Schedule.cs b/web/ApiControllers/Calendar/Model/Schedule.cs similarity index 90% rename from web/ApiControllers/NightFlash/Model/Schedule.cs rename to web/ApiControllers/Calendar/Model/Schedule.cs index 34455e70..1c942f23 100644 --- a/web/ApiControllers/NightFlash/Model/Schedule.cs +++ b/web/ApiControllers/Calendar/Model/Schedule.cs @@ -23,12 +23,16 @@ using System; using System.Web.Http; using System.ComponentModel.DataAnnotations; -namespace Yavsc.ApiControllers.NightFlash.Model +namespace Yavsc.ApiControllers.Calendar.Model { /// /// Schedule. /// public class Schedule { + /// + /// Gets or sets the period. + /// + /// The period. public Periodicity Period { get; set; } /// diff --git a/web/ApiControllers/Calendar/Model/UserPrefs.cs b/web/ApiControllers/Calendar/Model/UserPrefs.cs new file mode 100644 index 00000000..ea185b11 --- /dev/null +++ b/web/ApiControllers/Calendar/Model/UserPrefs.cs @@ -0,0 +1,34 @@ +// +// NightFlashController.cs +// +// Author: +// Paul Schneider +// +// Copyright (c) 2015 Paul Schneider +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +using System; +using System.Web.Http; +using System.ComponentModel.DataAnnotations; +using System.Collections.Generic; + +namespace Yavsc.ApiControllers.Calendar.Model +{ + class UserPrefs + { + Circle [] Circles { get; set ; } + Dictionary MusicTypeRatings { get; set; } + Dictionary LocationTypeRatings { get; set; } + } +} diff --git a/web/ApiControllers/NightFlash/Model/WeekDay.cs b/web/ApiControllers/Calendar/Model/WeekDay.cs similarity index 96% rename from web/ApiControllers/NightFlash/Model/WeekDay.cs rename to web/ApiControllers/Calendar/Model/WeekDay.cs index 31435df4..9b58fb36 100644 --- a/web/ApiControllers/NightFlash/Model/WeekDay.cs +++ b/web/ApiControllers/Calendar/Model/WeekDay.cs @@ -23,7 +23,7 @@ using System; using System.Web.Http; using System.ComponentModel.DataAnnotations; -namespace Yavsc.ApiControllers.NightFlash.Model +namespace Yavsc.ApiControllers.Calendar.Model { /// /// Week day. diff --git a/web/ApiControllers/Calendar/Model/YaEvent.cs b/web/ApiControllers/Calendar/Model/YaEvent.cs new file mode 100644 index 00000000..58c314be --- /dev/null +++ b/web/ApiControllers/Calendar/Model/YaEvent.cs @@ -0,0 +1,101 @@ +// +// NFEvent.cs +// +// Author: +// Paul Schneider +// +// Copyright (c) 2015 Paul Schneider +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . + +using System; +using System.Web.Http; +using System.ComponentModel.DataAnnotations; + +namespace Yavsc.ApiControllers.Calendar.Model +{ + + /// + /// NF event. + /// + public class YaEvent + { + /// + /// Initializes a new instance of the class. + /// + public YaEvent() + { + this.EstabType = EstablishmentType.DomainePublique; + this.NFEvType = EventType.Distraciton; + } + + /// + /// Gets or sets the type of the NF ev. + /// + /// The type of the NF ev. + [Required] + public EventType NFEvType { get; set; } + + /// + /// Gets or sets the type of the estab. + /// + /// The type of the estab. + [Required(ErrorMessage="Please, choose an establisment type.")] + public EstablishmentType EstabType { get; set; } + + /// + /// The title. + /// + [Required(ErrorMessage="Please, choose a .")] + public string Title { get; set; } + /// + /// The description. + /// + [Required(ErrorMessage="Please, choose a Description.")] public string Description { get; set; } + /// + /// The location. + /// + [Required(ErrorMessage="Please, choose a Location.")] public Position Location { get; set; } + /// + /// The start date. + /// + [Required(ErrorMessage="Please, choose a Start Date.")] public DateTime StartDate { get; set; } + + /// + /// Gets or sets the end date. + /// + /// The end date. + [Required(ErrorMessage="Please, choose an End Date.")] public DateTime EndDate { get; set; } + /// + /// The name of the NF provider. + /// + [Required(ErrorMessage="Please, choose a Nigth Flash Provider Name.")] public string NFProviderName { get; set; } + /// + /// The NF provider identifier. + /// + [Required(ErrorMessage="Please, choose a Night Flash Provider Identifier.")] public string NFProviderId { get; set; } + /// + /// The promotion code. + /// + public string PromotionCode { get; set; } + /// + /// The event web page. + /// + public string EventWebPage { get; set; } + /// + /// The image locator. + /// - + public string ImgLocator { get; set; } + } +} diff --git a/web/ApiControllers/FrontOfficeApiController.cs b/web/ApiControllers/FrontOfficeApiController.cs index cac2a6c2..6528b0e1 100644 --- a/web/ApiControllers/FrontOfficeApiController.cs +++ b/web/ApiControllers/FrontOfficeApiController.cs @@ -124,7 +124,7 @@ namespace Yavsc.ApiControllers /// Gets the estimate in pdf format from tex generation. /// /// The to pdf. - /// Estimid. + /// Estimid. [AcceptVerbs("GET")] public HttpResponseMessage EstimateToPdf (long id) { diff --git a/web/ApiControllers/WorkFlowController.cs b/web/ApiControllers/WorkFlowController.cs index 9b78b2d0..872dc15c 100644 --- a/web/ApiControllers/WorkFlowController.cs +++ b/web/ApiControllers/WorkFlowController.cs @@ -53,11 +53,12 @@ namespace Yavsc.ApiControllers Membership.GetUser().UserName,client,title,description); } + + /// - /// Register the specified model and isapprouved. + /// Register the specified userModel. /// - /// Model. - /// If set to true isapprouved. + /// User model. [HttpGet] [ValidateAjax] [Authorize(Roles="Admin,FrontOffice")] diff --git a/web/App_GlobalResources/Resources.Designer.cs b/web/App_GlobalResources/Resources.Designer.cs deleted file mode 100644 index 389eefd1..00000000 --- a/web/App_GlobalResources/Resources.Designer.cs +++ /dev/null @@ -1,62 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Mono Runtime Version: 4.0.30319.17020 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ - -namespace Yavsc.App_GlobalResources { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { - get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Yavsc.App_GlobalResources.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - internal static System.Drawing.Color Color1 { - get { - object obj = ResourceManager.GetObject("Color1", resourceCulture); - return ((System.Drawing.Color)(obj)); - } - } - - internal static string Name1 { - get { - return ResourceManager.GetString("Name1", resourceCulture); - } - } - } -} diff --git a/web/Global.asax.cs b/web/Global.asax.cs index 926911cd..55d0bcfc 100644 --- a/web/Global.asax.cs +++ b/web/Global.asax.cs @@ -29,12 +29,11 @@ namespace Yavsc /// Routes. public static void RegisterRoutes (RouteCollection routes) { - // Should be FrontOffice - string defaultController = WebConfigurationManager.AppSettings ["DefaultController"]; + // Should be FrontOffice in a POS, + string defaultController = + WebConfigurationManager.AppSettings ["DefaultController"]; if (defaultController == null) - { - defaultController = "Admin"; - } + defaultController = "Home"; routes.IgnoreRoute ("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute ("Scripts/{*pathInfo}"); routes.IgnoreRoute ("Theme/{*pathInfo}"); @@ -98,6 +97,9 @@ namespace Yavsc return HttpContext.Current.Request.AppRelativeCurrentExecutionFilePath.StartsWith(WebApiConfig.UrlPrefixRelative); } + /// + /// begins a request against this application. + /// protected void Application_BeginRequest() { var ob = typeof( diff --git a/web/TemplateException.cs b/web/Helpers/TemplateException.cs similarity index 95% rename from web/TemplateException.cs rename to web/Helpers/TemplateException.cs index fcb18344..ab161656 100644 --- a/web/TemplateException.cs +++ b/web/Helpers/TemplateException.cs @@ -21,7 +21,7 @@ using System.Text; using System.Web.Profile; using System.Collections.Specialized; -namespace Yavsc.ApiControllers +namespace Yavsc.Helpers { class TemplateException : Exception { @@ -32,6 +32,5 @@ namespace Yavsc.ApiControllers { } } - } diff --git a/web/ValidateAjaxAttribute.cs b/web/ValidateAjaxAttribute.cs index 2070c6f4..62d6b39b 100644 --- a/web/ValidateAjaxAttribute.cs +++ b/web/ValidateAjaxAttribute.cs @@ -51,7 +51,10 @@ namespace Yavsc return errorModel; } - + /// + /// Raises the action executed event. + /// + /// Action executed context. public override void OnActionExecuted (HttpActionExecutedContext actionExecutedContext) { var modelState = actionExecutedContext.ActionContext.ModelState; diff --git a/web/Web.csproj b/web/Web.csproj index 208867dc..09a1b4b6 100644 --- a/web/Web.csproj +++ b/web/Web.csproj @@ -108,8 +108,6 @@ - - @@ -120,8 +118,8 @@ - - + + @@ -176,21 +174,26 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -698,7 +701,6 @@ TextTemplatingFilePreprocessor Estim.cs - diff --git a/web/install/instdb.sql b/web/install/instdb.sql deleted file mode 100644 index 5f282702..00000000 --- a/web/install/instdb.sql +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file