diff --git a/BookAStar.sln b/BookAStar.sln index cf37a60d..622d32c9 100644 --- a/BookAStar.sln +++ b/BookAStar.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.25123.0 +VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookAStar.Droid", "BookAStar\BookAStar.Droid\BookAStar.Droid.csproj", "{2A8C2BD7-B1B6-4D74-A3FC-3F5DB3BE325E}" EndProject @@ -9,8 +9,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookAStar.iOS", "BookAStar\ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookAStar", "BookAStar\BookAStar\BookAStar.csproj", "{A0815650-0A0A-47B0-8826-771F0E1AD137}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Yavsc.Server.Api", "Yavsc.Api\Yavsc.Server.Api.xproj", "{5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yavsc.Client", "Yavsc.Client\Yavsc.Client.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}" EndProject Global @@ -193,54 +191,6 @@ Global {A0815650-0A0A-47B0-8826-771F0E1AD137}.Release|x64.Build.0 = Release|Any CPU {A0815650-0A0A-47B0-8826-771F0E1AD137}.Release|x86.ActiveCfg = Release|Any CPU {A0815650-0A0A-47B0-8826-771F0E1AD137}.Release|x86.Build.0 = Release|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|x64.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Ad-Hoc|x86.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|ARM.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|ARM.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|iPhone.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|x64.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|x64.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|x86.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.AppStore|x86.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|ARM.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|ARM.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|iPhone.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|x64.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|x64.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|x86.ActiveCfg = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Debug|x86.Build.0 = Debug|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|Any CPU.Build.0 = Release|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|ARM.ActiveCfg = Release|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|ARM.Build.0 = Release|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|iPhone.ActiveCfg = Release|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|iPhone.Build.0 = Release|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|x64.ActiveCfg = Release|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|x64.Build.0 = Release|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|x86.ActiveCfg = Release|Any CPU - {5C3248AC-CAE0-4324-8A70-08F2DCA9FB08}.Release|x86.Build.0 = Release|Any CPU {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU diff --git a/BookAStar/BookAStar.Droid/BookAStar.Droid.csproj b/BookAStar/BookAStar.Droid/BookAStar.Droid.csproj index 3e33b707..e772421b 100644 --- a/BookAStar/BookAStar.Droid/BookAStar.Droid.csproj +++ b/BookAStar/BookAStar.Droid/BookAStar.Droid.csproj @@ -35,7 +35,7 @@ prompt 4 True - None + Full False False False @@ -76,6 +76,10 @@ ..\..\packages\Xamarin.Forms.2.3.0.107\lib\MonoAndroid10\FormsViewGroup.dll True + + ..\..\packages\MarkdownDeep-av.NET.1.5.2\lib\MonoAndroid10\MarkdownDeep.dll + True + ..\..\packages\Xam.Plugin.Media.1.0.1\lib\MonoAndroid10\Media.Plugin.dll True @@ -100,10 +104,12 @@ + + False + ..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Drawing.dll + - - ..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll True @@ -264,7 +270,7 @@ - + diff --git a/BookAStar/BookAStar.Droid/BookAStar.Droid.csproj.user b/BookAStar/BookAStar.Droid/BookAStar.Droid.csproj.user index f4289f65..84b624c1 100644 --- a/BookAStar/BookAStar.Droid/BookAStar.Droid.csproj.user +++ b/BookAStar/BookAStar.Droid/BookAStar.Droid.csproj.user @@ -3,4 +3,7 @@ Nexus 4 + + C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v6.0\ + \ No newline at end of file diff --git a/BookAStar/BookAStar.Droid/Helpers/SimpleJsonPostMethod.cs b/BookAStar/BookAStar.Droid/Helpers/SimpleJsonPostMethod.cs index 7b200659..4cc139e4 100644 --- a/BookAStar/BookAStar.Droid/Helpers/SimpleJsonPostMethod.cs +++ b/BookAStar/BookAStar.Droid/Helpers/SimpleJsonPostMethod.cs @@ -48,7 +48,7 @@ namespace Yavsc.Helpers request.SendChunked = true; request.TransferEncoding = "UTF-8"; if (authorizationHeader!=null) - request.Headers.Add($"Authorization: Bearer {authorizationHeader}"); + request.Headers.Add($"Authorization: {authorizationHeader}"); } public static string BasePath { get; private set; } = "http://dev.pschneider.fr/api/"; diff --git a/BookAStar/BookAStar.Droid/MainActivity.cs b/BookAStar/BookAStar.Droid/MainActivity.cs index 834ee3b6..baca502a 100644 --- a/BookAStar/BookAStar.Droid/MainActivity.cs +++ b/BookAStar/BookAStar.Droid/MainActivity.cs @@ -22,6 +22,7 @@ using BookAStar.Model.Auth.Account; using BookAStar.Droid.OAuth; using Yavsc.Helpers; using Yavsc.Models.Identity; +using static Android.Content.Res.Resources; namespace BookAStar.Droid { @@ -37,8 +38,11 @@ namespace BookAStar.Droid global::Xamarin.Forms.Forms.Init(this, bundle); global::Xamarin.FormsMaps.Init(this, bundle); LoadApplication(new App(this)); + /* var x = typeof(Themes.DarkThemeResources); + x = typeof(Themes.LightThemeResources); + x = typeof(Themes.Android.UnderlineEffect); */ } - + public bool EnablePushNotifications(bool enable) { @@ -293,7 +297,8 @@ namespace BookAStar.Droid public TAnswer InvokeApi(string method, object arg) { using (var m = - new SimpleJsonPostMethod(method, + new SimpleJsonPostMethod( + method, "Bearer "+ MainSettings.CurrentUser.YavscTokens.AccessToken )) { @@ -304,9 +309,10 @@ namespace BookAStar.Droid public object InvokeApi(string method, object arg) { using (var m = - new SimpleJsonPostMethod(method, + new SimpleJsonPostMethod( + method, "Bearer " + MainSettings.CurrentUser.YavscTokens.AccessToken - )) + )) { return m.InvokeJson(arg); } diff --git a/BookAStar/BookAStar.Droid/Properties/AndroidManifest.xml b/BookAStar/BookAStar.Droid/Properties/AndroidManifest.xml index a0c47dad..5bc18bd0 100644 --- a/BookAStar/BookAStar.Droid/Properties/AndroidManifest.xml +++ b/BookAStar/BookAStar.Droid/Properties/AndroidManifest.xml @@ -29,13 +29,14 @@ - - - + + + + \ No newline at end of file diff --git a/BookAStar/BookAStar.Droid/Services/GcmRegistrationIntentService.cs b/BookAStar/BookAStar.Droid/Services/GcmRegistrationIntentService.cs index ac849504..2909499f 100644 --- a/BookAStar/BookAStar.Droid/Services/GcmRegistrationIntentService.cs +++ b/BookAStar/BookAStar.Droid/Services/GcmRegistrationIntentService.cs @@ -44,9 +44,26 @@ namespace BookAStar.Droid Log.Info ("RegistrationIntentService", "Calling InstanceID.GetToken"); lock (locker) { - - var instanceID = InstanceID.GetInstance (this); - var senderid = MainSettings.GoogleSenderId; + + var instanceID = InstanceID.GetInstance(this); + +#if DEBUG + // When debugging, and application data/cache is preserved, + // a previous instance comes from another application installation + // and the old registration against GCM fails, + // until one delete it. + try + { + instanceID.DeleteInstanceID(); + } + catch(Exception ex) + { + Debug.WaitForDebugger(); + Log.Debug("bas.GCM", ex.StackTrace.ToString()); + } +#endif + + var senderid = MainSettings.GoogleSenderId; var token = instanceID.GetToken ( senderid, GoogleCloudMessaging.InstanceIdScope, null); @@ -83,7 +100,11 @@ namespace BookAStar.Droid { var pubSub = GcmPubSub.GetInstance(this); pubSub.Subscribe(token, "/topics/global", null); - pubSub.Subscribe (token, "/topics/jobs", null); + + // TODO if a Activity is specified, + // and general annonces in this activity are accepted: + // + // pubSub.Subscribe(token, "/topics/jobs/"+ActivityCode, null); } } diff --git a/BookAStar/BookAStar.Droid/Services/MyGcmIntentService.cs b/BookAStar/BookAStar.Droid/Services/MyGcmIntentService.cs index aa2007fd..b6ed58f1 100644 --- a/BookAStar/BookAStar.Droid/Services/MyGcmIntentService.cs +++ b/BookAStar/BookAStar.Droid/Services/MyGcmIntentService.cs @@ -99,7 +99,7 @@ namespace BookAStar.Droid void SubscribeGCM () { Context context = this.ApplicationContext; - string senders = "325408689282"; + string senders = MainSettings.GoogleSenderId; // Resources.GetString(GoogleSenderId); Intent intent = new Intent ("com.google.android.c2dm.intent.REGISTER"); intent.SetPackage ("com.google.android.gsf"); diff --git a/BookAStar/BookAStar.Droid/app.config b/BookAStar/BookAStar.Droid/app.config index de5386a4..66a6339f 100644 --- a/BookAStar/BookAStar.Droid/app.config +++ b/BookAStar/BookAStar.Droid/app.config @@ -1,11 +1,31 @@ - + + + + + + + + + + + + + + + + + + + + + - - + + - \ No newline at end of file + diff --git a/BookAStar/BookAStar.Droid/packages.config b/BookAStar/BookAStar.Droid/packages.config index 451c6e77..3c8a0a89 100644 --- a/BookAStar/BookAStar.Droid/packages.config +++ b/BookAStar/BookAStar.Droid/packages.config @@ -1,5 +1,6 @@  + diff --git a/BookAStar/BookAStar.iOS/BookAStar.iOS.csproj b/BookAStar/BookAStar.iOS/BookAStar.iOS.csproj index b57c0800..1c69864b 100644 --- a/BookAStar/BookAStar.iOS/BookAStar.iOS.csproj +++ b/BookAStar/BookAStar.iOS/BookAStar.iOS.csproj @@ -90,6 +90,7 @@ + @@ -151,4 +152,4 @@ - + \ No newline at end of file diff --git a/BookAStar/BookAStar.iOS/app.config b/BookAStar/BookAStar.iOS/app.config new file mode 100644 index 00000000..8460dd43 --- /dev/null +++ b/BookAStar/BookAStar.iOS/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/BookAStar/BookAStar/App.xaml.cs b/BookAStar/BookAStar/App.xaml.cs index 412de277..5f294941 100644 --- a/BookAStar/BookAStar/App.xaml.cs +++ b/BookAStar/BookAStar/App.xaml.cs @@ -83,10 +83,11 @@ namespace BookAStar else deviceInfoPage.Focus(); } - public async Task PostDeviceInfo() + public void PostDeviceInfo() { var res = PlateformSpecificInstance.InvokeApi( - "gcm/register", PlateformSpecificInstance.GetDeviceInfo()); + "gcm/register", + PlateformSpecificInstance.GetDeviceInfo()); } } diff --git a/BookAStar/BookAStar/Helpers/MainSettings.cs b/BookAStar/BookAStar/Helpers/MainSettings.cs index 33bd6581..ab1e0acf 100644 --- a/BookAStar/BookAStar/Helpers/MainSettings.cs +++ b/BookAStar/BookAStar/Helpers/MainSettings.cs @@ -58,7 +58,7 @@ namespace BookAStar }; private static readonly Dictionary environ = new Dictionary(); - public static readonly string YavscApiUrl = "dev.pschneider.fr"; + public static readonly string YavscApiUrl = "http://dev.pschneider.fr/api"; #endregion @@ -78,9 +78,7 @@ namespace BookAStar // Inform the server of it. if (oldregid != value) { - Task.Run( async () => { - await App.CurrentApp.PostDeviceInfo(); - }); + App.CurrentApp.PostDeviceInfo(); } } get { return AppSettings.GetValueOrDefault(GoogleRegIdKey); } @@ -109,8 +107,7 @@ namespace BookAStar return accountList; } } - - private static User currentUser = null; + public static User CurrentUser { get { var uname = UserName; @@ -121,8 +118,7 @@ namespace BookAStar } set { - var olduserid = currentUser?.Id; - currentUser = value; + var olduserid = CurrentUser?.Id; AppSettings.AddOrUpdateValue(userNameKey, value?.UserName); // TODO if it changes, for a valid // ident, and we've got a GoogleRedId, inform the server @@ -131,11 +127,10 @@ namespace BookAStar { if (olduserid != value.Id) { - Task.Run(async () => { - await App.CurrentApp.PostDeviceInfo(); - }); + App.CurrentApp.PostDeviceInfo(); } } + // TODO else Unregister the device } } diff --git a/BookAStar/BookAStar/SettingsPage.xaml b/BookAStar/BookAStar/SettingsPage.xaml index cefc2a6d..e0984276 100644 --- a/BookAStar/BookAStar/SettingsPage.xaml +++ b/BookAStar/BookAStar/SettingsPage.xaml @@ -1,20 +1,18 @@  +Title="Paramètres Booking star" +BindingContext="." > - + - diff --git a/BookAStar/BookAStar/SettingsPage.xaml.cs b/BookAStar/BookAStar/SettingsPage.xaml.cs index a432fbc5..5ffaa059 100644 --- a/BookAStar/BookAStar/SettingsPage.xaml.cs +++ b/BookAStar/BookAStar/SettingsPage.xaml.cs @@ -24,6 +24,7 @@ namespace BookAStar this.Musical = MainSettings.Musical; this.Environ = MainSettings.Environ; + this.BindingContext = this; AddAccountBtn.Clicked += AddAccountBtn_Clicked; diff --git a/Yavsc.Api/project.lock.json b/Yavsc.Api/project.lock.json index b20e6f25..03c1b066 100644 --- a/Yavsc.Api/project.lock.json +++ b/Yavsc.Api/project.lock.json @@ -753,7 +753,7 @@ } } }, - ".NETFramework,Version=v4.5.1/debian.8-x86": { + ".NETFramework,Version=v4.5.1/win7-x86": { "EntityFramework.Commands/7.0.0-rc1-final": { "type": "package", "dependencies": { @@ -1504,7 +1504,7 @@ } } }, - ".NETFramework,Version=v4.5.1/debian.8-x64": { + ".NETFramework,Version=v4.5.1/win7-x64": { "EntityFramework.Commands/7.0.0-rc1-final": { "type": "package", "dependencies": { @@ -3043,4 +3043,4 @@ ], ".NETFramework,Version=v4.5.1": [] } -} \ No newline at end of file +} diff --git a/Yavsc.Client/Yavsc.Client.csproj b/Yavsc.Client/Yavsc.Client.csproj index 89b9462b..f1f42ced 100644 --- a/Yavsc.Client/Yavsc.Client.csproj +++ b/Yavsc.Client/Yavsc.Client.csproj @@ -47,12 +47,12 @@ + Designer - @@ -67,4 +67,4 @@ --> - \ No newline at end of file + diff --git a/Yavsc.Client/Yavsc.Client.nuget.targets b/Yavsc.Client/Yavsc.Client.nuget.targets new file mode 100644 index 00000000..85cf587b --- /dev/null +++ b/Yavsc.Client/Yavsc.Client.nuget.targets @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Yavsc.Client/Yavsc.Client.sln b/Yavsc.Client/Yavsc.Client.sln index 61bdff8b..88788b1f 100644 --- a/Yavsc.Client/Yavsc.Client.sln +++ b/Yavsc.Client/Yavsc.Client.sln @@ -1,17 +1,17 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yavsc.Client", "Yavsc.Client.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.Build.0 = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yavsc.Client", "Yavsc.Client.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/Yavsc.Client/app.config b/Yavsc.Client/app.config new file mode 100644 index 00000000..8460dd43 --- /dev/null +++ b/Yavsc.Client/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Yavsc.Client/packages.config b/Yavsc.Client/packages.config index 6b8deb9c..569e1bea 100644 --- a/Yavsc.Client/packages.config +++ b/Yavsc.Client/packages.config @@ -1,3 +1,3 @@  - \ No newline at end of file + diff --git a/Yavsc.Client/project.json b/Yavsc.Client/project.json index 8e58e005..6204fd2a 100644 --- a/Yavsc.Client/project.json +++ b/Yavsc.Client/project.json @@ -12,10 +12,9 @@ "tooling": { "defaultNamespace": "Yavsc" }, - "dependencies": { - "Microsoft.AspNet.SignalR.Client.Portable": "2.0.1" - }, + "dependencies": {}, "frameworks": { - "net451": {} + "net451": {}, + ".NETPortable,Version=v4.5,Profile=Profile111": {} } } \ No newline at end of file diff --git a/Yavsc.Client/project.lock.json b/Yavsc.Client/project.lock.json old mode 100755 new mode 100644 index a380b838..ec5815d6 --- a/Yavsc.Client/project.lock.json +++ b/Yavsc.Client/project.lock.json @@ -2,254 +2,13 @@ "locked": false, "version": 2, "targets": { - ".NETFramework,Version=v4.5.1": { - "Microsoft.AspNet.SignalR.Client.Portable/2.0.1": { - "type": "package", - "dependencies": { - "Microsoft.Net.Http": "2.2.18", - "Newtonsoft.Json": "5.0.6" - }, - "compile": { - "lib/Microsoft.AspNet.SignalR.Client.dll": {} - }, - "runtime": { - "lib/Microsoft.AspNet.SignalR.Client.dll": {} - } - }, - "Microsoft.Bcl/1.1.3": { - "type": "package", - "dependencies": { - "Microsoft.Bcl.Build": "1.0.4" - }, - "compile": { - "lib/net45/_._": {} - }, - "runtime": { - "lib/net45/_._": {} - } - }, - "Microsoft.Bcl.Build/1.0.10": { - "type": "package" - }, - "Microsoft.Net.Http/2.2.18": { - "type": "package", - "dependencies": { - "Microsoft.Bcl": "1.1.3", - "Microsoft.Bcl.Build": "1.0.10" - }, - "frameworkAssemblies": [ - "System.Net.Http", - "System.Net.Http.WebRequest" - ], - "compile": { - "lib/net45/System.Net.Http.Extensions.dll": {}, - "lib/net45/System.Net.Http.Primitives.dll": {} - }, - "runtime": { - "lib/net45/System.Net.Http.Extensions.dll": {}, - "lib/net45/System.Net.Http.Primitives.dll": {} - } - }, - "Newtonsoft.Json/5.0.6": { - "type": "package", - "compile": { - "lib/net45/Newtonsoft.Json.dll": {} - }, - "runtime": { - "lib/net45/Newtonsoft.Json.dll": {} - } - } - } - }, - "libraries": { - "Microsoft.AspNet.SignalR.Client.Portable/2.0.1": { - "sha512": "IrbSa4V7I+sQbhXiZV+4FFAp0FKZ2Q+zJsbGmBUtixzWVksDytSl5zIOov8dAk6FiZWdvNOUigz8pbOJZL82Lw==", - "type": "package", - "files": [ - "Microsoft.AspNet.SignalR.Client.Portable.2.0.1.nupkg.sha512", - "Microsoft.AspNet.SignalR.Client.Portable.nuspec", - "lib/Microsoft.AspNet.SignalR.Client.XML", - "lib/Microsoft.AspNet.SignalR.Client.dll" - ] - }, - "Microsoft.Bcl/1.1.3": { - "sha512": "NlSh9kk1UyC25O5JJ6vM/omaEirx0Ysep3CMkFNluQbzlIE14eWNa2rHtmFV1NGAsA/OW6MYvuSi7T7aowD2jw==", - "type": "package", - "files": [ - "License-RTM.rtf", - "Microsoft.Bcl.1.1.3.nupkg.sha512", - "Microsoft.Bcl.nuspec", - "ReleaseNotes.txt", - "content/net45/_._", - "content/portable-net45+win8+wp8/_._", - "content/sl4/_._", - "content/sl5/_._", - "content/win8/_._", - "content/wp8/_._", - "lib/net40/System.IO.dll", - "lib/net40/System.IO.xml", - "lib/net40/System.Runtime.dll", - "lib/net40/System.Runtime.xml", - "lib/net40/System.Threading.Tasks.dll", - "lib/net40/System.Threading.Tasks.xml", - "lib/net40/ensureRedirect.xml", - "lib/net45/_._", - "lib/portable-net40+sl4+win8+wp71/System.IO.dll", - "lib/portable-net40+sl4+win8+wp71/System.IO.xml", - "lib/portable-net40+sl4+win8+wp71/System.Runtime.dll", - "lib/portable-net40+sl4+win8+wp71/System.Runtime.xml", - "lib/portable-net40+sl4+win8+wp71/System.Threading.Tasks.dll", - "lib/portable-net40+sl4+win8+wp71/System.Threading.Tasks.xml", - "lib/portable-net40+sl4+win8+wp71/ensureRedirect.xml", - "lib/portable-net40+sl4+win8+wp8/System.IO.dll", - "lib/portable-net40+sl4+win8+wp8/System.IO.xml", - "lib/portable-net40+sl4+win8+wp8/System.Runtime.dll", - "lib/portable-net40+sl4+win8+wp8/System.Runtime.xml", - "lib/portable-net40+sl4+win8+wp8/System.Threading.Tasks.dll", - "lib/portable-net40+sl4+win8+wp8/System.Threading.Tasks.xml", - "lib/portable-net40+sl4+win8+wp8/ensureRedirect.xml", - "lib/portable-net40+sl4+win8/System.IO.dll", - "lib/portable-net40+sl4+win8/System.IO.xml", - "lib/portable-net40+sl4+win8/System.Runtime.dll", - "lib/portable-net40+sl4+win8/System.Runtime.xml", - "lib/portable-net40+sl4+win8/System.Threading.Tasks.dll", - "lib/portable-net40+sl4+win8/System.Threading.Tasks.xml", - "lib/portable-net40+sl4+win8/ensureRedirect.xml", - "lib/portable-net40+sl5+win8+wp8/System.IO.dll", - "lib/portable-net40+sl5+win8+wp8/System.IO.xml", - "lib/portable-net40+sl5+win8+wp8/System.Runtime.dll", - "lib/portable-net40+sl5+win8+wp8/System.Runtime.xml", - "lib/portable-net40+sl5+win8+wp8/System.Threading.Tasks.dll", - "lib/portable-net40+sl5+win8+wp8/System.Threading.Tasks.xml", - "lib/portable-net40+sl5+win8+wp8/ensureRedirect.xml", - "lib/portable-net40+win8+wp8/System.IO.dll", - "lib/portable-net40+win8+wp8/System.IO.xml", - "lib/portable-net40+win8+wp8/System.Runtime.dll", - "lib/portable-net40+win8+wp8/System.Runtime.xml", - "lib/portable-net40+win8+wp8/System.Threading.Tasks.dll", - "lib/portable-net40+win8+wp8/System.Threading.Tasks.xml", - "lib/portable-net40+win8+wp8/ensureRedirect.xml", - "lib/portable-net40+win8/System.IO.dll", - "lib/portable-net40+win8/System.IO.xml", - "lib/portable-net40+win8/System.Runtime.dll", - "lib/portable-net40+win8/System.Runtime.xml", - "lib/portable-net40+win8/System.Threading.Tasks.dll", - "lib/portable-net40+win8/System.Threading.Tasks.xml", - "lib/portable-net40+win8/ensureRedirect.xml", - "lib/portable-net45+win8+wp8/_._", - "lib/sl4-windowsphone71/System.IO.dll", - "lib/sl4-windowsphone71/System.IO.xml", - "lib/sl4-windowsphone71/System.Runtime.dll", - "lib/sl4-windowsphone71/System.Runtime.xml", - "lib/sl4-windowsphone71/System.Threading.Tasks.dll", - "lib/sl4-windowsphone71/System.Threading.Tasks.xml", - "lib/sl4-windowsphone71/ensureRedirect.xml", - "lib/sl4/System.IO.dll", - "lib/sl4/System.IO.xml", - "lib/sl4/System.Runtime.dll", - "lib/sl4/System.Runtime.xml", - "lib/sl4/System.Threading.Tasks.dll", - "lib/sl4/System.Threading.Tasks.xml", - "lib/sl5/System.IO.dll", - "lib/sl5/System.IO.xml", - "lib/sl5/System.Runtime.dll", - "lib/sl5/System.Runtime.xml", - "lib/sl5/System.Threading.Tasks.dll", - "lib/sl5/System.Threading.Tasks.xml", - "lib/win8/_._", - "lib/wp8/_._" - ] - }, - "Microsoft.Bcl.Build/1.0.10": { - "sha512": "JpazBBc/JT6o76Gx2q3mxJlGHfv2gK+GTzaJ+PZjf2XNGQOcajNU4PKJqc0udRwmPunZP5GrMhiWUuDVkabh+A==", - "type": "package", - "files": [ - "License-Stable.rtf", - "Microsoft.Bcl.Build.1.0.10.nupkg.sha512", - "Microsoft.Bcl.Build.nuspec", - "content/net40/_._", - "content/netcore45/_._", - "content/portable-net40+win8+sl4+wp71/_._", - "content/sl4-windowsphone71/_._", - "content/sl4/_._", - "tools/Install.ps1", - "tools/Microsoft.Bcl.Build.Tasks.dll", - "tools/Microsoft.Bcl.Build.targets", - "tools/Uninstall.ps1" - ] - }, - "Microsoft.Net.Http/2.2.18": { - "sha512": "YSmLk8qh917EkfrP5ULL4Nu8mxpoz1fwd5pXwNPUlg4+grLWWpHyYPIMZKjxa7HOR5gsZ8ZfhaSoYzQyom8xUw==", - "type": "package", - "files": [ - "License-Stable.rtf", - "Microsoft.Net.Http.2.2.18.nupkg.sha512", - "Microsoft.Net.Http.nuspec", - "lib/net40/System.Net.Http.Extensions.XML", - "lib/net40/System.Net.Http.Extensions.dll", - "lib/net40/System.Net.Http.Primitives.dll", - "lib/net40/System.Net.Http.Primitives.xml", - "lib/net40/System.Net.Http.WebRequest.dll", - "lib/net40/System.Net.Http.WebRequest.xml", - "lib/net40/System.Net.Http.dll", - "lib/net40/System.Net.Http.xml", - "lib/net40/ensureRedirect.xml", - "lib/net45/System.Net.Http.Extensions.XML", - "lib/net45/System.Net.Http.Extensions.dll", - "lib/net45/System.Net.Http.Primitives.dll", - "lib/net45/System.Net.Http.Primitives.xml", - "lib/net45/ensureRedirect.xml", - "lib/portable-net40+sl4+win8+wp71/System.Net.Http.Extensions.XML", - "lib/portable-net40+sl4+win8+wp71/System.Net.Http.Extensions.dll", - "lib/portable-net40+sl4+win8+wp71/System.Net.Http.Primitives.XML", - "lib/portable-net40+sl4+win8+wp71/System.Net.Http.Primitives.dll", - "lib/portable-net40+sl4+win8+wp71/System.Net.Http.dll", - "lib/portable-net40+sl4+win8+wp71/System.Net.Http.xml", - "lib/portable-net40+sl4+win8+wp71/ensureRedirect.xml", - "lib/portable-net45+win8/System.Net.Http.Extensions.XML", - "lib/portable-net45+win8/System.Net.Http.Extensions.dll", - "lib/portable-net45+win8/System.Net.Http.Primitives.dll", - "lib/portable-net45+win8/System.Net.Http.Primitives.xml", - "lib/portable-net45+win8/ensureRedirect.xml", - "lib/sl4-windowsphone71/System.Net.Http.Extensions.XML", - "lib/sl4-windowsphone71/System.Net.Http.Extensions.dll", - "lib/sl4-windowsphone71/System.Net.Http.Primitives.XML", - "lib/sl4-windowsphone71/System.Net.Http.Primitives.dll", - "lib/sl4-windowsphone71/System.Net.Http.dll", - "lib/sl4-windowsphone71/System.Net.Http.xml", - "lib/win8/System.Net.Http.Extensions.XML", - "lib/win8/System.Net.Http.Extensions.dll", - "lib/win8/System.Net.Http.Primitives.dll", - "lib/win8/System.Net.Http.Primitives.xml" - ] - }, - "Newtonsoft.Json/5.0.6": { - "sha512": "Z594WlU7Wndv4vQxwsS7ym2y2Izsuw5U86UxQbx6YIKIjVju7V7OU4l1QQl5fM9AmPdzWIOxSlonzuQzzulMaw==", - "type": "package", - "files": [ - "Newtonsoft.Json.5.0.6.nupkg.sha512", - "Newtonsoft.Json.nuspec", - "lib/net20/Newtonsoft.Json.dll", - "lib/net20/Newtonsoft.Json.xml", - "lib/net35/Newtonsoft.Json.dll", - "lib/net35/Newtonsoft.Json.xml", - "lib/net40/Newtonsoft.Json.dll", - "lib/net40/Newtonsoft.Json.xml", - "lib/net45/Newtonsoft.Json.dll", - "lib/net45/Newtonsoft.Json.xml", - "lib/netcore45/Newtonsoft.Json.dll", - "lib/netcore45/Newtonsoft.Json.xml", - "lib/portable-net40+sl4+wp7+win8/Newtonsoft.Json.dll", - "lib/portable-net40+sl4+wp7+win8/Newtonsoft.Json.xml", - "lib/portable-net45+wp80+win8/Newtonsoft.Json.dll", - "lib/portable-net45+wp80+win8/Newtonsoft.Json.xml" - ] - } + ".NETFramework,Version=v4.5.1": {}, + ".NETPortable,Version=v4.5,Profile=Profile111": {} }, + "libraries": {}, "projectFileDependencyGroups": { - "": [ - "Microsoft.AspNet.SignalR.Client.Portable >= 2.0.1" - ], - ".NETFramework,Version=v4.5.1": [] + "": [], + ".NETFramework,Version=v4.5.1": [], + ".NETPortable,Version=v4.5,Profile=Profile111": [] } } \ No newline at end of file diff --git a/Yavsc/Controllers/SIRENExceptionsController.cs b/Yavsc/Controllers/SIRENExceptionsController.cs index ff7f3e69..9cd19866 100644 --- a/Yavsc/Controllers/SIRENExceptionsController.cs +++ b/Yavsc/Controllers/SIRENExceptionsController.cs @@ -1,121 +1,121 @@ -using System.Linq; -using Microsoft.AspNet.Authorization; -using Microsoft.AspNet.Mvc; -using Yavsc.Models; -using Yavsc.Models.Billing; - -namespace Yavsc.Controllers -{ - [Authorize(Roles="Administrator")] - public class SIRENExceptionsController : Controller - { - private ApplicationDbContext _context; - - public SIRENExceptionsController(ApplicationDbContext context) - { - _context = context; - } - - // GET: SIRENExceptions - public IActionResult Index() - { - return View(_context.ExceptionsSIREN.ToList()); - } - - // GET: SIRENExceptions/Details/5 - public IActionResult Details(string id) - { - if (id == null) - { - return HttpNotFound(); - } - - ExceptionSIREN exceptionSIREN = _context.ExceptionsSIREN.Single(m => m.SIREN == id); - if (exceptionSIREN == null) - { - return HttpNotFound(); - } - - return View(exceptionSIREN); - } - - // GET: SIRENExceptions/Create - public IActionResult Create() - { - return View(); - } - - // POST: SIRENExceptions/Create - [HttpPost] - [ValidateAntiForgeryToken] - public IActionResult Create(ExceptionSIREN exceptionSIREN) - { - if (ModelState.IsValid) - { - _context.ExceptionsSIREN.Add(exceptionSIREN); - _context.SaveChanges(); - return RedirectToAction("Index"); - } - return View(exceptionSIREN); - } - - // GET: SIRENExceptions/Edit/5 - public IActionResult Edit(string id) - { - if (id == null) - { - return HttpNotFound(); - } - - ExceptionSIREN exceptionSIREN = _context.ExceptionsSIREN.Single(m => m.SIREN == id); - if (exceptionSIREN == null) - { - return HttpNotFound(); - } - return View(exceptionSIREN); - } - - // POST: SIRENExceptions/Edit/5 - [HttpPost] - [ValidateAntiForgeryToken] - public IActionResult Edit(ExceptionSIREN exceptionSIREN) - { - if (ModelState.IsValid) - { - _context.Update(exceptionSIREN); - _context.SaveChanges(); - return RedirectToAction("Index"); - } - return View(exceptionSIREN); - } - - // GET: SIRENExceptions/Delete/5 - [ActionName("Delete")] - public IActionResult Delete(string id) - { - if (id == null) - { - return HttpNotFound(); - } - - ExceptionSIREN exceptionSIREN = _context.ExceptionsSIREN.Single(m => m.SIREN == id); - if (exceptionSIREN == null) - { - return HttpNotFound(); - } - - return View(exceptionSIREN); - } - - // POST: SIRENExceptions/Delete/5 - [HttpPost, ActionName("Delete")] - [ValidateAntiForgeryToken] - public IActionResult DeleteConfirmed(string id) - { - ExceptionSIREN exceptionSIREN = _context.ExceptionsSIREN.Single(m => m.SIREN == id); - _context.ExceptionsSIREN.Remove(exceptionSIREN); - _context.SaveChanges(); - return RedirectToAction("Index"); - } - } -} +using System.Linq; +using Microsoft.AspNet.Authorization; +using Microsoft.AspNet.Mvc; +using Yavsc.Models; +using Yavsc.Models.Billing; + +namespace Yavsc.Controllers +{ + [Authorize(Roles="Administrator")] + public class SIRENExceptionsController : Controller + { + private ApplicationDbContext _context; + + public SIRENExceptionsController(ApplicationDbContext context) + { + _context = context; + } + + // GET: SIRENExceptions + public IActionResult Index() + { + return View(_context.ExceptionsSIREN.ToList()); + } + + // GET: SIRENExceptions/Details/5 + public IActionResult Details(string id) + { + if (id == null) + { + return HttpNotFound(); + } + + ExceptionSIREN exceptionSIREN = _context.ExceptionsSIREN.Single(m => m.SIREN == id); + if (exceptionSIREN == null) + { + return HttpNotFound(); + } + + return View(exceptionSIREN); + } + + // GET: SIRENExceptions/Create + public IActionResult Create() + { + return View(); + } + + // POST: SIRENExceptions/Create + [HttpPost] + [ValidateAntiForgeryToken] + public IActionResult Create(ExceptionSIREN exceptionSIREN) + { + if (ModelState.IsValid) + { + _context.ExceptionsSIREN.Add(exceptionSIREN); + _context.SaveChanges(); + return RedirectToAction("Index"); + } + return View(exceptionSIREN); + } + + // GET: SIRENExceptions/Edit/5 + public IActionResult Edit(string id) + { + if (id == null) + { + return HttpNotFound(); + } + + ExceptionSIREN exceptionSIREN = _context.ExceptionsSIREN.Single(m => m.SIREN == id); + if (exceptionSIREN == null) + { + return HttpNotFound(); + } + return View(exceptionSIREN); + } + + // POST: SIRENExceptions/Edit/5 + [HttpPost] + [ValidateAntiForgeryToken] + public IActionResult Edit(ExceptionSIREN exceptionSIREN) + { + if (ModelState.IsValid) + { + _context.Update(exceptionSIREN); + _context.SaveChanges(); + return RedirectToAction("Index"); + } + return View(exceptionSIREN); + } + + // GET: SIRENExceptions/Delete/5 + [ActionName("Delete")] + public IActionResult Delete(string id) + { + if (id == null) + { + return HttpNotFound(); + } + + ExceptionSIREN exceptionSIREN = _context.ExceptionsSIREN.Single(m => m.SIREN == id); + if (exceptionSIREN == null) + { + return HttpNotFound(); + } + + return View(exceptionSIREN); + } + + // POST: SIRENExceptions/Delete/5 + [HttpPost, ActionName("Delete")] + [ValidateAntiForgeryToken] + public IActionResult DeleteConfirmed(string id) + { + ExceptionSIREN exceptionSIREN = _context.ExceptionsSIREN.Single(m => m.SIREN == id); + _context.ExceptionsSIREN.Remove(exceptionSIREN); + _context.SaveChanges(); + return RedirectToAction("Index"); + } + } +} diff --git a/Yavsc/Model/Identity/ApplicationUser.cs b/Yavsc/Model/Identity/ApplicationUser.cs index 24a285a8..94b3fcf9 100644 --- a/Yavsc/Model/Identity/ApplicationUser.cs +++ b/Yavsc/Model/Identity/ApplicationUser.cs @@ -1,37 +1,37 @@ - -using System.Collections.Generic; -using Microsoft.AspNet.Identity.EntityFramework; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Yavsc.Models.Identity; - -namespace Yavsc.Models -{ - - public class ApplicationUser : IdentityUser - { - - [Display(Name="AccountBalance")] - public virtual AccountBalance AccountBalance { get; set; } - - [InverseProperty("Author")] - public virtual List Posts { get; set; } - - [InverseProperty("Owner")] - public virtual List Book { get; set; } - - [InverseProperty("DeviceOwner")] - public virtual List Devices { get; set; } - - [InverseProperty("Owner")] - - public virtual List Circles { get; set; } - public virtual Location PostalAddress { get; set; } - - public string DedicatedGoogleCalendar { get; set; } - - public override string ToString() { - return this.Id+" "+this.AccountBalance?.Credits.ToString()+this.Email+" "+this.UserName+" $"+this.AccountBalance?.Credits.ToString(); - } - } -} + +using System.Collections.Generic; +using Microsoft.AspNet.Identity.EntityFramework; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Yavsc.Models.Identity; + +namespace Yavsc.Models +{ + + public class ApplicationUser : IdentityUser + { + + [Display(Name="AccountBalance")] + public virtual AccountBalance AccountBalance { get; set; } + + [InverseProperty("Author")] + public virtual List Posts { get; set; } + + [InverseProperty("Owner")] + public virtual List Book { get; set; } + + [InverseProperty("DeviceOwner")] + public virtual List Devices { get; set; } + + [InverseProperty("Owner")] + + public virtual List Circles { get; set; } + public virtual Location PostalAddress { get; set; } + + public string DedicatedGoogleCalendar { get; set; } + + public override string ToString() { + return this.Id+" "+this.AccountBalance?.Credits.ToString()+this.Email+" "+this.UserName+" $"+this.AccountBalance?.Credits.ToString(); + } + } +} diff --git a/Yavsc/Model/Relationship/Contact.cs b/Yavsc/Model/Relationship/Contact.cs index 781eb7e2..8666f25d 100644 --- a/Yavsc/Model/Relationship/Contact.cs +++ b/Yavsc/Model/Relationship/Contact.cs @@ -1,18 +1,18 @@ -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - - -namespace Yavsc.Models -{ - public class Contact - { - [Required()] - public string UserId { get; set; } - - [Required()] - public string OwnerId { get; set; } - - [ForeignKeyAttribute("OwnerId")] - public virtual ApplicationUser Owner { get; set; } - } -} +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + + +namespace Yavsc.Models +{ + public class Contact + { + [Required()] + public string UserId { get; set; } + + [Required()] + public string OwnerId { get; set; } + + [ForeignKeyAttribute("OwnerId")] + public virtual ApplicationUser Owner { get; set; } + } +} diff --git a/Yavsc/Model/Workflow/Activity.cs b/Yavsc/Model/Workflow/Activity.cs index b7282505..628903d1 100644 --- a/Yavsc/Model/Workflow/Activity.cs +++ b/Yavsc/Model/Workflow/Activity.cs @@ -1,40 +1,40 @@ - -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using Yavsc.Models.Market; - -namespace Yavsc.Models -{ - public class Activity - { - - [StringLength(512),Required,Key] - public string Code {get; set;} - /// - /// - /// - /// - [StringLength(512),Required()] - public string Name {get; set;} - - public string Description {get; set;} - /// - /// Name to associate to a performer in this activity domain - /// - /// - public string ActorDenomination {get; set;} - - public string Photo {get; set;} - - [InverseProperty("Context")] - public List Services { get; set; } - - /// - /// Moderation settings - /// - /// - string ModeratorGroupName { get; set; } - - } -} + +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Yavsc.Models.Market; + +namespace Yavsc.Models +{ + public class Activity + { + + [StringLength(512),Required,Key] + public string Code {get; set;} + /// + /// + /// + /// + [StringLength(512),Required()] + public string Name {get; set;} + + public string Description {get; set;} + /// + /// Name to associate to a performer in this activity domain + /// + /// + public string ActorDenomination {get; set;} + + public string Photo {get; set;} + + [InverseProperty("Context")] + public List Services { get; set; } + + /// + /// Moderation settings + /// + /// + string ModeratorGroupName { get; set; } + + } +} diff --git a/Yavsc/Views/Command/CommandConfirmation.cshtml b/Yavsc/Views/Command/CommandConfirmation.cshtml index d58ee305..2540b909 100644 --- a/Yavsc/Views/Command/CommandConfirmation.cshtml +++ b/Yavsc/Views/Command/CommandConfirmation.cshtml @@ -1,30 +1,30 @@ -@model BookQuery -@using Yavsc.Models.Google.Messaging -@{ - ViewData["Title"] = SR["Command confirmation"]+" "+SR[Model.PerformerProfile.ActivityCode]; -} -

@ViewData["Title"]

-
-

@SR["Your book query"]

-
- : @Html.DisplayFor(m => m.EventDate) -
- - : @Html.DisplayFor(m => m.Location) -
- - @if (ViewBag.GooglePayload !=null) - { - @if (ViewBag.GooglePayload.success>0) { -

@SR["GCM Notifications sent"]

- } - else { - if (ViewBag.GooglePayload.failure>0) - { -

@SR["GCM Notification sending failed"]

- } - } - } -
- - +@model BookQuery +@using Yavsc.Models.Google.Messaging +@{ + ViewData["Title"] = SR["Command confirmation"]+" "+SR[Model.PerformerProfile.ActivityCode]; +} +

@ViewData["Title"]

+
+

@SR["Your book query"]

+
+ : @Html.DisplayFor(m => m.EventDate) +
+ + : @Html.DisplayFor(m => m.Location) +
+ + @if (ViewBag.GooglePayload !=null) + { + @if (ViewBag.GooglePayload.success>0) { +

@SR["GCM Notifications sent"]

+ } + else { + if (ViewBag.GooglePayload.failure>0) + { +

@SR["GCM Notification sending failed"]

+ } + } + } +
+ + diff --git a/Yavsc/Views/SIRENExceptions/Create.cshtml b/Yavsc/Views/SIRENExceptions/Create.cshtml index 84dbb9a8..839cb5a9 100644 --- a/Yavsc/Views/SIRENExceptions/Create.cshtml +++ b/Yavsc/Views/SIRENExceptions/Create.cshtml @@ -1,22 +1,22 @@ -@model Yavsc.Models.Billing.ExceptionSIREN - - -
-
-

Exception SIREN

-
-
-
- @Html.TextBox("SIREN") -
-
- -
-
-
-
-
- - +@model Yavsc.Models.Billing.ExceptionSIREN + + +
+
+

Exception SIREN

+
+
+
+ @Html.TextBox("SIREN") +
+
+ +
+
+
+
+
+ + diff --git a/Yavsc/Views/SIRENExceptions/Delete.cshtml b/Yavsc/Views/SIRENExceptions/Delete.cshtml index 63be9f60..54b04c84 100644 --- a/Yavsc/Views/SIRENExceptions/Delete.cshtml +++ b/Yavsc/Views/SIRENExceptions/Delete.cshtml @@ -1,31 +1,31 @@ -@model Yavsc.Models.Billing.ExceptionSIREN - -@{ - Layout = null; -} - - - - - - - Delete - - - -

Are you sure you want to delete this?

-
-

ExceptionSIREN

-
-
-
- -
-
- | - Back to List -
-
-
- - +@model Yavsc.Models.Billing.ExceptionSIREN + +@{ + Layout = null; +} + + + + + + + Delete + + + +

Are you sure you want to delete this?

+
+

ExceptionSIREN

+
+
+
+ +
+
+ | + Back to List +
+
+
+ + diff --git a/Yavsc/Views/SIRENExceptions/Details.cshtml b/Yavsc/Views/SIRENExceptions/Details.cshtml index 12ce1d9a..bc575deb 100644 --- a/Yavsc/Views/SIRENExceptions/Details.cshtml +++ b/Yavsc/Views/SIRENExceptions/Details.cshtml @@ -1,27 +1,27 @@ -@model Yavsc.Models.Billing.ExceptionSIREN - -@{ - Layout = null; -} - - - - - - - Details - - - -
-

ExceptionSIREN

-
-
-
-
-

- Edit | - Back to List -

- - +@model Yavsc.Models.Billing.ExceptionSIREN + +@{ + Layout = null; +} + + + + + + + Details + + + +
+

ExceptionSIREN

+
+
+
+
+

+ Edit | + Back to List +

+ + diff --git a/Yavsc/Views/SIRENExceptions/Edit.cshtml b/Yavsc/Views/SIRENExceptions/Edit.cshtml index abaac31e..dc9c2d95 100644 --- a/Yavsc/Views/SIRENExceptions/Edit.cshtml +++ b/Yavsc/Views/SIRENExceptions/Edit.cshtml @@ -1,39 +1,39 @@ -@model Yavsc.Models.Billing.ExceptionSIREN - -@{ - Layout = null; -} - - - - - - - Edit - - - -
-
-

ExceptionSIREN

-
-
- @Html.DisplayFor(model => model.SIREN) : - -
-
- @Html.InputFor(model => model.SIREN) -
-
- -
-
-
-
- - - - - +@model Yavsc.Models.Billing.ExceptionSIREN + +@{ + Layout = null; +} + + + + + + + Edit + + + +
+
+

ExceptionSIREN

+
+
+ @Html.DisplayFor(model => model.SIREN) : + +
+
+ @Html.InputFor(model => model.SIREN) +
+
+ +
+
+
+
+ + + + + diff --git a/Yavsc/Views/SIRENExceptions/Index.cshtml b/Yavsc/Views/SIRENExceptions/Index.cshtml index d059a9be..26668904 100644 --- a/Yavsc/Views/SIRENExceptions/Index.cshtml +++ b/Yavsc/Views/SIRENExceptions/Index.cshtml @@ -1,21 +1,21 @@ -@model IEnumerable - -

- Create New -

- - - - - -@foreach (var item in Model) { - - - - -} -
Exceptions à la validation des code SIREN
@item.SIREN - Edit | - Details | - Delete -
+@model IEnumerable + +

+ Create New +

+ + + + + +@foreach (var item in Model) { + + + + +} +
Exceptions à la validation des code SIREN
@item.SIREN + Edit | + Details | + Delete +
diff --git a/sendmsg/NuGet.Config b/sendmsg/NuGet.Config old mode 100755 new mode 100644 diff --git a/wrap/Yavsc.Client/project.json b/wrap/Yavsc.Client/project.json index 451528f0..cbd22f76 100644 --- a/wrap/Yavsc.Client/project.json +++ b/wrap/Yavsc.Client/project.json @@ -6,6 +6,10 @@ "bin": { "assembly": "../../Yavsc.Client/obj/{configuration}/Yavsc.Client.dll", "pdb": "../../Yavsc.Client/obj/{configuration}/Yavsc.Client.pdb" + }, + "dependencies": { + "Json.NET.Web": "1.0.49", + "Newtonsoft.Json": "9.0.1" } } }