* 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
This commit is contained in:
parent
4bb83ce552
commit
04304ac0c3
25 changed files with 387 additions and 149 deletions
|
|
@ -21,14 +21,14 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using Yavsc.ApiControllers.NightFlash.Model;
|
using Yavsc.ApiControllers.Calendar.Model;
|
||||||
|
|
||||||
namespace Yavsc.ApiControllers.NightFlash
|
namespace Yavsc.ApiControllers.Calendar
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Night flash controller.
|
/// Night flash controller.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class NightFlashController: ApiController
|
public class CalendarController: ApiController
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// List events according the specified search arguments.
|
/// List events according the specified search arguments.
|
||||||
|
|
@ -36,19 +36,18 @@ namespace Yavsc.ApiControllers.NightFlash
|
||||||
/// <param name="args">Arguments.</param>
|
/// <param name="args">Arguments.</param>
|
||||||
[ValidateAjaxAttribute]
|
[ValidateAjaxAttribute]
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public NFEvent[] List ([FromUri] PositionAndKeyphrase args)
|
public YaEvent[] List ([FromUri] PositionAndKeyphrase args)
|
||||||
{
|
{
|
||||||
return new NFEvent[] {
|
return new YaEvent[] {
|
||||||
new NFEvent () {
|
new YaEvent () {
|
||||||
Title = "Test",
|
|
||||||
Description = "Test Descr",
|
Description = "Test Descr",
|
||||||
EventType = "Night club special bubble party",
|
Title = "Night club special bubble party",
|
||||||
Location = new Position() {
|
Location = new Position() {
|
||||||
Longitude = 0,
|
Longitude = 0,
|
||||||
Latitude = 0
|
Latitude = 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new NFEvent () {
|
new YaEvent () {
|
||||||
Title = "Test2",
|
Title = "Test2",
|
||||||
ImgLocator = "http://bla/im.png",
|
ImgLocator = "http://bla/im.png",
|
||||||
Location = new Position() {
|
Location = new Position() {
|
||||||
|
|
@ -56,16 +55,15 @@ namespace Yavsc.ApiControllers.NightFlash
|
||||||
Latitude = 0
|
Latitude = 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new NFEvent () {
|
new YaEvent () {
|
||||||
Title = "Test",
|
|
||||||
Description = "Test Descr",
|
Description = "Test Descr",
|
||||||
EventType = "Night club special bubble party",
|
Title = "Night club special bubble party",
|
||||||
Location = new Position() {
|
Location = new Position() {
|
||||||
Longitude = 0,
|
Longitude = 0,
|
||||||
Latitude = 0
|
Latitude = 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new NFEvent () {
|
new YaEvent () {
|
||||||
Title = "Test2",
|
Title = "Test2",
|
||||||
ImgLocator = "http://bla/im.png",
|
ImgLocator = "http://bla/im.png",
|
||||||
Location = new Position() {
|
Location = new Position() {
|
||||||
|
|
@ -81,7 +79,7 @@ namespace Yavsc.ApiControllers.NightFlash
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ProviderId">Provider identifier.</param>
|
/// <param name="ProviderId">Provider identifier.</param>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public ProviderPublicInfo Provider ([FromUri] string ProviderId)
|
public ProviderPublicInfo ProviderInfo ([FromUri] string ProviderId)
|
||||||
{
|
{
|
||||||
return new ProviderPublicInfo () {
|
return new ProviderPublicInfo () {
|
||||||
DisplayName = "Yavsc clubing",
|
DisplayName = "Yavsc clubing",
|
||||||
|
|
@ -123,6 +121,11 @@ namespace Yavsc.ApiControllers.NightFlash
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Authorize]
|
||||||
|
void NotifyEvent(EventPub evpub) {
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
35
web/ApiControllers/Calendar/Model/Circle.cs
Normal file
35
web/ApiControllers/Calendar/Model/Circle.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
//
|
||||||
|
// NightFlashController.cs
|
||||||
|
//
|
||||||
|
// Author:
|
||||||
|
// Paul Schneider <paulschneider@free.fr>
|
||||||
|
//
|
||||||
|
// 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 <http://www.gnu.org/licenses/>.
|
||||||
|
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; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
62
web/ApiControllers/Calendar/Model/EstablishmentType.cs
Normal file
62
web/ApiControllers/Calendar/Model/EstablishmentType.cs
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
//
|
||||||
|
// NFEvent.cs
|
||||||
|
//
|
||||||
|
// Author:
|
||||||
|
// Paul Schneider <paulschneider@free.fr>
|
||||||
|
//
|
||||||
|
// 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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Web.Http;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Yavsc.ApiControllers.Calendar.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Establishment type.
|
||||||
|
/// </summary>
|
||||||
|
public enum EstablishmentType
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The discotheque.
|
||||||
|
/// </summary>
|
||||||
|
Discotheque,
|
||||||
|
/// <summary>
|
||||||
|
/// The piano bar.
|
||||||
|
/// </summary>
|
||||||
|
PianoBar,
|
||||||
|
/// <summary>
|
||||||
|
/// The bar.
|
||||||
|
/// </summary>
|
||||||
|
Bar,
|
||||||
|
/// <summary>
|
||||||
|
/// The place publique.
|
||||||
|
/// </summary>
|
||||||
|
PlacePublique,
|
||||||
|
/// <summary>
|
||||||
|
/// The maison privee.
|
||||||
|
/// </summary>
|
||||||
|
MaisonPrivee,
|
||||||
|
/// <summary>
|
||||||
|
/// The domaine publique.
|
||||||
|
/// </summary>
|
||||||
|
DomainePublique,
|
||||||
|
/// <summary>
|
||||||
|
/// The domaine prive.
|
||||||
|
/// </summary>
|
||||||
|
DomainePrive
|
||||||
|
}
|
||||||
|
}
|
||||||
35
web/ApiControllers/Calendar/Model/EventPub.cs
Normal file
35
web/ApiControllers/Calendar/Model/EventPub.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
//
|
||||||
|
// NightFlashController.cs
|
||||||
|
//
|
||||||
|
// Author:
|
||||||
|
// Paul Schneider <paulschneider@free.fr>
|
||||||
|
//
|
||||||
|
// 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 <http://www.gnu.org/licenses/>.
|
||||||
|
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; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// NFEvent.cs
|
// EventType.cs
|
||||||
//
|
//
|
||||||
// Author:
|
// Author:
|
||||||
// Paul Schneider <paulschneider@free.fr>
|
// Paul Schneider <paulschneider@free.fr>
|
||||||
|
|
@ -23,58 +23,49 @@ using System;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Yavsc.ApiControllers.NightFlash.Model
|
namespace Yavsc.ApiControllers.Calendar.Model
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// NF event.
|
/// Event type.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class NFEvent
|
public enum EventType
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The title.
|
/// The concert gratuit.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required] public string Title { get; set; }
|
ConcertGratuit,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The description.
|
/// The concert prive.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required] public string Description { get; set; }
|
ConcertPrive,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The type of the event.
|
/// The distraciton.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required] public string EventType { get; set; }
|
Distraciton,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The location.
|
/// The rencontre.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required] public Position Location { get; set; }
|
Rencontre,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The start date.
|
/// The assemblee.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required] public DateTime StartDate { get; set; }
|
Assemblee,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The name of the NF provider.
|
/// The reunion.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required] public string NFProviderName { get; set; }
|
Reunion,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The NF provider identifier.
|
/// The bureau.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required] public string NFProviderId { get; set; }
|
Bureau,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The type of the location.
|
/// The manifestation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required] public string LocationType { get; set; }
|
Manifestation,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The promotion code.
|
/// The zone de danger.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string PromotionCode { get; set; }
|
ZoneDeDanger
|
||||||
/// <summary>
|
|
||||||
/// The event web page.
|
|
||||||
/// </summary>
|
|
||||||
public string EventWebPage { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// The image locator.
|
|
||||||
/// </summary>
|
|
||||||
public string ImgLocator { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -23,7 +23,7 @@ using System;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Yavsc.ApiControllers.NightFlash.Model
|
namespace Yavsc.ApiControllers.Calendar.Model
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -35,6 +35,11 @@ namespace Yavsc.ApiControllers.NightFlash.Model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
[Required]
|
||||||
public WeekDay Day;
|
public WeekDay Day;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the s.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The s.</value>
|
||||||
public TimeSpan S { get; set; }
|
public TimeSpan S { get; set; }
|
||||||
|
|
||||||
// ASSERT Start <= End
|
// ASSERT Start <= End
|
||||||
|
|
@ -23,14 +23,22 @@ using System;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Yavsc.ApiControllers.NightFlash.Model
|
namespace Yavsc.ApiControllers.Calendar.Model
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Hollydays.
|
/// Hollydays.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Period {
|
public class Period {
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the start.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The start.</value>
|
||||||
[Required]
|
[Required]
|
||||||
public DateTime Start { get; set; }
|
public DateTime Start { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the end.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The end.</value>
|
||||||
[Required]
|
[Required]
|
||||||
public DateTime End { get; set; }
|
public DateTime End { get; set; }
|
||||||
}
|
}
|
||||||
|
|
@ -23,7 +23,7 @@ using System;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Yavsc.ApiControllers.NightFlash.Model
|
namespace Yavsc.ApiControllers.Calendar.Model
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Periodicity.
|
/// Periodicity.
|
||||||
|
|
@ -33,10 +33,25 @@ namespace Yavsc.ApiControllers.NightFlash.Model
|
||||||
/// The daily.
|
/// The daily.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Daily,
|
Daily,
|
||||||
|
/// <summary>
|
||||||
|
/// The weekly.
|
||||||
|
/// </summary>
|
||||||
Weekly,
|
Weekly,
|
||||||
|
/// <summary>
|
||||||
|
/// The monthly.
|
||||||
|
/// </summary>
|
||||||
Monthly,
|
Monthly,
|
||||||
|
/// <summary>
|
||||||
|
/// The three m.
|
||||||
|
/// </summary>
|
||||||
ThreeM,
|
ThreeM,
|
||||||
|
/// <summary>
|
||||||
|
/// The six m.
|
||||||
|
/// </summary>
|
||||||
SixM,
|
SixM,
|
||||||
|
/// <summary>
|
||||||
|
/// The yearly.
|
||||||
|
/// </summary>
|
||||||
Yearly
|
Yearly
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -23,7 +23,7 @@ using System;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Yavsc.ApiControllers.NightFlash.Model
|
namespace Yavsc.ApiControllers.Calendar.Model
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Position.
|
/// Position.
|
||||||
|
|
@ -38,6 +38,7 @@ namespace Yavsc.ApiControllers.NightFlash.Model
|
||||||
/// The latitude.
|
/// The latitude.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double Latitude { get; set; }
|
public double Latitude { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -23,7 +23,7 @@ using System;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Yavsc.ApiControllers.NightFlash.Model
|
namespace Yavsc.ApiControllers.Calendar.Model
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Position and keyphrase.
|
/// Position and keyphrase.
|
||||||
|
|
@ -23,13 +23,13 @@ using System;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Yavsc.ApiControllers.NightFlash.Model
|
namespace Yavsc.ApiControllers.Calendar.Model
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provided event.
|
/// Provided event.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ProvidedEvent : NFEvent {
|
public class ProvidedEvent : YaEvent {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The privacy.
|
/// The privacy.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -23,7 +23,7 @@ using System;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Yavsc.ApiControllers.NightFlash.Model
|
namespace Yavsc.ApiControllers.Calendar.Model
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provider public info.
|
/// Provider public info.
|
||||||
|
|
@ -23,7 +23,7 @@ using System;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Yavsc.ApiControllers.NightFlash.Model
|
namespace Yavsc.ApiControllers.Calendar.Model
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -23,12 +23,16 @@ using System;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Yavsc.ApiControllers.NightFlash.Model
|
namespace Yavsc.ApiControllers.Calendar.Model
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Schedule.
|
/// Schedule.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Schedule {
|
public class Schedule {
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the period.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The period.</value>
|
||||||
public Periodicity Period { get; set; }
|
public Periodicity Period { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
34
web/ApiControllers/Calendar/Model/UserPrefs.cs
Normal file
34
web/ApiControllers/Calendar/Model/UserPrefs.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
//
|
||||||
|
// NightFlashController.cs
|
||||||
|
//
|
||||||
|
// Author:
|
||||||
|
// Paul Schneider <paulschneider@free.fr>
|
||||||
|
//
|
||||||
|
// 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 <http://www.gnu.org/licenses/>.
|
||||||
|
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<string,double> MusicTypeRatings { get; set; }
|
||||||
|
Dictionary<string,double> LocationTypeRatings { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -23,7 +23,7 @@ using System;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Yavsc.ApiControllers.NightFlash.Model
|
namespace Yavsc.ApiControllers.Calendar.Model
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Week day.
|
/// Week day.
|
||||||
101
web/ApiControllers/Calendar/Model/YaEvent.cs
Normal file
101
web/ApiControllers/Calendar/Model/YaEvent.cs
Normal file
|
|
@ -0,0 +1,101 @@
|
||||||
|
//
|
||||||
|
// NFEvent.cs
|
||||||
|
//
|
||||||
|
// Author:
|
||||||
|
// Paul Schneider <paulschneider@free.fr>
|
||||||
|
//
|
||||||
|
// 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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Web.Http;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Yavsc.ApiControllers.Calendar.Model
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// NF event.
|
||||||
|
/// </summary>
|
||||||
|
public class YaEvent
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="Yavsc.ApiControllers.Calendar.Model.YaEvent"/> class.
|
||||||
|
/// </summary>
|
||||||
|
public YaEvent()
|
||||||
|
{
|
||||||
|
this.EstabType = EstablishmentType.DomainePublique;
|
||||||
|
this.NFEvType = EventType.Distraciton;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the type of the NF ev.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The type of the NF ev.</value>
|
||||||
|
[Required]
|
||||||
|
public EventType NFEvType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the type of the estab.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The type of the estab.</value>
|
||||||
|
[Required(ErrorMessage="Please, choose an establisment type.")]
|
||||||
|
public EstablishmentType EstabType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The title.
|
||||||
|
/// </summary>
|
||||||
|
[Required(ErrorMessage="Please, choose a .")]
|
||||||
|
public string Title { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// The description.
|
||||||
|
/// </summary>
|
||||||
|
[Required(ErrorMessage="Please, choose a Description.")] public string Description { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// The location.
|
||||||
|
/// </summary>
|
||||||
|
[Required(ErrorMessage="Please, choose a Location.")] public Position Location { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// The start date.
|
||||||
|
/// </summary>
|
||||||
|
[Required(ErrorMessage="Please, choose a Start Date.")] public DateTime StartDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the end date.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The end date.</value>
|
||||||
|
[Required(ErrorMessage="Please, choose an End Date.")] public DateTime EndDate { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// The name of the NF provider.
|
||||||
|
/// </summary>
|
||||||
|
[Required(ErrorMessage="Please, choose a Nigth Flash Provider Name.")] public string NFProviderName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// The NF provider identifier.
|
||||||
|
/// </summary>
|
||||||
|
[Required(ErrorMessage="Please, choose a Night Flash Provider Identifier.")] public string NFProviderId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// The promotion code.
|
||||||
|
/// </summary>
|
||||||
|
public string PromotionCode { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// The event web page.
|
||||||
|
/// </summary>
|
||||||
|
public string EventWebPage { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// The image locator.
|
||||||
|
/// </summary>-
|
||||||
|
public string ImgLocator { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -124,7 +124,7 @@ namespace Yavsc.ApiControllers
|
||||||
/// Gets the estimate in pdf format from tex generation.
|
/// Gets the estimate in pdf format from tex generation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>The to pdf.</returns>
|
/// <returns>The to pdf.</returns>
|
||||||
/// <param name="estimid">Estimid.</param>
|
/// <param name="id">Estimid.</param>
|
||||||
[AcceptVerbs("GET")]
|
[AcceptVerbs("GET")]
|
||||||
public HttpResponseMessage EstimateToPdf (long id)
|
public HttpResponseMessage EstimateToPdf (long id)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -53,11 +53,12 @@ namespace Yavsc.ApiControllers
|
||||||
Membership.GetUser().UserName,client,title,description);
|
Membership.GetUser().UserName,client,title,description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Register the specified model and isapprouved.
|
/// Register the specified userModel.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="model">Model.</param>
|
/// <param name="userModel">User model.</param>
|
||||||
/// <param name="isapprouved">If set to <c>true</c> isapprouved.</param>
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[ValidateAjax]
|
[ValidateAjax]
|
||||||
[Authorize(Roles="Admin,FrontOffice")]
|
[Authorize(Roles="Admin,FrontOffice")]
|
||||||
|
|
|
||||||
62
web/App_GlobalResources/Resources.Designer.cs
generated
62
web/App_GlobalResources/Resources.Designer.cs
generated
|
|
@ -1,62 +0,0 @@
|
||||||
// ------------------------------------------------------------------------------
|
|
||||||
// <autogenerated>
|
|
||||||
// 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.
|
|
||||||
// </autogenerated>
|
|
||||||
// ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -29,12 +29,11 @@ namespace Yavsc
|
||||||
/// <param name="routes">Routes.</param>
|
/// <param name="routes">Routes.</param>
|
||||||
public static void RegisterRoutes (RouteCollection routes)
|
public static void RegisterRoutes (RouteCollection routes)
|
||||||
{
|
{
|
||||||
// Should be FrontOffice
|
// Should be FrontOffice in a POS,
|
||||||
string defaultController = WebConfigurationManager.AppSettings ["DefaultController"];
|
string defaultController =
|
||||||
|
WebConfigurationManager.AppSettings ["DefaultController"];
|
||||||
if (defaultController == null)
|
if (defaultController == null)
|
||||||
{
|
defaultController = "Home";
|
||||||
defaultController = "Admin";
|
|
||||||
}
|
|
||||||
routes.IgnoreRoute ("{resource}.axd/{*pathInfo}");
|
routes.IgnoreRoute ("{resource}.axd/{*pathInfo}");
|
||||||
routes.IgnoreRoute ("Scripts/{*pathInfo}");
|
routes.IgnoreRoute ("Scripts/{*pathInfo}");
|
||||||
routes.IgnoreRoute ("Theme/{*pathInfo}");
|
routes.IgnoreRoute ("Theme/{*pathInfo}");
|
||||||
|
|
@ -98,6 +97,9 @@ namespace Yavsc
|
||||||
return HttpContext.Current.Request.AppRelativeCurrentExecutionFilePath.StartsWith(WebApiConfig.UrlPrefixRelative);
|
return HttpContext.Current.Request.AppRelativeCurrentExecutionFilePath.StartsWith(WebApiConfig.UrlPrefixRelative);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// begins a request against this application.
|
||||||
|
/// </summary>
|
||||||
protected void Application_BeginRequest()
|
protected void Application_BeginRequest()
|
||||||
{
|
{
|
||||||
var ob = typeof(
|
var ob = typeof(
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ using System.Text;
|
||||||
using System.Web.Profile;
|
using System.Web.Profile;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
|
|
||||||
namespace Yavsc.ApiControllers
|
namespace Yavsc.Helpers
|
||||||
{
|
{
|
||||||
class TemplateException : Exception
|
class TemplateException : Exception
|
||||||
{
|
{
|
||||||
|
|
@ -32,6 +32,5 @@ namespace Yavsc.ApiControllers
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -51,7 +51,10 @@ namespace Yavsc
|
||||||
return errorModel;
|
return errorModel;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Raises the action executed event.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="actionExecutedContext">Action executed context.</param>
|
||||||
public override void OnActionExecuted (HttpActionExecutedContext actionExecutedContext)
|
public override void OnActionExecuted (HttpActionExecutedContext actionExecutedContext)
|
||||||
{
|
{
|
||||||
var modelState = actionExecutedContext.ActionContext.ModelState;
|
var modelState = actionExecutedContext.ActionContext.ModelState;
|
||||||
|
|
|
||||||
|
|
@ -108,8 +108,6 @@
|
||||||
<Folder Include="Theme\dark\" />
|
<Folder Include="Theme\dark\" />
|
||||||
<Folder Include="templates\" />
|
<Folder Include="templates\" />
|
||||||
<Folder Include="Formatters\" />
|
<Folder Include="Formatters\" />
|
||||||
<Folder Include="install\" />
|
|
||||||
<Folder Include="App_GlobalResources\" />
|
|
||||||
<Folder Include="Views\Google\" />
|
<Folder Include="Views\Google\" />
|
||||||
<Folder Include="Settings\" />
|
<Folder Include="Settings\" />
|
||||||
<Folder Include="Views\BackOffice\" />
|
<Folder Include="Views\BackOffice\" />
|
||||||
|
|
@ -120,8 +118,8 @@
|
||||||
<Folder Include="Views\PayPal\" />
|
<Folder Include="Views\PayPal\" />
|
||||||
<Folder Include="ApiControllers\" />
|
<Folder Include="ApiControllers\" />
|
||||||
<Folder Include="Views\Modules\" />
|
<Folder Include="Views\Modules\" />
|
||||||
<Folder Include="ApiControllers\NightFlash\" />
|
<Folder Include="ApiControllers\Calendar\" />
|
||||||
<Folder Include="ApiControllers\NightFlash\Model\" />
|
<Folder Include="ApiControllers\Calendar\Model\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Controllers\HomeController.cs" />
|
<Compile Include="Controllers\HomeController.cs" />
|
||||||
|
|
@ -176,21 +174,26 @@
|
||||||
<Compile Include="ApiControllers\PaypalApiController.cs" />
|
<Compile Include="ApiControllers\PaypalApiController.cs" />
|
||||||
<Compile Include="WebApiConfig.cs" />
|
<Compile Include="WebApiConfig.cs" />
|
||||||
<Compile Include="ApiControllers\WorkFlowController.cs" />
|
<Compile Include="ApiControllers\WorkFlowController.cs" />
|
||||||
<Compile Include="TemplateException.cs" />
|
|
||||||
<Compile Include="IValueProvider.cs" />
|
<Compile Include="IValueProvider.cs" />
|
||||||
<Compile Include="Formatters\EstimToPdfFormatter.MSAN.cs" />
|
<Compile Include="Formatters\EstimToPdfFormatter.MSAN.cs" />
|
||||||
<Compile Include="ApiControllers\NightFlash\Model\NFEvent.cs" />
|
<Compile Include="Helpers\TemplateException.cs" />
|
||||||
<Compile Include="ApiControllers\NightFlash\Model\OpenDay.cs" />
|
<Compile Include="ApiControllers\Calendar\Model\OpenDay.cs" />
|
||||||
<Compile Include="ApiControllers\NightFlash\Model\Period.cs" />
|
<Compile Include="ApiControllers\Calendar\Model\Period.cs" />
|
||||||
<Compile Include="ApiControllers\NightFlash\Model\Periodicity.cs" />
|
<Compile Include="ApiControllers\Calendar\Model\Periodicity.cs" />
|
||||||
<Compile Include="ApiControllers\NightFlash\Model\Position.cs" />
|
<Compile Include="ApiControllers\Calendar\Model\Position.cs" />
|
||||||
<Compile Include="ApiControllers\NightFlash\Model\PositionAndKeyphrase.cs" />
|
<Compile Include="ApiControllers\Calendar\Model\PositionAndKeyphrase.cs" />
|
||||||
<Compile Include="ApiControllers\NightFlash\Model\ProvidedEvent.cs" />
|
<Compile Include="ApiControllers\Calendar\Model\ProvidedEvent.cs" />
|
||||||
<Compile Include="ApiControllers\NightFlash\Model\Publishing.cs" />
|
<Compile Include="ApiControllers\Calendar\Model\Publishing.cs" />
|
||||||
<Compile Include="ApiControllers\NightFlash\Model\Schedule.cs" />
|
<Compile Include="ApiControllers\Calendar\Model\Schedule.cs" />
|
||||||
<Compile Include="ApiControllers\NightFlash\Model\ProviderPublicInfo.cs" />
|
<Compile Include="ApiControllers\Calendar\Model\ProviderPublicInfo.cs" />
|
||||||
<Compile Include="ApiControllers\NightFlash\Model\WeekDay.cs" />
|
<Compile Include="ApiControllers\Calendar\Model\WeekDay.cs" />
|
||||||
<Compile Include="ApiControllers\NightFlash\NightFlashController.cs" />
|
<Compile Include="ApiControllers\Calendar\Model\EstablishmentType.cs" />
|
||||||
|
<Compile Include="ApiControllers\Calendar\Model\EventType.cs" />
|
||||||
|
<Compile Include="ApiControllers\Calendar\CalendarController.cs" />
|
||||||
|
<Compile Include="ApiControllers\Calendar\Model\YaEvent.cs" />
|
||||||
|
<Compile Include="ApiControllers\Calendar\Model\Circle.cs" />
|
||||||
|
<Compile Include="ApiControllers\Calendar\Model\EventPub.cs" />
|
||||||
|
<Compile Include="ApiControllers\Calendar\Model\UserPrefs.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Web.config" />
|
<Content Include="Views\Web.config" />
|
||||||
|
|
@ -698,7 +701,6 @@
|
||||||
<Generator>TextTemplatingFilePreprocessor</Generator>
|
<Generator>TextTemplatingFilePreprocessor</Generator>
|
||||||
<LastGenOutput>Estim.cs</LastGenOutput>
|
<LastGenOutput>Estim.cs</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
<None Include="install\instdb.sql" />
|
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
<None Include="Scripts\jquery-2.1.3.min.map" />
|
<None Include="Scripts\jquery-2.1.3.min.map" />
|
||||||
<None Include="Scripts\styles.json" />
|
<None Include="Scripts\styles.json" />
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue