Merge branch 'vnext' of github.com:pazof/yavsc into vnext

main
Paul Schneider 9 years ago
commit 7283689059
36 changed files with 556 additions and 802 deletions

@ -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

@ -35,7 +35,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
<AndroidLinkMode>None</AndroidLinkMode>
<AndroidLinkMode>Full</AndroidLinkMode>
<EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk>
<BundleAssemblies>False</BundleAssemblies>
<AndroidCreatePackagePerAbi>False</AndroidCreatePackagePerAbi>
@ -76,6 +76,10 @@
<HintPath>..\..\packages\Xamarin.Forms.2.3.0.107\lib\MonoAndroid10\FormsViewGroup.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MarkdownDeep, Version=1.5.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MarkdownDeep-av.NET.1.5.2\lib\MonoAndroid10\MarkdownDeep.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media.Plugin, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xam.Plugin.Media.1.0.1\lib\MonoAndroid10\Media.Plugin.dll</HintPath>
<Private>True</Private>
@ -100,10 +104,12 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Drawing.dll</HintPath>
</Reference>
<Reference Include="System.Json" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
<Reference Include="Xamarin.Android.Support.Animated.Vector.Drawable, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll</HintPath>
<Private>True</Private>
@ -264,7 +270,7 @@
<AndroidResource Include="Resources\drawable\ic_corp_icon.png" />
<AndroidResource Include="Resources\drawable\nfqrcode.png" />
<AndroidResource Include="Resources\drawable\visuel_sexion.jpg" />
<Content Include="Resources\values\values-21\styles.xml" />
<AndroidResource Include="Resources\values\values-21\styles.xml" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\drawable-hdpi\" />

@ -3,4 +3,7 @@
<PropertyGroup>
<AndroidDesignerPreferredDevice>Nexus 4</AndroidDesignerPreferredDevice>
</PropertyGroup>
<PropertyGroup>
<ReferencePath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v6.0\</ReferencePath>
</PropertyGroup>
</Project>

@ -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/";

@ -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<TAnswer>(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);
}

@ -29,13 +29,14 @@
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<permission android:name="com.xamarin.mobilecrm.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
<uses-permission android:name="com.xamarin.mobilecrm.permission.MAPS_RECEIVE" />
<permission android:name="fr.pschneider.bas.permission.C2D_MESSAGE" />
<permission android:name="fr.pschneider.bas.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
<uses-permission android:name="fr.pschneider.bas.permission.MAPS_RECEIVE" />
<permission android:name="fr.pschneider.bas.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="fr.pschneider.bas.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.intent.RECEIVE" />
<uses-permission android:name="com.google.android.c2dm.intent.REGISTRATION" />
<uses-permission android:name="com.google.android.c2dm.intent.RETRY" />
<uses-permission android:name="android.permission.ACCOUNT_MANAGER" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
</manifest>

@ -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);
}
}

@ -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");

@ -1,11 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Drawing" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Data.SqlXml" publicKeyToken="B77A5C561934E089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Configuration" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Xml" publicKeyToken="B77A5C561934E089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
</configuration>

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MarkdownDeep-av.NET" version="1.5.2" targetFramework="monoandroid60" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="monoandroid60" />
<package id="Xam.Plugin.Connectivity" version="1.0.1" targetFramework="monoandroid60" />
<package id="Xam.Plugin.DeviceInfo" version="1.0.0.2" targetFramework="monoandroid60" />

@ -90,6 +90,7 @@
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" />
<None Include="app.config" />
<None Include="Entitlements.plist" />
<None Include="Info.plist" />
<Compile Include="Properties\AssemblyInfo.cs" />
@ -151,4 +152,4 @@
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.0.0.6482\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.0.0.6482\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
</Target>
</Project>
</Project>

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

@ -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());
}
}

@ -58,7 +58,7 @@ namespace BookAStar
};
private static readonly Dictionary<string, double> environ = new Dictionary<string, double>();
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<string>(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<string>(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
}
}

@ -1,20 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:local="clr-namespace:BookAStar.Views;assembly=BookAStar"
xmlns:local="clr-namespace:BookAStar;assembly=BookAStar"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="BookAStar.SettingsPage"
Title="Paramètres Booking star">
Title="Paramètres Booking star"
BindingContext="." >
<ContentPage.Resources>
<ResourceDictionary>
<Style TargetType="Label">
<Setter Property="FontSize" Value="Large"/>
</Style>
</ResourceDictionary>
</ContentPage.Resources>
<StackLayout>
<Label Text="Compte utilisateur" />
<Label x:Name="UserNameLabel" Text="{Binding ActiveUserName}" />
<Label Text="Compte utilisateur" StyleClass="Header"/>
<ListView x:Name="AccountListView"
SeparatorVisibility="Default"
@ -44,57 +42,17 @@ Title="Paramètres Booking star">
</ListView>
<StackLayout Orientation="Horizontal">
<Label Text="Status" VerticalOptions="Start"
XAlign="Center" IsVisible="true"
FontSize="Large" FontAttributes="Bold" TextColor="Yellow" />
<Label Text="Recevoir les notifications push"/>
<StackLayout Orientation="Horizontal" VerticalOptions="Start">
<Label Text="Recevoir les notifications push" StyleClass="Header"/>
<Switch x:Name="pushstatus" />
</StackLayout>
<StackLayout Orientation="Horizontal" VerticalOptions="Start">
<Label Text="Recevoir les demandes de devis de la part de professionnels uniquement"
StyleClass="Header"/>
<Switch x:Name="restrictToPro" />
</StackLayout>
<Label Text="Genres Musicaux"/>
<ListView VerticalOptions="Start" x:Name="MusicalListView"
ItemsSource="{Binding Musical}"
>
<ListView.Header><StackLayout></StackLayout></ListView.Header>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<StackLayout Orientation="Horizontal">
<Label Text="{Binding Key}" TextColor="Silver" FontAttributes="Italic"></Label>
<Slider Value="{Binding Value}" HorizontalOptions="FillAndExpand" ></Slider>
</StackLayout>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.Footer><StackLayout></StackLayout></ListView.Footer>
</ListView>
<Label Text="Lieux de prédileciton" />
<ListView x:Name="EnvironListView"
ItemsSource="{Binding Environ}" >
<ListView.Header>
<StackLayout></StackLayout>
</ListView.Header>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<StackLayout Orientation="Horizontal">
<Label Text="{Binding Key}" TextColor="Silver" FontAttributes="Italic"></Label>
<Slider Value="{Binding Value}" HorizontalOptions="FillAndExpand" ></Slider>
</StackLayout>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.Footer>
<StackLayout></StackLayout>
</ListView.Footer>
</ListView>
<Button x:Name="BtnViewDeviceInfo" Text="Device info"></Button>
<Button x:Name="BtnViewDeviceInfo" Text="Device info" StyleClass="Info"></Button>
</StackLayout>
</ContentPage>

@ -24,6 +24,7 @@ namespace BookAStar
this.Musical = MainSettings.Musical;
this.Environ = MainSettings.Environ;
this.BindingContext = this;
AddAccountBtn.Clicked += AddAccountBtn_Clicked;

@ -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": []
}
}
}

@ -47,12 +47,12 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="Helpers\" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
@ -67,4 +67,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="EmitMSBuildWarning" BeforeTargets="Build">
<Warning Text="Les packages contenant des cibles et des fichiers de propriétés MSBuild ne peuvent pas être installés complètement dans des projets ciblant plusieurs infrastructures. Les cibles et les fichiers de propriétés MSBuild ont été ignorés." />
</Target>
</Project>

@ -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

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
</packages>
</packages>

@ -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": {}
}
}

@ -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": []
}
}

@ -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");
}
}
}

@ -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<Blog> Posts { get; set; }
[InverseProperty("Owner")]
public virtual List<Contact> Book { get; set; }
[InverseProperty("DeviceOwner")]
public virtual List<GoogleCloudMobileDeclaration> Devices { get; set; }
[InverseProperty("Owner")]
public virtual List<Circle> 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<Blog> Posts { get; set; }
[InverseProperty("Owner")]
public virtual List<Contact> Book { get; set; }
[InverseProperty("DeviceOwner")]
public virtual List<GoogleCloudMobileDeclaration> Devices { get; set; }
[InverseProperty("Owner")]
public virtual List<Circle> 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();
}
}
}

@ -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; }
}
}

@ -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;}
/// <summary>
///
/// </summary>
/// <returns></returns>
[StringLength(512),Required()]
public string Name {get; set;}
public string Description {get; set;}
/// <summary>
/// Name to associate to a performer in this activity domain
/// </summary>
/// <returns></returns>
public string ActorDenomination {get; set;}
public string Photo {get; set;}
[InverseProperty("Context")]
public List<Service> Services { get; set; }
/// <summary>
/// Moderation settings
/// </summary>
/// <returns></returns>
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;}
/// <summary>
///
/// </summary>
/// <returns></returns>
[StringLength(512),Required()]
public string Name {get; set;}
public string Description {get; set;}
/// <summary>
/// Name to associate to a performer in this activity domain
/// </summary>
/// <returns></returns>
public string ActorDenomination {get; set;}
public string Photo {get; set;}
[InverseProperty("Context")]
public List<Service> Services { get; set; }
/// <summary>
/// Moderation settings
/// </summary>
/// <returns></returns>
string ModeratorGroupName { get; set; }
}
}

@ -1,30 +1,30 @@
@model BookQuery
@using Yavsc.Models.Google.Messaging
@{
ViewData["Title"] = SR["Command confirmation"]+" "+SR[Model.PerformerProfile.ActivityCode];
}
<h2>@ViewData["Title"]</h2>
<div class="form-horizontal">
<h4>@SR["Your book query"]</h4>
<hr />
<label for="EventDate">@SR["Event date"]</label>: @Html.DisplayFor(m => m.EventDate)
<br/>
<label for="Location">@SR["Location"]</label>: @Html.DisplayFor(m => m.Location)
<br/>
@if (ViewBag.GooglePayload !=null)
{
@if (ViewBag.GooglePayload.success>0) {
<h4>@SR["GCM Notifications sent"]</h4>
}
else {
if (ViewBag.GooglePayload.failure>0)
{
<h4>@SR["GCM Notification sending failed"]</h4>
}
}
}
</div>
@model BookQuery
@using Yavsc.Models.Google.Messaging
@{
ViewData["Title"] = SR["Command confirmation"]+" "+SR[Model.PerformerProfile.ActivityCode];
}
<h2>@ViewData["Title"]</h2>
<div class="form-horizontal">
<h4>@SR["Your book query"]</h4>
<hr />
<label for="EventDate">@SR["Event date"]</label>: @Html.DisplayFor(m => m.EventDate)
<br/>
<label for="Location">@SR["Location"]</label>: @Html.DisplayFor(m => m.Location)
<br/>
@if (ViewBag.GooglePayload !=null)
{
@if (ViewBag.GooglePayload.success>0) {
<h4>@SR["GCM Notifications sent"]</h4>
}
else {
if (ViewBag.GooglePayload.failure>0)
{
<h4>@SR["GCM Notification sending failed"]</h4>
}
}
}
</div>

@ -1,22 +1,22 @@
@model Yavsc.Models.Billing.ExceptionSIREN
<form asp-action="Create">
<div class="form-horizontal">
<h4>Exception SIREN</h4>
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<div class="form-group">
@Html.TextBox("SIREN")
<div class="col-md-offset-1 col-md-10">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</div>
</div>
</div>
</form>
<div>
<a asp-action="Index">Back to List</a>
</div>
@model Yavsc.Models.Billing.ExceptionSIREN
<form asp-action="Create">
<div class="form-horizontal">
<h4>Exception SIREN</h4>
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<div class="form-group">
@Html.TextBox("SIREN")
<div class="col-md-offset-1 col-md-10">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</div>
</div>
</div>
</form>
<div>
<a asp-action="Index">Back to List</a>
</div>

@ -1,31 +1,31 @@
@model Yavsc.Models.Billing.ExceptionSIREN
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Delete</title>
</head>
<body>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>ExceptionSIREN</h4>
<hr />
<dl class="dl-horizontal">
</dl>
<form asp-action="Delete">
<div class="form-actions no-color">
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</div>
</form>
</div>
</body>
</html>
@model Yavsc.Models.Billing.ExceptionSIREN
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Delete</title>
</head>
<body>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>ExceptionSIREN</h4>
<hr />
<dl class="dl-horizontal">
</dl>
<form asp-action="Delete">
<div class="form-actions no-color">
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</div>
</form>
</div>
</body>
</html>

@ -1,27 +1,27 @@
@model Yavsc.Models.Billing.ExceptionSIREN
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Details</title>
</head>
<body>
<div>
<h4>ExceptionSIREN</h4>
<hr />
<dl class="dl-horizontal">
</dl>
</div>
<p>
<a asp-action="Edit" asp-route-id="@Model.SIREN">Edit</a> |
<a asp-action="Index">Back to List</a>
</p>
</body>
</html>
@model Yavsc.Models.Billing.ExceptionSIREN
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Details</title>
</head>
<body>
<div>
<h4>ExceptionSIREN</h4>
<hr />
<dl class="dl-horizontal">
</dl>
</div>
<p>
<a asp-action="Edit" asp-route-id="@Model.SIREN">Edit</a> |
<a asp-action="Index">Back to List</a>
</p>
</body>
</html>

@ -1,39 +1,39 @@
@model Yavsc.Models.Billing.ExceptionSIREN
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Edit</title>
</head>
<body>
<form asp-action="Edit">
<div class="form-horizontal">
<h4>ExceptionSIREN</h4>
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
@Html.DisplayFor(model => model.SIREN) :
<div class="form-group">
<div class="col-md-offset-1 col-md-10">
@Html.InputFor(model => model.SIREN)
</div>
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</div>
</div>
</form>
<div>
<a asp-action="Index">Back to List</a>
</div>
</body>
</html>
@model Yavsc.Models.Billing.ExceptionSIREN
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Edit</title>
</head>
<body>
<form asp-action="Edit">
<div class="form-horizontal">
<h4>ExceptionSIREN</h4>
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
@Html.DisplayFor(model => model.SIREN) :
<div class="form-group">
<div class="col-md-offset-1 col-md-10">
@Html.InputFor(model => model.SIREN)
</div>
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</div>
</div>
</form>
<div>
<a asp-action="Index">Back to List</a>
</div>
</body>
</html>

@ -1,21 +1,21 @@
@model IEnumerable<Yavsc.Models.Billing.ExceptionSIREN>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<tr>
<th>Exceptions à la validation des code SIREN</th>
</tr>
@foreach (var item in Model) {
<tr>
<td>@item.SIREN</td>
<td>
<a asp-action="Edit" asp-route-id="@item.SIREN">Edit</a> |
<a asp-action="Details" asp-route-id="@item.SIREN">Details</a> |
<a asp-action="Delete" asp-route-id="@item.SIREN">Delete</a>
</td>
</tr>
}
</table>
@model IEnumerable<Yavsc.Models.Billing.ExceptionSIREN>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<tr>
<th>Exceptions à la validation des code SIREN</th>
</tr>
@foreach (var item in Model) {
<tr>
<td>@item.SIREN</td>
<td>
<a asp-action="Edit" asp-route-id="@item.SIREN">Edit</a> |
<a asp-action="Details" asp-route-id="@item.SIREN">Details</a> |
<a asp-action="Delete" asp-route-id="@item.SIREN">Delete</a>
</td>
</tr>
}
</table>

@ -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"
}
}
}

Loading…