├── .gitattributes
├── .gitignore
├── MobileStore
├── MobileStore.sln
├── MyStore.CustomersApp.sln
├── MyStore.CustomersApp
│ ├── MyStore.CustomersApp.Android
│ │ ├── Assets
│ │ │ └── AboutAssets.txt
│ │ ├── MainActivity.cs
│ │ ├── MyStore.CustomersApp.Android.csproj
│ │ ├── Properties
│ │ │ ├── AndroidManifest.xml
│ │ │ └── AssemblyInfo.cs
│ │ └── Resources
│ │ │ ├── AboutResources.txt
│ │ │ ├── Resource.designer.cs
│ │ │ ├── drawable-hdpi
│ │ │ └── icon.png
│ │ │ ├── drawable-xhdpi
│ │ │ └── icon.png
│ │ │ ├── drawable-xxhdpi
│ │ │ └── icon.png
│ │ │ ├── drawable
│ │ │ └── icon.png
│ │ │ ├── layout
│ │ │ ├── Main.axml
│ │ │ ├── Tabbar.axml
│ │ │ └── Toolbar.axml
│ │ │ ├── mipmap-hdpi
│ │ │ └── Icon.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── Icon.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── Icon.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── Icon.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── Icon.png
│ │ │ └── values
│ │ │ ├── Strings.xml
│ │ │ └── styles.xml
│ ├── MyStore.CustomersApp.UWP
│ │ ├── App.xaml
│ │ ├── App.xaml.cs
│ │ ├── Assets
│ │ │ ├── LockScreenLogo.scale-100.png
│ │ │ ├── LockScreenLogo.scale-125.png
│ │ │ ├── LockScreenLogo.scale-150.png
│ │ │ ├── LockScreenLogo.scale-200.png
│ │ │ ├── LockScreenLogo.scale-400.png
│ │ │ ├── SplashScreen.scale-100.png
│ │ │ ├── SplashScreen.scale-125.png
│ │ │ ├── SplashScreen.scale-150.png
│ │ │ ├── SplashScreen.scale-200.png
│ │ │ ├── SplashScreen.scale-400.png
│ │ │ ├── Square150x150Logo.scale-100.png
│ │ │ ├── Square150x150Logo.scale-125.png
│ │ │ ├── Square150x150Logo.scale-150.png
│ │ │ ├── Square150x150Logo.scale-200.png
│ │ │ ├── Square150x150Logo.scale-400.png
│ │ │ ├── Square44x44Logo.scale-100.png
│ │ │ ├── Square44x44Logo.scale-125.png
│ │ │ ├── Square44x44Logo.scale-150.png
│ │ │ ├── Square44x44Logo.scale-200.png
│ │ │ ├── Square44x44Logo.scale-400.png
│ │ │ ├── Square44x44Logo.targetsize-16_altform-unplated.png
│ │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ │ ├── Square44x44Logo.targetsize-256_altform-unplated.png
│ │ │ ├── Square44x44Logo.targetsize-32_altform-unplated.png
│ │ │ ├── Square44x44Logo.targetsize-48_altform-unplated.png
│ │ │ ├── StoreLogo.png
│ │ │ ├── Wide310x150Logo.scale-100.png
│ │ │ ├── Wide310x150Logo.scale-125.png
│ │ │ ├── Wide310x150Logo.scale-150.png
│ │ │ ├── Wide310x150Logo.scale-200.png
│ │ │ └── Wide310x150Logo.scale-400.png
│ │ ├── MainPage.xaml
│ │ ├── MainPage.xaml.cs
│ │ ├── MyStore.CustomersApp.UWP.csproj
│ │ ├── Package.appxmanifest
│ │ └── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ └── Default.rd.xml
│ ├── MyStore.CustomersApp.iOS
│ │ ├── AppDelegate.cs
│ │ ├── Entitlements.plist
│ │ ├── Info.plist
│ │ ├── Main.cs
│ │ ├── MyStore.CustomersApp.iOS.csproj
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ └── Resources
│ │ │ ├── Default-568h@2x.png
│ │ │ ├── Default-Portrait.png
│ │ │ ├── Default-Portrait@2x.png
│ │ │ ├── Default.png
│ │ │ ├── Default@2x.png
│ │ │ ├── Icon-60@2x.png
│ │ │ ├── Icon-60@3x.png
│ │ │ ├── Icon-76.png
│ │ │ ├── Icon-76@2x.png
│ │ │ ├── Icon-Small-40.png
│ │ │ ├── Icon-Small-40@2x.png
│ │ │ ├── Icon-Small-40@3x.png
│ │ │ ├── Icon-Small.png
│ │ │ ├── Icon-Small@2x.png
│ │ │ ├── Icon-Small@3x.png
│ │ │ └── LaunchScreen.storyboard
│ └── MyStore.CustomersApp
│ │ ├── App.xaml
│ │ ├── App.xaml.cs
│ │ ├── MyStore.CustomersApp.csproj
│ │ ├── Notifications
│ │ └── StoreNotification.cs
│ │ ├── Pages
│ │ ├── CustomerOrderListPage.xaml
│ │ ├── CustomerOrderListPage.xaml.cs
│ │ ├── CustomerOrderPage.xaml
│ │ ├── CustomerOrderPage.xaml.cs
│ │ ├── LoginPage.xaml
│ │ └── LoginPage.xaml.cs
│ │ └── Services
│ │ └── SignalRService.cs
├── MyStore.EmployeesApp.sln
├── MyStore.EmployeesApp
│ ├── MyStore.EmployeesApp.Android
│ │ ├── Assets
│ │ │ └── AboutAssets.txt
│ │ ├── MainActivity.cs
│ │ ├── MyStore.EmployeesApp.Android.csproj
│ │ ├── Properties
│ │ │ ├── AndroidManifest.xml
│ │ │ └── AssemblyInfo.cs
│ │ └── Resources
│ │ │ ├── AboutResources.txt
│ │ │ ├── Resource.designer.cs
│ │ │ ├── drawable-hdpi
│ │ │ └── icon.png
│ │ │ ├── drawable-xhdpi
│ │ │ └── icon.png
│ │ │ ├── drawable-xxhdpi
│ │ │ └── icon.png
│ │ │ ├── drawable
│ │ │ └── icon.png
│ │ │ ├── layout
│ │ │ ├── Main.axml
│ │ │ ├── Tabbar.axml
│ │ │ └── Toolbar.axml
│ │ │ ├── mipmap-hdpi
│ │ │ └── Icon.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── Icon.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── Icon.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── Icon.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── Icon.png
│ │ │ └── values
│ │ │ ├── Strings.xml
│ │ │ └── styles.xml
│ ├── MyStore.EmployeesApp.UWP
│ │ ├── App.xaml
│ │ ├── App.xaml.cs
│ │ ├── Assets
│ │ │ ├── LockScreenLogo.scale-100.png
│ │ │ ├── LockScreenLogo.scale-125.png
│ │ │ ├── LockScreenLogo.scale-150.png
│ │ │ ├── LockScreenLogo.scale-200.png
│ │ │ ├── LockScreenLogo.scale-400.png
│ │ │ ├── SplashScreen.scale-100.png
│ │ │ ├── SplashScreen.scale-125.png
│ │ │ ├── SplashScreen.scale-150.png
│ │ │ ├── SplashScreen.scale-200.png
│ │ │ ├── SplashScreen.scale-400.png
│ │ │ ├── Square150x150Logo.scale-100.png
│ │ │ ├── Square150x150Logo.scale-125.png
│ │ │ ├── Square150x150Logo.scale-150.png
│ │ │ ├── Square150x150Logo.scale-200.png
│ │ │ ├── Square150x150Logo.scale-400.png
│ │ │ ├── Square44x44Logo.scale-100.png
│ │ │ ├── Square44x44Logo.scale-125.png
│ │ │ ├── Square44x44Logo.scale-150.png
│ │ │ ├── Square44x44Logo.scale-200.png
│ │ │ ├── Square44x44Logo.scale-400.png
│ │ │ ├── Square44x44Logo.targetsize-16_altform-unplated.png
│ │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ │ ├── Square44x44Logo.targetsize-256_altform-unplated.png
│ │ │ ├── Square44x44Logo.targetsize-32_altform-unplated.png
│ │ │ ├── Square44x44Logo.targetsize-48_altform-unplated.png
│ │ │ ├── StoreLogo.png
│ │ │ ├── Wide310x150Logo.scale-100.png
│ │ │ ├── Wide310x150Logo.scale-125.png
│ │ │ ├── Wide310x150Logo.scale-150.png
│ │ │ ├── Wide310x150Logo.scale-200.png
│ │ │ └── Wide310x150Logo.scale-400.png
│ │ ├── MainPage.xaml
│ │ ├── MainPage.xaml.cs
│ │ ├── MyStore.EmployeesApp.UWP.csproj
│ │ ├── Package.appxmanifest
│ │ └── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ └── Default.rd.xml
│ ├── MyStore.EmployeesApp.iOS
│ │ ├── AppDelegate.cs
│ │ ├── Entitlements.plist
│ │ ├── Info.plist
│ │ ├── Main.cs
│ │ ├── MyStore.EmployeesApp.iOS.csproj
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ └── Resources
│ │ │ ├── Default-568h@2x.png
│ │ │ ├── Default-Portrait.png
│ │ │ ├── Default-Portrait@2x.png
│ │ │ ├── Default.png
│ │ │ ├── Default@2x.png
│ │ │ ├── Icon-60@2x.png
│ │ │ ├── Icon-60@3x.png
│ │ │ ├── Icon-76.png
│ │ │ ├── Icon-76@2x.png
│ │ │ ├── Icon-Small-40.png
│ │ │ ├── Icon-Small-40@2x.png
│ │ │ ├── Icon-Small-40@3x.png
│ │ │ ├── Icon-Small.png
│ │ │ ├── Icon-Small@2x.png
│ │ │ ├── Icon-Small@3x.png
│ │ │ └── LaunchScreen.storyboard
│ └── MyStore.EmployeesApp
│ │ ├── App.xaml
│ │ ├── App.xaml.cs
│ │ ├── MyStore.EmployeesApp.csproj
│ │ ├── Notifications
│ │ └── StoreNotification.cs
│ │ ├── Pages
│ │ ├── CustomerListPage.xaml
│ │ ├── CustomerListPage.xaml.cs
│ │ ├── CustomerOrderListPage.xaml
│ │ ├── CustomerOrderListPage.xaml.cs
│ │ ├── CustomerOrderPage.xaml
│ │ ├── CustomerOrderPage.xaml.cs
│ │ ├── CustomerPage.xaml
│ │ ├── CustomerPage.xaml.cs
│ │ ├── LoginPage.xaml
│ │ └── LoginPage.xaml.cs
│ │ └── Services
│ │ └── SignalRService.cs
├── MyStore.Models
│ ├── CustomerDTO.cs
│ ├── CustomerOrderDTO.cs
│ ├── EmployeDTO.cs
│ ├── MyStore.Models.csproj
│ ├── OrderDetailDTO.cs
│ ├── OrderStatusDTO.cs
│ └── ProductDTO.cs
└── MyStore.Services
│ ├── Helpers
│ ├── Constants.cs
│ └── MD5Security.cs
│ ├── MyStore.Services.csproj
│ └── Services
│ └── StoreWebApiClient.cs
├── StoreDB_Script.sql
└── StoreWebApi
├── StoreWebApi.sln
└── StoreWebApi
├── Controllers
├── CustomerOrdersController.cs
├── CustomersController.cs
├── EmployeesController.cs
├── OrderDetailsController.cs
├── OrderStatusesController.cs
├── ProductsController.cs
└── ValuesController.cs
├── DTOs
├── AutoMapperConfiguration.cs
├── CustomerDTO.cs
├── CustomerOrderDTO.cs
├── EmployeeDTO.cs
├── OrderDetailDTO.cs
├── OrderStatusDTO.cs
└── ProductDTO.cs
├── Hubs
├── IStoreHub.cs
└── StoreHub.cs
├── Models
├── Customer.cs
├── CustomerOrder.cs
├── Employee.cs
├── OrderDetail.cs
├── OrderStatus.cs
├── Product.cs
└── StoreDBContext.cs
├── Program.cs
├── Properties
├── PublishProfiles
│ └── CustomProfile.pubxml
└── launchSettings.json
├── Startup.cs
├── StoreWebApi.csproj
├── appsettings.Development.json
└── appsettings.json
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with you package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
20 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Android.App;
4 | using Android.Content.PM;
5 | using Android.Runtime;
6 | using Android.Views;
7 | using Android.Widget;
8 | using Android.OS;
9 |
10 | namespace MyStore.CustomersApp.Droid
11 | {
12 | [Activity(Label = "MyStore.CustomersApp", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
13 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
14 | {
15 | protected override void OnCreate(Bundle bundle)
16 | {
17 | TabLayoutResource = Resource.Layout.Tabbar;
18 | ToolbarResource = Resource.Layout.Toolbar;
19 |
20 | base.OnCreate(bundle);
21 |
22 | global::Xamarin.Forms.Forms.Init(this, bundle);
23 | LoadApplication(new App());
24 | }
25 | }
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/MyStore.CustomersApp.Android.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {D497BE95-6E0D-4488-A2C6-FDD898584D96}
7 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
8 | Library
9 | MyStore.CustomersApp.Droid
10 | MyStore.CustomersApp.Android
11 | v8.1
12 | True
13 | Resources\Resource.designer.cs
14 | Resource
15 | Properties\AndroidManifest.xml
16 | Resources
17 | Assets
18 |
19 |
20 |
21 |
22 | true
23 | full
24 | false
25 | bin\Debug
26 | DEBUG;
27 | prompt
28 | 4
29 | None
30 |
31 |
32 | true
33 | pdbonly
34 | true
35 | bin\Release
36 | prompt
37 | 4
38 | true
39 | false
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | 1.0.1
51 |
52 |
53 | 3.0.1
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | Designer
85 |
86 |
87 |
88 |
89 | {AFD7B2AD-D61B-4EAB-866E-632D7075ACC8}
90 | MyStore.CustomersApp
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("MyStore.CustomersApp.Android")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("MyStore.CustomersApp.Android")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: ComVisible(false)]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
32 | // Add some common permissions, these can be removed if not needed
33 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
34 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
35 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.xml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable-hdpi/
12 | icon.png
13 |
14 | drawable-ldpi/
15 | icon.png
16 |
17 | drawable-mdpi/
18 | icon.png
19 |
20 | layout/
21 | main.xml
22 |
23 | values/
24 | strings.xml
25 |
26 | In order to get the build system to recognize Android resources, set the build action to
27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
28 | instead operate on resource IDs. When you compile an Android application that uses resources,
29 | the build system will package the resources for distribution and generate a class called
30 | "Resource" that contains the tokens for each one of the resources included. For example,
31 | for the above Resources layout, this is what the Resource class would expose:
32 |
33 | public class Resource {
34 | public class drawable {
35 | public const int icon = 0x123;
36 | }
37 |
38 | public class layout {
39 | public const int main = 0x456;
40 | }
41 |
42 | public class strings {
43 | public const int first_string = 0xabc;
44 | public const int second_string = 0xbcd;
45 | }
46 | }
47 |
48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
50 | string in the dictionary file values/strings.xml.
51 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/drawable/icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/layout/Main.axml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/layout/Tabbar.axml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/layout/Toolbar.axml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/mipmap-hdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/mipmap-hdpi/Icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/mipmap-mdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/mipmap-mdpi/Icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/mipmap-xhdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/mipmap-xhdpi/Icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/mipmap-xxhdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/mipmap-xxhdpi/Icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/mipmap-xxxhdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/mipmap-xxxhdpi/Icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/values/Strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello World, Click Me!
4 | MyStore.CustomersApp.Droid
5 |
6 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.Android/Resources/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
26 |
27 |
30 |
31 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.ApplicationModel;
7 | using Windows.ApplicationModel.Activation;
8 | using Windows.Foundation;
9 | using Windows.Foundation.Collections;
10 | using Windows.UI.Xaml;
11 | using Windows.UI.Xaml.Controls;
12 | using Windows.UI.Xaml.Controls.Primitives;
13 | using Windows.UI.Xaml.Data;
14 | using Windows.UI.Xaml.Input;
15 | using Windows.UI.Xaml.Media;
16 | using Windows.UI.Xaml.Navigation;
17 |
18 | namespace MyStore.CustomersApp.UWP
19 | {
20 | ///
21 | /// Provides application-specific behavior to supplement the default Application class.
22 | ///
23 | sealed partial class App : Application
24 | {
25 | ///
26 | /// Initializes the singleton application object. This is the first line of authored code
27 | /// executed, and as such is the logical equivalent of main() or WinMain().
28 | ///
29 | public App()
30 | {
31 | this.InitializeComponent();
32 | this.Suspending += OnSuspending;
33 | }
34 |
35 | ///
36 | /// Invoked when the application is launched normally by the end user. Other entry points
37 | /// will be used such as when the application is launched to open a specific file.
38 | ///
39 | /// Details about the launch request and process.
40 | protected override void OnLaunched(LaunchActivatedEventArgs e)
41 | {
42 |
43 |
44 | Frame rootFrame = Window.Current.Content as Frame;
45 |
46 | // Do not repeat app initialization when the Window already has content,
47 | // just ensure that the window is active
48 | if (rootFrame == null)
49 | {
50 | // Create a Frame to act as the navigation context and navigate to the first page
51 | rootFrame = new Frame();
52 |
53 | rootFrame.NavigationFailed += OnNavigationFailed;
54 |
55 | Xamarin.Forms.Forms.Init(e);
56 |
57 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
58 | {
59 | //TODO: Load state from previously suspended application
60 | }
61 |
62 | // Place the frame in the current Window
63 | Window.Current.Content = rootFrame;
64 | }
65 |
66 | if (rootFrame.Content == null)
67 | {
68 | // When the navigation stack isn't restored navigate to the first page,
69 | // configuring the new page by passing required information as a navigation
70 | // parameter
71 | rootFrame.Navigate(typeof(MainPage), e.Arguments);
72 | }
73 | // Ensure the current window is active
74 | Window.Current.Activate();
75 | }
76 |
77 | ///
78 | /// Invoked when Navigation to a certain page fails
79 | ///
80 | /// The Frame which failed navigation
81 | /// Details about the navigation failure
82 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
83 | {
84 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
85 | }
86 |
87 | ///
88 | /// Invoked when application execution is being suspended. Application state is saved
89 | /// without knowing whether the application will be terminated or resumed with the contents
90 | /// of memory still intact.
91 | ///
92 | /// The source of the suspend request.
93 | /// Details about the suspend request.
94 | private void OnSuspending(object sender, SuspendingEventArgs e)
95 | {
96 | var deferral = e.SuspendingOperation.GetDeferral();
97 | //TODO: Save application state and stop any background activity
98 | deferral.Complete();
99 | }
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/LockScreenLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/LockScreenLogo.scale-100.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/LockScreenLogo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/LockScreenLogo.scale-125.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/LockScreenLogo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/LockScreenLogo.scale-150.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/LockScreenLogo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/LockScreenLogo.scale-400.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/SplashScreen.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/SplashScreen.scale-125.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/SplashScreen.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/SplashScreen.scale-150.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/SplashScreen.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/SplashScreen.scale-400.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square150x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square150x150Logo.scale-100.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square150x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square150x150Logo.scale-125.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square150x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square150x150Logo.scale-150.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square150x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square150x150Logo.scale-400.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.scale-100.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.scale-125.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.scale-150.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.scale-400.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.targetsize-16_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.targetsize-16_altform-unplated.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.targetsize-256_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.targetsize-256_altform-unplated.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.targetsize-32_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.targetsize-32_altform-unplated.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.targetsize-48_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Square44x44Logo.targetsize-48_altform-unplated.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Wide310x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Wide310x150Logo.scale-100.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Wide310x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Wide310x150Logo.scale-125.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Wide310x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Wide310x150Logo.scale-150.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Wide310x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Assets/Wide310x150Logo.scale-400.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | namespace MyStore.CustomersApp.UWP
17 | {
18 | public sealed partial class MainPage
19 | {
20 | public MainPage()
21 | {
22 | this.InitializeComponent();
23 |
24 | LoadApplication(new MyStore.CustomersApp.App());
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
13 |
14 |
15 |
16 |
17 | MyStore.CustomersApp.UWP
18 | f6d6050d-e15d-446a-a7ff-c7c438bead87
19 | Assets\StoreLogo.png
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("MyStore.CustomersApp.UWP")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MyStore.CustomersApp.UWP")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.UWP/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace MyStore.CustomersApp.iOS
9 | {
10 | // The UIApplicationDelegate for the application. This class is responsible for launching the
11 | // User Interface of the application, as well as listening (and optionally responding) to
12 | // application events from iOS.
13 | [Register("AppDelegate")]
14 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
15 | {
16 | //
17 | // This method is invoked when the application has loaded and is ready to run. In this
18 | // method you should instantiate the window, load the UI into it and then make the window
19 | // visible.
20 | //
21 | // You have 17 seconds to return from this method, or iOS will terminate your application.
22 | //
23 | public override bool FinishedLaunching(UIApplication app, NSDictionary options)
24 | {
25 | global::Xamarin.Forms.Forms.Init();
26 | LoadApplication(new App());
27 |
28 | return base.FinishedLaunching(app, options);
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIDeviceFamily
6 |
7 | 1
8 | 2
9 |
10 | UISupportedInterfaceOrientations
11 |
12 | UIInterfaceOrientationPortrait
13 | UIInterfaceOrientationLandscapeLeft
14 | UIInterfaceOrientationLandscapeRight
15 |
16 | UISupportedInterfaceOrientations~ipad
17 |
18 | UIInterfaceOrientationPortrait
19 | UIInterfaceOrientationPortraitUpsideDown
20 | UIInterfaceOrientationLandscapeLeft
21 | UIInterfaceOrientationLandscapeRight
22 |
23 | MinimumOSVersion
24 | 10.3
25 | CFBundleDisplayName
26 | MyStore.CustomersApp
27 | CFBundleIdentifier
28 | com.yourcompany.MyStore.CustomersApp
29 | CFBundleVersion
30 | 1.0
31 | CFBundleIconFiles
32 |
33 | Icon-60@2x
34 | Icon-60@3x
35 | Icon-76
36 | Icon-76@2x
37 | Default
38 | Default@2x
39 | Default-568h@2x
40 | Default-Portrait
41 | Default-Portrait@2x
42 | Icon-Small-40
43 | Icon-Small-40@2x
44 | Icon-Small-40@3x
45 | Icon-Small
46 | Icon-Small@2x
47 | Icon-Small@3x
48 |
49 | UILaunchStoryboardName
50 | LaunchScreen
51 | CFBundleName
52 | MyStore.CustomersApp
53 |
54 |
55 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace MyStore.CustomersApp.iOS
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main(string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main(args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("MyStore.CustomersApp.iOS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MyStore.CustomersApp.iOS")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Default-Portrait.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Default.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Default@2x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-60@2x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-60@3x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-76.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-76@2x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-Small-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-Small-40.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-Small-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-Small-40@2x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-Small-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-Small-40@3x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-Small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-Small.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-Small@2x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-Small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/Icon-Small@3x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp.iOS/Resources/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Xamarin.Forms;
4 |
5 | using MyStore.Models;
6 | using MyStore.CustomersApp.Services;
7 |
8 | namespace MyStore.CustomersApp
9 | {
10 | public partial class App : Application
11 | {
12 | public static CustomerDTO CurrentCustomer;
13 | public static SignalRService SignalRService;
14 |
15 | public App ()
16 | {
17 | InitializeComponent();
18 |
19 | MainPage = new NavigationPage(new Pages.LoginPage());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp/MyStore.CustomersApp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | *.xaml
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | MSBuild:UpdateDesignTimeXaml
27 |
28 |
29 | MSBuild:UpdateDesignTimeXaml
30 |
31 |
32 | MSBuild:UpdateDesignTimeXaml
33 |
34 |
35 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp/Notifications/StoreNotification.cs:
--------------------------------------------------------------------------------
1 | using MyStore.Models;
2 | using Plugin.LocalNotifications;
3 |
4 | namespace MyStore.CustomersApp.Notifications
5 | {
6 | public static class StoreNotification
7 | {
8 | public static void Notify(CustomerOrderDTO order, string message)
9 | {
10 | CrossLocalNotifications.Current.Show("Store Notification", message);
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp/Pages/CustomerOrderListPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
32 |
34 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp/Pages/CustomerOrderListPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Xaml;
5 |
6 | using MyStore.Models;
7 | using MyStore.Services;
8 |
9 | namespace MyStore.CustomersApp.Pages
10 | {
11 | [XamlCompilation(XamlCompilationOptions.Compile)]
12 | public partial class CustomerOrderListPage : ContentPage
13 | {
14 | CustomerDTO Item;
15 |
16 | public CustomerOrderListPage ()
17 | {
18 | InitializeComponent ();
19 |
20 | Item = App.CurrentCustomer;
21 | }
22 |
23 | protected async override void OnAppearing()
24 | {
25 | base.OnAppearing();
26 |
27 | Loading(true);
28 | CustomerOrdersListView.ItemsSource = await StoreWebApiClient.Instance.GetItems("CustomerOrders", $"Customer/{Item.Id}");
29 | Loading(false);
30 | }
31 |
32 | void Loading(bool show)
33 | {
34 | indicator.IsEnabled = show;
35 | indicator.IsRunning = show;
36 | }
37 |
38 | private async void CustomerOrdersListView_ItemSelected(object sender, SelectedItemChangedEventArgs e)
39 | {
40 | try
41 | {
42 | if (e.SelectedItem != null)
43 | {
44 | var item = (CustomerOrderDTO)e.SelectedItem;
45 | await Navigation.PushAsync(new CustomerOrderPage(item));
46 | CustomerOrdersListView.SelectedItem = null;
47 | }
48 | }
49 | catch (Exception ex)
50 | {
51 | }
52 | }
53 |
54 | public async void AddButton_Clicked(object sender, EventArgs e)
55 | {
56 | var item = new CustomerOrderDTO()
57 | {
58 | Id = 0,
59 | Amount = 0,
60 | Customer = App.CurrentCustomer,
61 | CustomerId = App.CurrentCustomer.Id,
62 | Date = DateTime.UtcNow
63 | };
64 |
65 | await Navigation.PushAsync(new CustomerOrderPage(item));
66 | }
67 | }
68 | }
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp/Pages/CustomerOrderPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
13 |
14 |
15 |
16 |
17 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp/Pages/CustomerOrderPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Threading.Tasks;
4 |
5 | using Xamarin.Forms;
6 | using Xamarin.Forms.Xaml;
7 |
8 | using MyStore.Models;
9 | using MyStore.Services;
10 |
11 | namespace MyStore.CustomersApp.Pages
12 | {
13 | [XamlCompilation(XamlCompilationOptions.Compile)]
14 | public partial class CustomerOrderPage : ContentPage
15 | {
16 | public CustomerOrderPage(CustomerOrderDTO item)
17 | {
18 | InitializeComponent();
19 | LoadItem(item);
20 | }
21 |
22 | public async Task LoadItem(CustomerOrderDTO item)
23 | {
24 | this.BindingContext = item;
25 | var list = await StoreWebApiClient.Instance.GetItems("OrderStatuses");
26 |
27 | if (item.Id == 0)
28 | {
29 | this.ToolbarItems.RemoveAt(1);
30 |
31 | var unpaidStatus = list.First(x => x.Name == "1-Unpaid");
32 | item.OrderStatusId = unpaidStatus.Id;
33 | item.OrderStatus = unpaidStatus;
34 | }
35 |
36 | StatusPicker.ItemsSource = list;
37 | StatusPicker.ItemDisplayBinding = new Binding("Name");
38 | StatusPicker.SelectedItem = list.First(x => x.Id == item.OrderStatusId);
39 | }
40 |
41 | void Loading(bool show)
42 | {
43 | indicator.IsEnabled = show;
44 | indicator.IsRunning = show;
45 | }
46 |
47 | async void RegisterButton_Clicked(object sender, EventArgs e)
48 | {
49 | Loading(true);
50 | var item = (CustomerOrderDTO)this.BindingContext;
51 |
52 | if (item.Id > 0)
53 | await StoreWebApiClient.Instance.PutItem("CustomerOrders", item, item.Id);
54 | else
55 | await StoreWebApiClient.Instance.PostItem("CustomerOrders", item);
56 |
57 | Loading(false);
58 |
59 | await DisplayAlert("Success", "Item registered!", "OK");
60 | await NotifyOrder(item);
61 | await Navigation.PopAsync();
62 | }
63 |
64 | async void DeleteButton_Clicked(object sender, EventArgs e)
65 | {
66 | if (await DisplayAlert("Warning!", "Do you really want to delete this item?", "Yes", "No"))
67 | {
68 | Loading(true);
69 |
70 | var item = (CustomerOrderDTO)this.BindingContext;
71 |
72 | var op = await StoreWebApiClient.Instance.DeleteItem("CustomerOrders", item.Id);
73 |
74 | Loading(false);
75 |
76 | if (op)
77 | {
78 | await DisplayAlert("Success!", "Item deleted!", "OK");
79 | await Navigation.PopAsync();
80 | }
81 | else
82 | {
83 | await DisplayAlert("Error!", "Item was not deleted!", "OK");
84 | }
85 | }
86 | }
87 |
88 | async Task NotifyOrder(CustomerOrderDTO order)
89 | {
90 | if (order.OrderStatus.Name == "1-Unpaid"
91 | || order.OrderStatus.Name == "2-Paid")
92 | {
93 | await App.SignalRService.Notify(order, Constants.Employee);
94 | }
95 | }
96 | }
97 | }
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp/Pages/LoginPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
25 |
26 |
28 |
33 |
34 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp/Pages/LoginPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Xaml;
5 |
6 | using MyStore.Services;
7 | using MyStore.Models;
8 | using MyStore.CustomersApp.Services;
9 |
10 | namespace MyStore.CustomersApp.Pages
11 | {
12 | [XamlCompilation(XamlCompilationOptions.Compile)]
13 | public partial class LoginPage : ContentPage
14 | {
15 | public LoginPage ()
16 | {
17 | InitializeComponent ();
18 | }
19 |
20 | public async void SignInButton_Clicked(object sender, EventArgs e)
21 | {
22 | var username = UserNameEntry.Text;
23 | var password = PasswordEntry.Text;
24 |
25 | var customer = await StoreWebApiClient.Instance.LoginCustomer(username, password);
26 |
27 | if (customer != default(CustomerDTO))
28 | {
29 | App.CurrentCustomer = customer;
30 |
31 | App.SignalRService = new SignalRService();
32 | await App.SignalRService.InitCustomer(App.CurrentCustomer);
33 |
34 | await DisplayAlert("Welcome!", $"Welcome {customer.FullName}", "OK");
35 | await Navigation.PushAsync(new CustomerOrderListPage());
36 | }
37 | else
38 | {
39 | await DisplayAlert("Error!", "Wrong credentials!", "OK");
40 | }
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/MobileStore/MyStore.CustomersApp/MyStore.CustomersApp/Services/SignalRService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using Microsoft.AspNetCore.SignalR.Client;
4 | using MyStore.CustomersApp.Notifications;
5 | using MyStore.Models;
6 | using MyStore.Services;
7 |
8 | namespace MyStore.CustomersApp.Services
9 | {
10 | public class SignalRService
11 | {
12 | HubConnection Connection;
13 |
14 | public async Task InitCustomer(CustomerDTO customer)
15 | {
16 | try
17 | {
18 | Connection = new HubConnectionBuilder()
19 | .WithUrl(Constants.SignalRURL)
20 | .Build();
21 |
22 | // Client: NotifyNewInfo
23 | Connection.On(Constants.ClientMethod, (order) =>
24 | {
25 | switch (order.OrderStatus.Name)
26 | {
27 | case "1-Unpaid":
28 | case "2-Paid":
29 | NotifyEmployee(order);
30 | break;
31 | case "3-Processing":
32 | case "4-Shipped":
33 | case "5-Delivered":
34 | NotifyCustomer(order);
35 | break;
36 | }
37 | });
38 |
39 | await Connection.StartAsync();
40 |
41 | Connection.Closed += async (exception) =>
42 | {
43 | TimeSpan retryDuration = TimeSpan.FromSeconds(30);
44 |
45 | while (DateTime.UtcNow < DateTime.UtcNow.Add(retryDuration))
46 | {
47 | bool connected = await InitCustomer(App.CurrentCustomer);
48 | if (connected)
49 | return;
50 | }
51 | };
52 |
53 | await Suscribe($"{Constants.Customer}-{customer.Id}");
54 |
55 | return true;
56 | }
57 | catch(Exception ex)
58 | {
59 | return false;
60 | }
61 | }
62 |
63 | private Task Connection_Closed(Exception arg)
64 | {
65 |
66 | throw new NotImplementedException();
67 | }
68 |
69 | public async Task Suscribe(string group)
70 | {
71 | await Connection.InvokeAsync(Constants.ServerSubscribeMethod, group);
72 | }
73 |
74 | public async Task Unsuscribe(string group)
75 | {
76 | await Connection.InvokeAsync(Constants.ServerUnsuscribeMethod, group);
77 | }
78 |
79 | public async Task Notify(CustomerOrderDTO order, string group)
80 | {
81 | try
82 | {
83 | await Connection.InvokeAsync(Constants.ServerMethod, order, group);
84 | }
85 | catch(Exception ex)
86 | {
87 |
88 | }
89 | }
90 |
91 | public void NotifyEmployee(CustomerOrderDTO order)
92 | {
93 | StoreNotification.Notify(order, $"An order has a new status: {order.OrderStatus.Name}. Please review it.");
94 | }
95 |
96 | public void NotifyCustomer(CustomerOrderDTO order)
97 | {
98 | StoreNotification.Notify(order, $"An employee has updated your oder with the status: {order.OrderStatus.Name}.");
99 | }
100 | }
101 | }
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with you package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
20 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Android.App;
4 | using Android.Content.PM;
5 | using Android.Runtime;
6 | using Android.Views;
7 | using Android.Widget;
8 | using Android.OS;
9 |
10 | namespace MyStore.EmployeesApp.Droid
11 | {
12 | [Activity(Label = "MyStore.EmployeesApp", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
13 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
14 | {
15 | protected override void OnCreate(Bundle bundle)
16 | {
17 | TabLayoutResource = Resource.Layout.Tabbar;
18 | ToolbarResource = Resource.Layout.Toolbar;
19 |
20 | base.OnCreate(bundle);
21 |
22 | global::Xamarin.Forms.Forms.Init(this, bundle);
23 | LoadApplication(new App());
24 | }
25 | }
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/MyStore.EmployeesApp.Android.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {0D4D6103-B33E-4B26-87B3-479380A72746}
7 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
8 | Library
9 | MyStore.EmployeesApp.Droid
10 | MyStore.EmployeesApp.Android
11 | v8.1
12 | True
13 | Resources\Resource.designer.cs
14 | Resource
15 | Properties\AndroidManifest.xml
16 | Resources
17 | Assets
18 |
19 |
20 |
21 |
22 | true
23 | full
24 | false
25 | bin\Debug
26 | DEBUG;
27 | prompt
28 | 4
29 | None
30 |
31 |
32 | true
33 | pdbonly
34 | true
35 | bin\Release
36 | prompt
37 | 4
38 | true
39 | false
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | 1.0.1
51 |
52 |
53 | 3.0.1
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | Designer
85 |
86 |
87 |
88 |
89 | {0E5DAD2D-0420-4872-9441-DF7AB29C293E}
90 | MyStore.EmployeesApp
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("MyStore.EmployeesApp.Android")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("MyStore.EmployeesApp.Android")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: ComVisible(false)]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
32 | // Add some common permissions, these can be removed if not needed
33 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
34 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
35 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.xml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable-hdpi/
12 | icon.png
13 |
14 | drawable-ldpi/
15 | icon.png
16 |
17 | drawable-mdpi/
18 | icon.png
19 |
20 | layout/
21 | main.xml
22 |
23 | values/
24 | strings.xml
25 |
26 | In order to get the build system to recognize Android resources, set the build action to
27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
28 | instead operate on resource IDs. When you compile an Android application that uses resources,
29 | the build system will package the resources for distribution and generate a class called
30 | "Resource" that contains the tokens for each one of the resources included. For example,
31 | for the above Resources layout, this is what the Resource class would expose:
32 |
33 | public class Resource {
34 | public class drawable {
35 | public const int icon = 0x123;
36 | }
37 |
38 | public class layout {
39 | public const int main = 0x456;
40 | }
41 |
42 | public class strings {
43 | public const int first_string = 0xabc;
44 | public const int second_string = 0xbcd;
45 | }
46 | }
47 |
48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
50 | string in the dictionary file values/strings.xml.
51 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/drawable/icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/layout/Main.axml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/layout/Tabbar.axml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/layout/Toolbar.axml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/mipmap-hdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/mipmap-hdpi/Icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/mipmap-mdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/mipmap-mdpi/Icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/mipmap-xhdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/mipmap-xhdpi/Icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/mipmap-xxhdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/mipmap-xxhdpi/Icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/mipmap-xxxhdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/mipmap-xxxhdpi/Icon.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/values/Strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello World, Click Me!
4 | MyStore.EmployeesApp.Droid
5 |
6 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.Android/Resources/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
26 |
27 |
30 |
31 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.ApplicationModel;
7 | using Windows.ApplicationModel.Activation;
8 | using Windows.Foundation;
9 | using Windows.Foundation.Collections;
10 | using Windows.UI.Xaml;
11 | using Windows.UI.Xaml.Controls;
12 | using Windows.UI.Xaml.Controls.Primitives;
13 | using Windows.UI.Xaml.Data;
14 | using Windows.UI.Xaml.Input;
15 | using Windows.UI.Xaml.Media;
16 | using Windows.UI.Xaml.Navigation;
17 |
18 | namespace MyStore.EmployeesApp.UWP
19 | {
20 | ///
21 | /// Provides application-specific behavior to supplement the default Application class.
22 | ///
23 | sealed partial class App : Application
24 | {
25 | ///
26 | /// Initializes the singleton application object. This is the first line of authored code
27 | /// executed, and as such is the logical equivalent of main() or WinMain().
28 | ///
29 | public App()
30 | {
31 | this.InitializeComponent();
32 | this.Suspending += OnSuspending;
33 | }
34 |
35 | ///
36 | /// Invoked when the application is launched normally by the end user. Other entry points
37 | /// will be used such as when the application is launched to open a specific file.
38 | ///
39 | /// Details about the launch request and process.
40 | protected override void OnLaunched(LaunchActivatedEventArgs e)
41 | {
42 |
43 |
44 | Frame rootFrame = Window.Current.Content as Frame;
45 |
46 | // Do not repeat app initialization when the Window already has content,
47 | // just ensure that the window is active
48 | if (rootFrame == null)
49 | {
50 | // Create a Frame to act as the navigation context and navigate to the first page
51 | rootFrame = new Frame();
52 |
53 | rootFrame.NavigationFailed += OnNavigationFailed;
54 |
55 | Xamarin.Forms.Forms.Init(e);
56 |
57 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
58 | {
59 | //TODO: Load state from previously suspended application
60 | }
61 |
62 | // Place the frame in the current Window
63 | Window.Current.Content = rootFrame;
64 | }
65 |
66 | if (rootFrame.Content == null)
67 | {
68 | // When the navigation stack isn't restored navigate to the first page,
69 | // configuring the new page by passing required information as a navigation
70 | // parameter
71 | rootFrame.Navigate(typeof(MainPage), e.Arguments);
72 | }
73 | // Ensure the current window is active
74 | Window.Current.Activate();
75 | }
76 |
77 | ///
78 | /// Invoked when Navigation to a certain page fails
79 | ///
80 | /// The Frame which failed navigation
81 | /// Details about the navigation failure
82 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
83 | {
84 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
85 | }
86 |
87 | ///
88 | /// Invoked when application execution is being suspended. Application state is saved
89 | /// without knowing whether the application will be terminated or resumed with the contents
90 | /// of memory still intact.
91 | ///
92 | /// The source of the suspend request.
93 | /// Details about the suspend request.
94 | private void OnSuspending(object sender, SuspendingEventArgs e)
95 | {
96 | var deferral = e.SuspendingOperation.GetDeferral();
97 | //TODO: Save application state and stop any background activity
98 | deferral.Complete();
99 | }
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/LockScreenLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/LockScreenLogo.scale-100.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/LockScreenLogo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/LockScreenLogo.scale-125.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/LockScreenLogo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/LockScreenLogo.scale-150.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/LockScreenLogo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/LockScreenLogo.scale-400.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/SplashScreen.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/SplashScreen.scale-125.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/SplashScreen.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/SplashScreen.scale-150.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/SplashScreen.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/SplashScreen.scale-400.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square150x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square150x150Logo.scale-100.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square150x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square150x150Logo.scale-125.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square150x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square150x150Logo.scale-150.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square150x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square150x150Logo.scale-400.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.scale-100.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.scale-125.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.scale-150.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.scale-400.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.targetsize-16_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.targetsize-16_altform-unplated.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.targetsize-256_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.targetsize-256_altform-unplated.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.targetsize-32_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.targetsize-32_altform-unplated.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.targetsize-48_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Square44x44Logo.targetsize-48_altform-unplated.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Wide310x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Wide310x150Logo.scale-100.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Wide310x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Wide310x150Logo.scale-125.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Wide310x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Wide310x150Logo.scale-150.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Wide310x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Assets/Wide310x150Logo.scale-400.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | namespace MyStore.EmployeesApp.UWP
17 | {
18 | public sealed partial class MainPage
19 | {
20 | public MainPage()
21 | {
22 | this.InitializeComponent();
23 |
24 | LoadApplication(new MyStore.EmployeesApp.App());
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
13 |
14 |
15 |
16 |
17 | MyStore.EmployeesApp.UWP
18 | 0755f9e0-6fb5-4df6-aecd-8e0ef4af43e6
19 | Assets\StoreLogo.png
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("MyStore.EmployeesApp.UWP")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MyStore.EmployeesApp.UWP")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.UWP/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace MyStore.EmployeesApp.iOS
9 | {
10 | // The UIApplicationDelegate for the application. This class is responsible for launching the
11 | // User Interface of the application, as well as listening (and optionally responding) to
12 | // application events from iOS.
13 | [Register("AppDelegate")]
14 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
15 | {
16 | //
17 | // This method is invoked when the application has loaded and is ready to run. In this
18 | // method you should instantiate the window, load the UI into it and then make the window
19 | // visible.
20 | //
21 | // You have 17 seconds to return from this method, or iOS will terminate your application.
22 | //
23 | public override bool FinishedLaunching(UIApplication app, NSDictionary options)
24 | {
25 | global::Xamarin.Forms.Forms.Init();
26 | LoadApplication(new App());
27 |
28 | return base.FinishedLaunching(app, options);
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIDeviceFamily
6 |
7 | 1
8 | 2
9 |
10 | UISupportedInterfaceOrientations
11 |
12 | UIInterfaceOrientationPortrait
13 | UIInterfaceOrientationLandscapeLeft
14 | UIInterfaceOrientationLandscapeRight
15 |
16 | UISupportedInterfaceOrientations~ipad
17 |
18 | UIInterfaceOrientationPortrait
19 | UIInterfaceOrientationPortraitUpsideDown
20 | UIInterfaceOrientationLandscapeLeft
21 | UIInterfaceOrientationLandscapeRight
22 |
23 | MinimumOSVersion
24 | 10.3
25 | CFBundleDisplayName
26 | MyStore.EmployeesApp
27 | CFBundleIdentifier
28 | com.yourcompany.MyStore.EmployeesApp
29 | CFBundleVersion
30 | 1.0
31 | CFBundleIconFiles
32 |
33 | Icon-60@2x
34 | Icon-60@3x
35 | Icon-76
36 | Icon-76@2x
37 | Default
38 | Default@2x
39 | Default-568h@2x
40 | Default-Portrait
41 | Default-Portrait@2x
42 | Icon-Small-40
43 | Icon-Small-40@2x
44 | Icon-Small-40@3x
45 | Icon-Small
46 | Icon-Small@2x
47 | Icon-Small@3x
48 |
49 | UILaunchStoryboardName
50 | LaunchScreen
51 | CFBundleName
52 | MyStore.EmployeesApp
53 |
54 |
55 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace MyStore.EmployeesApp.iOS
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main(string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main(args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("MyStore.EmployeesApp.iOS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MyStore.EmployeesApp.iOS")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Default-Portrait.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Default.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Default@2x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-60@2x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-60@3x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-76.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-76@2x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-Small-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-Small-40.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-Small-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-Small-40@2x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-Small-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-Small-40@3x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-Small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-Small.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-Small@2x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-Small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/icebeam7/Store/6869c23cafb73fabb84ead5c5107627226b33a7f/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/Icon-Small@3x.png
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp.iOS/Resources/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Xamarin.Forms;
4 |
5 | using MyStore.Models;
6 | using MyStore.EmployeesApp.Services;
7 |
8 | namespace MyStore.EmployeesApp
9 | {
10 | public partial class App : Application
11 | {
12 | public static EmployeeDTO CurrentEmployee;
13 | public static SignalRService SignalRService;
14 |
15 | public App()
16 | {
17 | InitializeComponent();
18 |
19 | MainPage = new NavigationPage(new Pages.LoginPage());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp/MyStore.EmployeesApp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | *.xaml
21 |
22 |
23 |
24 |
25 |
26 | MSBuild:UpdateDesignTimeXaml
27 |
28 |
29 | MSBuild:UpdateDesignTimeXaml
30 |
31 |
32 | MSBuild:UpdateDesignTimeXaml
33 |
34 |
35 | MSBuild:UpdateDesignTimeXaml
36 |
37 |
38 | MSBuild:UpdateDesignTimeXaml
39 |
40 |
41 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp/Notifications/StoreNotification.cs:
--------------------------------------------------------------------------------
1 | using MyStore.Models;
2 | using Plugin.LocalNotifications;
3 |
4 | namespace MyStore.EmployeesApp.Notifications
5 | {
6 | public static class StoreNotification
7 | {
8 | public static void Notify(CustomerOrderDTO order, string message)
9 | {
10 | CrossLocalNotifications.Current.Show("Store Notification", message);
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp/Pages/CustomerListPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp/Pages/CustomerListPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Xaml;
5 |
6 | using MyStore.Models;
7 | using MyStore.Services;
8 |
9 | namespace MyStore.EmployeesApp.Pages
10 | {
11 | [XamlCompilation(XamlCompilationOptions.Compile)]
12 | public partial class CustomerListPage : ContentPage
13 | {
14 | public CustomerListPage()
15 | {
16 | InitializeComponent();
17 | }
18 |
19 | protected async override void OnAppearing()
20 | {
21 | base.OnAppearing();
22 |
23 | Loading(true);
24 | CustomersListView.ItemsSource = await StoreWebApiClient.Instance.GetItems("Customers");
25 | Loading(false);
26 | }
27 |
28 | void Loading(bool show)
29 | {
30 | indicator.IsEnabled = show;
31 | indicator.IsRunning = show;
32 | }
33 |
34 | private async void CustomersListView_ItemSelected(object sender, SelectedItemChangedEventArgs e)
35 | {
36 | try
37 | {
38 | if (e.SelectedItem != null)
39 | {
40 | var item = (CustomerDTO)e.SelectedItem;
41 | await Navigation.PushAsync(new CustomerPage(item));
42 | CustomersListView.SelectedItem = null;
43 | }
44 | }
45 | catch (Exception ex)
46 | {
47 | }
48 | }
49 |
50 | public async void AddButton_Clicked(object sender, EventArgs e)
51 | {
52 | await Navigation.PushAsync(new CustomerPage(new CustomerDTO()));
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp/Pages/CustomerOrderListPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
33 |
35 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp/Pages/CustomerOrderListPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Xaml;
5 |
6 | using MyStore.Models;
7 | using MyStore.Services;
8 |
9 | namespace MyStore.EmployeesApp.Pages
10 | {
11 | [XamlCompilation(XamlCompilationOptions.Compile)]
12 | public partial class CustomerOrderListPage : ContentPage
13 | {
14 | CustomerDTO Item;
15 |
16 | public CustomerOrderListPage(CustomerDTO item)
17 | {
18 | InitializeComponent();
19 |
20 | Item = item;
21 | }
22 |
23 | protected async override void OnAppearing()
24 | {
25 | base.OnAppearing();
26 |
27 | Loading(true);
28 | CustomerOrdersListView.ItemsSource = await StoreWebApiClient.Instance.GetItems("CustomerOrders", $"Customer/{Item.Id}");
29 | Loading(false);
30 | }
31 |
32 | void Loading(bool show)
33 | {
34 | indicator.IsEnabled = show;
35 | indicator.IsRunning = show;
36 | }
37 |
38 | private async void CustomerOrdersListView_ItemSelected(object sender, SelectedItemChangedEventArgs e)
39 | {
40 | try
41 | {
42 | if (e.SelectedItem != null)
43 | {
44 | var item = (CustomerOrderDTO)e.SelectedItem;
45 | await Navigation.PushAsync(new CustomerOrderPage(item));
46 | CustomerOrdersListView.SelectedItem = null;
47 | }
48 | }
49 | catch (Exception ex)
50 | {
51 | }
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp/Pages/CustomerOrderPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
13 |
14 |
15 |
16 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp/Pages/CustomerOrderPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Threading.Tasks;
4 |
5 | using Xamarin.Forms;
6 | using Xamarin.Forms.Xaml;
7 |
8 | using MyStore.Models;
9 | using MyStore.Services;
10 |
11 | namespace MyStore.EmployeesApp.Pages
12 | {
13 | [XamlCompilation(XamlCompilationOptions.Compile)]
14 | public partial class CustomerOrderPage : ContentPage
15 | {
16 | public CustomerOrderPage (CustomerOrderDTO item)
17 | {
18 | InitializeComponent ();
19 | LoadItem(item);
20 | }
21 |
22 | public async Task LoadItem(CustomerOrderDTO item)
23 | {
24 | this.BindingContext = item;
25 | var list = await StoreWebApiClient.Instance.GetItems("OrderStatuses");
26 |
27 | StatusPicker.ItemsSource = list;
28 | StatusPicker.ItemDisplayBinding = new Binding("Name");
29 | StatusPicker.SelectedItem = list.First(x => x.Id == item.OrderStatusId);
30 | }
31 |
32 | void Loading(bool show)
33 | {
34 | indicator.IsEnabled = show;
35 | indicator.IsRunning = show;
36 | }
37 |
38 | async void UpdateStatusButton_Clicked(object sender, EventArgs e)
39 | {
40 | Loading(true);
41 | var item = (CustomerOrderDTO)this.BindingContext;
42 | item.OrderStatus = StatusPicker.SelectedItem as OrderStatusDTO;
43 | item.OrderStatusId = item.OrderStatus.Id;
44 |
45 | if (item.Id > 0)
46 | await StoreWebApiClient.Instance.PutItem("CustomerOrders", item, item.Id);
47 |
48 | Loading(false);
49 |
50 | await DisplayAlert("Success", "Item registered!", "OK");
51 | await NotifyOrder(item);
52 | await Navigation.PopAsync();
53 | }
54 |
55 | async Task NotifyOrder(CustomerOrderDTO order)
56 | {
57 | if (!(order.OrderStatus.Name == "1-Unpaid"
58 | || order.OrderStatus.Name == "2-Paid"))
59 | {
60 | await App.SignalRService.Notify(order, $"{Constants.Customer}-{order.CustomerId}");
61 | }
62 | }
63 | }
64 | }
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp/Pages/CustomerPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
21 |
22 |
23 |
24 |
25 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp/Pages/CustomerPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Xaml;
5 |
6 | using MyStore.Models;
7 | using MyStore.Services;
8 |
9 | namespace MyStore.EmployeesApp.Pages
10 | {
11 | [XamlCompilation(XamlCompilationOptions.Compile)]
12 | public partial class CustomerPage : ContentPage
13 | {
14 | public CustomerPage(CustomerDTO item)
15 | {
16 | InitializeComponent();
17 |
18 | this.BindingContext = item;
19 | if (item.Id == 0)
20 | {
21 | this.ToolbarItems.RemoveAt(2);
22 | this.ToolbarItems.RemoveAt(1);
23 | }
24 | }
25 |
26 | void Loading(bool show)
27 | {
28 | indicator.IsEnabled = show;
29 | indicator.IsRunning = show;
30 | }
31 |
32 | async void RegisterButton_Clicked(object sender, EventArgs e)
33 | {
34 | Loading(true);
35 | var item = (CustomerDTO)this.BindingContext;
36 |
37 | if (item.Id > 0)
38 | await StoreWebApiClient.Instance.PutItem("Customers", item, item.Id);
39 | else
40 | {
41 | item.Password = MD5Security.ToMD5Hash("abc");
42 | await StoreWebApiClient.Instance.PostItem("Customers", item);
43 | }
44 |
45 | Loading(false);
46 |
47 | await DisplayAlert("Success", "Item registered!", "OK");
48 | await Navigation.PopAsync();
49 | }
50 |
51 | async void ViewCustomerOrdersButton_Clicked(object sender, EventArgs e)
52 | {
53 | var item = (CustomerDTO)this.BindingContext;
54 | await Navigation.PushAsync(new CustomerOrderListPage(item));
55 | }
56 |
57 | async void DeleteButton_Clicked(object sender, EventArgs e)
58 | {
59 | if (await DisplayAlert("Warning!", "Do you really want to delete this item?", "Yes", "No"))
60 | {
61 | Loading(true);
62 |
63 | var item = (CustomerDTO)this.BindingContext;
64 |
65 | var op = await StoreWebApiClient.Instance.DeleteItem("Customers", item.Id);
66 |
67 | Loading(false);
68 |
69 | if (op)
70 | {
71 | await DisplayAlert("Success!", "Item deleted!", "OK");
72 | await Navigation.PopAsync();
73 | }
74 | else
75 | {
76 | await DisplayAlert("Error!", "Item was not deleted!", "OK");
77 | }
78 | }
79 | }
80 | }
81 | }
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp/Pages/LoginPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
25 |
26 |
28 |
33 |
34 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp/Pages/LoginPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Xaml;
5 |
6 | using MyStore.Services;
7 | using MyStore.Models;
8 | using MyStore.EmployeesApp.Services;
9 |
10 | namespace MyStore.EmployeesApp.Pages
11 | {
12 | [XamlCompilation(XamlCompilationOptions.Compile)]
13 | public partial class LoginPage : ContentPage
14 | {
15 | public LoginPage()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | public async void SignInButton_Clicked(object sender, EventArgs e)
21 | {
22 | var username = UserNameEntry.Text;
23 | var password = PasswordEntry.Text;
24 |
25 | var employee = await StoreWebApiClient.Instance.Login(username, password);
26 |
27 | if (employee != default(EmployeeDTO))
28 | {
29 | App.CurrentEmployee = employee;
30 |
31 | App.SignalRService = new SignalRService();
32 | await App.SignalRService.InitEmployee(App.CurrentEmployee);
33 |
34 | await DisplayAlert("Welcome!", $"Welcome {employee.FullName}", "OK");
35 | await Navigation.PushAsync(new CustomerListPage());
36 | }
37 | else
38 | {
39 | await DisplayAlert("Error!", "Wrong credentials!", "OK");
40 | }
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/MobileStore/MyStore.EmployeesApp/MyStore.EmployeesApp/Services/SignalRService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using Microsoft.AspNetCore.SignalR.Client;
4 | using MyStore.EmployeesApp.Notifications;
5 | using MyStore.Models;
6 | using MyStore.Services;
7 |
8 | namespace MyStore.EmployeesApp.Services
9 | {
10 | public class SignalRService
11 | {
12 | HubConnection Connection;
13 |
14 | public async Task InitEmployee(EmployeeDTO employee)
15 | {
16 | Connection = new HubConnectionBuilder()
17 | .WithUrl(Constants.SignalRURL)
18 | .Build();
19 |
20 | // Client: NotifyNewInfo
21 | Connection.On(Constants.ClientMethod, (order) =>
22 | {
23 | switch (order.OrderStatus.Name)
24 | {
25 | case "1-Unpaid":
26 | case "2-Paid":
27 | NotifyEmployee(order);
28 | break;
29 | case "3-Processing":
30 | case "4-Shipped":
31 | case "5-Delivered":
32 | NotifyCustomer(order);
33 | break;
34 | }
35 | });
36 |
37 | await Connection.StartAsync();
38 | await Suscribe(Constants.Employee);
39 | }
40 |
41 | public async Task Suscribe(string group)
42 | {
43 | await Connection.InvokeAsync(Constants.ServerSubscribeMethod, group);
44 | }
45 |
46 | public async Task Unsuscribe(string group)
47 | {
48 | await Connection.InvokeAsync(Constants.ServerUnsuscribeMethod, group);
49 | }
50 |
51 | public async Task Notify(CustomerOrderDTO order, string group)
52 | {
53 | try
54 | {
55 | await Connection.InvokeAsync(Constants.ServerMethod, order, group);
56 | }
57 | catch (Exception ex)
58 | {
59 |
60 | }
61 | }
62 |
63 | public void NotifyEmployee(CustomerOrderDTO order)
64 | {
65 | StoreNotification.Notify(order, $"An order has a new status: {order.OrderStatus.Name}. Please review it.");
66 | }
67 |
68 | public void NotifyCustomer(CustomerOrderDTO order)
69 | {
70 | StoreNotification.Notify(order, $"An employee has updated your oder with the status: {order.OrderStatus.Name}.");
71 | }
72 | }
73 | }
--------------------------------------------------------------------------------
/MobileStore/MyStore.Models/CustomerDTO.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace MyStore.Models
5 | {
6 | public class CustomerDTO
7 | {
8 | public int Id { get; set; }
9 | public string FirstName { get; set; }
10 | public string LastName { get; set; }
11 | public string UserName { get; set; }
12 | public string Password { get; set; }
13 |
14 | public List CustomerOrder { get; set; }
15 |
16 | public string FullName => $"{LastName} {FirstName}";
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.Models/CustomerOrderDTO.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace MyStore.Models
5 | {
6 | public class CustomerOrderDTO
7 | {
8 | public int Id { get; set; }
9 | public int CustomerId { get; set; }
10 | public DateTime Date { get; set; }
11 | public int OrderStatusId { get; set; }
12 | public decimal Amount { get; set; }
13 |
14 | public CustomerDTO Customer { get; set; }
15 | public OrderStatusDTO OrderStatus { get; set; }
16 | public List OrderDetail { get; set; }
17 |
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.Models/EmployeDTO.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace MyStore.Models
5 | {
6 | public class EmployeeDTO
7 | {
8 | public int Id { get; set; }
9 | public string FirstName { get; set; }
10 | public string LastName { get; set; }
11 | public string UserName { get; set; }
12 | public string Password { get; set; }
13 |
14 | public string FullName => $"{LastName} {FirstName}";
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.Models/MyStore.Models.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.Models/OrderDetailDTO.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace MyStore.Models
5 | {
6 | public class OrderDetailDTO
7 | {
8 | public int CustomerOrderId { get; set; }
9 | public int ProductId { get; set; }
10 | public int Quantity { get; set; }
11 | public decimal Amount { get; set; }
12 |
13 | public CustomerOrderDTO CustomerOrder { get; set; }
14 | public ProductDTO Product { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.Models/OrderStatusDTO.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace MyStore.Models
5 | {
6 | public class OrderStatusDTO
7 | {
8 | public int Id { get; set; }
9 | public string Name { get; set; }
10 |
11 | public List CustomerOrder { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.Models/ProductDTO.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace MyStore.Models
5 | {
6 | public class ProductDTO
7 | {
8 | public int Id { get; set; }
9 | public string Name { get; set; }
10 | public decimal UnitPrice { get; set; }
11 |
12 | public List OrderDetail { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.Services/Helpers/Constants.cs:
--------------------------------------------------------------------------------
1 | namespace MyStore.Services
2 | {
3 | public class Constants
4 | {
5 | public const string StoreWebApiURL = "http://IPServidor:5001/api/";
6 |
7 | #region SignalR Constants
8 | // URL
9 | public const string SignalRURL = "http://IPServidor:5001/StoreHub";
10 |
11 | // Groups
12 | public const string Customer = "Customer";
13 | public const string Employee = "Employee";
14 | public const string Store = "Store";
15 |
16 | // Server Methods
17 | public static readonly string ServerSubscribeMethod = "SubscribeToGroup";
18 | public static readonly string ServerUnsuscribeMethod = "UnsubscribeFromGroup";
19 | public static readonly string ServerMethod = "PostNewInfo";
20 |
21 | // Client Methods
22 | public static readonly string ClientMethod = "NotifyNewInfo";
23 | public static readonly string ClientSubscribeMethod = "Subscribe";
24 | public static readonly string ClientUnsuscribeMethod = "Unsuscribe";
25 |
26 | #endregion
27 | }
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.Services/Helpers/MD5Security.cs:
--------------------------------------------------------------------------------
1 | using System.Text;
2 | using System.Linq;
3 | using System.Security.Cryptography;
4 |
5 | namespace MyStore.Services
6 | {
7 | public static class MD5Security
8 | {
9 | public static string ToMD5Hash(this string str)
10 | {
11 | if (string.IsNullOrEmpty(str))
12 | return null;
13 |
14 | return Encoding.ASCII.GetBytes(str).ToMD5Hash();
15 | }
16 |
17 | public static string ToMD5Hash(this byte[] bytes)
18 | {
19 | if (bytes == null || bytes.Length == 0)
20 | return null;
21 |
22 | using (var md5 = MD5.Create())
23 | {
24 | return string.Join("", md5.ComputeHash(bytes).Select(x => x.ToString("X2")));
25 | }
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/MobileStore/MyStore.Services/MyStore.Services.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/StoreDB_Script.sql:
--------------------------------------------------------------------------------
1 | create database StoreDB
2 | go
3 | use StoreDB
4 | go
5 |
6 | create table Employee(
7 | ID int identity(1,1) primary key not null,
8 | FirstName varchar(50) not null,
9 | LastName varchar(50) not null,
10 | UserName varchar(32) not null,
11 | Password varchar(32) not null
12 | )
13 |
14 | create table Customer(
15 | ID int identity(1,1) primary key not null,
16 | FirstName varchar(50) not null,
17 | LastName varchar(50) not null,
18 | UserName varchar(32) not null,
19 | Password varchar(32) not null
20 | )
21 |
22 | insert into Customer values ('Juan', 'Perez', '123',
23 | CONVERT(VARCHAR(32), HashBytes('MD5', 'abc'), 2))
24 |
25 | select * from customer
26 |
27 | create table Product(
28 | ID int identity(1,1) primary key not null,
29 | Name varchar(255) not null,
30 | UnitPrice decimal(8,2) not null
31 | )
32 |
33 | create table OrderStatus(
34 | ID int identity(1,1) primary key not null,
35 | Name varchar(255) not null
36 | )
37 |
38 | insert into OrderStatus(Name)
39 | values ('1-Unpaid'), ('2-Paid'), ('3-Processing'), ('4-Shipped'), ('5-Delivered')
40 |
41 | create table CustomerOrder(
42 | ID int identity(1,1) primary key not null,
43 | CustomerID int not null,
44 | Date smalldatetime not null,
45 | OrderStatusID int not null,
46 | Amount decimal(10,2) not null,
47 | constraint FK_Customer_CustomerOrder foreign key (CustomerID) references Customer(ID),
48 | constraint FK_OrderStatus_CustomerOrder foreign key (OrderStatusID) references OrderStatus(ID)
49 | )
50 |
51 | create table OrderDetail(
52 | CustomerOrderID int not null,
53 | ProductID int not null,
54 | Quantity int not null,
55 | Amount decimal(10,2) not null,
56 | constraint FK_CustomerOrder_OrderDetail foreign key (CustomerOrderID) references CustomerOrder(ID),
57 | constraint FK_Product_OrderDetail foreign key (ProductID) references Product(ID),
58 | constraint PK_OrderDetail primary key (CustomerOrderID, ProductID)
59 | )
60 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27428.2043
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StoreWebApi", "StoreWebApi\StoreWebApi.csproj", "{A8E3B237-3256-4073-94EF-EF7A1BAF2C0B}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {A8E3B237-3256-4073-94EF-EF7A1BAF2C0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {A8E3B237-3256-4073-94EF-EF7A1BAF2C0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {A8E3B237-3256-4073-94EF-EF7A1BAF2C0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {A8E3B237-3256-4073-94EF-EF7A1BAF2C0B}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {D329533C-4A76-4F10-B959-618662EB5DA5}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Controllers/CustomerOrdersController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Http;
6 | using Microsoft.AspNetCore.Mvc;
7 | using Microsoft.EntityFrameworkCore;
8 | using StoreWebApi.Models;
9 | using AutoMapper;
10 | using StoreWebApi.DTOs;
11 |
12 | namespace StoreWebApi.Controllers
13 | {
14 | [Produces("application/json")]
15 | [Route("api/CustomerOrders")]
16 | public class CustomerOrdersController : Controller
17 | {
18 | private readonly StoreDBContext _context;
19 |
20 | public CustomerOrdersController(StoreDBContext context)
21 | {
22 | _context = context;
23 | }
24 |
25 | // GET: api/CustomerOrders
26 | [HttpGet]
27 | public IEnumerable GetCustomerOrder()
28 | {
29 | return Mapper.Map>(_context.CustomerOrder.OrderByDescending(x => x.Date));
30 | }
31 |
32 | // GET: api/CustomerOrders/Customer/5
33 | [HttpGet("Customer/{customerId}")]
34 | public IEnumerable GetCustomer_CustomerOrder([FromRoute] int customerId)
35 | {
36 | return Mapper.Map>(_context.CustomerOrder
37 | .Include(x => x.OrderStatus)
38 | .Where(x => x.CustomerId == customerId)
39 | .OrderByDescending(x => x.Date));
40 | }
41 |
42 | // GET: api/CustomerOrders/5
43 | [HttpGet("{id}")]
44 | public async Task GetCustomerOrder([FromRoute] int id)
45 | {
46 | if (!ModelState.IsValid)
47 | {
48 | return BadRequest(ModelState);
49 | }
50 |
51 | var customerOrder = await _context.CustomerOrder.SingleOrDefaultAsync(m => m.Id == id);
52 |
53 | if (customerOrder == null)
54 | {
55 | return NotFound();
56 | }
57 |
58 | return Ok(Mapper.Map(customerOrder));
59 | }
60 |
61 | // PUT: api/CustomerOrders/5
62 | [HttpPut("{id}")]
63 | public async Task PutCustomerOrder([FromRoute] int id, [FromBody] CustomerOrderDTO customerOrder)
64 | {
65 | customerOrder.OrderDetail = null;
66 | customerOrder.OrderStatus = null;
67 | customerOrder.Customer = null;
68 |
69 | if (!ModelState.IsValid)
70 | {
71 | return BadRequest(ModelState);
72 | }
73 |
74 | if (id != customerOrder.Id)
75 | {
76 | return BadRequest();
77 | }
78 |
79 | _context.Entry(Mapper.Map(customerOrder)).State = EntityState.Modified;
80 |
81 | try
82 | {
83 | await _context.SaveChangesAsync();
84 | }
85 | catch (DbUpdateConcurrencyException)
86 | {
87 | if (!CustomerOrderExists(id))
88 | {
89 | return NotFound();
90 | }
91 | else
92 | {
93 | throw;
94 | }
95 | }
96 |
97 | return NoContent();
98 | }
99 |
100 | // POST: api/CustomerOrders
101 | [HttpPost]
102 | public async Task PostCustomerOrder([FromBody] CustomerOrderDTO customerOrder)
103 | {
104 | customerOrder.OrderDetail = null;
105 | customerOrder.OrderStatus = null;
106 | customerOrder.Customer = null;
107 |
108 | if (!ModelState.IsValid)
109 | {
110 | return BadRequest(ModelState);
111 | }
112 |
113 | var co = Mapper.Map(customerOrder);
114 | _context.CustomerOrder.Add(co);
115 | await _context.SaveChangesAsync();
116 | customerOrder.Id = co.Id;
117 |
118 | return CreatedAtAction("GetCustomerOrder", new { id = co.Id }, customerOrder);
119 | }
120 |
121 | // DELETE: api/CustomerOrders/5
122 | [HttpDelete("{id}")]
123 | public async Task DeleteCustomerOrder([FromRoute] int id)
124 | {
125 | if (!ModelState.IsValid)
126 | {
127 | return BadRequest(ModelState);
128 | }
129 |
130 | var customerOrder = await _context.CustomerOrder.SingleOrDefaultAsync(m => m.Id == id);
131 | if (customerOrder == null)
132 | {
133 | return NotFound();
134 | }
135 |
136 | _context.CustomerOrder.Remove(customerOrder);
137 | await _context.SaveChangesAsync();
138 |
139 | return Ok(Mapper.Map(customerOrder));
140 | }
141 |
142 | private bool CustomerOrderExists(int id)
143 | {
144 | return _context.CustomerOrder.Any(e => e.Id == id);
145 | }
146 | }
147 | }
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Controllers/CustomersController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Http;
6 | using Microsoft.AspNetCore.Mvc;
7 | using Microsoft.EntityFrameworkCore;
8 | using StoreWebApi.Models;
9 | using AutoMapper;
10 | using StoreWebApi.DTOs;
11 | using Newtonsoft.Json.Linq;
12 | using Newtonsoft.Json;
13 |
14 | namespace StoreWebApi.Controllers
15 | {
16 | [Produces("application/json")]
17 | [Route("api/Customers")]
18 | public class CustomersController : Controller
19 | {
20 | private readonly StoreDBContext _context;
21 |
22 | public CustomersController(StoreDBContext context)
23 | {
24 | _context = context;
25 | }
26 |
27 | // GET: api/Customers
28 | [HttpGet]
29 | public IEnumerable GetCustomer()
30 | {
31 | return Mapper.Map>(_context.Customer.OrderBy(x => x.LastName).ThenBy(x => x.FirstName));
32 | }
33 |
34 | // GET: api/Customers/5
35 | [HttpGet("{id}")]
36 | public async Task GetCustomer([FromRoute] int id)
37 | {
38 | if (!ModelState.IsValid)
39 | {
40 | return BadRequest(ModelState);
41 | }
42 |
43 | var customer = await _context.Customer.SingleOrDefaultAsync(m => m.Id == id);
44 |
45 | if (customer == null)
46 | {
47 | return NotFound();
48 | }
49 |
50 | return Ok(Mapper.Map(customer));
51 | }
52 |
53 | [HttpPost("Login")]
54 | public async Task Login([FromBody] dynamic credentials)
55 | {
56 | var username = (string)credentials["username"];
57 | var password = (string)credentials["password"];
58 |
59 | var customer = await _context.Customer.SingleOrDefaultAsync(m => m.UserName == username && m.Password == password);
60 |
61 | if (customer == null)
62 | {
63 | return NotFound();
64 | }
65 |
66 | return Ok(Mapper.Map(customer));
67 | }
68 |
69 | // PUT: api/Customers/5
70 | [HttpPut("{id}")]
71 | public async Task PutCustomer([FromRoute] int id, [FromBody] CustomerDTO customer)
72 | {
73 | customer.CustomerOrder = null;
74 |
75 | if (!ModelState.IsValid)
76 | {
77 | return BadRequest(ModelState);
78 | }
79 |
80 | if (id != customer.Id)
81 | {
82 | return BadRequest();
83 | }
84 |
85 | _context.Entry(Mapper.Map(customer)).State = EntityState.Modified;
86 |
87 | try
88 | {
89 | await _context.SaveChangesAsync();
90 | }
91 | catch (DbUpdateConcurrencyException)
92 | {
93 | if (!CustomerExists(id))
94 | {
95 | return NotFound();
96 | }
97 | else
98 | {
99 | throw;
100 | }
101 | }
102 |
103 | return NoContent();
104 | }
105 |
106 | // POST: api/Customers
107 | [HttpPost]
108 | public async Task PostCustomer([FromBody] CustomerDTO customer)
109 | {
110 | customer.CustomerOrder = null;
111 |
112 | if (!ModelState.IsValid)
113 | {
114 | return BadRequest(ModelState);
115 | }
116 |
117 | var c = Mapper.Map(customer);
118 | _context.Customer.Add(c);
119 | await _context.SaveChangesAsync();
120 | customer.Id = c.Id;
121 |
122 | return CreatedAtAction("GetCustomer", new { id = c.Id }, customer);
123 | }
124 |
125 | // DELETE: api/Customers/5
126 | [HttpDelete("{id}")]
127 | public async Task DeleteCustomer([FromRoute] int id)
128 | {
129 | if (!ModelState.IsValid)
130 | {
131 | return BadRequest(ModelState);
132 | }
133 |
134 | var customer = await _context.Customer.SingleOrDefaultAsync(m => m.Id == id);
135 | if (customer == null)
136 | {
137 | return NotFound();
138 | }
139 |
140 | _context.Customer.Remove(customer);
141 | await _context.SaveChangesAsync();
142 |
143 | return Ok(Mapper.Map(customer));
144 | }
145 |
146 | private bool CustomerExists(int id)
147 | {
148 | return _context.Customer.Any(e => e.Id == id);
149 | }
150 | }
151 | }
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Controllers/EmployeesController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Http;
6 | using Microsoft.AspNetCore.Mvc;
7 | using Microsoft.EntityFrameworkCore;
8 | using StoreWebApi.Models;
9 | using AutoMapper;
10 | using StoreWebApi.DTOs;
11 | using Newtonsoft.Json;
12 |
13 | namespace StoreWebApi.Controllers
14 | {
15 | [Produces("application/json")]
16 | [Route("api/Employees")]
17 | public class EmployeesController : Controller
18 | {
19 | private readonly StoreDBContext _context;
20 |
21 | public EmployeesController(StoreDBContext context)
22 | {
23 | _context = context;
24 | }
25 |
26 | // GET: api/Employees
27 | [HttpGet]
28 | public IEnumerable GetEmployee()
29 | {
30 | return Mapper.Map>(_context.Employee.OrderBy(x => x.LastName).ThenBy(x => x.FirstName));
31 | }
32 |
33 | // GET: api/Employees/5
34 | [HttpGet("{id}")]
35 | public async Task GetEmployee([FromRoute] int id)
36 | {
37 | if (!ModelState.IsValid)
38 | {
39 | return BadRequest(ModelState);
40 | }
41 |
42 | var employee = await _context.Employee.SingleOrDefaultAsync(m => m.Id == id);
43 |
44 | if (employee == null)
45 | {
46 | return NotFound();
47 | }
48 |
49 | return Ok(Mapper.Map(employee));
50 | }
51 |
52 | [HttpPost("Login")]
53 | public async Task Login([FromBody] dynamic credentials)
54 | {
55 | var username = (string)credentials["username"];
56 | var password = (string)credentials["password"];
57 |
58 | var employee = await _context.Employee.SingleOrDefaultAsync(m => m.UserName == username && m.Password == password);
59 |
60 | if (employee == null)
61 | {
62 | return NotFound();
63 | }
64 |
65 | return Ok(Mapper.Map(employee));
66 | }
67 |
68 | // PUT: api/Employees/5
69 | [HttpPut("{id}")]
70 | public async Task PutEmployee([FromRoute] int id, [FromBody] EmployeeDTO employee)
71 | {
72 | if (!ModelState.IsValid)
73 | {
74 | return BadRequest(ModelState);
75 | }
76 |
77 | if (id != employee.Id)
78 | {
79 | return BadRequest();
80 | }
81 |
82 | _context.Entry(Mapper.Map(employee)).State = EntityState.Modified;
83 |
84 | try
85 | {
86 | await _context.SaveChangesAsync();
87 | }
88 | catch (DbUpdateConcurrencyException)
89 | {
90 | if (!EmployeeExists(id))
91 | {
92 | return NotFound();
93 | }
94 | else
95 | {
96 | throw;
97 | }
98 | }
99 |
100 | return NoContent();
101 | }
102 |
103 | // POST: api/Employees
104 | [HttpPost]
105 | public async Task PostEmployee([FromBody] EmployeeDTO employee)
106 | {
107 | if (!ModelState.IsValid)
108 | {
109 | return BadRequest(ModelState);
110 | }
111 |
112 | var e = Mapper.Map(employee);
113 | _context.Employee.Add(e);
114 | await _context.SaveChangesAsync();
115 | employee.Id = e.Id;
116 |
117 | return CreatedAtAction("GetEmployee", new { id = e.Id }, employee);
118 | }
119 |
120 | // DELETE: api/Employees/5
121 | [HttpDelete("{id}")]
122 | public async Task DeleteEmployee([FromRoute] int id)
123 | {
124 | if (!ModelState.IsValid)
125 | {
126 | return BadRequest(ModelState);
127 | }
128 |
129 | var employee = await _context.Employee.SingleOrDefaultAsync(m => m.Id == id);
130 | if (employee == null)
131 | {
132 | return NotFound();
133 | }
134 |
135 | _context.Employee.Remove(employee);
136 | await _context.SaveChangesAsync();
137 |
138 | return Ok(Mapper.Map(employee));
139 | }
140 |
141 | private bool EmployeeExists(int id)
142 | {
143 | return _context.Employee.Any(e => e.Id == id);
144 | }
145 | }
146 | }
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Controllers/OrderDetailsController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Http;
6 | using Microsoft.AspNetCore.Mvc;
7 | using Microsoft.EntityFrameworkCore;
8 | using StoreWebApi.Models;
9 | using AutoMapper;
10 | using StoreWebApi.DTOs;
11 |
12 | namespace StoreWebApi.Controllers
13 | {
14 | [Produces("application/json")]
15 | [Route("api/OrderDetails")]
16 | public class OrderDetailsController : Controller
17 | {
18 | private readonly StoreDBContext _context;
19 |
20 | public OrderDetailsController(StoreDBContext context)
21 | {
22 | _context = context;
23 | }
24 |
25 | // GET: api/OrderDetails
26 | [HttpGet]
27 | public IEnumerable GetOrderDetail()
28 | {
29 | return _context.OrderDetail;
30 | }
31 |
32 | // GET: api/OrderDetails/Order/5
33 | [HttpGet("Order/{orderId}")]
34 | public async Task GetOrder_OrderDetail([FromRoute] int orderId)
35 | {
36 | if (!ModelState.IsValid)
37 | {
38 | return BadRequest(ModelState);
39 | }
40 |
41 | var orderDetail = _context.OrderDetail
42 | .Include(x => x.Product)
43 | .Where(m => m.CustomerOrderId == orderId);
44 |
45 | if (orderDetail == null)
46 | {
47 | return NotFound();
48 | }
49 |
50 | return Ok(Mapper.Map>(orderDetail));
51 | }
52 |
53 | // POST: api/OrderDetails
54 | [HttpPost]
55 | public async Task PostOrderDetail([FromBody] List orderDetail)
56 | {
57 | foreach (var item in orderDetail)
58 | {
59 | item.CustomerOrder = null;
60 | item.Product = null;
61 | }
62 |
63 | if (!ModelState.IsValid)
64 | {
65 | return BadRequest(ModelState);
66 | }
67 |
68 | var od = Mapper.Map>(orderDetail);
69 | _context.OrderDetail.AddRange(od);
70 | await _context.SaveChangesAsync();
71 |
72 | return CreatedAtAction("GetOrderDetail", new { id = od.First().CustomerOrderId }, orderDetail);
73 | }
74 |
75 | // DELETE: api/OrderDetails/5
76 | [HttpDelete("{orderId}")]
77 | public async Task DeleteOrderDetail([FromRoute] int orderId)
78 | {
79 | if (!ModelState.IsValid)
80 | {
81 | return BadRequest(ModelState);
82 | }
83 |
84 | var orderDetail = _context.OrderDetail.Where(m => m.CustomerOrderId == orderId);
85 | if (orderDetail == null)
86 | {
87 | return NotFound();
88 | }
89 |
90 | _context.OrderDetail.RemoveRange(orderDetail);
91 | await _context.SaveChangesAsync();
92 |
93 | return Ok(orderDetail);
94 | }
95 |
96 | private bool OrderDetailExists(int id)
97 | {
98 | return _context.OrderDetail.Any(e => e.CustomerOrderId == id);
99 | }
100 | }
101 | }
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Controllers/OrderStatusesController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Http;
6 | using Microsoft.AspNetCore.Mvc;
7 | using Microsoft.EntityFrameworkCore;
8 | using StoreWebApi.Models;
9 | using AutoMapper;
10 | using StoreWebApi.DTOs;
11 |
12 | namespace StoreWebApi.Controllers
13 | {
14 | [Produces("application/json")]
15 | [Route("api/OrderStatuses")]
16 | public class OrderStatusesController : Controller
17 | {
18 | private readonly StoreDBContext _context;
19 |
20 | public OrderStatusesController(StoreDBContext context)
21 | {
22 | _context = context;
23 | }
24 |
25 | // GET: api/OrderStatuses
26 | [HttpGet]
27 | public IEnumerable GetOrderStatus()
28 | {
29 | return Mapper.Map>(_context.OrderStatus.OrderBy(x => x.Name));
30 | }
31 |
32 | // GET: api/OrderStatuses/5
33 | [HttpGet("{id}")]
34 | public async Task GetOrderStatus([FromRoute] int id)
35 | {
36 | if (!ModelState.IsValid)
37 | {
38 | return BadRequest(ModelState);
39 | }
40 |
41 | var orderStatus = await _context.OrderStatus.SingleOrDefaultAsync(m => m.Id == id);
42 |
43 | if (orderStatus == null)
44 | {
45 | return NotFound();
46 | }
47 |
48 | return Ok(Mapper.Map(orderStatus));
49 | }
50 |
51 | // PUT: api/OrderStatuses/5
52 | [HttpPut("{id}")]
53 | public async Task PutOrderStatus([FromRoute] int id, [FromBody] OrderStatusDTO orderStatus)
54 | {
55 | orderStatus.CustomerOrder = null;
56 |
57 | if (!ModelState.IsValid)
58 | {
59 | return BadRequest(ModelState);
60 | }
61 |
62 | if (id != orderStatus.Id)
63 | {
64 | return BadRequest();
65 | }
66 |
67 | _context.Entry(Mapper.Map(orderStatus)).State = EntityState.Modified;
68 |
69 | try
70 | {
71 | await _context.SaveChangesAsync();
72 | }
73 | catch (DbUpdateConcurrencyException)
74 | {
75 | if (!OrderStatusExists(id))
76 | {
77 | return NotFound();
78 | }
79 | else
80 | {
81 | throw;
82 | }
83 | }
84 |
85 | return NoContent();
86 | }
87 |
88 | // POST: api/OrderStatuses
89 | [HttpPost]
90 | public async Task PostOrderStatus([FromBody] OrderStatusDTO orderStatus)
91 | {
92 | orderStatus.CustomerOrder = null;
93 |
94 | if (!ModelState.IsValid)
95 | {
96 | return BadRequest(ModelState);
97 | }
98 |
99 | var os = Mapper.Map(orderStatus);
100 |
101 | _context.OrderStatus.Add(os);
102 | await _context.SaveChangesAsync();
103 | orderStatus.Id = os.Id;
104 |
105 | return CreatedAtAction("GetOrderStatus", new { id = os.Id }, orderStatus);
106 | }
107 |
108 | // DELETE: api/OrderStatuses/5
109 | [HttpDelete("{id}")]
110 | public async Task DeleteOrderStatus([FromRoute] int id)
111 | {
112 | if (!ModelState.IsValid)
113 | {
114 | return BadRequest(ModelState);
115 | }
116 |
117 | var orderStatus = await _context.OrderStatus.SingleOrDefaultAsync(m => m.Id == id);
118 | if (orderStatus == null)
119 | {
120 | return NotFound();
121 | }
122 |
123 | _context.OrderStatus.Remove(orderStatus);
124 | await _context.SaveChangesAsync();
125 |
126 | return Ok(Mapper.Map(orderStatus));
127 | }
128 |
129 | private bool OrderStatusExists(int id)
130 | {
131 | return _context.OrderStatus.Any(e => e.Id == id);
132 | }
133 | }
134 | }
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Controllers/ProductsController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Http;
6 | using Microsoft.AspNetCore.Mvc;
7 | using Microsoft.EntityFrameworkCore;
8 | using StoreWebApi.Models;
9 | using AutoMapper;
10 | using StoreWebApi.DTOs;
11 |
12 | namespace StoreWebApi.Controllers
13 | {
14 | [Produces("application/json")]
15 | [Route("api/Products")]
16 | public class ProductsController : Controller
17 | {
18 | private readonly StoreDBContext _context;
19 |
20 | public ProductsController(StoreDBContext context)
21 | {
22 | _context = context;
23 | }
24 |
25 | // GET: api/Products
26 | [HttpGet]
27 | public IEnumerable GetProduct()
28 | {
29 | return Mapper.Map>(_context.Product.OrderBy(x => x.Name));
30 | }
31 |
32 | // GET: api/Products/5
33 | [HttpGet("{id}")]
34 | public async Task GetProduct([FromRoute] int id)
35 | {
36 | if (!ModelState.IsValid)
37 | {
38 | return BadRequest(ModelState);
39 | }
40 |
41 | var product = await _context.Product.SingleOrDefaultAsync(m => m.Id == id);
42 |
43 | if (product == null)
44 | {
45 | return NotFound();
46 | }
47 |
48 | return Ok(Mapper.Map(product));
49 | }
50 |
51 | // PUT: api/Products/5
52 | [HttpPut("{id}")]
53 | public async Task PutProduct([FromRoute] int id, [FromBody] ProductDTO product)
54 | {
55 | product.OrderDetail = null;
56 |
57 | if (!ModelState.IsValid)
58 | {
59 | return BadRequest(ModelState);
60 | }
61 |
62 | if (id != product.Id)
63 | {
64 | return BadRequest();
65 | }
66 |
67 | _context.Entry(Mapper.Map(product)).State = EntityState.Modified;
68 |
69 | try
70 | {
71 | await _context.SaveChangesAsync();
72 | }
73 | catch (DbUpdateConcurrencyException)
74 | {
75 | if (!ProductExists(id))
76 | {
77 | return NotFound();
78 | }
79 | else
80 | {
81 | throw;
82 | }
83 | }
84 |
85 | return NoContent();
86 | }
87 |
88 | // POST: api/Products
89 | [HttpPost]
90 | public async Task PostProduct([FromBody] ProductDTO product)
91 | {
92 | product.OrderDetail = null;
93 |
94 | if (!ModelState.IsValid)
95 | {
96 | return BadRequest(ModelState);
97 | }
98 |
99 | var p = Mapper.Map(product);
100 |
101 | _context.Product.Add(p);
102 | await _context.SaveChangesAsync();
103 | product.Id = p.Id;
104 |
105 | return CreatedAtAction("GetProduct", new { id = p.Id }, product);
106 | }
107 |
108 | // DELETE: api/Products/5
109 | [HttpDelete("{id}")]
110 | public async Task DeleteProduct([FromRoute] int id)
111 | {
112 | if (!ModelState.IsValid)
113 | {
114 | return BadRequest(ModelState);
115 | }
116 |
117 | var product = await _context.Product.SingleOrDefaultAsync(m => m.Id == id);
118 | if (product == null)
119 | {
120 | return NotFound();
121 | }
122 |
123 | _context.Product.Remove(product);
124 | await _context.SaveChangesAsync();
125 |
126 | return Ok(Mapper.Map(product));
127 | }
128 |
129 | private bool ProductExists(int id)
130 | {
131 | return _context.Product.Any(e => e.Id == id);
132 | }
133 | }
134 | }
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Controllers/ValuesController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Mvc;
6 |
7 | namespace StoreWebApi.Controllers
8 | {
9 | [Route("api/[controller]")]
10 | public class ValuesController : Controller
11 | {
12 | // GET api/values
13 | [HttpGet]
14 | public IEnumerable Get()
15 | {
16 | return new string[] { "value1", "value2" };
17 | }
18 |
19 | // GET api/values/5
20 | [HttpGet("{id}")]
21 | public string Get(int id)
22 | {
23 | return "value";
24 | }
25 |
26 | // POST api/values
27 | [HttpPost]
28 | public void Post([FromBody]string value)
29 | {
30 | }
31 |
32 | // PUT api/values/5
33 | [HttpPut("{id}")]
34 | public void Put(int id, [FromBody]string value)
35 | {
36 | }
37 |
38 | // DELETE api/values/5
39 | [HttpDelete("{id}")]
40 | public void Delete(int id)
41 | {
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/DTOs/AutoMapperConfiguration.cs:
--------------------------------------------------------------------------------
1 | using AutoMapper;
2 | using StoreWebApi.Models;
3 |
4 | namespace StoreWebApi.DTOs
5 | {
6 | public static class AutoMapperConfiguration
7 | {
8 | public static void Configure()
9 | {
10 | Mapper.Initialize(cfg =>
11 | {
12 | cfg.CreateMap()
13 | .ForMember(x => x.CustomerOrder, o => o.Ignore())
14 | .ReverseMap();
15 |
16 | cfg.CreateMap()
17 | .ForMember(x => x.OrderDetail, o => o.Ignore())
18 | .ReverseMap();
19 |
20 | cfg.CreateMap()
21 | .ReverseMap();
22 |
23 | cfg.CreateMap()
24 | .ReverseMap();
25 |
26 | cfg.CreateMap()
27 | .ForMember(x => x.CustomerOrder, o => o.Ignore())
28 | .ReverseMap();
29 |
30 | cfg.CreateMap()
31 | .ForMember(x => x.OrderDetail, o => o.Ignore())
32 | .ReverseMap();
33 | });
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/DTOs/CustomerDTO.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace StoreWebApi.DTOs
5 | {
6 | public class CustomerDTO
7 | {
8 | public int Id { get; set; }
9 | public string FirstName { get; set; }
10 | public string LastName { get; set; }
11 | public string UserName { get; set; }
12 | public string Password { get; set; }
13 |
14 | public List CustomerOrder { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/DTOs/CustomerOrderDTO.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace StoreWebApi.DTOs
5 | {
6 | public class CustomerOrderDTO
7 | {
8 | public int Id { get; set; }
9 | public int CustomerId { get; set; }
10 | public DateTime Date { get; set; }
11 | public int OrderStatusId { get; set; }
12 | public decimal Amount { get; set; }
13 |
14 | public CustomerDTO Customer { get; set; }
15 | public OrderStatusDTO OrderStatus { get; set; }
16 | public List OrderDetail { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/DTOs/EmployeeDTO.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace StoreWebApi.DTOs
5 | {
6 | public class EmployeeDTO
7 | {
8 | public int Id { get; set; }
9 | public string FirstName { get; set; }
10 | public string LastName { get; set; }
11 | public string UserName { get; set; }
12 | public string Password { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/DTOs/OrderDetailDTO.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace StoreWebApi.DTOs
5 | {
6 | public class OrderDetailDTO
7 | {
8 | public int CustomerOrderId { get; set; }
9 | public int ProductId { get; set; }
10 | public int Quantity { get; set; }
11 | public decimal Amount { get; set; }
12 |
13 | public CustomerOrderDTO CustomerOrder { get; set; }
14 | public ProductDTO Product { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/DTOs/OrderStatusDTO.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace StoreWebApi.DTOs
5 | {
6 | public class OrderStatusDTO
7 | {
8 | public int Id { get; set; }
9 | public string Name { get; set; }
10 |
11 | public List CustomerOrder { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/DTOs/ProductDTO.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace StoreWebApi.DTOs
5 | {
6 | public class ProductDTO
7 | {
8 | public int Id { get; set; }
9 | public string Name { get; set; }
10 | public decimal UnitPrice { get; set; }
11 |
12 | public List OrderDetail { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Hubs/IStoreHub.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace StoreWebApi.Hubs
4 | {
5 | public interface IStoreHub
6 | {
7 | Task NotifyNewInfo(DTOs.CustomerOrderDTO order);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Hubs/StoreHub.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using Microsoft.AspNetCore.SignalR;
4 |
5 | namespace StoreWebApi.Hubs
6 | {
7 | public class StoreHub : Hub
8 | {
9 | const string Customer = "Customer";
10 | const string Employee = "Employee";
11 | const string Store = "Store";
12 |
13 | public override async Task OnConnectedAsync()
14 | {
15 | await Groups.AddToGroupAsync(Context.ConnectionId, Store);
16 | await base.OnConnectedAsync();
17 | }
18 |
19 | public override async Task OnDisconnectedAsync(Exception exception)
20 | {
21 | await Groups.RemoveFromGroupAsync(Context.ConnectionId, Store);
22 | await base.OnDisconnectedAsync(exception);
23 | }
24 |
25 | public async Task SubscribeToGroup(string grupo)
26 | {
27 | await Groups.AddToGroupAsync(Context.ConnectionId, grupo);
28 | }
29 |
30 | public async Task UnsubscribeFromGroup(string grupo)
31 | {
32 | // De acuerdo a la notificación de SignalR:
33 | //You should not manually remove the user from the group when the user disconnects.
34 | //This action is automatically performed by the SignalR framework.
35 | //await Groups.RemoveFromGroupAsync(Context.ConnectionId, grupo);
36 | }
37 |
38 | public async Task PostNewInfo(DTOs.CustomerOrderDTO order, string grupo)
39 | {
40 | await Clients.Group(grupo).NotifyNewInfo(order);
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Models/Customer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace StoreWebApi.Models
5 | {
6 | public partial class Customer
7 | {
8 | public Customer()
9 | {
10 | CustomerOrder = new HashSet();
11 | }
12 |
13 | public int Id { get; set; }
14 | public string FirstName { get; set; }
15 | public string LastName { get; set; }
16 | public string UserName { get; set; }
17 | public string Password { get; set; }
18 |
19 | public ICollection CustomerOrder { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Models/CustomerOrder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace StoreWebApi.Models
5 | {
6 | public partial class CustomerOrder
7 | {
8 | public CustomerOrder()
9 | {
10 | OrderDetail = new HashSet();
11 | }
12 |
13 | public int Id { get; set; }
14 | public int CustomerId { get; set; }
15 | public DateTime Date { get; set; }
16 | public int OrderStatusId { get; set; }
17 | public decimal Amount { get; set; }
18 |
19 | public Customer Customer { get; set; }
20 | public OrderStatus OrderStatus { get; set; }
21 | public ICollection OrderDetail { get; set; }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Models/Employee.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace StoreWebApi.Models
5 | {
6 | public partial class Employee
7 | {
8 | public int Id { get; set; }
9 | public string FirstName { get; set; }
10 | public string LastName { get; set; }
11 | public string UserName { get; set; }
12 | public string Password { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Models/OrderDetail.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace StoreWebApi.Models
5 | {
6 | public partial class OrderDetail
7 | {
8 | public int CustomerOrderId { get; set; }
9 | public int ProductId { get; set; }
10 | public int Quantity { get; set; }
11 | public decimal Amount { get; set; }
12 |
13 | public CustomerOrder CustomerOrder { get; set; }
14 | public Product Product { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Models/OrderStatus.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace StoreWebApi.Models
5 | {
6 | public partial class OrderStatus
7 | {
8 | public OrderStatus()
9 | {
10 | CustomerOrder = new HashSet();
11 | }
12 |
13 | public int Id { get; set; }
14 | public string Name { get; set; }
15 |
16 | public ICollection CustomerOrder { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Models/Product.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace StoreWebApi.Models
5 | {
6 | public partial class Product
7 | {
8 | public Product()
9 | {
10 | OrderDetail = new HashSet();
11 | }
12 |
13 | public int Id { get; set; }
14 | public string Name { get; set; }
15 | public decimal UnitPrice { get; set; }
16 |
17 | public ICollection OrderDetail { get; set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Threading.Tasks;
6 | using Microsoft.AspNetCore;
7 | using Microsoft.AspNetCore.Hosting;
8 | using Microsoft.Extensions.Configuration;
9 | using Microsoft.Extensions.Logging;
10 |
11 | namespace StoreWebApi
12 | {
13 | public class Program
14 | {
15 | public static void Main(string[] args)
16 | {
17 | BuildWebHost(args).Run();
18 | }
19 |
20 | public static IWebHost BuildWebHost(string[] args) =>
21 | WebHost.CreateDefaultBuilder(args)
22 | .UseIISIntegration()
23 | .UseKestrel()
24 | .UseContentRoot(Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location))
25 | .ConfigureAppConfiguration((hostingContext, config) =>
26 | {
27 | IHostingEnvironment env = hostingContext.HostingEnvironment;
28 | config.SetBasePath(Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location));
29 |
30 | config.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
31 | .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: true);
32 | })
33 | .UseStartup()
34 | .Build();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Properties/PublishProfiles/CustomProfile.pubxml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | FileSystem
9 | Release
10 | Any CPU
11 |
12 | True
13 | False
14 | netcoreapp2.0
15 | a8e3b237-3256-4073-94ef-ef7a1baf2c0b
16 | E:\Sites\Store
17 | False
18 |
19 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:64953/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "launchUrl": "api/values",
15 | "environmentVariables": {
16 | "ASPNETCORE_ENVIRONMENT": "production"
17 | }
18 | },
19 | "StoreWebApi": {
20 | "commandName": "Project",
21 | "launchBrowser": true,
22 | "launchUrl": "api/values",
23 | "environmentVariables": {
24 | "ASPNETCORE_ENVIRONMENT": "Development"
25 | },
26 | "applicationUrl": "http://localhost:64954/"
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/Startup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Builder;
6 | using Microsoft.AspNetCore.Hosting;
7 | using Microsoft.Extensions.Configuration;
8 | using Microsoft.Extensions.DependencyInjection;
9 | using Microsoft.Extensions.Logging;
10 | using Microsoft.Extensions.Options;
11 | using Microsoft.EntityFrameworkCore;
12 | using StoreWebApi.DTOs;
13 |
14 | namespace StoreWebApi
15 | {
16 | public class Startup
17 | {
18 | public Startup(IConfiguration configuration)
19 | {
20 | Configuration = configuration;
21 | AutoMapperConfiguration.Configure();
22 | }
23 |
24 | public IConfiguration Configuration { get; }
25 |
26 | // This method gets called by the runtime. Use this method to add services to the container.
27 | public void ConfigureServices(IServiceCollection services)
28 | {
29 | services.AddMvc().AddJsonOptions(
30 | options => options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore);
31 |
32 | services.AddDbContext(
33 | options => options.UseSqlServer(Configuration.GetConnectionString("StoreDBContext")));
34 |
35 | //5
36 | services.AddSignalR(options => options.EnableDetailedErrors = true);
37 | }
38 |
39 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
40 | public void Configure(IApplicationBuilder app, IHostingEnvironment env)
41 | {
42 | if (env.IsDevelopment())
43 | {
44 | app.UseDeveloperExceptionPage();
45 | }
46 |
47 | app.UseMvc();
48 |
49 | //6
50 | app.UseSignalR(routes =>
51 | {
52 | routes.MapHub("/StoreHub");
53 | });
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/StoreWebApi.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | Always
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Debug",
6 | "System": "Information",
7 | "Microsoft": "Information"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/StoreWebApi/StoreWebApi/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "ConnectionStrings": {
3 | "StoreDBContext": "Server=TuServer;Database=StoreDB;User Id=TuUsuario;Password=TuPassword"
4 | },
5 |
6 | "Logging": {
7 | "IncludeScopes": false,
8 | "Debug": {
9 | "LogLevel": {
10 | "Default": "Warning"
11 | }
12 | },
13 | "Console": {
14 | "LogLevel": {
15 | "Default": "Warning"
16 | }
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------