Merge pull request #488 from jaszymas/master
Adding demo for Always Encrypted with secure enclaves
@@ -1,6 +1,8 @@
|
||||
#SQL Security
|
||||
|
||||
<!--laceholder for summary.-->
|
||||
<!--placeholder for summary.-->
|
||||
|
||||
[Always Encrypted with secure enclaves Demos](always-encrypted-with-secure-enclaves)
|
||||
|
||||
[Azure Active Directory Authentication Demos](azure-active-directory-auth)
|
||||
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
# Always Encrypted with secure enclaves
|
||||
|
||||
This sample/demo showcases the benefits of [Always Encrypted with secure enclaves](https://aka.ms/AlwaysEncryptedwithSecureEnclaves).
|
||||
|
||||
## About this sample
|
||||
- **Applies to:** SQL Server 2019 CTP 2.1
|
||||
- **Programming Language:** .NET C#, T-SQL
|
||||
- **Authors:** Jakub Szymaszek [jaszymas-MSFT]
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](http://microsoft.github.io/codeofconduct). For more information see the [Code of Conduct FAQ](http://microsoft.github.io/codeofconduct/faq.md) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
|
||||
## Contents
|
||||
1. [Prerequisites](#prerequisites)
|
||||
2. [Setup](#setup)
|
||||
3. [Demo Part 1 - Tour the Clinic database and the demo application](#demo-part-1---tour-the-clinic-database-and-the-demo-application)
|
||||
4. [Demo Part 2 - Encrypt columns in place](#demo-part-2---encrypt-columns-in-place)
|
||||
5. [Demo Part 3 - Run rich queries from SSMS](#Demo-Part-3---run-rich-queries-from-SSMS)
|
||||
6. [Demo Part 4 - Re-encrypt and decrypt columns in-place](#demo-part-4---re-encrypt-and-decrypt-columns-in-place)
|
||||
7. [Resetting your demo environment](#resetting-your-demo-environment)
|
||||
|
||||
|
||||
|
||||
## Prerequisites
|
||||
You need two machines (they can be virtual machines):
|
||||
- The SQL Server computer:
|
||||
+ Windows Server 2019 Datacenter or Windows 10 Enterprise version 1809
|
||||
+ SQL Server 2019 CTP 2.1 or later
|
||||
+ [SQL Server Management Studio 18.0 or later](https://msdn.microsoft.com/en-us/library/mt238290.aspx)
|
||||
+ Visual Studio 2015 (or newer)
|
||||
+ If this machine is a virtual machine, it must be a generation 2 VM.
|
||||
- The HGS computer to host Windows Host Guardian Service for enclave attestation:
|
||||
+ Windows Server 2019 Datacenter or Standard
|
||||
|
||||
## Setup
|
||||
1. Configure host attestation for the SQL Server computer, following Steps 1-2 in [Tutorial: Getting started with Always Encrypted with secure enclaves using SSMS](https://aka.ms/AlwaysEncryptedEnclavesTutorial).
|
||||
1. Enable Always Encrypted with secure enclaves in your SQL Server instances by following instructions in Step 2 in [Tutorial: Getting started with Always Encrypted with secure enclaves using SSMS](https://aka.ms/AlwaysEncryptedEnclavesTutorial).
|
||||
1. Set up the Clinic demo database.
|
||||
+ Clone/Download the repository.
|
||||
+ Open SSMS and connect to your SQL Server 2019 instance.
|
||||
+ In SSMS, right-click on **Databases** in Object Explorer and select **Import Data-tier Application...**.
|
||||
+ Locate the **Clinic** bacpac file the **/setup** folder.
|
||||

|
||||
+ Complete the steps of the wizard to import the **Clinic** database.
|
||||
1. Set up the database connection string in the demo application.
|
||||
+ Start Visual Studio and open the **ContosoClinic** solution file- located in **/src**.
|
||||
+ Using Solution Explorer, locate and open the **web.config** file under the **ContosoClinic** project.
|
||||
+ Look for the line that looks like this:
|
||||
```csharp
|
||||
<connectionStrings>
|
||||
<add name="DefaultConnection" connectionString="Data Source=.;Initial Catalog=Clinic; Integrated Security=true; Column Encrypteiond Setting = Enabled; Enclave Attestation URL=http://YourHGSComputer/Attestation"
|
||||
</connectionStrings>
|
||||
```
|
||||
+ Make sure the value of the **Data Source** key word in the database connection string is correct (identifies your instance).
|
||||
+ Make sure the **Initial Catalog** value is set to **Clinic**
|
||||
+ Replace **YourHGSComputer** with a DNS name or an IP address of your HGS computer.
|
||||
+ Save the file.
|
||||
|
||||
1. Build the demo application in Visual Studio.
|
||||
+ Right click on your project in Solution Explorer and select **Properties**.
|
||||
+ Make sure the .NET Framework 4.7.2 or higher is configured as the target .NET Framework for your project (change it, if necessary).
|
||||

|
||||
+ Build the solution.
|
||||
|
||||
## Demo Part 1 - tour the Clinic database and the demo application
|
||||
1. Connect to your database using SSMS without Always Encrypted enabled in the database connection.
|
||||
- Open SSMS.
|
||||
- In the **Connect to Server** dialog, enter your server name and authentication parameters. For more information on using SSMS to connect to a Database, [click here](https://azure.microsoft.com/en-us/documentation/articles/sql-database-connect-query-ssms/).
|
||||
- Click the **Options >>** button and select the **Always Encrypted** tab. Make sure **Enable Always Encrypted** is not selected.
|
||||

|
||||
- Click **Connect**.
|
||||
1. In SSMS, open and execute **tsql-scripts/ListAllPatients.sql**. The results of this query include sensitive information about patients: social security numbers, names, dates of birth, etc.
|
||||
1. In SSMS, configure an extended event session, you will use to monitor Transact-SQL queries the demo application sends to the database.
|
||||
- Open and execute **tsql-scripts/CreateXESession.sql**. This creates an extended event session,
|
||||
- In Object Explorer, locate the newly created **ClinicDemo** extended event session - under your server, go to **Management/Extended Events/Sessions**.
|
||||
- Righ-click the **ClinicDemo** session and select **Watch Live Data**. This will open the **ClinicDemo Live Data** window.
|
||||

|
||||
1. Run the demo application
|
||||
+ In Visual Studio, start the app (**F5**). This will open the Contoso Clinic application in the default browser.
|
||||
+ Select the **Patients** tab in the application.
|
||||
+ Enter a part of a patient's name and the maximum patient age. You should see the patients that meet your search criteria.
|
||||

|
||||
1. In SSMS, inspect the queries the demo application sends to the database.
|
||||
+ Select the **ClinicDemo Live Data** window, which should contain a table with some events your demo application triggered.
|
||||
+ If the table does not contain the **statement** column, right click on the header of the table and select **Choose Columns...**. Move **statement** to **Selected columns** and click **OK**.
|
||||

|
||||
+ Back in the **ClinicDemo Live Data** window, double click on the statement column in the last row of the table to see the last query the application sent to the database. Inspect the query statement. Note the **WHERE** clause of the query contains the **LIKE** predicate on some string columns and a comparison (**>=**) on the **BirthDate** column.
|
||||

|
||||
+ Click **OK** to close the statement window.
|
||||
|
||||
## Demo Part 2 - Encrypt columns in place
|
||||
1. Connect to your database using SSMS with Always Encrypted enabled in the database connection.
|
||||
- Open a new instance of SSMS. (Keep the instance from the previous part of the demo open.)
|
||||
- In the **Connect to Server** dialog, enter your server name and authentication parameters.
|
||||
- Click the **Options >>** button and select the **Always Encrypted** tab. Make sure **Enable Always Encrypted** is selected. Enter the URL of your enclave attestation service, you have configured when setting up your demo environment.
|
||||

|
||||
- Click **Connect**.
|
||||
1. Provision a column master key in SSMS.
|
||||
+ In Object Explorer, expand your database and navigate to **Security/ Always Encrypted Keys/Column Master Keys**.
|
||||
+ Right-click on the **Column Master Keys** folder and select **New Column Master Key…**.
|
||||

|
||||
+ Enter a column master key name: **CMK1**.
|
||||
+ Select **Windows Certificate Store - Current User**.
|
||||
+ Make sure **Allow enclave computations** is selected.
|
||||

|
||||
+ Click **Generate Certificate** to create a new certificate to be used as a column master key.
|
||||
+ Click **OK**.
|
||||
1. Provision a column encryption key.
|
||||
+ In Object Explorer, expand your database and navigate to **Security/ Always Encrypted Keys/Column Encryption Keys**.
|
||||
+ Right-click on the **Column Encryption Keys** folder and select **New Column Encryption Key…**.
|
||||
+ Enter a column encryption key name: **CEK1**.
|
||||
+ Select **CMK1** as the column master key to protect your new column encryption key.
|
||||
+ Click **OK**.
|
||||
1. Encrypt a few columns in-place using Transact-SQL.
|
||||
+ In SSMS, open and review **tsql-scripts/EncryptColumns.sql**. Note the **ALTER TABLE ALTER COLUMN** statements that encrypt three columns: **SSN**, **LastName**, and **BirthDate**. The statements also change the sort order of both string columns to **BIN2**, which is required to support rich queries on those columns.
|
||||
+ Execute the script.
|
||||
1. Check if the columns are encrypted.
|
||||
+ Switch to the other instance of SSMS (from the previous part of the demo) that uses a database connection with Always Encrypted disabled.
|
||||
+ Rerun the query from **tsql-scripts/ListAllPatients.sql**. Note that the data the **SSN**, **LastName**, **BirthDate** columns are now encrypted.
|
||||

|
||||
1. Test the Contoso Clinic web application.
|
||||
+ In your web browser, refresh the **Patients** page in the Contoso Clinic application. Notice the application shows plaintext data. This is because Always Encrypted has been already configured in the database connection for the application in the **web.config** file.
|
||||
+ Enter a part of a patient's name and the maximum patient age. You should see the patients that meet your search criteria.
|
||||
+ In SSMS, click on the **ClinicDemo Live Data** windows/tab, capturing extending events.
|
||||
+ Double click on the statement column in the last row of the table to see the last query the application sent to the database. Note the query statement has not changed, but SQL Server now receives encrypted query parameters.
|
||||

|
||||
+ Click **OK** to close the statement window.
|
||||
|
||||
## Demo Part 3 - run rich queries from SSMS
|
||||
1. Enable Parameterization for Always Encrypted the SSMS instance that uses a database connection with Always Encrypted enabled.
|
||||
+ In the main menu, select **Tools** and then select **Options**
|
||||
+ In the left pane of the **Options** window, navigate to **Query Execution/SQL Server/Advanced**. Scroll down in the right pane and make sure **Enabled Parameterization for Always Encrypted** is enabled.
|
||||

|
||||
+ Click **OK**.
|
||||
1. Open, review (change, if you want) and execute the query in **tsql-scripts/QueryColumns.sql**. The query should return the rows in the **Patients** table meeting the specified search criteria.
|
||||
|
||||
## Demo Part 4 - Re-encrypt and decrypt columns in-place
|
||||
1. Re-encrypt your columns to rotate/change the column encryption key.
|
||||
+ In the SSMS instance that uses a database connection with Always Encrypted enabled, use Object Explorer to expand your database and navigate to **Security/ Always Encrypted Keys/Column Encryption Keys**.
|
||||
+ Right-click on the **Column Encryption Keys** folder and select **New Column Encryption Key…**.
|
||||
+ Enter a column encryption key name: **CEK2**.
|
||||
+ Select **CMK1** as the column master key to protect your new column encryption key.
|
||||
+ Click **OK** to provision a new column encryption key.
|
||||
+ Open and review **tsql-scripts/RotateKeys.sql**. Note that the only difference between this script and **tsql-scripts/EncryptColumns.sql** is the column encryption key specified for the three columns (this script uses **CEK2**). When you execute the script, the columns are re-encrypted using the new column encryption key.
|
||||
+ Refresh the demo app in the browser. The app should continue to work.
|
||||
1. Decrypt your columns (convert them back to plaintext).
|
||||
+ Open, review and execute **tsql-scripts/DecryptColumns.sql**. This script decrypts the encrypted columns. It also re-sets the original collation of the columns.
|
||||
|
||||
## Resetting your demo environment
|
||||
1. Open and execute **tsql-scripts/DecryptColumns.sql**.
|
||||
1. Open and execute **tsql-scripts/DropKeys.sql**.
|
||||
1. Close both SSMS windows.
|
||||
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28010.2036
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ContosoClinic", "ContosoClinic\ContosoClinic.csproj", "{CD00D85A-BCAC-4784-AAEE-F8A04F671168}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{CD00D85A-BCAC-4784-AAEE-F8A04F671168}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CD00D85A-BCAC-4784-AAEE-F8A04F671168}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CD00D85A-BCAC-4784-AAEE-F8A04F671168}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CD00D85A-BCAC-4784-AAEE-F8A04F671168}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {1426E8BB-D281-42C3-8732-F25D28B3F7B0}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,31 @@
|
||||
using System.Web;
|
||||
using System.Web.Optimization;
|
||||
|
||||
namespace ContosoClinic
|
||||
{
|
||||
public class BundleConfig
|
||||
{
|
||||
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
|
||||
public static void RegisterBundles(BundleCollection bundles)
|
||||
{
|
||||
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
|
||||
"~/Scripts/jquery-{version}.js"));
|
||||
|
||||
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
|
||||
"~/Scripts/jquery.validate*"));
|
||||
|
||||
// Use the development version of Modernizr to develop with and learn from. Then, when you're
|
||||
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
|
||||
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
|
||||
"~/Scripts/modernizr-*"));
|
||||
|
||||
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
|
||||
"~/Scripts/bootstrap.js",
|
||||
"~/Scripts/respond.js"));
|
||||
|
||||
bundles.Add(new StyleBundle("~/Content/css").Include(
|
||||
"~/Content/bootstrap.css",
|
||||
"~/Content/site.css"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace ContosoClinic
|
||||
{
|
||||
public class FilterConfig
|
||||
{
|
||||
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
|
||||
{
|
||||
filters.Add(new HandleErrorAttribute());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
using Microsoft.AspNet.Identity.Owin;
|
||||
using Microsoft.Owin;
|
||||
using Microsoft.Owin.Security;
|
||||
using ContosoClinic.Models;
|
||||
|
||||
namespace ContosoClinic
|
||||
{
|
||||
public class EmailService : IIdentityMessageService
|
||||
{
|
||||
public Task SendAsync(IdentityMessage message)
|
||||
{
|
||||
// Plug in your email service here to send an email.
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
}
|
||||
|
||||
public class SmsService : IIdentityMessageService
|
||||
{
|
||||
public Task SendAsync(IdentityMessage message)
|
||||
{
|
||||
// Plug in your SMS service here to send a text message.
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
}
|
||||
|
||||
// Configure the application user manager used in this application. UserManager is defined in ASP.NET Identity and is used by the application.
|
||||
public class ApplicationUserManager : UserManager<ApplicationUser>
|
||||
{
|
||||
public ApplicationUserManager(IUserStore<ApplicationUser> store)
|
||||
: base(store)
|
||||
{
|
||||
}
|
||||
|
||||
public static ApplicationUserManager Create(IdentityFactoryOptions<ApplicationUserManager> options, IOwinContext context)
|
||||
{
|
||||
var manager = new ApplicationUserManager(new UserStore<ApplicationUser>(context.Get<ApplicationDbContext>()));
|
||||
// Configure validation logic for usernames
|
||||
manager.UserValidator = new UserValidator<ApplicationUser>(manager)
|
||||
{
|
||||
AllowOnlyAlphanumericUserNames = false,
|
||||
RequireUniqueEmail = true
|
||||
};
|
||||
|
||||
// Configure validation logic for passwords
|
||||
manager.PasswordValidator = new PasswordValidator
|
||||
{
|
||||
RequiredLength = 6,
|
||||
RequireNonLetterOrDigit = true,
|
||||
RequireDigit = true,
|
||||
RequireLowercase = true,
|
||||
RequireUppercase = true,
|
||||
};
|
||||
|
||||
// Configure user lockout defaults
|
||||
manager.UserLockoutEnabledByDefault = true;
|
||||
manager.DefaultAccountLockoutTimeSpan = TimeSpan.FromMinutes(5);
|
||||
manager.MaxFailedAccessAttemptsBeforeLockout = 5;
|
||||
|
||||
// Register two factor authentication providers. This application uses Phone and Emails as a step of receiving a code for verifying the user
|
||||
// You can write your own provider and plug it in here.
|
||||
manager.RegisterTwoFactorProvider("Phone Code", new PhoneNumberTokenProvider<ApplicationUser>
|
||||
{
|
||||
MessageFormat = "Your security code is {0}"
|
||||
});
|
||||
manager.RegisterTwoFactorProvider("Email Code", new EmailTokenProvider<ApplicationUser>
|
||||
{
|
||||
Subject = "Security Code",
|
||||
BodyFormat = "Your security code is {0}"
|
||||
});
|
||||
manager.EmailService = new EmailService();
|
||||
manager.SmsService = new SmsService();
|
||||
var dataProtectionProvider = options.DataProtectionProvider;
|
||||
if (dataProtectionProvider != null)
|
||||
{
|
||||
manager.UserTokenProvider =
|
||||
new DataProtectorTokenProvider<ApplicationUser>(dataProtectionProvider.Create("ASP.NET Identity"));
|
||||
}
|
||||
return manager;
|
||||
}
|
||||
}
|
||||
|
||||
// Configure the application sign-in manager which is used in this application.
|
||||
public class ApplicationSignInManager : SignInManager<ApplicationUser, string>
|
||||
{
|
||||
public ApplicationSignInManager(ApplicationUserManager userManager, IAuthenticationManager authenticationManager)
|
||||
: base(userManager, authenticationManager)
|
||||
{
|
||||
}
|
||||
|
||||
public override Task<ClaimsIdentity> CreateUserIdentityAsync(ApplicationUser user)
|
||||
{
|
||||
return user.GenerateUserIdentityAsync((ApplicationUserManager)UserManager);
|
||||
}
|
||||
|
||||
public static ApplicationSignInManager Create(IdentityFactoryOptions<ApplicationSignInManager> options, IOwinContext context)
|
||||
{
|
||||
return new ApplicationSignInManager(context.GetUserManager<ApplicationUserManager>(), context.Authentication);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace ContosoClinic
|
||||
{
|
||||
public class RouteConfig
|
||||
{
|
||||
public static void RegisterRoutes(RouteCollection routes)
|
||||
{
|
||||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
|
||||
|
||||
routes.MapRoute(
|
||||
name: "Default",
|
||||
url: "{controller}/{action}/{id}",
|
||||
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity.Owin;
|
||||
using Microsoft.Owin;
|
||||
using Microsoft.Owin.Security.Cookies;
|
||||
using Microsoft.Owin.Security.Google;
|
||||
using Owin;
|
||||
using ContosoClinic.Models;
|
||||
|
||||
namespace ContosoClinic
|
||||
{
|
||||
public partial class Startup
|
||||
{
|
||||
// For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
|
||||
public void ConfigureAuth(IAppBuilder app)
|
||||
{
|
||||
// Configure the db context, user manager and signin manager to use a single instance per request
|
||||
app.CreatePerOwinContext(ApplicationDbContext.Create);
|
||||
app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);
|
||||
app.CreatePerOwinContext<ApplicationSignInManager>(ApplicationSignInManager.Create);
|
||||
|
||||
// Enable the application to use a cookie to store information for the signed in user
|
||||
// and to use a cookie to temporarily store information about a user logging in with a third party login provider
|
||||
// Configure the sign in cookie
|
||||
app.UseCookieAuthentication(new CookieAuthenticationOptions
|
||||
{
|
||||
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
|
||||
LoginPath = new PathString("/Account/Login"),
|
||||
Provider = new CookieAuthenticationProvider
|
||||
{
|
||||
// Enables the application to validate the security stamp when the user logs in.
|
||||
// This is a security feature which is used when you change a password or add an external login to your account.
|
||||
OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager, ApplicationUser>(
|
||||
validateInterval: TimeSpan.FromMinutes(30),
|
||||
regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager))
|
||||
}
|
||||
});
|
||||
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
|
||||
|
||||
// Enables the application to temporarily store user information when they are verifying the second factor in the two-factor authentication process.
|
||||
app.UseTwoFactorSignInCookie(DefaultAuthenticationTypes.TwoFactorCookie, TimeSpan.FromMinutes(5));
|
||||
|
||||
// Enables the application to remember the second login verification factor such as phone or email.
|
||||
// Once you check this option, your second step of verification during the login process will be remembered on the device where you logged in from.
|
||||
// This is similar to the RememberMe option when you log in.
|
||||
app.UseTwoFactorRememberBrowserCookie(DefaultAuthenticationTypes.TwoFactorRememberBrowserCookie);
|
||||
|
||||
// Uncomment the following lines to enable logging in with third party login providers
|
||||
//app.UseMicrosoftAccountAuthentication(
|
||||
// clientId: "",
|
||||
// clientSecret: "");
|
||||
|
||||
//app.UseTwitterAuthentication(
|
||||
// consumerKey: "",
|
||||
// consumerSecret: "");
|
||||
|
||||
//app.UseFacebookAuthentication(
|
||||
// appId: "",
|
||||
// appSecret: "");
|
||||
|
||||
//app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()
|
||||
//{
|
||||
// ClientId = "",
|
||||
// ClientSecret = ""
|
||||
//});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
body {
|
||||
padding-top: 50px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
/* Set padding to keep content from hitting the edges */
|
||||
.body-content {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
/* Override the default bootstrap behavior where horizontal description lists
|
||||
will truncate terms that are too long to fit in the left column
|
||||
*/
|
||||
.dl-horizontal dt {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
/* Set width on the form input elements since they're 100% wide by default */
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
max-width: 280px;
|
||||
}
|
||||
@@ -0,0 +1,384 @@
|
||||
.btn-default,
|
||||
.btn-primary,
|
||||
.btn-success,
|
||||
.btn-info,
|
||||
.btn-warning,
|
||||
.btn-danger {
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.btn-default:active,
|
||||
.btn-primary:active,
|
||||
.btn-success:active,
|
||||
.btn-info:active,
|
||||
.btn-warning:active,
|
||||
.btn-danger:active,
|
||||
.btn-default.active,
|
||||
.btn-primary.active,
|
||||
.btn-success.active,
|
||||
.btn-info.active,
|
||||
.btn-warning.active,
|
||||
.btn-danger.active {
|
||||
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||
}
|
||||
|
||||
.btn:active,
|
||||
.btn.active {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-default {
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#e6e6e6));
|
||||
background-image: -webkit-linear-gradient(top, #ffffff, 0%, #e6e6e6, 100%);
|
||||
background-image: -moz-linear-gradient(top, #ffffff 0%, #e6e6e6 100%);
|
||||
background-image: linear-gradient(to bottom, #ffffff 0%, #e6e6e6 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #e0e0e0;
|
||||
border-color: #ccc;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
|
||||
}
|
||||
|
||||
.btn-default:active,
|
||||
.btn-default.active {
|
||||
background-color: #e6e6e6;
|
||||
border-color: #e0e0e0;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#3071a9));
|
||||
background-image: -webkit-linear-gradient(top, #428bca, 0%, #3071a9, 100%);
|
||||
background-image: -moz-linear-gradient(top, #428bca 0%, #3071a9 100%);
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #2d6ca2;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);
|
||||
}
|
||||
|
||||
.btn-primary:active,
|
||||
.btn-primary.active {
|
||||
background-color: #3071a9;
|
||||
border-color: #2d6ca2;
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5cb85c), to(#449d44));
|
||||
background-image: -webkit-linear-gradient(top, #5cb85c, 0%, #449d44, 100%);
|
||||
background-image: -moz-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #419641;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
|
||||
}
|
||||
|
||||
.btn-success:active,
|
||||
.btn-success.active {
|
||||
background-color: #449d44;
|
||||
border-color: #419641;
|
||||
}
|
||||
|
||||
.btn-warning {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f0ad4e), to(#ec971f));
|
||||
background-image: -webkit-linear-gradient(top, #f0ad4e, 0%, #ec971f, 100%);
|
||||
background-image: -moz-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #eb9316;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
|
||||
}
|
||||
|
||||
.btn-warning:active,
|
||||
.btn-warning.active {
|
||||
background-color: #ec971f;
|
||||
border-color: #eb9316;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9534f), to(#c9302c));
|
||||
background-image: -webkit-linear-gradient(top, #d9534f, 0%, #c9302c, 100%);
|
||||
background-image: -moz-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #c12e2a;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
|
||||
}
|
||||
|
||||
.btn-danger:active,
|
||||
.btn-danger.active {
|
||||
background-color: #c9302c;
|
||||
border-color: #c12e2a;
|
||||
}
|
||||
|
||||
.btn-info {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5bc0de), to(#31b0d5));
|
||||
background-image: -webkit-linear-gradient(top, #5bc0de, 0%, #31b0d5, 100%);
|
||||
background-image: -moz-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #2aabd2;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
|
||||
}
|
||||
|
||||
.btn-info:active,
|
||||
.btn-info.active {
|
||||
background-color: #31b0d5;
|
||||
border-color: #2aabd2;
|
||||
}
|
||||
|
||||
.thumbnail,
|
||||
.img-thumbnail {
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.dropdown-menu > li > a:hover,
|
||||
.dropdown-menu > li > a:focus,
|
||||
.dropdown-menu > .active > a,
|
||||
.dropdown-menu > .active > a:hover,
|
||||
.dropdown-menu > .active > a:focus {
|
||||
background-color: #357ebd;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#357ebd));
|
||||
background-image: -webkit-linear-gradient(top, #428bca, 0%, #357ebd, 100%);
|
||||
background-image: -moz-linear-gradient(top, #428bca 0%, #357ebd 100%);
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
|
||||
}
|
||||
|
||||
.navbar {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#f8f8f8));
|
||||
background-image: -webkit-linear-gradient(top, #ffffff, 0%, #f8f8f8, 100%);
|
||||
background-image: -moz-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);
|
||||
background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-radius: 4px;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.navbar .navbar-nav > .active > a {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
.navbar-brand,
|
||||
.navbar-nav > li > a {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
|
||||
.navbar-inverse {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#3c3c3c), to(#222222));
|
||||
background-image: -webkit-linear-gradient(top, #3c3c3c, 0%, #222222, 100%);
|
||||
background-image: -moz-linear-gradient(top, #3c3c3c 0%, #222222 100%);
|
||||
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-nav > .active > a {
|
||||
background-color: #222222;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-brand,
|
||||
.navbar-inverse .navbar-nav > li > a {
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.navbar-static-top,
|
||||
.navbar-fixed-top,
|
||||
.navbar-fixed-bottom {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.alert {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.alert-success {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#dff0d8), to(#c8e5bc));
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8, 0%, #c8e5bc, 100%);
|
||||
background-image: -moz-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #b2dba1;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
|
||||
}
|
||||
|
||||
.alert-info {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9edf7), to(#b9def0));
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7, 0%, #b9def0, 100%);
|
||||
background-image: -moz-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #9acfea;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
|
||||
}
|
||||
|
||||
.alert-warning {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fcf8e3), to(#f8efc0));
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3, 0%, #f8efc0, 100%);
|
||||
background-image: -moz-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #f5e79e;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
|
||||
}
|
||||
|
||||
.alert-danger {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f2dede), to(#e7c3c3));
|
||||
background-image: -webkit-linear-gradient(top, #f2dede, 0%, #e7c3c3, 100%);
|
||||
background-image: -moz-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dca7a7;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
|
||||
}
|
||||
|
||||
.progress {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ebebeb), to(#f5f5f5));
|
||||
background-image: -webkit-linear-gradient(top, #ebebeb, 0%, #f5f5f5, 100%);
|
||||
background-image: -moz-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#3071a9));
|
||||
background-image: -webkit-linear-gradient(top, #428bca, 0%, #3071a9, 100%);
|
||||
background-image: -moz-linear-gradient(top, #428bca 0%, #3071a9 100%);
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);
|
||||
}
|
||||
|
||||
.progress-bar-success {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5cb85c), to(#449d44));
|
||||
background-image: -webkit-linear-gradient(top, #5cb85c, 0%, #449d44, 100%);
|
||||
background-image: -moz-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
|
||||
}
|
||||
|
||||
.progress-bar-info {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5bc0de), to(#31b0d5));
|
||||
background-image: -webkit-linear-gradient(top, #5bc0de, 0%, #31b0d5, 100%);
|
||||
background-image: -moz-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
|
||||
}
|
||||
|
||||
.progress-bar-warning {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f0ad4e), to(#ec971f));
|
||||
background-image: -webkit-linear-gradient(top, #f0ad4e, 0%, #ec971f, 100%);
|
||||
background-image: -moz-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
|
||||
}
|
||||
|
||||
.progress-bar-danger {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9534f), to(#c9302c));
|
||||
background-image: -webkit-linear-gradient(top, #d9534f, 0%, #c9302c, 100%);
|
||||
background-image: -moz-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
|
||||
}
|
||||
|
||||
.list-group {
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.list-group-item.active,
|
||||
.list-group-item.active:hover,
|
||||
.list-group-item.active:focus {
|
||||
text-shadow: 0 -1px 0 #3071a9;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#3278b3));
|
||||
background-image: -webkit-linear-gradient(top, #428bca, 0%, #3278b3, 100%);
|
||||
background-image: -moz-linear-gradient(top, #428bca 0%, #3278b3 100%);
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #3278b3;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);
|
||||
}
|
||||
|
||||
.panel {
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.panel-default > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f5f5f5), to(#e8e8e8));
|
||||
background-image: -webkit-linear-gradient(top, #f5f5f5, 0%, #e8e8e8, 100%);
|
||||
background-image: -moz-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||
}
|
||||
|
||||
.panel-primary > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#357ebd));
|
||||
background-image: -webkit-linear-gradient(top, #428bca, 0%, #357ebd, 100%);
|
||||
background-image: -moz-linear-gradient(top, #428bca 0%, #357ebd 100%);
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
|
||||
}
|
||||
|
||||
.panel-success > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#dff0d8), to(#d0e9c6));
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8, 0%, #d0e9c6, 100%);
|
||||
background-image: -moz-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
|
||||
}
|
||||
|
||||
.panel-info > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9edf7), to(#c4e3f3));
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7, 0%, #c4e3f3, 100%);
|
||||
background-image: -moz-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
|
||||
}
|
||||
|
||||
.panel-warning > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fcf8e3), to(#faf2cc));
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3, 0%, #faf2cc, 100%);
|
||||
background-image: -moz-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
|
||||
}
|
||||
|
||||
.panel-danger > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f2dede), to(#ebcccc));
|
||||
background-image: -webkit-linear-gradient(top, #f2dede, 0%, #ebcccc, 100%);
|
||||
background-image: -moz-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
|
||||
}
|
||||
|
||||
.well {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#e8e8e8), to(#f5f5f5));
|
||||
background-image: -webkit-linear-gradient(top, #e8e8e8, 0%, #f5f5f5, 100%);
|
||||
background-image: -moz-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dcdcdc;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
|
||||
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
@@ -0,0 +1,333 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
|
||||
<Import Project="..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{CD00D85A-BCAC-4784-AAEE-F8A04F671168}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ContosoClinic</RootNamespace>
|
||||
<AssemblyName>ContosoClinic</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
<Use64BitIISExpress />
|
||||
<WebGreaseLibPath>..\packages\WebGrease.1.5.2\lib</WebGreaseLibPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Antlr3.Runtime, Version=3.4.1.9004, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNet.Identity.EntityFramework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.1\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNet.Identity.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Identity.Owin.2.2.1\lib\net45\Microsoft.AspNet.Identity.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Host.SystemWeb, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.3.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Security, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.Security.3.0.1\lib\net45\Microsoft.Owin.Security.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Security.Cookies, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.Security.Cookies.3.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Security.Facebook, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.Security.Facebook.3.0.1\lib\net45\Microsoft.Owin.Security.Facebook.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Security.Google, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.Security.Google.3.0.1\lib\net45\Microsoft.Owin.Security.Google.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Security.MicrosoftAccount, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.Security.MicrosoftAccount.3.0.1\lib\net45\Microsoft.Owin.Security.MicrosoftAccount.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Security.OAuth, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.Security.OAuth.3.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Owin.Security.Twitter, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Owin.Security.Twitter.3.0.1\lib\net45\Microsoft.Owin.Security.Twitter.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.SqlServer.Management.AlwaysEncrypted.EnclaveProviders, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.SqlServer.Management.AlwaysEncrypted.EnclaveProviders.1.0.0-beta\lib\net472\Microsoft.SqlServer.Management.AlwaysEncrypted.EnclaveProviders.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Routing" />
|
||||
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
<Reference Include="System.Net.Http">
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.WebRequest">
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="WebGrease, Version=1.5.2.14234, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="App_Start\BundleConfig.cs" />
|
||||
<Compile Include="App_Start\FilterConfig.cs" />
|
||||
<Compile Include="App_Start\IdentityConfig.cs" />
|
||||
<Compile Include="App_Start\RouteConfig.cs" />
|
||||
<Compile Include="App_Start\Startup.Auth.cs" />
|
||||
<Compile Include="Controllers\AccountController.cs" />
|
||||
<Compile Include="Controllers\HomeController.cs" />
|
||||
<Compile Include="Controllers\ManageController.cs" />
|
||||
<Compile Include="Controllers\PatientsController.cs" />
|
||||
<Compile Include="Controllers\VisitsController.cs" />
|
||||
<Compile Include="Global.asax.cs">
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\201602170540262_Initial.cs" />
|
||||
<Compile Include="Migrations\201602170540262_Initial.Designer.cs">
|
||||
<DependentUpon>201602170540262_Initial.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\201602170605457_Visits.cs" />
|
||||
<Compile Include="Migrations\201602170605457_Visits.Designer.cs">
|
||||
<DependentUpon>201602170605457_Visits.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\201602170720063_Nullability.cs" />
|
||||
<Compile Include="Migrations\201602170720063_Nullability.Designer.cs">
|
||||
<DependentUpon>201602170720063_Nullability.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\201602170857179_Assignments.cs" />
|
||||
<Compile Include="Migrations\201602170857179_Assignments.Designer.cs">
|
||||
<DependentUpon>201602170857179_Assignments.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\Configuration.cs" />
|
||||
<Compile Include="Models\AccountViewModels.cs" />
|
||||
<Compile Include="Models\ClinicModels.cs" />
|
||||
<Compile Include="Models\IdentityModels.cs" />
|
||||
<Compile Include="Models\ManageViewModels.cs" />
|
||||
<Compile Include="Models\SessionContextInterceptor.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Startup.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Content\bootstrap-theme.css" />
|
||||
<Content Include="Content\bootstrap-theme.min.css" />
|
||||
<Content Include="Content\bootstrap.css" />
|
||||
<Content Include="Content\bootstrap.min.css" />
|
||||
<Content Include="favicon.ico" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.svg" />
|
||||
<Content Include="Global.asax" />
|
||||
<Content Include="Content\Site.css" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.woff" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.ttf" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.eot" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\PublishProfiles\app.pubxml" />
|
||||
<None Include="Scripts\jquery-1.10.2.intellisense.js" />
|
||||
<Content Include="Scripts\bootstrap.js" />
|
||||
<Content Include="Scripts\bootstrap.min.js" />
|
||||
<Content Include="Scripts\jquery-1.10.2.js" />
|
||||
<Content Include="Scripts\jquery-1.10.2.min.js" />
|
||||
<None Include="Scripts\jquery.validate-vsdoc.js" />
|
||||
<Content Include="Scripts\jquery.validate.js" />
|
||||
<Content Include="Scripts\jquery.validate.min.js" />
|
||||
<Content Include="Scripts\jquery.validate.unobtrusive.js" />
|
||||
<Content Include="Scripts\jquery.validate.unobtrusive.min.js" />
|
||||
<Content Include="Scripts\modernizr-2.6.2.js" />
|
||||
<Content Include="Scripts\respond.js" />
|
||||
<Content Include="Scripts\respond.min.js" />
|
||||
<Content Include="Scripts\_references.js" />
|
||||
<Content Include="Web.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="Web.Release.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="Views\Web.config" />
|
||||
<Content Include="Views\_ViewStart.cshtml" />
|
||||
<Content Include="Views\Shared\Error.cshtml" />
|
||||
<Content Include="Views\Shared\_Layout.cshtml" />
|
||||
<Content Include="Views\Home\About.cshtml" />
|
||||
<Content Include="Views\Home\Contact.cshtml" />
|
||||
<Content Include="Views\Home\Index.cshtml" />
|
||||
<Content Include="Views\Account\_ExternalLoginsListPartial.cshtml" />
|
||||
<Content Include="Views\Account\ConfirmEmail.cshtml" />
|
||||
<Content Include="Views\Account\ExternalLoginConfirmation.cshtml" />
|
||||
<Content Include="Views\Account\ExternalLoginFailure.cshtml" />
|
||||
<Content Include="Views\Account\ForgotPassword.cshtml" />
|
||||
<Content Include="Views\Account\ForgotPasswordConfirmation.cshtml" />
|
||||
<Content Include="Views\Account\Login.cshtml" />
|
||||
<Content Include="Views\Account\Register.cshtml" />
|
||||
<Content Include="Views\Account\ResetPassword.cshtml" />
|
||||
<Content Include="Views\Account\ResetPasswordConfirmation.cshtml" />
|
||||
<Content Include="Views\Account\SendCode.cshtml" />
|
||||
<Content Include="Views\Account\VerifyCode.cshtml" />
|
||||
<Content Include="Views\Manage\AddPhoneNumber.cshtml" />
|
||||
<Content Include="Views\Manage\ChangePassword.cshtml" />
|
||||
<Content Include="Views\Manage\Index.cshtml" />
|
||||
<Content Include="Views\Manage\ManageLogins.cshtml" />
|
||||
<Content Include="Views\Manage\SetPassword.cshtml" />
|
||||
<Content Include="Views\Manage\VerifyPhoneNumber.cshtml" />
|
||||
<Content Include="Views\Shared\Lockout.cshtml" />
|
||||
<Content Include="Views\Shared\_LoginPartial.cshtml" />
|
||||
<Content Include="Views\Patients\Create.cshtml" />
|
||||
<Content Include="Views\Patients\Delete.cshtml" />
|
||||
<Content Include="Views\Patients\Details.cshtml" />
|
||||
<Content Include="Views\Patients\Edit.cshtml" />
|
||||
<Content Include="Views\Patients\Index.cshtml" />
|
||||
<Content Include="Views\Visits\Create.cshtml" />
|
||||
<Content Include="Views\Visits\Delete.cshtml" />
|
||||
<Content Include="Views\Visits\Details.cshtml" />
|
||||
<Content Include="Views\Visits\Edit.cshtml" />
|
||||
<Content Include="Views\Visits\Index.cshtml" />
|
||||
<Content Include="Scripts\jquery-1.10.2.min.map" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Project_Readme.html" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Migrations\201602170540262_Initial.resx">
|
||||
<DependentUpon>201602170540262_Initial.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\201602170605457_Visits.resx">
|
||||
<DependentUpon>201602170605457_Visits.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\201602170720063_Nullability.resx">
|
||||
<DependentUpon>201602170720063_Nullability.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\201602170857179_Assignments.resx">
|
||||
<DependentUpon>201602170857179_Assignments.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
|
||||
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
|
||||
</Target>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>1192</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:1192/</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target> -->
|
||||
</Project>
|
||||
@@ -0,0 +1,485 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity.Owin;
|
||||
using Microsoft.Owin.Security;
|
||||
using ContosoClinic.Models;
|
||||
|
||||
namespace ContosoClinic.Controllers
|
||||
{
|
||||
[Authorize]
|
||||
public class AccountController : Controller
|
||||
{
|
||||
private ApplicationSignInManager _signInManager;
|
||||
private ApplicationUserManager _userManager;
|
||||
|
||||
public AccountController()
|
||||
{
|
||||
}
|
||||
|
||||
public AccountController(ApplicationUserManager userManager, ApplicationSignInManager signInManager )
|
||||
{
|
||||
UserManager = userManager;
|
||||
SignInManager = signInManager;
|
||||
}
|
||||
|
||||
public ApplicationSignInManager SignInManager
|
||||
{
|
||||
get
|
||||
{
|
||||
return _signInManager ?? HttpContext.GetOwinContext().Get<ApplicationSignInManager>();
|
||||
}
|
||||
private set
|
||||
{
|
||||
_signInManager = value;
|
||||
}
|
||||
}
|
||||
|
||||
public ApplicationUserManager UserManager
|
||||
{
|
||||
get
|
||||
{
|
||||
return _userManager ?? HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>();
|
||||
}
|
||||
private set
|
||||
{
|
||||
_userManager = value;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Account/Login
|
||||
[AllowAnonymous]
|
||||
public ActionResult Login(string returnUrl)
|
||||
{
|
||||
ViewBag.ReturnUrl = returnUrl;
|
||||
return View();
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Account/Login
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<ActionResult> Login(LoginViewModel model, string returnUrl)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return View(model);
|
||||
}
|
||||
|
||||
// This doesn't count login failures towards account lockout
|
||||
// To enable password failures to trigger account lockout, change to shouldLockout: true
|
||||
var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, shouldLockout: false);
|
||||
switch (result)
|
||||
{
|
||||
case SignInStatus.Success:
|
||||
return RedirectToLocal(returnUrl);
|
||||
case SignInStatus.LockedOut:
|
||||
return View("Lockout");
|
||||
case SignInStatus.RequiresVerification:
|
||||
return RedirectToAction("SendCode", new { ReturnUrl = returnUrl, RememberMe = model.RememberMe });
|
||||
case SignInStatus.Failure:
|
||||
default:
|
||||
ModelState.AddModelError("", "Invalid login attempt.");
|
||||
return View(model);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Account/VerifyCode
|
||||
[AllowAnonymous]
|
||||
public async Task<ActionResult> VerifyCode(string provider, string returnUrl, bool rememberMe)
|
||||
{
|
||||
// Require that the user has already logged in via username/password or external login
|
||||
if (!await SignInManager.HasBeenVerifiedAsync())
|
||||
{
|
||||
return View("Error");
|
||||
}
|
||||
return View(new VerifyCodeViewModel { Provider = provider, ReturnUrl = returnUrl, RememberMe = rememberMe });
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Account/VerifyCode
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<ActionResult> VerifyCode(VerifyCodeViewModel model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return View(model);
|
||||
}
|
||||
|
||||
// The following code protects for brute force attacks against the two factor codes.
|
||||
// If a user enters incorrect codes for a specified amount of time then the user account
|
||||
// will be locked out for a specified amount of time.
|
||||
// You can configure the account lockout settings in IdentityConfig
|
||||
var result = await SignInManager.TwoFactorSignInAsync(model.Provider, model.Code, isPersistent: model.RememberMe, rememberBrowser: model.RememberBrowser);
|
||||
switch (result)
|
||||
{
|
||||
case SignInStatus.Success:
|
||||
return RedirectToLocal(model.ReturnUrl);
|
||||
case SignInStatus.LockedOut:
|
||||
return View("Lockout");
|
||||
case SignInStatus.Failure:
|
||||
default:
|
||||
ModelState.AddModelError("", "Invalid code.");
|
||||
return View(model);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Account/Register
|
||||
[AllowAnonymous]
|
||||
public ActionResult Register()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Account/Register
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<ActionResult> Register(RegisterViewModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
var user = new ApplicationUser { UserName = model.Email, Email = model.Email };
|
||||
var result = await UserManager.CreateAsync(user, model.Password);
|
||||
if (result.Succeeded)
|
||||
{
|
||||
await SignInManager.SignInAsync(user, isPersistent:false, rememberBrowser:false);
|
||||
|
||||
// For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=320771
|
||||
// Send an email with this link
|
||||
// string code = await UserManager.GenerateEmailConfirmationTokenAsync(user.Id);
|
||||
// var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: Request.Url.Scheme);
|
||||
// await UserManager.SendEmailAsync(user.Id, "Confirm your account", "Please confirm your account by clicking <a href=\"" + callbackUrl + "\">here</a>");
|
||||
|
||||
return RedirectToAction("Index", "Home");
|
||||
}
|
||||
AddErrors(result);
|
||||
}
|
||||
|
||||
// If we got this far, something failed, redisplay form
|
||||
return View(model);
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Account/ConfirmEmail
|
||||
[AllowAnonymous]
|
||||
public async Task<ActionResult> ConfirmEmail(string userId, string code)
|
||||
{
|
||||
if (userId == null || code == null)
|
||||
{
|
||||
return View("Error");
|
||||
}
|
||||
var result = await UserManager.ConfirmEmailAsync(userId, code);
|
||||
return View(result.Succeeded ? "ConfirmEmail" : "Error");
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Account/ForgotPassword
|
||||
[AllowAnonymous]
|
||||
public ActionResult ForgotPassword()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Account/ForgotPassword
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<ActionResult> ForgotPassword(ForgotPasswordViewModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
var user = await UserManager.FindByNameAsync(model.Email);
|
||||
if (user == null || !(await UserManager.IsEmailConfirmedAsync(user.Id)))
|
||||
{
|
||||
// Don't reveal that the user does not exist or is not confirmed
|
||||
return View("ForgotPasswordConfirmation");
|
||||
}
|
||||
|
||||
// For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=320771
|
||||
// Send an email with this link
|
||||
// string code = await UserManager.GeneratePasswordResetTokenAsync(user.Id);
|
||||
// var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = code }, protocol: Request.Url.Scheme);
|
||||
// await UserManager.SendEmailAsync(user.Id, "Reset Password", "Please reset your password by clicking <a href=\"" + callbackUrl + "\">here</a>");
|
||||
// return RedirectToAction("ForgotPasswordConfirmation", "Account");
|
||||
}
|
||||
|
||||
// If we got this far, something failed, redisplay form
|
||||
return View(model);
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Account/ForgotPasswordConfirmation
|
||||
[AllowAnonymous]
|
||||
public ActionResult ForgotPasswordConfirmation()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Account/ResetPassword
|
||||
[AllowAnonymous]
|
||||
public ActionResult ResetPassword(string code)
|
||||
{
|
||||
return code == null ? View("Error") : View();
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Account/ResetPassword
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<ActionResult> ResetPassword(ResetPasswordViewModel model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return View(model);
|
||||
}
|
||||
var user = await UserManager.FindByNameAsync(model.Email);
|
||||
if (user == null)
|
||||
{
|
||||
// Don't reveal that the user does not exist
|
||||
return RedirectToAction("ResetPasswordConfirmation", "Account");
|
||||
}
|
||||
var result = await UserManager.ResetPasswordAsync(user.Id, model.Code, model.Password);
|
||||
if (result.Succeeded)
|
||||
{
|
||||
return RedirectToAction("ResetPasswordConfirmation", "Account");
|
||||
}
|
||||
AddErrors(result);
|
||||
return View();
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Account/ResetPasswordConfirmation
|
||||
[AllowAnonymous]
|
||||
public ActionResult ResetPasswordConfirmation()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Account/ExternalLogin
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
[ValidateAntiForgeryToken]
|
||||
public ActionResult ExternalLogin(string provider, string returnUrl)
|
||||
{
|
||||
// Request a redirect to the external login provider
|
||||
return new ChallengeResult(provider, Url.Action("ExternalLoginCallback", "Account", new { ReturnUrl = returnUrl }));
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Account/SendCode
|
||||
[AllowAnonymous]
|
||||
public async Task<ActionResult> SendCode(string returnUrl, bool rememberMe)
|
||||
{
|
||||
var userId = await SignInManager.GetVerifiedUserIdAsync();
|
||||
if (userId == null)
|
||||
{
|
||||
return View("Error");
|
||||
}
|
||||
var userFactors = await UserManager.GetValidTwoFactorProvidersAsync(userId);
|
||||
var factorOptions = userFactors.Select(purpose => new SelectListItem { Text = purpose, Value = purpose }).ToList();
|
||||
return View(new SendCodeViewModel { Providers = factorOptions, ReturnUrl = returnUrl, RememberMe = rememberMe });
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Account/SendCode
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<ActionResult> SendCode(SendCodeViewModel model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// Generate the token and send it
|
||||
if (!await SignInManager.SendTwoFactorCodeAsync(model.SelectedProvider))
|
||||
{
|
||||
return View("Error");
|
||||
}
|
||||
return RedirectToAction("VerifyCode", new { Provider = model.SelectedProvider, ReturnUrl = model.ReturnUrl, RememberMe = model.RememberMe });
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Account/ExternalLoginCallback
|
||||
[AllowAnonymous]
|
||||
public async Task<ActionResult> ExternalLoginCallback(string returnUrl)
|
||||
{
|
||||
var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();
|
||||
if (loginInfo == null)
|
||||
{
|
||||
return RedirectToAction("Login");
|
||||
}
|
||||
|
||||
// Sign in the user with this external login provider if the user already has a login
|
||||
var result = await SignInManager.ExternalSignInAsync(loginInfo, isPersistent: false);
|
||||
switch (result)
|
||||
{
|
||||
case SignInStatus.Success:
|
||||
return RedirectToLocal(returnUrl);
|
||||
case SignInStatus.LockedOut:
|
||||
return View("Lockout");
|
||||
case SignInStatus.RequiresVerification:
|
||||
return RedirectToAction("SendCode", new { ReturnUrl = returnUrl, RememberMe = false });
|
||||
case SignInStatus.Failure:
|
||||
default:
|
||||
// If the user does not have an account, then prompt the user to create an account
|
||||
ViewBag.ReturnUrl = returnUrl;
|
||||
ViewBag.LoginProvider = loginInfo.Login.LoginProvider;
|
||||
return View("ExternalLoginConfirmation", new ExternalLoginConfirmationViewModel { Email = loginInfo.Email });
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Account/ExternalLoginConfirmation
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<ActionResult> ExternalLoginConfirmation(ExternalLoginConfirmationViewModel model, string returnUrl)
|
||||
{
|
||||
if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
return RedirectToAction("Index", "Manage");
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
// Get the information about the user from the external login provider
|
||||
var info = await AuthenticationManager.GetExternalLoginInfoAsync();
|
||||
if (info == null)
|
||||
{
|
||||
return View("ExternalLoginFailure");
|
||||
}
|
||||
var user = new ApplicationUser { UserName = model.Email, Email = model.Email };
|
||||
var result = await UserManager.CreateAsync(user);
|
||||
if (result.Succeeded)
|
||||
{
|
||||
result = await UserManager.AddLoginAsync(user.Id, info.Login);
|
||||
if (result.Succeeded)
|
||||
{
|
||||
await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false);
|
||||
return RedirectToLocal(returnUrl);
|
||||
}
|
||||
}
|
||||
AddErrors(result);
|
||||
}
|
||||
|
||||
ViewBag.ReturnUrl = returnUrl;
|
||||
return View(model);
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Account/LogOff
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public ActionResult LogOff()
|
||||
{
|
||||
AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie);
|
||||
return RedirectToAction("Index", "Home");
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Account/ExternalLoginFailure
|
||||
[AllowAnonymous]
|
||||
public ActionResult ExternalLoginFailure()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
if (_userManager != null)
|
||||
{
|
||||
_userManager.Dispose();
|
||||
_userManager = null;
|
||||
}
|
||||
|
||||
if (_signInManager != null)
|
||||
{
|
||||
_signInManager.Dispose();
|
||||
_signInManager = null;
|
||||
}
|
||||
}
|
||||
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Helpers
|
||||
// Used for XSRF protection when adding external logins
|
||||
private const string XsrfKey = "XsrfId";
|
||||
|
||||
private IAuthenticationManager AuthenticationManager
|
||||
{
|
||||
get
|
||||
{
|
||||
return HttpContext.GetOwinContext().Authentication;
|
||||
}
|
||||
}
|
||||
|
||||
private void AddErrors(IdentityResult result)
|
||||
{
|
||||
foreach (var error in result.Errors)
|
||||
{
|
||||
ModelState.AddModelError("", error);
|
||||
}
|
||||
}
|
||||
|
||||
private ActionResult RedirectToLocal(string returnUrl)
|
||||
{
|
||||
if (Url.IsLocalUrl(returnUrl))
|
||||
{
|
||||
return Redirect(returnUrl);
|
||||
}
|
||||
return RedirectToAction("Index", "Home");
|
||||
}
|
||||
|
||||
internal class ChallengeResult : HttpUnauthorizedResult
|
||||
{
|
||||
public ChallengeResult(string provider, string redirectUri)
|
||||
: this(provider, redirectUri, null)
|
||||
{
|
||||
}
|
||||
|
||||
public ChallengeResult(string provider, string redirectUri, string userId)
|
||||
{
|
||||
LoginProvider = provider;
|
||||
RedirectUri = redirectUri;
|
||||
UserId = userId;
|
||||
}
|
||||
|
||||
public string LoginProvider { get; set; }
|
||||
public string RedirectUri { get; set; }
|
||||
public string UserId { get; set; }
|
||||
|
||||
public override void ExecuteResult(ControllerContext context)
|
||||
{
|
||||
var properties = new AuthenticationProperties { RedirectUri = RedirectUri };
|
||||
if (UserId != null)
|
||||
{
|
||||
properties.Dictionary[XsrfKey] = UserId;
|
||||
}
|
||||
context.HttpContext.GetOwinContext().Authentication.Challenge(properties, LoginProvider);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace ContosoClinic.Controllers
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult About()
|
||||
{
|
||||
ViewBag.Message = "Your application description page.";
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult Contact()
|
||||
{
|
||||
ViewBag.Message = "Your contact page.";
|
||||
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,387 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity.Owin;
|
||||
using Microsoft.Owin.Security;
|
||||
using ContosoClinic.Models;
|
||||
|
||||
namespace ContosoClinic.Controllers
|
||||
{
|
||||
[Authorize]
|
||||
public class ManageController : Controller
|
||||
{
|
||||
private ApplicationSignInManager _signInManager;
|
||||
private ApplicationUserManager _userManager;
|
||||
|
||||
public ManageController()
|
||||
{
|
||||
}
|
||||
|
||||
public ManageController(ApplicationUserManager userManager, ApplicationSignInManager signInManager)
|
||||
{
|
||||
UserManager = userManager;
|
||||
SignInManager = signInManager;
|
||||
}
|
||||
|
||||
public ApplicationSignInManager SignInManager
|
||||
{
|
||||
get
|
||||
{
|
||||
return _signInManager ?? HttpContext.GetOwinContext().Get<ApplicationSignInManager>();
|
||||
}
|
||||
private set
|
||||
{
|
||||
_signInManager = value;
|
||||
}
|
||||
}
|
||||
|
||||
public ApplicationUserManager UserManager
|
||||
{
|
||||
get
|
||||
{
|
||||
return _userManager ?? HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>();
|
||||
}
|
||||
private set
|
||||
{
|
||||
_userManager = value;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Manage/Index
|
||||
public async Task<ActionResult> Index(ManageMessageId? message)
|
||||
{
|
||||
ViewBag.StatusMessage =
|
||||
message == ManageMessageId.ChangePasswordSuccess ? "Your password has been changed."
|
||||
: message == ManageMessageId.SetPasswordSuccess ? "Your password has been set."
|
||||
: message == ManageMessageId.SetTwoFactorSuccess ? "Your two-factor authentication provider has been set."
|
||||
: message == ManageMessageId.Error ? "An error has occurred."
|
||||
: message == ManageMessageId.AddPhoneSuccess ? "Your phone number was added."
|
||||
: message == ManageMessageId.RemovePhoneSuccess ? "Your phone number was removed."
|
||||
: "";
|
||||
|
||||
var userId = User.Identity.GetUserId();
|
||||
var model = new IndexViewModel
|
||||
{
|
||||
HasPassword = HasPassword(),
|
||||
PhoneNumber = await UserManager.GetPhoneNumberAsync(userId),
|
||||
TwoFactor = await UserManager.GetTwoFactorEnabledAsync(userId),
|
||||
Logins = await UserManager.GetLoginsAsync(userId),
|
||||
BrowserRemembered = await AuthenticationManager.TwoFactorBrowserRememberedAsync(userId)
|
||||
};
|
||||
return View(model);
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Manage/RemoveLogin
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<ActionResult> RemoveLogin(string loginProvider, string providerKey)
|
||||
{
|
||||
ManageMessageId? message;
|
||||
var result = await UserManager.RemoveLoginAsync(User.Identity.GetUserId(), new UserLoginInfo(loginProvider, providerKey));
|
||||
if (result.Succeeded)
|
||||
{
|
||||
var user = await UserManager.FindByIdAsync(User.Identity.GetUserId());
|
||||
if (user != null)
|
||||
{
|
||||
await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false);
|
||||
}
|
||||
message = ManageMessageId.RemoveLoginSuccess;
|
||||
}
|
||||
else
|
||||
{
|
||||
message = ManageMessageId.Error;
|
||||
}
|
||||
return RedirectToAction("ManageLogins", new { Message = message });
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Manage/AddPhoneNumber
|
||||
public ActionResult AddPhoneNumber()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Manage/AddPhoneNumber
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<ActionResult> AddPhoneNumber(AddPhoneNumberViewModel model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return View(model);
|
||||
}
|
||||
// Generate the token and send it
|
||||
var code = await UserManager.GenerateChangePhoneNumberTokenAsync(User.Identity.GetUserId(), model.Number);
|
||||
if (UserManager.SmsService != null)
|
||||
{
|
||||
var message = new IdentityMessage
|
||||
{
|
||||
Destination = model.Number,
|
||||
Body = "Your security code is: " + code
|
||||
};
|
||||
await UserManager.SmsService.SendAsync(message);
|
||||
}
|
||||
return RedirectToAction("VerifyPhoneNumber", new { PhoneNumber = model.Number });
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Manage/EnableTwoFactorAuthentication
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<ActionResult> EnableTwoFactorAuthentication()
|
||||
{
|
||||
await UserManager.SetTwoFactorEnabledAsync(User.Identity.GetUserId(), true);
|
||||
var user = await UserManager.FindByIdAsync(User.Identity.GetUserId());
|
||||
if (user != null)
|
||||
{
|
||||
await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false);
|
||||
}
|
||||
return RedirectToAction("Index", "Manage");
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Manage/DisableTwoFactorAuthentication
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<ActionResult> DisableTwoFactorAuthentication()
|
||||
{
|
||||
await UserManager.SetTwoFactorEnabledAsync(User.Identity.GetUserId(), false);
|
||||
var user = await UserManager.FindByIdAsync(User.Identity.GetUserId());
|
||||
if (user != null)
|
||||
{
|
||||
await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false);
|
||||
}
|
||||
return RedirectToAction("Index", "Manage");
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Manage/VerifyPhoneNumber
|
||||
public async Task<ActionResult> VerifyPhoneNumber(string phoneNumber)
|
||||
{
|
||||
var code = await UserManager.GenerateChangePhoneNumberTokenAsync(User.Identity.GetUserId(), phoneNumber);
|
||||
// Send an SMS through the SMS provider to verify the phone number
|
||||
return phoneNumber == null ? View("Error") : View(new VerifyPhoneNumberViewModel { PhoneNumber = phoneNumber });
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Manage/VerifyPhoneNumber
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<ActionResult> VerifyPhoneNumber(VerifyPhoneNumberViewModel model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return View(model);
|
||||
}
|
||||
var result = await UserManager.ChangePhoneNumberAsync(User.Identity.GetUserId(), model.PhoneNumber, model.Code);
|
||||
if (result.Succeeded)
|
||||
{
|
||||
var user = await UserManager.FindByIdAsync(User.Identity.GetUserId());
|
||||
if (user != null)
|
||||
{
|
||||
await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false);
|
||||
}
|
||||
return RedirectToAction("Index", new { Message = ManageMessageId.AddPhoneSuccess });
|
||||
}
|
||||
// If we got this far, something failed, redisplay form
|
||||
ModelState.AddModelError("", "Failed to verify phone");
|
||||
return View(model);
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Manage/RemovePhoneNumber
|
||||
public async Task<ActionResult> RemovePhoneNumber()
|
||||
{
|
||||
var result = await UserManager.SetPhoneNumberAsync(User.Identity.GetUserId(), null);
|
||||
if (!result.Succeeded)
|
||||
{
|
||||
return RedirectToAction("Index", new { Message = ManageMessageId.Error });
|
||||
}
|
||||
var user = await UserManager.FindByIdAsync(User.Identity.GetUserId());
|
||||
if (user != null)
|
||||
{
|
||||
await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false);
|
||||
}
|
||||
return RedirectToAction("Index", new { Message = ManageMessageId.RemovePhoneSuccess });
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Manage/ChangePassword
|
||||
public ActionResult ChangePassword()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Manage/ChangePassword
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<ActionResult> ChangePassword(ChangePasswordViewModel model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return View(model);
|
||||
}
|
||||
var result = await UserManager.ChangePasswordAsync(User.Identity.GetUserId(), model.OldPassword, model.NewPassword);
|
||||
if (result.Succeeded)
|
||||
{
|
||||
var user = await UserManager.FindByIdAsync(User.Identity.GetUserId());
|
||||
if (user != null)
|
||||
{
|
||||
await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false);
|
||||
}
|
||||
return RedirectToAction("Index", new { Message = ManageMessageId.ChangePasswordSuccess });
|
||||
}
|
||||
AddErrors(result);
|
||||
return View(model);
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Manage/SetPassword
|
||||
public ActionResult SetPassword()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Manage/SetPassword
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<ActionResult> SetPassword(SetPasswordViewModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
var result = await UserManager.AddPasswordAsync(User.Identity.GetUserId(), model.NewPassword);
|
||||
if (result.Succeeded)
|
||||
{
|
||||
var user = await UserManager.FindByIdAsync(User.Identity.GetUserId());
|
||||
if (user != null)
|
||||
{
|
||||
await SignInManager.SignInAsync(user, isPersistent: false, rememberBrowser: false);
|
||||
}
|
||||
return RedirectToAction("Index", new { Message = ManageMessageId.SetPasswordSuccess });
|
||||
}
|
||||
AddErrors(result);
|
||||
}
|
||||
|
||||
// If we got this far, something failed, redisplay form
|
||||
return View(model);
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Manage/ManageLogins
|
||||
public async Task<ActionResult> ManageLogins(ManageMessageId? message)
|
||||
{
|
||||
ViewBag.StatusMessage =
|
||||
message == ManageMessageId.RemoveLoginSuccess ? "The external login was removed."
|
||||
: message == ManageMessageId.Error ? "An error has occurred."
|
||||
: "";
|
||||
var user = await UserManager.FindByIdAsync(User.Identity.GetUserId());
|
||||
if (user == null)
|
||||
{
|
||||
return View("Error");
|
||||
}
|
||||
var userLogins = await UserManager.GetLoginsAsync(User.Identity.GetUserId());
|
||||
var otherLogins = AuthenticationManager.GetExternalAuthenticationTypes().Where(auth => userLogins.All(ul => auth.AuthenticationType != ul.LoginProvider)).ToList();
|
||||
ViewBag.ShowRemoveButton = user.PasswordHash != null || userLogins.Count > 1;
|
||||
return View(new ManageLoginsViewModel
|
||||
{
|
||||
CurrentLogins = userLogins,
|
||||
OtherLogins = otherLogins
|
||||
});
|
||||
}
|
||||
|
||||
//
|
||||
// POST: /Manage/LinkLogin
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public ActionResult LinkLogin(string provider)
|
||||
{
|
||||
// Request a redirect to the external login provider to link a login for the current user
|
||||
return new AccountController.ChallengeResult(provider, Url.Action("LinkLoginCallback", "Manage"), User.Identity.GetUserId());
|
||||
}
|
||||
|
||||
//
|
||||
// GET: /Manage/LinkLoginCallback
|
||||
public async Task<ActionResult> LinkLoginCallback()
|
||||
{
|
||||
var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync(XsrfKey, User.Identity.GetUserId());
|
||||
if (loginInfo == null)
|
||||
{
|
||||
return RedirectToAction("ManageLogins", new { Message = ManageMessageId.Error });
|
||||
}
|
||||
var result = await UserManager.AddLoginAsync(User.Identity.GetUserId(), loginInfo.Login);
|
||||
return result.Succeeded ? RedirectToAction("ManageLogins") : RedirectToAction("ManageLogins", new { Message = ManageMessageId.Error });
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && _userManager != null)
|
||||
{
|
||||
_userManager.Dispose();
|
||||
_userManager = null;
|
||||
}
|
||||
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Helpers
|
||||
// Used for XSRF protection when adding external logins
|
||||
private const string XsrfKey = "XsrfId";
|
||||
|
||||
private IAuthenticationManager AuthenticationManager
|
||||
{
|
||||
get
|
||||
{
|
||||
return HttpContext.GetOwinContext().Authentication;
|
||||
}
|
||||
}
|
||||
|
||||
private void AddErrors(IdentityResult result)
|
||||
{
|
||||
foreach (var error in result.Errors)
|
||||
{
|
||||
ModelState.AddModelError("", error);
|
||||
}
|
||||
}
|
||||
|
||||
private bool HasPassword()
|
||||
{
|
||||
var user = UserManager.FindById(User.Identity.GetUserId());
|
||||
if (user != null)
|
||||
{
|
||||
return user.PasswordHash != null;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool HasPhoneNumber()
|
||||
{
|
||||
var user = UserManager.FindById(User.Identity.GetUserId());
|
||||
if (user != null)
|
||||
{
|
||||
return user.PhoneNumber != null;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public enum ManageMessageId
|
||||
{
|
||||
AddPhoneSuccess,
|
||||
ChangePasswordSuccess,
|
||||
SetTwoFactorSuccess,
|
||||
SetPasswordSuccess,
|
||||
RemoveLoginSuccess,
|
||||
RemovePhoneSuccess,
|
||||
Error
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using ContosoClinic.Models;
|
||||
|
||||
namespace ContosoClinic.Controllers
|
||||
{
|
||||
public class PatientsController : Controller
|
||||
{
|
||||
private ApplicationDbContext db = new ApplicationDbContext();
|
||||
|
||||
// GET: Patients
|
||||
public ActionResult Index(string searchString, int? maxAgeString)
|
||||
{
|
||||
var patients = from p in db.Patients
|
||||
select p;
|
||||
if (!String.IsNullOrEmpty(searchString))
|
||||
{
|
||||
patients = patients.Where(s => s.FirstName.Contains(searchString)
|
||||
|| s.LastName.Contains(searchString)
|
||||
|| s.SSN.Contains(searchString));
|
||||
}
|
||||
if (maxAgeString != null)
|
||||
{
|
||||
int maxAge = maxAgeString.Value;
|
||||
DateTime minBirthDate = DateTime.Now.AddYears(-1 * maxAge);
|
||||
patients = patients.Where(s => s.BirthDate >= minBirthDate);
|
||||
}
|
||||
return View(patients.ToList());
|
||||
}
|
||||
|
||||
// GET: Patients/Details/5
|
||||
public ActionResult Details(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
|
||||
}
|
||||
Patient patient = db.Patients.Find(id);
|
||||
if (patient == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
return View(patient);
|
||||
}
|
||||
|
||||
// GET: Patients/Create
|
||||
public ActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: Patients/Create
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public ActionResult Create([Bind(Include = "PatientID,SSN,FirstName,LastName,MiddleName,StreetAddress,City,ZipCode,State,BirthDate")] Patient patient)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
db.Patients.Add(patient);
|
||||
db.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
||||
return View(patient);
|
||||
}
|
||||
|
||||
// GET: Patients/Edit/5
|
||||
public ActionResult Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
|
||||
}
|
||||
Patient patient = db.Patients.Find(id);
|
||||
if (patient == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
return View(patient);
|
||||
}
|
||||
|
||||
// POST: Patients/Edit/5
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public ActionResult Edit([Bind(Include = "PatientID,SSN,FirstName,LastName,MiddleName,StreetAddress,City,ZipCode,State,BirthDate")] Patient patient)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
db.Entry(patient).State = EntityState.Modified;
|
||||
db.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
return View(patient);
|
||||
}
|
||||
|
||||
// GET: Patients/Delete/5
|
||||
public ActionResult Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
|
||||
}
|
||||
Patient patient = db.Patients.Find(id);
|
||||
if (patient == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
return View(patient);
|
||||
}
|
||||
|
||||
// POST: Patients/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public ActionResult DeleteConfirmed(int id)
|
||||
{
|
||||
Patient patient = db.Patients.Find(id);
|
||||
db.Patients.Remove(patient);
|
||||
db.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
db.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using ContosoClinic.Models;
|
||||
|
||||
namespace ContosoClinic.Controllers
|
||||
{
|
||||
public class VisitsController : Controller
|
||||
{
|
||||
private ApplicationDbContext db = new ApplicationDbContext();
|
||||
|
||||
// GET: Visits
|
||||
public ActionResult Index()
|
||||
{
|
||||
var visits = db.Visits.Include(v => v.Patient);
|
||||
return View(visits.ToList());
|
||||
}
|
||||
|
||||
// GET: Visits/Details/5
|
||||
public ActionResult Details(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
|
||||
}
|
||||
Visit visit = db.Visits.Find(id);
|
||||
if (visit == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
return View(visit);
|
||||
}
|
||||
|
||||
// GET: Visits/Create
|
||||
public ActionResult Create()
|
||||
{
|
||||
ViewBag.PatientID = new SelectList(db.Patients, "PatientID", "SSN");
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: Visits/Create
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public ActionResult Create([Bind(Include = "VisitID,PatientID,Date,Reason,Treatment,FollowUpDate")] Visit visit)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
db.Visits.Add(visit);
|
||||
db.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
||||
ViewBag.PatientID = new SelectList(db.Patients, "PatientID", "SSN", visit.PatientID);
|
||||
return View(visit);
|
||||
}
|
||||
|
||||
// GET: Visits/Edit/5
|
||||
public ActionResult Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
|
||||
}
|
||||
Visit visit = db.Visits.Find(id);
|
||||
if (visit == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
ViewBag.PatientID = new SelectList(db.Patients, "PatientID", "SSN", visit.PatientID);
|
||||
return View(visit);
|
||||
}
|
||||
|
||||
// POST: Visits/Edit/5
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public ActionResult Edit([Bind(Include = "VisitID,PatientID,Date,Reason,Treatment,FollowUpDate")] Visit visit)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
db.Entry(visit).State = EntityState.Modified;
|
||||
db.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
ViewBag.PatientID = new SelectList(db.Patients, "PatientID", "SSN", visit.PatientID);
|
||||
return View(visit);
|
||||
}
|
||||
|
||||
// GET: Visits/Delete/5
|
||||
public ActionResult Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
|
||||
}
|
||||
Visit visit = db.Visits.Find(id);
|
||||
if (visit == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
return View(visit);
|
||||
}
|
||||
|
||||
// POST: Visits/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public ActionResult DeleteConfirmed(int id)
|
||||
{
|
||||
Visit visit = db.Visits.Find(id);
|
||||
db.Visits.Remove(visit);
|
||||
db.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
db.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<%@ Application Codebehind="Global.asax.cs" Inherits="ContosoClinic.MvcApplication" Language="C#" %>
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Optimization;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace ContosoClinic
|
||||
{
|
||||
public class MvcApplication : System.Web.HttpApplication
|
||||
{
|
||||
protected void Application_Start()
|
||||
{
|
||||
AreaRegistration.RegisterAllAreas();
|
||||
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
|
||||
RouteConfig.RegisterRoutes(RouteTable.Routes);
|
||||
BundleConfig.RegisterBundles(BundleTable.Bundles);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// <auto-generated />
|
||||
namespace ContosoClinic.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
|
||||
public sealed partial class Initial : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(Initial));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201602170540262_Initial"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
namespace ContosoClinic.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class Initial : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
CreateTable(
|
||||
"dbo.Patients",
|
||||
c => new
|
||||
{
|
||||
PatientID = c.Int(nullable: false, identity: true),
|
||||
SSN = c.String(maxLength: 11, fixedLength: true, unicode: false),
|
||||
FirstName = c.String(maxLength: 50),
|
||||
LastName = c.String(maxLength: 50),
|
||||
MiddleName = c.String(maxLength: 50),
|
||||
StreetAddress = c.String(maxLength: 50),
|
||||
City = c.String(maxLength: 50),
|
||||
ZipCode = c.String(maxLength: 5, fixedLength: true, unicode: false),
|
||||
State = c.String(maxLength: 2, fixedLength: true, unicode: false),
|
||||
BirthDate = c.DateTime(nullable: false, storeType: "date"),
|
||||
})
|
||||
.PrimaryKey(t => t.PatientID);
|
||||
|
||||
CreateTable(
|
||||
"dbo.AspNetRoles",
|
||||
c => new
|
||||
{
|
||||
Id = c.String(nullable: false, maxLength: 128),
|
||||
Name = c.String(nullable: false, maxLength: 256),
|
||||
})
|
||||
.PrimaryKey(t => t.Id)
|
||||
.Index(t => t.Name, unique: true, name: "RoleNameIndex");
|
||||
|
||||
CreateTable(
|
||||
"dbo.AspNetUserRoles",
|
||||
c => new
|
||||
{
|
||||
UserId = c.String(nullable: false, maxLength: 128),
|
||||
RoleId = c.String(nullable: false, maxLength: 128),
|
||||
})
|
||||
.PrimaryKey(t => new { t.UserId, t.RoleId })
|
||||
.ForeignKey("dbo.AspNetRoles", t => t.RoleId, cascadeDelete: true)
|
||||
.ForeignKey("dbo.AspNetUsers", t => t.UserId, cascadeDelete: true)
|
||||
.Index(t => t.UserId)
|
||||
.Index(t => t.RoleId);
|
||||
|
||||
CreateTable(
|
||||
"dbo.AspNetUsers",
|
||||
c => new
|
||||
{
|
||||
Id = c.String(nullable: false, maxLength: 128),
|
||||
Email = c.String(maxLength: 256),
|
||||
EmailConfirmed = c.Boolean(nullable: false),
|
||||
PasswordHash = c.String(),
|
||||
SecurityStamp = c.String(),
|
||||
PhoneNumber = c.String(),
|
||||
PhoneNumberConfirmed = c.Boolean(nullable: false),
|
||||
TwoFactorEnabled = c.Boolean(nullable: false),
|
||||
LockoutEndDateUtc = c.DateTime(),
|
||||
LockoutEnabled = c.Boolean(nullable: false),
|
||||
AccessFailedCount = c.Int(nullable: false),
|
||||
UserName = c.String(nullable: false, maxLength: 256),
|
||||
})
|
||||
.PrimaryKey(t => t.Id)
|
||||
.Index(t => t.UserName, unique: true, name: "UserNameIndex");
|
||||
|
||||
CreateTable(
|
||||
"dbo.AspNetUserClaims",
|
||||
c => new
|
||||
{
|
||||
Id = c.Int(nullable: false, identity: true),
|
||||
UserId = c.String(nullable: false, maxLength: 128),
|
||||
ClaimType = c.String(),
|
||||
ClaimValue = c.String(),
|
||||
})
|
||||
.PrimaryKey(t => t.Id)
|
||||
.ForeignKey("dbo.AspNetUsers", t => t.UserId, cascadeDelete: true)
|
||||
.Index(t => t.UserId);
|
||||
|
||||
CreateTable(
|
||||
"dbo.AspNetUserLogins",
|
||||
c => new
|
||||
{
|
||||
LoginProvider = c.String(nullable: false, maxLength: 128),
|
||||
ProviderKey = c.String(nullable: false, maxLength: 128),
|
||||
UserId = c.String(nullable: false, maxLength: 128),
|
||||
})
|
||||
.PrimaryKey(t => new { t.LoginProvider, t.ProviderKey, t.UserId })
|
||||
.ForeignKey("dbo.AspNetUsers", t => t.UserId, cascadeDelete: true)
|
||||
.Index(t => t.UserId);
|
||||
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropForeignKey("dbo.AspNetUserRoles", "UserId", "dbo.AspNetUsers");
|
||||
DropForeignKey("dbo.AspNetUserLogins", "UserId", "dbo.AspNetUsers");
|
||||
DropForeignKey("dbo.AspNetUserClaims", "UserId", "dbo.AspNetUsers");
|
||||
DropForeignKey("dbo.AspNetUserRoles", "RoleId", "dbo.AspNetRoles");
|
||||
DropIndex("dbo.AspNetUserLogins", new[] { "UserId" });
|
||||
DropIndex("dbo.AspNetUserClaims", new[] { "UserId" });
|
||||
DropIndex("dbo.AspNetUsers", "UserNameIndex");
|
||||
DropIndex("dbo.AspNetUserRoles", new[] { "RoleId" });
|
||||
DropIndex("dbo.AspNetUserRoles", new[] { "UserId" });
|
||||
DropIndex("dbo.AspNetRoles", "RoleNameIndex");
|
||||
DropTable("dbo.AspNetUserLogins");
|
||||
DropTable("dbo.AspNetUserClaims");
|
||||
DropTable("dbo.AspNetUsers");
|
||||
DropTable("dbo.AspNetUserRoles");
|
||||
DropTable("dbo.AspNetRoles");
|
||||
DropTable("dbo.Patients");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Target" xml:space="preserve">
|
||||
<value>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</value>
|
||||
</data>
|
||||
<data name="DefaultSchema" xml:space="preserve">
|
||||
<value>dbo</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,29 @@
|
||||
// <auto-generated />
|
||||
namespace ContosoClinic.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
|
||||
public sealed partial class Visits : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(Visits));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201602170605457_Visits"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
namespace ContosoClinic.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class Visits : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
CreateTable(
|
||||
"dbo.Visits",
|
||||
c => new
|
||||
{
|
||||
VisitID = c.Int(nullable: false, identity: true),
|
||||
PatientID = c.Int(nullable: false),
|
||||
Date = c.DateTime(nullable: false, storeType: "date"),
|
||||
Reason = c.String(maxLength: 4000),
|
||||
Treatment = c.String(maxLength: 4000),
|
||||
FollowUpDate = c.DateTime(storeType: "date"),
|
||||
})
|
||||
.PrimaryKey(t => t.VisitID)
|
||||
.ForeignKey("dbo.Patients", t => t.PatientID, cascadeDelete: true)
|
||||
.Index(t => t.PatientID);
|
||||
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropForeignKey("dbo.Visits", "PatientID", "dbo.Patients");
|
||||
DropIndex("dbo.Visits", new[] { "PatientID" });
|
||||
DropTable("dbo.Visits");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Target" xml:space="preserve">
|
||||
<value>H4sIAAAAAAAEAN1dW2/juBV+L9D/IOipLbJ2LjuDaWDvIuNMtkFzQ5wMir4EtEQ7wujilahMgqK/bB/2J/UvlJQoiVdJlGXZWcyLw8t3Dg/PIQ+PeDj/++33yc+vgW+9wDjxonBqH40ObQuGTuR64Wpqp2j5wyf755/+/KfJFzd4tb4W7U5IO9wzTKb2M0Lr0/E4cZ5hAJJR4DlxlERLNHKiYAzcaHx8ePj38dHRGGIIG2NZ1uQ+DZEXwOwP/OcsCh24RinwryMX+gktxzXzDNW6AQFM1sCBUxu3RRh/5nuh54zy9rZ15nsA8zKH/tK2QBhGCCDM6eljAucojsLVfI0LgP/wtoa43RL4CaQjOK2atx3M4TEZzLjqWEA5aYKiwBDw6IRKZyx27yRju5Qelt8XLGf0RkadyXBq32FgGCLbEmmdzvyYtFNLeET7HVhc7UGpElhzyD9cn/oojeE0hCmKgX9g3aUL33P+Cd8eom8wnIap77MsYiZxHVeAi+7iaA1j9HYPlzzjl+e2Nea7j8X+ZW+5az7CyxCdHNvWDWYFLHxY6gMjjTmKYvgLDGEMEHQxAoIxns5LF2YSlZgQSM7nNwUxrH/YmGzrGrxewXCFnrGZHdnWhfcK3aKA0n/EIsXintooTmETiQsvThD5WUPow2EPhK7AMHSuPdf14RCUMC6E6Mx1Y5gk2yY2y9RluzT+7a1nuHEdmV7Ehm2hhsZxDzQ+ezF6PmfokN8PHtEJyVwFpBvw4q0y6xUwv3qJh/A830M/q06evXW+V4yyqqdyUbyIo+A+8os+RcXTA4hXENc/RKraeZTGjsDPZFwtvbULcgZlvBxnvXa3GGfkuyzFZcehFuLWa389TDeNFEDuIUjIpq41oB8PD/tYDR5iCFCQKfS2SV1Evh99f1yr5dPWQEv7626hhQ2qLbSw304WWqgaAa4z1OvSKztL1jcQjYqOoxzyIsZw36P424hFPLBa96sM/LitgZ8cLZYnnz58BO7Jxx/hyYcuxn7pmts56aN3f44/tVI9Q/Nq8ByOP3zshapWi/FZI1bvMux8P9FmlSLLtZI2K5r0otIEqn+1LlD3X7UJp7J6K5uSAXWxhILE0NZQ8Ltduq017my9xpOXqRaRiLHDI/TfnevzXlbDLwHw/B6WwxZU8FQsvTiA5Sg/R1j5QGjM8x1IErwauP8AyXMN6/hnH6cZ6KQxVlJ8qgnWW6d29xyF8CYNFkT3h6PV29Q8fI8ugIN98S8h6bUx3lXkfItS9CV0ibv4iJxG71EH0As7Z44Dk+QCKzN0Z1Fauc7djgtkidq1OzLzgReo/RFhMX0qmlY+ibqF5Jdomql8kzpWr6KVF7ZjtWiqZzVv0cgqbWbKKgFrxyltqWc0a9DIZ96qN28vm6H+3b0Mdv/9vc027+1HK3blLGbTR4hufW/KKH0Ffto3qU7WkC0C/VtDBrv/1pCxiYtfPJd4JS0OQUVjDN+qvfp81WxzAmdDmwM3zKGJD7MG6MzlLEkix8usgA3ZlgE4nnXsvlm10bh8DGUcD48D67VHdjhMe2r/TRKGDrGMwFeIZUyQxzyyRb28Dc+hDxG0zpz8o+wMJA5w5ZnAMnH5EqzKMCZGC8gpJ8Gm6IVI1nsvdLw18Os4FzqZfeMkvJVUxJpzuIYhWVnqpmJj8iUVQWRNEpqMGZWq1zRFmEynHHUxs0pD+MjtFtWkljGF6srxtya76KSIeim1UQdlYKy9Guol0Ya4Otw2kCJqzke6OW86LFXzLkXBBtHJhlOaRi/pSWErilkvsQGUs14kbRjQho53oaD0VNxWAcQj8r4pqHA21ygodd4HUVBeYjtQUF4k705B82BI2/kXIiP7pp58SGb4bb1WXDvQTU4ee6aa+SmHfCzCPWAsq+f5glTCV9UdHMwnjQQk9FAlqggBn0PEO9CJbVWHK/GwIp13eIjirpIEQM9PDd1p0FHqzXvCDSCiGtcBVqreAEo/e0tAkkkbMFfErWu5o36MAWwRY66FpbuPAMtooTCn1RUWpo3yjotoFE2H7HIolfZIhtV0rGYwKiUWl0h+cC0Grrr3II++6djX9uDHjIFqbY0Yas5pDI7CEjYWiu7jiyyYNscQk4MIMzA6GTUCajg0aIRUDKZ3KRU22SwllS9s4g1vJCXBc9VIqRhM71KiOtosJIU/ZuCRbSQi3nvqydiKcGa50Zd1k3GeQ0ILJmNNssnkGqzXXrhikk9oiTWnmSc/zM0TMoIcY+xw0hbdkpISimKwgkItuRLjwuy+/zlAYAFIMHfmBlIzpVuj2fcKkoLnIs9jsQcWHchv+i2nJlFE4QdSgAs8QnI5NRsslDceuadF8oCAD2L93d5Z5KdB2BjG1GNlCRssSlbQvj+TjcGiMMXtsaqECxaqKm2PxKZUsFhsuYGM+LQJTlp8VXvMPDuChZopvpPWIZS5DyxIWWgyuuwOMz+qrKg9BpO9wOIwxTLWZCwYhnQokmxQOrryNt3K4qmruLG95+cSc2vX9NNJtkwcYOWqSUOow+lzzZAnWjfHOoQiI4DFKMraozD3/VkgpthgHeMu9HNLGVezN3qs82QM1Zg7IJtrc313nbBJDIQVsSomou8tL+u6BX1HUyM7dL1NUxl26D5VegidwIuwFStyXShLj1J82eJsXvO1a2dTpzuGG06XGNwxn61GhO3YFr09zQLQIkMM5gKuBMbUmWxg7B1pfg9jawwcH/4iNOcA8VUGXLLXnTkm2YpOeBqJqlsYbKLSBWduL5VqDdx5+aoz59fL1R2wFTyLde1RFbehWWBFdXvs6mq0uIzu8e6ljbxtsH3lcenN9i8NxnbWxH62P+aqKXfqq4oNsehlUgmMlu+lPmljlBvoU/5BYjN90mDoVx/umia/+NTeLdVjcncvuQW+7u6pHs9Ma7eqG1KQUmxSUi+DlUJQckIDhG2eyREihnkT2yrEiDf3twTBYEQajOa/+lizsrNi0eAahN4SJii/b2wfHx4dC+/s7M+bN+MkcX1FgFXx8A0/XYM/PeMRETdmCRheGWZem3GeQSy9NVPBdXpYJnwBsYRL3i0xwxXfkekJVn42pidg5SsxPWGzj8L0BCm8ASMjmo+fedRBgjs2hZNednGz3/2kFyuiicO+ZLIVu1avHtI1lcvQha9T+z9Zr1Pr8l9PZccD6zbGa/mpdWj9d6NHT1pMlgzAP3ii1PP8HRIzTZLeN+kNWfWciTjyHlKP5LDTEOlrSillySQbPLRRgTapJRk0+ZUVH1iXyWPo/ZriigcsUKKdYnJsPytDfbhvT5+JaC9VbOx5V97SN5xh/vEII27yrhtw0/lJifdrUNxbDUpUwSC6P82wIJcIe3iWoeDyLwF4/auxZ6F6emEjRMXzCn3h9SJC3fMJXbC0TyeQnQoJD5O1csyVTyl0YU37jELmuGz4iEL7ZajoucOtRhGZG2JJ2oobul97k5SrvpGhy/noBnAb5Jx30Ix3lq7d2+6oyMbuDXuXqt13CnZ5wXzgHGnhbnmXrO9OaTD6m4Zbzaz+I6dS70v2dJVVstuk6SHzpGuutPyh0qP3IKFPkR60+yTooXVN9/15zzNJzVKd90zZaNLY7hOah1Y23cfpPVc2o7TlPdO1Xe2fO9a01lvozpOQ5aQecVqV2cV1ycX5R/6p7S4iPPX5yUObzyniU19dQqflKmx1vqk2uTbXOokAX62ik7+fpk4K0xGr1FxLsGqiJ6rPRhMJSyYv0ZVa1JM1Gyt1VWoHS9vUk9XkcNbRpjtXLW3app62JjNyu2nVgmFxyWiNqdRy/vX+J04r0y5VWfwNm4vmFpnyPYB9TpTmRtLwIEHTQaL2puZ7yovuRSjcwqC5bvh+0qB7EUmfpmOQ9izfHMQODfPf8GGnKvFWFQT5T/lC6HCuTNnmMlxGhUclcFQ0EW9pQQRc7OecxchbAgfhavKpKHvbMgu/kw+WC+hehrcpWqcIDxkGC5+LWxPPrI5+ltvN8zy5XZO/kj6GgNn0yCe22/Bz6vluyfeFIrSrgSAuH/0wQ+YSkQ80q7cS6SYKWwJR8ZWe6gMM1j4GS27DOXiBXXjD6ncFV8B5qwL5OpDmieDFPjn3wCoGQUIxqv74T6zDbvD60/8BO8pplo1yAAA=</value>
|
||||
</data>
|
||||
<data name="DefaultSchema" xml:space="preserve">
|
||||
<value>dbo</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,29 @@
|
||||
// <auto-generated />
|
||||
namespace ContosoClinic.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
|
||||
public sealed partial class Nullability : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(Nullability));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201602170720063_Nullability"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
namespace ContosoClinic.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class Nullability : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
AlterColumn("dbo.Patients", "SSN", c => c.String(nullable: false, maxLength: 11, fixedLength: true, unicode: false));
|
||||
AlterColumn("dbo.Patients", "LastName", c => c.String(nullable: false, maxLength: 50));
|
||||
AlterColumn("dbo.Patients", "StreetAddress", c => c.String(nullable: false, maxLength: 50));
|
||||
AlterColumn("dbo.Patients", "City", c => c.String(nullable: false, maxLength: 50));
|
||||
AlterColumn("dbo.Patients", "ZipCode", c => c.String(nullable: false, maxLength: 5, fixedLength: true, unicode: false));
|
||||
AlterColumn("dbo.Patients", "State", c => c.String(nullable: false, maxLength: 2, fixedLength: true, unicode: false));
|
||||
AlterColumn("dbo.Visits", "Reason", c => c.String(nullable: false, maxLength: 4000));
|
||||
AlterColumn("dbo.Visits", "Treatment", c => c.String(nullable: false, maxLength: 4000));
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
AlterColumn("dbo.Visits", "Treatment", c => c.String(maxLength: 4000));
|
||||
AlterColumn("dbo.Visits", "Reason", c => c.String(maxLength: 4000));
|
||||
AlterColumn("dbo.Patients", "State", c => c.String(maxLength: 2, fixedLength: true, unicode: false));
|
||||
AlterColumn("dbo.Patients", "ZipCode", c => c.String(maxLength: 5, fixedLength: true, unicode: false));
|
||||
AlterColumn("dbo.Patients", "City", c => c.String(maxLength: 50));
|
||||
AlterColumn("dbo.Patients", "StreetAddress", c => c.String(maxLength: 50));
|
||||
AlterColumn("dbo.Patients", "LastName", c => c.String(maxLength: 50));
|
||||
AlterColumn("dbo.Patients", "SSN", c => c.String(maxLength: 11, fixedLength: true, unicode: false));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Target" xml:space="preserve">
|
||||
<value>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</value>
|
||||
</data>
|
||||
<data name="DefaultSchema" xml:space="preserve">
|
||||
<value>dbo</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,29 @@
|
||||
// <auto-generated />
|
||||
namespace ContosoClinic.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
|
||||
public sealed partial class Assignments : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(Assignments));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201602170857179_Assignments"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
namespace ContosoClinic.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class Assignments : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
CreateTable(
|
||||
"dbo.ApplicationUserPatients",
|
||||
c => new
|
||||
{
|
||||
ApplicationUser_Id = c.String(nullable: false, maxLength: 128),
|
||||
Patient_PatientID = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => new { t.ApplicationUser_Id, t.Patient_PatientID })
|
||||
.ForeignKey("dbo.AspNetUsers", t => t.ApplicationUser_Id, cascadeDelete: true)
|
||||
.ForeignKey("dbo.Patients", t => t.Patient_PatientID, cascadeDelete: true)
|
||||
.Index(t => t.ApplicationUser_Id)
|
||||
.Index(t => t.Patient_PatientID);
|
||||
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropForeignKey("dbo.ApplicationUserPatients", "Patient_PatientID", "dbo.Patients");
|
||||
DropForeignKey("dbo.ApplicationUserPatients", "ApplicationUser_Id", "dbo.AspNetUsers");
|
||||
DropIndex("dbo.ApplicationUserPatients", new[] { "Patient_PatientID" });
|
||||
DropIndex("dbo.ApplicationUserPatients", new[] { "ApplicationUser_Id" });
|
||||
DropTable("dbo.ApplicationUserPatients");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Target" xml:space="preserve">
|
||||
<value>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</value>
|
||||
</data>
|
||||
<data name="DefaultSchema" xml:space="preserve">
|
||||
<value>dbo</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,351 @@
|
||||
namespace ContosoClinic.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Linq;
|
||||
using ContosoClinic.Models;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
using System.Collections.Generic;
|
||||
|
||||
internal sealed class Configuration : DbMigrationsConfiguration<ContosoClinic.Models.ApplicationDbContext>
|
||||
{
|
||||
public Configuration()
|
||||
{
|
||||
AutomaticMigrationsEnabled = false;
|
||||
}
|
||||
|
||||
protected override void Seed(ContosoClinic.Models.ApplicationDbContext context)
|
||||
{/*
|
||||
// Create test userts
|
||||
var manager = new UserManager<ApplicationUser>(
|
||||
new UserStore<ApplicationUser>(
|
||||
new ApplicationDbContext()));
|
||||
|
||||
var password = "Password!1";
|
||||
var user1 = new ApplicationUser()
|
||||
{
|
||||
UserName = string.Format("rachel@contoso.com"),
|
||||
//Patients = (from p in context.Patients where p.LastName.StartsWith("A") select p).ToList()
|
||||
};
|
||||
|
||||
manager.Create(user1, string.Format(password));
|
||||
var user2 = new ApplicationUser()
|
||||
{
|
||||
UserName = string.Format("alice@contoso.com"),
|
||||
//Patients = (from p in context.Patients where p.LastName.StartsWith("B") select p).ToList()
|
||||
};
|
||||
manager.Create(user2, string.Format(password));
|
||||
context.SaveChanges();*/
|
||||
// Create patients
|
||||
context.Patients.AddOrUpdate(p => p.SSN,
|
||||
new Patient { SSN = "795-73-9838", FirstName = "Catherine", LastName = "Abel", MiddleName = "R.", StreetAddress = "57251 Serene Blvd", City = "Van Nuys", ZipCode = "91411", State = "CA", BirthDate = new System.DateTime(1996, 9, 10) },
|
||||
new Patient { SSN = "990-00-6818", FirstName = "Kim", LastName = "Abercrombie", MiddleName = "", StreetAddress = "Tanger Factory", City = "Branch", ZipCode = "55056", State = "MN", BirthDate = new System.DateTime(1967, 6, 5) },
|
||||
new Patient { SSN = "009-37-3952", FirstName = "Frances", LastName = "Adams", MiddleName = "B.", StreetAddress = "6900 Sisk Road", City = "Modesto", ZipCode = "95354", State = "CA", BirthDate = new System.DateTime(2005, 12, 26) },
|
||||
new Patient { SSN = "708-44-3627", FirstName = "Jay", LastName = "Adams", MiddleName = "", StreetAddress = "Blue Ridge Mall", City = "Kansas City", ZipCode = "64106", State = "MS", BirthDate = new System.DateTime(2011, 12, 28) },
|
||||
new Patient { SSN = "447-62-6279", FirstName = "Robert", LastName = "Ahlering", MiddleName = "E.", StreetAddress = "6500 East Grant Road", City = "Tucson", ZipCode = "85701", State = "AZ", BirthDate = new System.DateTime(1953, 12, 1) },
|
||||
new Patient { SSN = "872-78-4732", FirstName = "Stanley", LastName = "Alan", MiddleName = "A.", StreetAddress = "567 Sw Mcloughlin Blvd", City = "Milwaukie", ZipCode = "97222", State = "OR", BirthDate = new System.DateTime(1967, 9, 15) },
|
||||
new Patient { SSN = "898-79-8701", FirstName = "Paul", LastName = "Alcorn", MiddleName = "L.", StreetAddress = "White Mountain Mall", City = "Rock Springs", ZipCode = "82901", State = "WY", BirthDate = new System.DateTime(2010, 3, 23) },
|
||||
new Patient { SSN = "561-88-3757", FirstName = "Mary", LastName = "Alexander", MiddleName = "", StreetAddress = "2345 West Spencer Road", City = "Lynnwood", ZipCode = "98036", State = "WA", BirthDate = new System.DateTime(1985, 2, 20) },
|
||||
new Patient { SSN = "904-55-0991", FirstName = "Michelle", LastName = "Alexander", MiddleName = "", StreetAddress = "22589 West Craig Road", City = "North Las Vegas", ZipCode = "89030", State = "NV", BirthDate = new System.DateTime(2009, 3, 2) },
|
||||
new Patient { SSN = "293-95-6617", FirstName = "Marvin", LastName = "Allen", MiddleName = "N.", StreetAddress = "First Colony Mall", City = "Sugar Land", ZipCode = "77478", State = "TX", BirthDate = new System.DateTime(1962, 12, 26) },
|
||||
new Patient { SSN = "260-99-4784", FirstName = "Oscar", LastName = "Alpuerto", MiddleName = "L.", StreetAddress = "Rocky Mountain Pines Outlet", City = "Loveland", ZipCode = "80537", State = "CO", BirthDate = new System.DateTime(2000, 9, 19) },
|
||||
new Patient { SSN = "605-29-1370", FirstName = "Ramona", LastName = "Antrim", MiddleName = "J.", StreetAddress = "998 Forest Road", City = "Saginaw", ZipCode = "48601", State = "MI", BirthDate = new System.DateTime(1991, 11, 12) },
|
||||
new Patient { SSN = "731-35-9387", FirstName = "Thomas", LastName = "Armstrong", MiddleName = "B.", StreetAddress = "Fox Hills", City = "Culver City", ZipCode = "90232", State = "CA", BirthDate = new System.DateTime(1964, 11, 6) },
|
||||
new Patient { SSN = "854-76-1401", FirstName = "John", LastName = "Arthur", MiddleName = "", StreetAddress = "2345 North Freeway", City = "Houston", ZipCode = "77003", State = "TX", BirthDate = new System.DateTime(1987, 10, 12) },
|
||||
new Patient { SSN = "775-20-2697", FirstName = "Chris", LastName = "Ashton", MiddleName = "", StreetAddress = "70 N.W. Plaza", City = "Saint Ann", ZipCode = "63074", State = "MS", BirthDate = new System.DateTime(1991, 7, 22) },
|
||||
new Patient { SSN = "117-79-5230", FirstName = "Teresa", LastName = "Atkinson", MiddleName = "", StreetAddress = "The Citadel Commerce Plaza", City = "City Of Commerce", ZipCode = "90040", State = "CA", BirthDate = new System.DateTime(1969, 6, 16) },
|
||||
new Patient { SSN = "607-41-3750", FirstName = "Stephen", LastName = "Ayers", MiddleName = "M.", StreetAddress = "2533 Eureka Rd.", City = "Southgate", ZipCode = "48195", State = "MI", BirthDate = new System.DateTime(1977, 2, 5) },
|
||||
new Patient { SSN = "412-66-3694", FirstName = "James", LastName = "Bailey", MiddleName = "B.", StreetAddress = "Southgate Mall", City = "Missoula", ZipCode = "59801", State = "MT", BirthDate = new System.DateTime(1951, 9, 22) },
|
||||
new Patient { SSN = "775-63-2547", FirstName = "Douglas", LastName = "Baldwin", MiddleName = "A.", StreetAddress = "Horizon Outlet Center", City = "Holland", ZipCode = "49423", State = "MI", BirthDate = new System.DateTime(1956, 10, 21) },
|
||||
new Patient { SSN = "779-52-1722", FirstName = "Wayne", LastName = "Banack", MiddleName = "N.", StreetAddress = "48255 I-10 E. @ Eastpoint Blvd.", City = "Baytown", ZipCode = "77520", State = "TX", BirthDate = new System.DateTime(1997, 4, 4) },
|
||||
new Patient { SSN = "647-03-0271", FirstName = "Robert", LastName = "Barker", MiddleName = "L.", StreetAddress = "6789 Warren Road", City = "Westland", ZipCode = "48185", State = "MI", BirthDate = new System.DateTime(1991, 4, 26) },
|
||||
new Patient { SSN = "353-98-6954", FirstName = "John", LastName = "Beaver", MiddleName = "A.", StreetAddress = "1318 Lasalle Street", City = "Bothell", ZipCode = "98011", State = "WA", BirthDate = new System.DateTime(2010, 9, 3) },
|
||||
new Patient { SSN = "817-89-8819", FirstName = "John", LastName = "Beaver", MiddleName = "A.", StreetAddress = "99300 223rd Southeast", City = "Bothell", ZipCode = "98011", State = "WA", BirthDate = new System.DateTime(1999, 9, 10) },
|
||||
new Patient { SSN = "611-82-6762", FirstName = "Edna", LastName = "Benson", MiddleName = "J.", StreetAddress = "Po Box 8035996", City = "Dallas", ZipCode = "75201", State = "TX", BirthDate = new System.DateTime(1963, 3, 19) },
|
||||
new Patient { SSN = "665-55-5653", FirstName = "Payton", LastName = "Benson", MiddleName = "P.", StreetAddress = "997000 Telegraph Rd.", City = "Southfield", ZipCode = "48034", State = "MI", BirthDate = new System.DateTime(1952, 9, 16) },
|
||||
new Patient { SSN = "947-37-8651", FirstName = "Robert", LastName = "Bernacchi", MiddleName = "M.", StreetAddress = "25915 140th Ave Ne", City = "Bellevue", ZipCode = "98004", State = "WA", BirthDate = new System.DateTime(2000, 4, 9) },
|
||||
new Patient { SSN = "071-31-7824", FirstName = "Robert", LastName = "Bernacchi", MiddleName = "M.", StreetAddress = "2681 Eagle Peak", City = "Bellevue", ZipCode = "98004", State = "WA", BirthDate = new System.DateTime(1993, 3, 13) },
|
||||
new Patient { SSN = "610-55-3726", FirstName = "Matthias", LastName = "Berndt", MiddleName = "", StreetAddress = "Escondido", City = "Escondido", ZipCode = "92025", State = "CA", BirthDate = new System.DateTime(1974, 5, 15) },
|
||||
new Patient { SSN = "590-27-0856", FirstName = "Jimmy", LastName = "Bischoff", MiddleName = "", StreetAddress = "3065 Santa Margarita Parkway", City = "Trabuco Canyon", ZipCode = "92679", State = "CA", BirthDate = new System.DateTime(2015, 10, 26) },
|
||||
new Patient { SSN = "008-73-9012", FirstName = "Mae", LastName = "Black", MiddleName = "M.", StreetAddress = "Redford Plaza", City = "Redford", ZipCode = "48239", State = "MI", BirthDate = new System.DateTime(1997, 1, 3) },
|
||||
new Patient { SSN = "137-23-1723", FirstName = "Donald", LastName = "Blanton", MiddleName = "L.", StreetAddress = "Corporate Office", City = "El Segundo", ZipCode = "90245", State = "CA", BirthDate = new System.DateTime(2015, 5, 25) },
|
||||
new Patient { SSN = "969-53-6095", FirstName = "Michael", LastName = "Blythe", MiddleName = "Greg", StreetAddress = "9903 Highway 6 South", City = "Houston", ZipCode = "77003", State = "TX", BirthDate = new System.DateTime(1989, 3, 4) },
|
||||
new Patient { SSN = "222-42-8458", FirstName = "Gabriel", LastName = "Bockenkamp", MiddleName = "L.", StreetAddress = "67 Rainer Ave S", City = "Renton", ZipCode = "98055", State = "WA", BirthDate = new System.DateTime(1976, 6, 20) },
|
||||
new Patient { SSN = "163-08-2988", FirstName = "Luis", LastName = "Bonifaz", MiddleName = "", StreetAddress = "72502 Eastern Ave.", City = "Bell Gardens", ZipCode = "90201", State = "CA", BirthDate = new System.DateTime(2012, 5, 14) },
|
||||
new Patient { SSN = "898-11-0280", FirstName = "Cory", LastName = "Booth", MiddleName = "K.", StreetAddress = "Eastern Beltway Center", City = "Las Vegas", ZipCode = "89106", State = "NV", BirthDate = new System.DateTime(1974, 2, 5) },
|
||||
new Patient { SSN = "432-52-2738", FirstName = "Randall", LastName = "Boseman", MiddleName = "", StreetAddress = "2500 North Stemmons Freeway", City = "Dallas", ZipCode = "75201", State = "TX", BirthDate = new System.DateTime(1999, 5, 9) },
|
||||
new Patient { SSN = "018-29-9539", FirstName = "Cornelius", LastName = "Brandon", MiddleName = "L.", StreetAddress = "789 West Alameda", City = "Westminster", ZipCode = "80030", State = "CO", BirthDate = new System.DateTime(1976, 2, 6) },
|
||||
new Patient { SSN = "472-36-9060", FirstName = "Richard", LastName = "Bready", MiddleName = "", StreetAddress = "4251 First Avenue", City = "Seattle", ZipCode = "98104", State = "WA", BirthDate = new System.DateTime(1987, 11, 2) },
|
||||
new Patient { SSN = "566-87-9214", FirstName = "Ted", LastName = "Bremer", MiddleName = "", StreetAddress = "Bldg. 9n/99298", City = "Redmond", ZipCode = "98052", State = "WA", BirthDate = new System.DateTime(1996, 9, 12) },
|
||||
new Patient { SSN = "771-34-9714", FirstName = "Alan", LastName = "Brewer", MiddleName = "", StreetAddress = "4255 East Lies Road", City = "Carol Stream", ZipCode = "60188", State = "IL", BirthDate = new System.DateTime(1997, 7, 24) },
|
||||
new Patient { SSN = "413-73-7072", FirstName = "Walter", LastName = "Brian", MiddleName = "J.", StreetAddress = "25136 Jefferson Blvd.", City = "Culver City", ZipCode = "90232", State = "CA", BirthDate = new System.DateTime(1970, 7, 18) },
|
||||
new Patient { SSN = "497-65-6363", FirstName = "Christopher", LastName = "Bright", MiddleName = "M.", StreetAddress = "Washington Square", City = "Portland", ZipCode = "97205", State = "OR", BirthDate = new System.DateTime(1988, 12, 26) },
|
||||
new Patient { SSN = "450-26-2195", FirstName = "Willie", LastName = "Brooks", MiddleName = "P.", StreetAddress = "Holiday Village Mall", City = "Great Falls", ZipCode = "59401", State = "MT", BirthDate = new System.DateTime(2014, 4, 28) },
|
||||
new Patient { SSN = "052-78-7929", FirstName = "Jo", LastName = "Brown", MiddleName = "", StreetAddress = "250000 Eight Mile Road", City = "Detroit", ZipCode = "48226", State = "MI", BirthDate = new System.DateTime(1972, 8, 12) },
|
||||
new Patient { SSN = "087-92-6356", FirstName = "Robert", LastName = "Brown", MiddleName = "", StreetAddress = "250880 Baur Blvd", City = "Saint Louis", ZipCode = "63103", State = "MS", BirthDate = new System.DateTime(1980, 4, 8) },
|
||||
new Patient { SSN = "048-71-8953", FirstName = "Steven", LastName = "Brown", MiddleName = "B.", StreetAddress = "5500 Grossmont Center Drive", City = "La Mesa", ZipCode = "91941", State = "CA", BirthDate = new System.DateTime(1965, 12, 1) },
|
||||
new Patient { SSN = "488-68-6075", FirstName = "Mary", LastName = "Browning", MiddleName = "K.", StreetAddress = "Noah Lane", City = "Chicago", ZipCode = "60610", State = "IL", BirthDate = new System.DateTime(1998, 7, 11) },
|
||||
new Patient { SSN = "819-63-3780", FirstName = "Michael", LastName = "Brundage", MiddleName = "", StreetAddress = "22555 Paseo De Las Americas", City = "San Diego", ZipCode = "92102", State = "CA", BirthDate = new System.DateTime(1990, 6, 28) },
|
||||
new Patient { SSN = "599-61-7739", FirstName = "Shirley", LastName = "Bruner", MiddleName = "R.", StreetAddress = "4781 Highway 95", City = "Sandpoint", ZipCode = "83864", State = "ID", BirthDate = new System.DateTime(1975, 7, 2) },
|
||||
new Patient { SSN = "772-36-0661", FirstName = "June", LastName = "Brunner", MiddleName = "B.", StreetAddress = "678 Eastman Ave.", City = "Midland", ZipCode = "48640", State = "MI", BirthDate = new System.DateTime(1993, 7, 1) },
|
||||
new Patient { SSN = "990-78-3760", FirstName = "Megan", LastName = "Burke", MiddleName = "E.", StreetAddress = "Arcadia Crossing", City = "Phoenix", ZipCode = "85004", State = "AZ", BirthDate = new System.DateTime(2008, 6, 19) },
|
||||
new Patient { SSN = "103-38-5903", FirstName = "Karren", LastName = "Burkhardt", MiddleName = "K.", StreetAddress = "2502 Evergreen Ste E", City = "Everett", ZipCode = "98201", State = "WA", BirthDate = new System.DateTime(2001, 2, 27) },
|
||||
new Patient { SSN = "146-43-8832", FirstName = "Linda", LastName = "Burnett", MiddleName = "E.", StreetAddress = "2505 Gateway Drive", City = "North Sioux City", ZipCode = "57049", State = "SD", BirthDate = new System.DateTime(1965, 12, 11) },
|
||||
new Patient { SSN = "448-72-5948", FirstName = "Jared", LastName = "Bustamante", MiddleName = "L.", StreetAddress = "3307 Evergreen Blvd", City = "Washougal", ZipCode = "98671", State = "WA", BirthDate = new System.DateTime(1960, 9, 19) },
|
||||
new Patient { SSN = "254-13-4819", FirstName = "Barbara", LastName = "Calone", MiddleName = "J.", StreetAddress = "25306 Harvey Rd.", City = "College Station", ZipCode = "77840", State = "TX", BirthDate = new System.DateTime(1990, 8, 23) },
|
||||
new Patient { SSN = "666-45-9926", FirstName = "Lindsey", LastName = "Camacho", MiddleName = "R.", StreetAddress = "S Sound Ctr Suite 25300", City = "Lacey", ZipCode = "98503", State = "WA", BirthDate = new System.DateTime(1995, 1, 19) },
|
||||
new Patient { SSN = "260-46-2402", FirstName = "Frank", LastName = "Campbell", MiddleName = "", StreetAddress = "251340 E. South St.", City = "Cerritos", ZipCode = "90703", State = "CA", BirthDate = new System.DateTime(2006, 2, 18) },
|
||||
new Patient { SSN = "189-92-4702", FirstName = "Henry", LastName = "Campen", MiddleName = "L.", StreetAddress = "2507 Pacific Ave S", City = "Tacoma", ZipCode = "98403", State = "WA", BirthDate = new System.DateTime(1965, 8, 24) },
|
||||
new Patient { SSN = "718-12-8401", FirstName = "Chris", LastName = "Cannon", MiddleName = "", StreetAddress = "Lakewood Mall", City = "Lakewood", ZipCode = "90712", State = "CA", BirthDate = new System.DateTime(2006, 6, 9) },
|
||||
new Patient { SSN = "918-66-9747", FirstName = "Jane", LastName = "Carmichael", MiddleName = "N.", StreetAddress = "5967 W Las Positas Blvd", City = "Pleasanton", ZipCode = "94566", State = "CA", BirthDate = new System.DateTime(1977, 4, 26) },
|
||||
new Patient { SSN = "806-97-1958", FirstName = "Jovita", LastName = "Carmody", MiddleName = "A.", StreetAddress = "253950 N.E. 178th Place", City = "Woodinville", ZipCode = "98072", State = "WA", BirthDate = new System.DateTime(2012, 9, 22) },
|
||||
new Patient { SSN = "482-61-8230", FirstName = "Rob", LastName = "Caron", MiddleName = "", StreetAddress = "Ward Parkway Center", City = "Kansas City", ZipCode = "64106", State = "MS", BirthDate = new System.DateTime(1990, 5, 21) },
|
||||
new Patient { SSN = "897-39-6229", FirstName = "Andy", LastName = "Carothers", MiddleName = "", StreetAddress = "566 S. Main", City = "Cedar City", ZipCode = "84720", State = "UT", BirthDate = new System.DateTime(1969, 4, 7) },
|
||||
new Patient { SSN = "656-79-6279", FirstName = "Donna", LastName = "Carreras", MiddleName = "F.", StreetAddress = "12345 Sterling Avenue", City = "Irving", ZipCode = "75061", State = "TX", BirthDate = new System.DateTime(2008, 9, 16) },
|
||||
new Patient { SSN = "745-99-0161", FirstName = "Rosmarie", LastName = "Carroll", MiddleName = "J.", StreetAddress = "39933 Mission Oaks Blvd", City = "Camarillo", ZipCode = "93010", State = "CA", BirthDate = new System.DateTime(1994, 4, 6) },
|
||||
new Patient { SSN = "216-16-4120", FirstName = "Raul", LastName = "Casts", MiddleName = "E.", StreetAddress = "99040 California Avenue", City = "Sand City", ZipCode = "93955", State = "CA", BirthDate = new System.DateTime(1989, 7, 13) },
|
||||
new Patient { SSN = "102-56-5530", FirstName = "Matthew", LastName = "Cavallari", MiddleName = "J.", StreetAddress = "North 93270 Newport Highway", City = "Spokane", ZipCode = "99202", State = "WA", BirthDate = new System.DateTime(1952, 7, 26) },
|
||||
new Patient { SSN = "787-23-4125", FirstName = "Andrew", LastName = "Cencini", MiddleName = "", StreetAddress = "558 S 6th St", City = "Klamath Falls", ZipCode = "97601", State = "OR", BirthDate = new System.DateTime(1991, 1, 12) },
|
||||
new Patient { SSN = "424-55-1778", FirstName = "Stacey", LastName = "Cereghino", MiddleName = "M.", StreetAddress = "220 Mercy Drive", City = "Garland", ZipCode = "75040", State = "TX", BirthDate = new System.DateTime(1967, 6, 3) },
|
||||
new Patient { SSN = "572-19-0999", FirstName = "Forrest", LastName = "Chandler", MiddleName = "J.", StreetAddress = "The Quad @ WestView", City = "Whittier", ZipCode = "90605", State = "CA", BirthDate = new System.DateTime(2002, 11, 6) },
|
||||
new Patient { SSN = "745-81-6513", FirstName = "Lee", LastName = "Chapla", MiddleName = "J.", StreetAddress = "99433 S. Greenbay Rd.", City = "Racine", ZipCode = "53182", State = "WI", BirthDate = new System.DateTime(1991, 6, 12) },
|
||||
new Patient { SSN = "947-66-5585", FirstName = "Yao-Qiang", LastName = "Cheng", MiddleName = "", StreetAddress = "25 N State St", City = "Chicago", ZipCode = "60610", State = "IL", BirthDate = new System.DateTime(1954, 5, 1) },
|
||||
new Patient { SSN = "531-83-4784", FirstName = "Nicky", LastName = "Chesnut", MiddleName = "E.", StreetAddress = "9920 North Telegraph Rd.", City = "Pontiac", ZipCode = "48342", State = "MI", BirthDate = new System.DateTime(1966, 4, 22) },
|
||||
new Patient { SSN = "109-99-0299", FirstName = "Ruth", LastName = "Choin", MiddleName = "A.", StreetAddress = "7760 N. Pan Am Expwy", City = "San Antonio", ZipCode = "78204", State = "TX", BirthDate = new System.DateTime(1963, 7, 1) },
|
||||
new Patient { SSN = "483-85-6853", FirstName = "Anthony", LastName = "Chor", MiddleName = "", StreetAddress = "Riverside", City = "Sherman Oaks", ZipCode = "91403", State = "CA", BirthDate = new System.DateTime(2014, 7, 27) },
|
||||
new Patient { SSN = "567-39-1024", FirstName = "Pei", LastName = "Chow", MiddleName = "", StreetAddress = "4660 Rodeo Road", City = "Santa Fe", ZipCode = "87501", State = "NM", BirthDate = new System.DateTime(1979, 9, 11) },
|
||||
new Patient { SSN = "382-49-7387", FirstName = "Jill", LastName = "Christie", MiddleName = "J.", StreetAddress = "54254 Pacific Ave.", City = "Stockton", ZipCode = "95202", State = "CA", BirthDate = new System.DateTime(2001, 11, 20) },
|
||||
new Patient { SSN = "336-03-8102", FirstName = "Alice", LastName = "Clark", MiddleName = "", StreetAddress = "42500 W 76th St", City = "Chicago", ZipCode = "60610", State = "IL", BirthDate = new System.DateTime(1965, 12, 6) },
|
||||
new Patient { SSN = "994-22-9926", FirstName = "Connie", LastName = "Coffman", MiddleName = "L.", StreetAddress = "25269 Wood Dale Rd.", City = "Wood Dale", ZipCode = "60191", State = "IL", BirthDate = new System.DateTime(1993, 10, 2) },
|
||||
new Patient { SSN = "129-28-7723", FirstName = "John", LastName = "Colon", MiddleName = "L.", StreetAddress = "77 Beale Street", City = "San Francisco", ZipCode = "94109", State = "CA", BirthDate = new System.DateTime(1999, 6, 6) },
|
||||
new Patient { SSN = "347-44-2949", FirstName = "Scott", LastName = "Colvin", MiddleName = "A.", StreetAddress = "25550 Executive Dr", City = "Elgin", ZipCode = "60120", State = "IL", BirthDate = new System.DateTime(1976, 4, 23) },
|
||||
new Patient { SSN = "706-66-0382", FirstName = "Scott", LastName = "Cooper", MiddleName = "", StreetAddress = "Pavillion @ Redlands", City = "Redlands", ZipCode = "92373", State = "CA", BirthDate = new System.DateTime(1952, 12, 20) },
|
||||
new Patient { SSN = "500-63-2220", FirstName = "Eva", LastName = "Corets", MiddleName = "", StreetAddress = "2540 Dell Range Blvd", City = "Cheyenne", ZipCode = "82001", State = "WY", BirthDate = new System.DateTime(1991, 5, 16) },
|
||||
new Patient { SSN = "942-15-7859", FirstName = "Marlin", LastName = "Coriell", MiddleName = "M.", StreetAddress = "99800 Tittabawasee Rd.", City = "Saginaw", ZipCode = "48601", State = "MI", BirthDate = new System.DateTime(1983, 3, 16) },
|
||||
new Patient { SSN = "143-78-9971", FirstName = "Jack", LastName = "Creasey", MiddleName = "", StreetAddress = "Factory Merchants", City = "Barstow", ZipCode = "92311", State = "CA", BirthDate = new System.DateTime(2004, 5, 16) },
|
||||
new Patient { SSN = "372-18-7905", FirstName = "Grant", LastName = "Culbertson", MiddleName = "", StreetAddress = "399700 John R. Rd.", City = "Madison Heights", ZipCode = "48071", State = "MI", BirthDate = new System.DateTime(1984, 1, 28) },
|
||||
new Patient { SSN = "153-33-1155", FirstName = "Scott", LastName = "Culp", MiddleName = "", StreetAddress = "750 Lakeway Dr", City = "Bellingham", ZipCode = "98225", State = "WA", BirthDate = new System.DateTime(1987, 7, 8) },
|
||||
new Patient { SSN = "666-38-8849", FirstName = "Conor", LastName = "Cunningham", MiddleName = "", StreetAddress = "Sports Store At Park City", City = "Park City", ZipCode = "84098", State = "UT", BirthDate = new System.DateTime(1990, 8, 12) },
|
||||
new Patient { SSN = "790-69-5423", FirstName = "Megan", LastName = "Davis", MiddleName = "N.", StreetAddress = "48995 Evergreen Wy.", City = "Everett", ZipCode = "98201", State = "WA", BirthDate = new System.DateTime(1983, 10, 14) },
|
||||
new Patient { SSN = "105-16-8373", FirstName = "Alvaro", LastName = "De Matos Miranda Filho", MiddleName = "", StreetAddress = "Mountain Square", City = "Upland", ZipCode = "91786", State = "CA", BirthDate = new System.DateTime(1962, 4, 25) },
|
||||
new Patient { SSN = "989-18-3523", FirstName = "Aidan", LastName = "Delaney", MiddleName = "", StreetAddress = "Corporate Office", City = "Garland", ZipCode = "75040", State = "TX", BirthDate = new System.DateTime(1953, 3, 10) },
|
||||
new Patient { SSN = "771-07-7325", FirstName = "Stefan", LastName = "Delmarco", MiddleName = "", StreetAddress = "Incom Sports Center", City = "Ontario", ZipCode = "91764", State = "CA", BirthDate = new System.DateTime(1963, 3, 1) },
|
||||
new Patient { SSN = "545-83-9747", FirstName = "Prashanth", LastName = "Desai", MiddleName = "", StreetAddress = "Sapp Road West", City = "Round Rock", ZipCode = "78664", State = "TX", BirthDate = new System.DateTime(1974, 2, 12) },
|
||||
new Patient { SSN = "994-72-1605", FirstName = "Bev", LastName = "Desalvo", MiddleName = "L.", StreetAddress = "7009 Sw Hall Blvd.", City = "Tigard", ZipCode = "97223", State = "OR", BirthDate = new System.DateTime(1987, 6, 21) },
|
||||
new Patient { SSN = "558-23-5595", FirstName = "Brenda", LastName = "Diaz", MiddleName = "", StreetAddress = "2560 E. Newlands Dr", City = "Fernley", ZipCode = "89408", State = "NV", BirthDate = new System.DateTime(1983, 4, 2) },
|
||||
new Patient { SSN = "752-63-1338", FirstName = "Blaine", LastName = "Dockter", MiddleName = "", StreetAddress = "99000 S. Avalon Blvd. Suite 750", City = "Carson", ZipCode = "90746", State = "CA", BirthDate = new System.DateTime(1953, 11, 5) },
|
||||
new Patient { SSN = "825-10-8923", FirstName = "Cindy", LastName = "Dodd", MiddleName = "M.", StreetAddress = "994 Sw Cherry Park Rd", City = "Troutdale", ZipCode = "97060", State = "OR", BirthDate = new System.DateTime(2011, 9, 10) },
|
||||
new Patient { SSN = "368-69-8964", FirstName = "Patricia", LastName = "Doyle", MiddleName = "", StreetAddress = "225 South 314th Street", City = "Federal Way", ZipCode = "98003", State = "WA", BirthDate = new System.DateTime(1994, 3, 8) },
|
||||
new Patient { SSN = "597-44-1424", FirstName = "Gerald", LastName = "Drury", MiddleName = "M.", StreetAddress = "4635 S. Harrison Blvd.", City = "Ogden", ZipCode = "84401", State = "UT", BirthDate = new System.DateTime(1962, 5, 22) },
|
||||
new Patient { SSN = "957-28-1545", FirstName = "Bart", LastName = "Duncan", MiddleName = "", StreetAddress = "99295 S.e. Tualatin Valley_hwy.", City = "Hillsboro", ZipCode = "97123", State = "OR", BirthDate = new System.DateTime(1982, 10, 22) },
|
||||
new Patient { SSN = "187-17-8616", FirstName = "Maciej", LastName = "Dusza", MiddleName = "", StreetAddress = "2564 S. Redwood Rd.", City = "Riverton", ZipCode = "84065", State = "UT", BirthDate = new System.DateTime(1964, 3, 13) },
|
||||
new Patient { SSN = "194-76-9481", FirstName = "Carol", LastName = "Elliott", MiddleName = "B.", StreetAddress = "25220 Airline Road", City = "Corpus Christi", ZipCode = "78404", State = "TX", BirthDate = new System.DateTime(1963, 5, 28) },
|
||||
new Patient { SSN = "679-79-8165", FirstName = "Shannon", LastName = "Elliott", MiddleName = "P.", StreetAddress = "Factory Stores/tucson", City = "Tucson", ZipCode = "85701", State = "AZ", BirthDate = new System.DateTime(1989, 6, 27) },
|
||||
new Patient { SSN = "367-73-8845", FirstName = "John", LastName = "Emory", MiddleName = "", StreetAddress = "Medford", City = "Medford", ZipCode = "97504", State = "OR", BirthDate = new System.DateTime(1998, 10, 3) },
|
||||
new Patient { SSN = "814-03-3691", FirstName = "Gail", LastName = "Erickson", MiddleName = "", StreetAddress = "44025 W. Empire", City = "Denby", ZipCode = "57716", State = "SD", BirthDate = new System.DateTime(1963, 12, 13) },
|
||||
new Patient { SSN = "214-28-9968", FirstName = "Mark", LastName = "Erickson", MiddleName = "B", StreetAddress = "Factory Stores Of America", City = "Mesa", ZipCode = "85201", State = "AZ", BirthDate = new System.DateTime(1975, 3, 1) },
|
||||
new Patient { SSN = "913-55-6645", FirstName = "Ann", LastName = "Evans", MiddleName = "R.", StreetAddress = "Ring Plaza", City = "Norridge", ZipCode = "60706", State = "IL", BirthDate = new System.DateTime(1963, 3, 28) },
|
||||
new Patient { SSN = "763-33-5650", FirstName = "John", LastName = "Evans", MiddleName = "", StreetAddress = "7709 West Virginia Avenue", City = "Phoenix", ZipCode = "85004", State = "AZ", BirthDate = new System.DateTime(2009, 12, 1) },
|
||||
new Patient { SSN = "658-41-8532", FirstName = "Twanna", LastName = "Evans", MiddleName = "R.", StreetAddress = "Lewis County Mall", City = "Chehalis", ZipCode = "98532", State = "WA", BirthDate = new System.DateTime(1968, 11, 4) },
|
||||
new Patient { SSN = "943-41-6011", FirstName = "Carolyn", LastName = "Farino", MiddleName = "", StreetAddress = "3250 South Meridian", City = "Puyallup", ZipCode = "98371", State = "WA", BirthDate = new System.DateTime(1950, 2, 12) },
|
||||
new Patient { SSN = "691-30-8623", FirstName = "Geri", LastName = "Farrell", MiddleName = "P.", StreetAddress = "49925 Crestview Drive N.E.", City = "Rio Rancho", ZipCode = "87124", State = "NM", BirthDate = new System.DateTime(1962, 8, 11) },
|
||||
new Patient { SSN = "361-08-3217", FirstName = "François", LastName = "Ferrier", MiddleName = "", StreetAddress = "Eastridge Mall", City = "Casper", ZipCode = "82601", State = "WY", BirthDate = new System.DateTime(1957, 6, 14) },
|
||||
new Patient { SSN = "827-51-1487", FirstName = "Kathie", LastName = "Flood", MiddleName = "", StreetAddress = "705 SE Mall Parkway", City = "Everett", ZipCode = "98201", State = "WA", BirthDate = new System.DateTime(1978, 2, 8) },
|
||||
new Patient { SSN = "483-93-0057", FirstName = "John", LastName = "Ford", MiddleName = "", StreetAddress = "23025 S.W. Military Rd.", City = "San Antonio", ZipCode = "78204", State = "TX", BirthDate = new System.DateTime(1987, 9, 16) },
|
||||
new Patient { SSN = "738-37-1607", FirstName = "Garth", LastName = "Fort", MiddleName = "", StreetAddress = "3250 Baldwin Park Blvd", City = "Baldwin Park", ZipCode = "91706", State = "CA", BirthDate = new System.DateTime(1964, 11, 25) },
|
||||
new Patient { SSN = "822-59-9384", FirstName = "Dorothy", LastName = "Fox", MiddleName = "J.", StreetAddress = "Lakeline Mall", City = "Cedar Park", ZipCode = "78613", State = "TX", BirthDate = new System.DateTime(1966, 9, 9) },
|
||||
new Patient { SSN = "309-79-2521", FirstName = "Mihail", LastName = "Frintu", MiddleName = "", StreetAddress = "Bayshore Mall", City = "Eureka", ZipCode = "95501", State = "CA", BirthDate = new System.DateTime(2013, 6, 17) },
|
||||
new Patient { SSN = "814-32-0421", FirstName = "Paul", LastName = "Fulton", MiddleName = "J.", StreetAddress = "Horizon Outlet Center", City = "Monroe", ZipCode = "98272", State = "MI", BirthDate = new System.DateTime(1984, 6, 11) },
|
||||
new Patient { SSN = "076-35-8143", FirstName = "Michael", LastName = "Galos", MiddleName = "", StreetAddress = "West Park Plaza", City = "Irvine", ZipCode = "92614", State = "CA", BirthDate = new System.DateTime(2009, 12, 14) },
|
||||
new Patient { SSN = "620-03-4764", FirstName = "Jon", LastName = "Ganio", MiddleName = "", StreetAddress = "3900 S. 997th St.", City = "Milwaukee", ZipCode = "53202", State = "WI", BirthDate = new System.DateTime(1975, 3, 12) },
|
||||
new Patient { SSN = "769-76-3600", FirstName = "Dominic", LastName = "Gash", MiddleName = "P.", StreetAddress = "5420 West 22500 South", City = "Salt Lake City", ZipCode = "84101", State = "UT", BirthDate = new System.DateTime(1969, 3, 27) },
|
||||
new Patient { SSN = "160-92-3129", FirstName = "Janet", LastName = "Gates", MiddleName = "M.", StreetAddress = "165 North Main", City = "Austin", ZipCode = "78701", State = "TX", BirthDate = new System.DateTime(1980, 9, 2) },
|
||||
new Patient { SSN = "318-00-6667", FirstName = "Janet", LastName = "Gates", MiddleName = "M.", StreetAddress = "800 Interchange Blvd.", City = "Austin", ZipCode = "78701", State = "TX", BirthDate = new System.DateTime(1970, 2, 22) },
|
||||
new Patient { SSN = "982-77-3975", FirstName = "Orlando", LastName = "Gee", MiddleName = "N.", StreetAddress = "2251 Elliot Avenue", City = "Seattle", ZipCode = "98104", State = "WA", BirthDate = new System.DateTime(2008, 11, 11) },
|
||||
new Patient { SSN = "328-68-1544", FirstName = "Darren", LastName = "Gehring", MiddleName = "", StreetAddress = "509 Nafta Boulevard", City = "Laredo", ZipCode = "78040", State = "TX", BirthDate = new System.DateTime(1966, 12, 26) },
|
||||
new Patient { SSN = "053-51-9173", FirstName = "Jim", LastName = "Geist", MiddleName = "", StreetAddress = "35525-9th Street Sw", City = "Puyallup", ZipCode = "98371", State = "WA", BirthDate = new System.DateTime(2009, 1, 21) },
|
||||
new Patient { SSN = "840-05-6646", FirstName = "Guy", LastName = "Gilbert", MiddleName = "", StreetAddress = "Vista Marketplace", City = "Alhambra", ZipCode = "91801", State = "CA", BirthDate = new System.DateTime(1982, 11, 20) },
|
||||
new Patient { SSN = "446-11-2924", FirstName = "Janet", LastName = "Gilliat", MiddleName = "J.", StreetAddress = "9995 West Central Entrance", City = "Duluth", ZipCode = "55802", State = "MN", BirthDate = new System.DateTime(1984, 4, 14) },
|
||||
new Patient { SSN = "273-16-2522", FirstName = "Mary", LastName = "Gimmi", MiddleName = "M.", StreetAddress = "5525 South Hover Road", City = "Longmont", ZipCode = "80501", State = "CO", BirthDate = new System.DateTime(1966, 4, 15) },
|
||||
new Patient { SSN = "003-23-9305", FirstName = "Jeanie", LastName = "Glenn", MiddleName = "R.", StreetAddress = "9909 W. Ventura Boulevard", City = "Camarillo", ZipCode = "93010", State = "CA", BirthDate = new System.DateTime(1963, 4, 13) },
|
||||
new Patient { SSN = "878-44-1968", FirstName = "Scott", LastName = "Gode", MiddleName = "", StreetAddress = "2583 Se 272nd St", City = "Kent", ZipCode = "98031", State = "WA", BirthDate = new System.DateTime(1950, 11, 20) },
|
||||
new Patient { SSN = "910-05-4138", FirstName = "Mete", LastName = "Goktepe", MiddleName = "", StreetAddress = "Hanford Mall", City = "Hanford", ZipCode = "93230", State = "CA", BirthDate = new System.DateTime(1951, 11, 5) },
|
||||
new Patient { SSN = "912-33-3174", FirstName = "Abigail", LastName = "Gonzalez", MiddleName = "J.", StreetAddress = "99450 Highway 59 North", City = "Humble", ZipCode = "77338", State = "TX", BirthDate = new System.DateTime(2007, 3, 10) },
|
||||
new Patient { SSN = "058-26-3234", FirstName = "Michael", LastName = "Graff", MiddleName = "", StreetAddress = "9700 Sisk Road", City = "Modesto", ZipCode = "95354", State = "CA", BirthDate = new System.DateTime(2002, 10, 24) },
|
||||
new Patient { SSN = "687-28-3396", FirstName = "Douglas", LastName = "Groncki", MiddleName = "", StreetAddress = "70259 West Sunnyview Ave", City = "Visalia", ZipCode = "93291", State = "CA", BirthDate = new System.DateTime(1974, 5, 7) },
|
||||
new Patient { SSN = "496-75-4904", FirstName = "Brian", LastName = "Groth", MiddleName = "", StreetAddress = "Gateway", City = "Portland", ZipCode = "97205", State = "OR", BirthDate = new System.DateTime(2008, 6, 5) },
|
||||
new Patient { SSN = "071-00-8057", FirstName = "Erin", LastName = "Hagens", MiddleName = "M.", StreetAddress = "25001 Montague Expressway", City = "Milpitas", ZipCode = "95035", State = "CA", BirthDate = new System.DateTime(1969, 4, 12) },
|
||||
new Patient { SSN = "288-05-9705", FirstName = "Betty", LastName = "Haines", MiddleName = "M.", StreetAddress = "640 South 994th St. W.", City = "Billings", ZipCode = "59101", State = "MT", BirthDate = new System.DateTime(1998, 10, 4) },
|
||||
new Patient { SSN = "002-47-6040", FirstName = "Jean", LastName = "Handley", MiddleName = "P.", StreetAddress = "259826 Russell Rd. South", City = "Kent", ZipCode = "98031", State = "WA", BirthDate = new System.DateTime(1993, 8, 4) },
|
||||
new Patient { SSN = "936-84-1664", FirstName = "Kerim", LastName = "Hanif", MiddleName = "", StreetAddress = "60025 Bollinger Canyon Road", City = "San Ramon", ZipCode = "94583", State = "CA", BirthDate = new System.DateTime(1959, 12, 20) },
|
||||
new Patient { SSN = "216-03-0835", FirstName = "John", LastName = "Hanson", MiddleName = "", StreetAddress = "825 W 500 S", City = "Bountiful", ZipCode = "84010", State = "UT", BirthDate = new System.DateTime(1989, 9, 23) },
|
||||
new Patient { SSN = "525-81-0810", FirstName = "Lucy", LastName = "Harrington", MiddleName = "", StreetAddress = "482505 Warm Springs Blvd.", City = "Fremont", ZipCode = "94536", State = "CA", BirthDate = new System.DateTime(2004, 3, 25) },
|
||||
new Patient { SSN = "331-25-9319", FirstName = "Keith", LastName = "Harris", MiddleName = "", StreetAddress = "3207 S Grady Way", City = "Renton", ZipCode = "98055", State = "WA", BirthDate = new System.DateTime(2003, 12, 25) },
|
||||
new Patient { SSN = "770-01-5105", FirstName = "Keith", LastName = "Harris", MiddleName = "", StreetAddress = "7943 Walnut Ave", City = "Renton", ZipCode = "98055", State = "WA", BirthDate = new System.DateTime(1968, 7, 3) },
|
||||
new Patient { SSN = "208-84-9956", FirstName = "Roger", LastName = "Harui", MiddleName = "", StreetAddress = "9927 N. Main St.", City = "Tooele", ZipCode = "84074", State = "UT", BirthDate = new System.DateTime(2015, 5, 11) },
|
||||
new Patient { SSN = "633-34-5095", FirstName = "Ann", LastName = "Hass", MiddleName = "T.", StreetAddress = "Medford Outlet Center", City = "Medford", ZipCode = "55049", State = "MN", BirthDate = new System.DateTime(2005, 7, 28) },
|
||||
new Patient { SSN = "022-89-0200", FirstName = "Valerie", LastName = "Hendricks", MiddleName = "M.", StreetAddress = "Kansas City Factory Outlet", City = "Odessa", ZipCode = "64076", State = "MS", BirthDate = new System.DateTime(1976, 10, 23) },
|
||||
new Patient { SSN = "912-85-8027", FirstName = "Cheryl", LastName = "Herring", MiddleName = "M.", StreetAddress = "Corp Ofc Accts Payable", City = "El Segundo", ZipCode = "90245", State = "CA", BirthDate = new System.DateTime(1980, 10, 9) },
|
||||
new Patient { SSN = "307-29-4403", FirstName = "Ronald", LastName = "Heymsfield", MiddleName = "K.", StreetAddress = "250775 SW Hillsdale Hwy", City = "Beaverton", ZipCode = "97005", State = "OR", BirthDate = new System.DateTime(1983, 7, 22) },
|
||||
new Patient { SSN = "083-68-5072", FirstName = "Mike", LastName = "Hines", MiddleName = "", StreetAddress = "25250 N 90th St", City = "Scottsdale", ZipCode = "85257", State = "AZ", BirthDate = new System.DateTime(1969, 12, 3) },
|
||||
new Patient { SSN = "239-20-6174", FirstName = "Matthew", LastName = "Hink", MiddleName = "", StreetAddress = "No. 60 Bellis Fair Parkway", City = "Bellingham", ZipCode = "98225", State = "WA", BirthDate = new System.DateTime(1997, 2, 15) },
|
||||
new Patient { SSN = "162-43-8489", FirstName = "Bob", LastName = "Hodges", MiddleName = "", StreetAddress = "Ohms Road", City = "Houston", ZipCode = "77003", State = "TX", BirthDate = new System.DateTime(2010, 8, 13) },
|
||||
new Patient { SSN = "717-37-3032", FirstName = "David", LastName = "Hodgson", MiddleName = "", StreetAddress = "99700 Bell Road", City = "Auburn", ZipCode = "95603", State = "CA", BirthDate = new System.DateTime(1983, 4, 13) },
|
||||
new Patient { SSN = "280-15-5623", FirstName = "Helge", LastName = "Hoeing", MiddleName = "", StreetAddress = "Cedar Creek Stores", City = "Mosinee", ZipCode = "54455", State = "WI", BirthDate = new System.DateTime(1988, 2, 7) },
|
||||
new Patient { SSN = "353-00-9496", FirstName = "Juanita", LastName = "Holman", MiddleName = "J.", StreetAddress = "Lake Elisnor Place", City = "Lake Elsinore", ZipCode = "92530", State = "CA", BirthDate = new System.DateTime(1989, 5, 13) },
|
||||
new Patient { SSN = "162-65-6542", FirstName = "Peter", LastName = "Houston", MiddleName = "", StreetAddress = "1200 First Ave.", City = "Joliet", ZipCode = "60433", State = "IL", BirthDate = new System.DateTime(1972, 6, 10) },
|
||||
new Patient { SSN = "427-43-7296", FirstName = "George", LastName = "Huckaby", MiddleName = "M.", StreetAddress = "3390 South 23rd St.", City = "Tacoma", ZipCode = "98403", State = "WA", BirthDate = new System.DateTime(2003, 5, 13) },
|
||||
new Patient { SSN = "603-61-0319", FirstName = "Joshua", LastName = "Huff", MiddleName = "J.", StreetAddress = "Management Mall", City = "San Antonio", ZipCode = "78204", State = "TX", BirthDate = new System.DateTime(1991, 11, 7) },
|
||||
new Patient { SSN = "877-01-3415", FirstName = "Phyllis", LastName = "Huntsman", MiddleName = "R.", StreetAddress = "99 Front Street", City = "Minneapolis", ZipCode = "55402", State = "MN", BirthDate = new System.DateTime(1981, 8, 27) },
|
||||
new Patient { SSN = "391-25-8382", FirstName = "Phyllis", LastName = "Huntsman", MiddleName = "R.", StreetAddress = "City Center", City = "Minneapolis", ZipCode = "55402", State = "MN", BirthDate = new System.DateTime(1959, 6, 28) },
|
||||
new Patient { SSN = "626-56-2930", FirstName = "Lawrence", LastName = "Hurkett", MiddleName = "E.", StreetAddress = "6753 Howard Hughes Parkway", City = "Las Vegas", ZipCode = "89106", State = "NV", BirthDate = new System.DateTime(1993, 10, 13) },
|
||||
new Patient { SSN = "731-19-3470", FirstName = "Lucio", LastName = "Iallo", MiddleName = "", StreetAddress = "Simi @ The Plaza", City = "Simi Valley", ZipCode = "93065", State = "CA", BirthDate = new System.DateTime(1959, 10, 14) },
|
||||
new Patient { SSN = "171-33-3481", FirstName = "Richard", LastName = "Irwin", MiddleName = "L.", StreetAddress = "99828 Routh Street, Suite 825", City = "Dallas", ZipCode = "75201", State = "TX", BirthDate = new System.DateTime(1963, 8, 5) },
|
||||
new Patient { SSN = "828-77-1376", FirstName = "Erik", LastName = "Ismert", MiddleName = "", StreetAddress = "4927 S Meridian Ave Ste D", City = "Puyallup", ZipCode = "98371", State = "WA", BirthDate = new System.DateTime(1968, 4, 5) },
|
||||
new Patient { SSN = "611-48-4137", FirstName = "Eric", LastName = "Jacobsen", MiddleName = "A.", StreetAddress = "Topanga Plaza", City = "Canoga Park", ZipCode = "91303", State = "CA", BirthDate = new System.DateTime(1957, 7, 11) },
|
||||
new Patient { SSN = "477-14-7161", FirstName = "Jodan", LastName = "Jacobson", MiddleName = "M.", StreetAddress = "6030 Robinson Road", City = "Jefferson City", ZipCode = "65101", State = "MS", BirthDate = new System.DateTime(1996, 2, 5) },
|
||||
new Patient { SSN = "738-83-2602", FirstName = "Sean", LastName = "Jacobson", MiddleName = "P.", StreetAddress = "2551 East Warner Road", City = "Gilbert", ZipCode = "85233", State = "AZ", BirthDate = new System.DateTime(1950, 11, 26) },
|
||||
new Patient { SSN = "589-30-3617", FirstName = "Joyce", LastName = "Jarvis", MiddleName = "", StreetAddress = "955 E. County Line Rd.", City = "Englewood", ZipCode = "80110", State = "CO", BirthDate = new System.DateTime(2011, 5, 20) },
|
||||
new Patient { SSN = "538-28-5108", FirstName = "Barry", LastName = "Johnson", MiddleName = "", StreetAddress = "2000 300th Street", City = "Denver", ZipCode = "80203", State = "CO", BirthDate = new System.DateTime(1991, 2, 15) },
|
||||
new Patient { SSN = "661-09-8547", FirstName = "Barry", LastName = "Johnson", MiddleName = "", StreetAddress = "2530 South Colorado Blvd.", City = "Denver", ZipCode = "80203", State = "CO", BirthDate = new System.DateTime(2004, 2, 5) },
|
||||
new Patient { SSN = "025-55-7602", FirstName = "Brian", LastName = "Johnson", MiddleName = "", StreetAddress = "625 W Jackson Blvd. Unit 2502", City = "Chicago", ZipCode = "60610", State = "IL", BirthDate = new System.DateTime(1989, 6, 10) },
|
||||
new Patient { SSN = "422-34-6020", FirstName = "David", LastName = "Johnson", MiddleName = "", StreetAddress = "7990 Ocean Beach Hwy.", City = "Longview", ZipCode = "98632", State = "WA", BirthDate = new System.DateTime(1965, 2, 27) },
|
||||
new Patient { SSN = "500-92-8728", FirstName = "Tom", LastName = "Johnston", MiddleName = "H", StreetAddress = "Belz Factory Outlet", City = "Las Vegas", ZipCode = "89106", State = "NV", BirthDate = new System.DateTime(1961, 10, 19) },
|
||||
new Patient { SSN = "170-89-3691", FirstName = "Jean", LastName = "Jordan", MiddleName = "", StreetAddress = "440 West Huntington Dr.", City = "Monrovia", ZipCode = "91016", State = "CA", BirthDate = new System.DateTime(1969, 10, 16) },
|
||||
new Patient { SSN = "108-25-0733", FirstName = "Peggy", LastName = "Justice", MiddleName = "J.", StreetAddress = "15 East Main", City = "Port Orchard", ZipCode = "98366", State = "WA", BirthDate = new System.DateTime(1981, 11, 1) },
|
||||
new Patient { SSN = "392-44-2253", FirstName = "Sandeep", LastName = "Kaliyath", MiddleName = "", StreetAddress = "630 N. Capitol Ave.", City = "San Jose", ZipCode = "95112", State = "CA", BirthDate = new System.DateTime(1998, 11, 3) },
|
||||
new Patient { SSN = "666-10-8497", FirstName = "Sandeep", LastName = "Katyal", MiddleName = "", StreetAddress = "765 Delridge Way Sw", City = "Seattle", ZipCode = "98104", State = "WA", BirthDate = new System.DateTime(1955, 1, 8) },
|
||||
new Patient { SSN = "738-29-5963", FirstName = "John", LastName = "Kelly", MiddleName = "", StreetAddress = "Pacific West Outlet", City = "Gilroy", ZipCode = "95020", State = "CA", BirthDate = new System.DateTime(1969, 6, 25) },
|
||||
new Patient { SSN = "253-47-6467", FirstName = "Robert", LastName = "Kelly", MiddleName = "", StreetAddress = "6425 Nw Loop 410", City = "San Antonio", ZipCode = "78204", State = "TX", BirthDate = new System.DateTime(1979, 9, 17) },
|
||||
new Patient { SSN = "059-47-6363", FirstName = "Kevin", LastName = "Kennedy", MiddleName = "", StreetAddress = "2550 Ne Sandy Blvd", City = "Portland", ZipCode = "97205", State = "OR", BirthDate = new System.DateTime(2005, 12, 16) },
|
||||
new Patient { SSN = "382-51-9530", FirstName = "Mitch", LastName = "Kennedy", MiddleName = "", StreetAddress = "C/O Starpak, Inc.", City = "Greeley", ZipCode = "80631", State = "CO", BirthDate = new System.DateTime(1980, 2, 28) },
|
||||
new Patient { SSN = "480-79-4419", FirstName = "Imtiaz", LastName = "Khan", MiddleName = "", StreetAddress = "25095 W. Florissant", City = "Ferguson", ZipCode = "63135", State = "MS", BirthDate = new System.DateTime(1971, 9, 2) },
|
||||
new Patient { SSN = "097-39-6667", FirstName = "Karan", LastName = "Khanna", MiddleName = "", StreetAddress = "755 W Washington Ave Ste D", City = "Sequim", ZipCode = "98382", State = "WA", BirthDate = new System.DateTime(1993, 8, 3) },
|
||||
new Patient { SSN = "625-86-1609", FirstName = "Anton", LastName = "Kirilov", MiddleName = "", StreetAddress = "2575 Rocky Mountain Ave.", City = "Loveland", ZipCode = "80537", State = "CO", BirthDate = new System.DateTime(1951, 5, 12) },
|
||||
new Patient { SSN = "109-78-5455", FirstName = "Christian", LastName = "Kleinerman", MiddleName = "", StreetAddress = "25150 El Camino Real", City = "San Bruno", ZipCode = "94066", State = "CA", BirthDate = new System.DateTime(1969, 1, 10) },
|
||||
new Patient { SSN = "914-28-0431", FirstName = "Andrew", LastName = "Kobylinski", MiddleName = "P.", StreetAddress = "2526a Tri-Lake Blvd Ne", City = "Kirkland", ZipCode = "98033", State = "WA", BirthDate = new System.DateTime(1999, 5, 23) },
|
||||
new Patient { SSN = "428-15-1588", FirstName = "Eugene", LastName = "Kogan", MiddleName = "", StreetAddress = "6756 Mowry", City = "Newark", ZipCode = "94560", State = "CA", BirthDate = new System.DateTime(1960, 7, 22) },
|
||||
new Patient { SSN = "612-70-0567", FirstName = "Scott", LastName = "Konersmann", MiddleName = "", StreetAddress = "52500 Liberty Way", City = "Fort Worth", ZipCode = "76102", State = "TX", BirthDate = new System.DateTime(1969, 7, 15) },
|
||||
new Patient { SSN = "025-76-2628", FirstName = "Joy", LastName = "Koski", MiddleName = "R.", StreetAddress = "258101 Nw Evergreen Parkway", City = "Beaverton", ZipCode = "97005", State = "OR", BirthDate = new System.DateTime(1957, 6, 15) },
|
||||
new Patient { SSN = "920-75-2262", FirstName = "Diane", LastName = "Krane", MiddleName = "F.", StreetAddress = "46460 West Oaks Drive", City = "Novi", ZipCode = "48375", State = "MI", BirthDate = new System.DateTime(1974, 9, 5) },
|
||||
new Patient { SSN = "748-12-0172", FirstName = "Kay", LastName = "Krane", MiddleName = "E.", StreetAddress = "9228 Via Del Sol", City = "Phoenix", ZipCode = "85004", State = "AZ", BirthDate = new System.DateTime(1992, 12, 27) },
|
||||
new Patient { SSN = "230-78-1884", FirstName = "Kay", LastName = "Krane", MiddleName = "E.", StreetAddress = "Prime Outlets", City = "Phoenix", ZipCode = "85004", State = "AZ", BirthDate = new System.DateTime(2010, 9, 14) },
|
||||
new Patient { SSN = "121-03-7961", FirstName = "Margaret", LastName = "Krupka", MiddleName = "T.", StreetAddress = "Great Northwestern", City = "North Bend", ZipCode = "98045", State = "WA", BirthDate = new System.DateTime(1971, 3, 9) },
|
||||
new Patient { SSN = "993-16-0574", FirstName = "Peter", LastName = "Kurniawan", MiddleName = "", StreetAddress = "63 W Monroe", City = "Chicago", ZipCode = "60610", State = "IL", BirthDate = new System.DateTime(2015, 11, 22) },
|
||||
new Patient { SSN = "560-17-8321", FirstName = "Jeffrey", LastName = "Kurtz", MiddleName = "", StreetAddress = "Receiving", City = "Fullerton", ZipCode = "92831", State = "CA", BirthDate = new System.DateTime(1990, 1, 15) },
|
||||
new Patient { SSN = "176-23-2126", FirstName = "Eric", LastName = "Lang", MiddleName = "", StreetAddress = "25300 Biddle Road", City = "Medford", ZipCode = "97504", State = "OR", BirthDate = new System.DateTime(1988, 2, 17) },
|
||||
new Patient { SSN = "678-53-5154", FirstName = "Elsa", LastName = "Leavitt", MiddleName = "", StreetAddress = "2575 West 2700 South", City = "Salt Lake City", ZipCode = "84101", State = "UT", BirthDate = new System.DateTime(1956, 9, 15) },
|
||||
new Patient { SSN = "950-17-4726", FirstName = "Marjorie", LastName = "Lee", MiddleName = "M.", StreetAddress = "2509 W. Frankford", City = "Carrollton", ZipCode = "75006", State = "TX", BirthDate = new System.DateTime(1990, 11, 24) },
|
||||
new Patient { SSN = "649-28-8360", FirstName = "Roger", LastName = "Lengel", MiddleName = "", StreetAddress = "490 Ne 4th St", City = "Renton", ZipCode = "98055", State = "WA", BirthDate = new System.DateTime(1998, 2, 22) },
|
||||
new Patient { SSN = "507-95-7549", FirstName = "A.", LastName = "Leonetti", MiddleName = "Francesca", StreetAddress = "5700 Legacy Dr", City = "Plano", ZipCode = "75074", State = "TX", BirthDate = new System.DateTime(1979, 4, 27) },
|
||||
new Patient { SSN = "442-99-4943", FirstName = "Bonnie", LastName = "Lepro", MiddleName = "B.", StreetAddress = "25600 E St Andrews Pl", City = "Santa Ana", ZipCode = "92701", State = "CA", BirthDate = new System.DateTime(1984, 11, 19) },
|
||||
new Patient { SSN = "674-71-8512", FirstName = "Elsie", LastName = "Lewin", MiddleName = "L.", StreetAddress = "P.O. Box 6256916", City = "Dallas", ZipCode = "75201", State = "TX", BirthDate = new System.DateTime(1980, 4, 20) },
|
||||
new Patient { SSN = "418-20-4458", FirstName = "George", LastName = "Li", MiddleName = "Z.", StreetAddress = "910 Main Street.", City = "Sparks", ZipCode = "89431", State = "NV", BirthDate = new System.DateTime(2001, 6, 7) },
|
||||
new Patient { SSN = "986-20-3872", FirstName = "Joseph", LastName = "Lique", MiddleName = "M.", StreetAddress = "257700 Ne 76th Street", City = "Redmond", ZipCode = "98052", State = "WA", BirthDate = new System.DateTime(1985, 8, 14) },
|
||||
new Patient { SSN = "716-41-6291", FirstName = "Paulo", LastName = "Lisboa", MiddleName = "H.", StreetAddress = "9178 Jumping St.", City = "Dallas", ZipCode = "75201", State = "TX", BirthDate = new System.DateTime(1951, 11, 23) },
|
||||
new Patient { SSN = "475-64-2482", FirstName = "Paulo", LastName = "Lisboa", MiddleName = "H.", StreetAddress = "Po Box 8259024", City = "Dallas", ZipCode = "75201", State = "TX", BirthDate = new System.DateTime(1971, 6, 7) },
|
||||
new Patient { SSN = "471-03-3608", FirstName = "David", LastName = "Liu", MiddleName = "J.", StreetAddress = "855 East Main Avenue", City = "Zeeland", ZipCode = "49464", State = "MI", BirthDate = new System.DateTime(1979, 1, 27) },
|
||||
new Patient { SSN = "440-49-4765", FirstName = "Jinghao", LastName = "Liu", MiddleName = "", StreetAddress = "90025 Sterling St", City = "Irving", ZipCode = "75061", State = "TX", BirthDate = new System.DateTime(1996, 4, 27) },
|
||||
new Patient { SSN = "321-33-7277", FirstName = "Kevin", LastName = "Liu", MiddleName = "", StreetAddress = "9992 Whipple Rd", City = "Union City", ZipCode = "94587", State = "CA", BirthDate = new System.DateTime(1982, 6, 26) },
|
||||
new Patient { SSN = "113-69-0506", FirstName = "Sharon", LastName = "Looney", MiddleName = "J.", StreetAddress = "74400 France Avenue South", City = "Edina", ZipCode = "55436", State = "MN", BirthDate = new System.DateTime(1979, 4, 11) },
|
||||
new Patient { SSN = "311-21-1551", FirstName = "Judy", LastName = "Lundahl", MiddleName = "R.", StreetAddress = "25149 Howard Dr", City = "West Chicago", ZipCode = "60185", State = "IL", BirthDate = new System.DateTime(1970, 5, 8) },
|
||||
new Patient { SSN = "710-73-5330", FirstName = "Denise", LastName = "Maccietto", MiddleName = "R.", StreetAddress = "Port Huron", City = "Port Huron", ZipCode = "48060", State = "MI", BirthDate = new System.DateTime(1977, 8, 8) },
|
||||
new Patient { SSN = "321-14-1319", FirstName = "Scott", LastName = "MacDonald", MiddleName = "", StreetAddress = "St. Louis Marketplace", City = "Saint Louis", ZipCode = "63103", State = "MS", BirthDate = new System.DateTime(1984, 11, 12) },
|
||||
new Patient { SSN = "340-75-5874", FirstName = "Kathy", LastName = "Marcovecchio", MiddleName = "R.", StreetAddress = "9905 Three Rivers Drive", City = "Kelso", ZipCode = "98626", State = "WA", BirthDate = new System.DateTime(1994, 4, 3) },
|
||||
new Patient { SSN = "043-85-0648", FirstName = "Melissa", LastName = "Marple", MiddleName = "R.", StreetAddress = "603 Gellert Blvd", City = "Daly City", ZipCode = "94015", State = "CA", BirthDate = new System.DateTime(1956, 9, 26) },
|
||||
new Patient { SSN = "253-33-7509", FirstName = "Frank", LastName = "Mart¡nez", MiddleName = "", StreetAddress = "870 N. 54th Ave.", City = "Chandler", ZipCode = "85225", State = "AZ", BirthDate = new System.DateTime(2003, 9, 2) },
|
||||
new Patient { SSN = "335-68-4629", FirstName = "Chris", LastName = "Maxwell", MiddleName = "", StreetAddress = "3025 E Waterway Blvd", City = "Shelton", ZipCode = "98584", State = "WA", BirthDate = new System.DateTime(2013, 3, 16) },
|
||||
new Patient { SSN = "535-30-6577", FirstName = "Sandra", LastName = "Maynard", MiddleName = "B.", StreetAddress = "9952 E. Lohman Ave.", City = "Las Cruces", ZipCode = "88001", State = "NM", BirthDate = new System.DateTime(1971, 6, 20) },
|
||||
new Patient { SSN = "613-34-9127", FirstName = "Walter", LastName = "Mays", MiddleName = "J.", StreetAddress = "Po Box 252525", City = "Santa Ana", ZipCode = "92701", State = "CA", BirthDate = new System.DateTime(1974, 2, 5) },
|
||||
new Patient { SSN = "754-70-9484", FirstName = "Lola", LastName = "McCarthy", MiddleName = "M.", StreetAddress = "1050 Oak Street", City = "Seattle", ZipCode = "98104", State = "WA", BirthDate = new System.DateTime(1986, 7, 9) },
|
||||
new Patient { SSN = "758-46-9282", FirstName = "Jane", LastName = "McCarty", MiddleName = "A.", StreetAddress = "409 Santa Monica Blvd.", City = "Santa Monica", ZipCode = "90401", State = "CA", BirthDate = new System.DateTime(2007, 1, 15) },
|
||||
new Patient { SSN = "287-44-2853", FirstName = "Yvonne", LastName = "McKay", MiddleName = "", StreetAddress = "Horizon Outlet", City = "Woodbury", ZipCode = "55125", State = "MN", BirthDate = new System.DateTime(2004, 6, 25) },
|
||||
new Patient { SSN = "173-12-0893", FirstName = "Nkenge", LastName = "McLin", MiddleName = "", StreetAddress = "Frontier Mall", City = "Cheyenne", ZipCode = "82001", State = "WY", BirthDate = new System.DateTime(2002, 12, 16) },
|
||||
new Patient { SSN = "028-18-1290", FirstName = "R. Morgan", LastName = "Mendoza", MiddleName = "L.", StreetAddress = "Johnson Creek", City = "Johnson Creek", ZipCode = "53038", State = "WI", BirthDate = new System.DateTime(2005, 3, 25) },
|
||||
new Patient { SSN = "035-47-1686", FirstName = "Helen", LastName = "Meyer", MiddleName = "M.", StreetAddress = "7505 Laguna Boulevard", City = "Elk Grove", ZipCode = "95624", State = "CA", BirthDate = new System.DateTime(1986, 1, 15) },
|
||||
new Patient { SSN = "926-47-4349", FirstName = "Dylan", LastName = "Miller", MiddleName = "", StreetAddress = "Parkway Plaza", City = "El Cajon", ZipCode = "92020", State = "CA", BirthDate = new System.DateTime(1965, 5, 7) },
|
||||
new Patient { SSN = "947-84-3762", FirstName = "Frank", LastName = "Miller", MiddleName = "", StreetAddress = "123 W. Lake Ave.", City = "Peoria", ZipCode = "61606", State = "IL", BirthDate = new System.DateTime(1972, 12, 23) },
|
||||
new Patient { SSN = "598-00-4792", FirstName = "Virginia", LastName = "Miller", MiddleName = "L.", StreetAddress = "25111 228th St Sw", City = "Bothell", ZipCode = "98011", State = "WA", BirthDate = new System.DateTime(1997, 9, 8) },
|
||||
new Patient { SSN = "069-59-6908", FirstName = "Virginia", LastName = "Miller", MiddleName = "L.", StreetAddress = "8713 Yosemite Ct.", City = "Bothell", ZipCode = "98011", State = "WA", BirthDate = new System.DateTime(2015, 6, 17) },
|
||||
new Patient { SSN = "864-49-8796", FirstName = "Neva", LastName = "Mitchell", MiddleName = "M.", StreetAddress = "2528 Meridian E", City = "Puyallup", ZipCode = "98371", State = "WA", BirthDate = new System.DateTime(2010, 8, 16) },
|
||||
new Patient { SSN = "484-78-0561", FirstName = "Joseph", LastName = "Mitzner", MiddleName = "P.", StreetAddress = "123 Camelia Avenue", City = "Oxnard", ZipCode = "93030", State = "CA", BirthDate = new System.DateTime(1991, 4, 16) },
|
||||
new Patient { SSN = "684-27-6433", FirstName = "Margaret", LastName = "Smith", MiddleName = "J.", StreetAddress = "Lewiston Mall", City = "Lewiston", ZipCode = "83501", State = "ID", BirthDate = new System.DateTime(1966, 8, 2) },
|
||||
new Patient { SSN = "521-85-5433", FirstName = "Laura", LastName = "Steele", MiddleName = "C.", StreetAddress = "253731 West Bell Road", City = "Surprise", ZipCode = "85374", State = "AZ", BirthDate = new System.DateTime(1954, 9, 24) },
|
||||
new Patient { SSN = "239-08-6212", FirstName = "Alan", LastName = "Steiner", MiddleName = "", StreetAddress = "2255 254th Avenue Se", City = "Albany", ZipCode = "97321", State = "OR", BirthDate = new System.DateTime(1969, 1, 9) },
|
||||
new Patient { SSN = "655-64-2836", FirstName = "Alice", LastName = "Steiner", MiddleName = "M.", StreetAddress = "Lone Star Factory", City = "La Marque", ZipCode = "77568", State = "TX", BirthDate = new System.DateTime(1950, 1, 15) },
|
||||
new Patient { SSN = "850-56-7206", FirstName = "Derik", LastName = "Stenerson", MiddleName = "", StreetAddress = "Factory Merchants", City = "Branson", ZipCode = "65616", State = "MS", BirthDate = new System.DateTime(1984, 4, 5) },
|
||||
new Patient { SSN = "077-42-9130", FirstName = "Vassar", LastName = "Stern", MiddleName = "J.", StreetAddress = "25130 South State Street", City = "Sandy", ZipCode = "84070", State = "UT", BirthDate = new System.DateTime(2005, 6, 6) },
|
||||
new Patient { SSN = "094-90-4314", FirstName = "Wathalee", LastName = "Steuber", MiddleName = "R.", StreetAddress = "700 Se Sunnyside Road", City = "Clackamas", ZipCode = "97015", State = "OR", BirthDate = new System.DateTime(2001, 9, 24) },
|
||||
new Patient { SSN = "409-83-6433", FirstName = "Liza Marie", LastName = "Stevens", MiddleName = "N.", StreetAddress = "7750 E Marching Rd", City = "Scottsdale", ZipCode = "85257", State = "AZ", BirthDate = new System.DateTime(1999, 12, 24) },
|
||||
new Patient { SSN = "351-34-7304", FirstName = "Robert", LastName = "Stotka", MiddleName = "B.", StreetAddress = "Sports Stores @ Tuscola", City = "Tuscola", ZipCode = "61953", State = "IL", BirthDate = new System.DateTime(1974, 4, 19) },
|
||||
new Patient { SSN = "866-96-8557", FirstName = "Kayla", LastName = "Stotler", MiddleName = "M.", StreetAddress = "9980 S Alma School Road", City = "Chandler", ZipCode = "85225", State = "AZ", BirthDate = new System.DateTime(1987, 5, 6) },
|
||||
new Patient { SSN = "716-37-0786", FirstName = "Ruth", LastName = "Suffin", MiddleName = "J.", StreetAddress = "Lancaster Mall", City = "Salem", ZipCode = "97301", State = "OR", BirthDate = new System.DateTime(2001, 10, 14) },
|
||||
new Patient { SSN = "689-86-1583", FirstName = "Elizabeth", LastName = "Sullivan", MiddleName = "J.", StreetAddress = "Town East Center", City = "Mesquite", ZipCode = "75149", State = "TX", BirthDate = new System.DateTime(2002, 6, 18) },
|
||||
new Patient { SSN = "622-25-6018", FirstName = "Michael", LastName = "Sullivan", MiddleName = "", StreetAddress = "5867 Sunrise Boulevard", City = "Citrus Heights", ZipCode = "95610", State = "CA", BirthDate = new System.DateTime(1983, 8, 27) },
|
||||
new Patient { SSN = "137-21-0253", FirstName = "Brad", LastName = "Sutton", MiddleName = "", StreetAddress = "Three Rivers Mall", City = "Kelso", ZipCode = "98626", State = "WA", BirthDate = new System.DateTime(2011, 12, 15) },
|
||||
new Patient { SSN = "237-99-8262", FirstName = "Abraham", LastName = "Swearengin", MiddleName = "L.", StreetAddress = "9920 Bridgepointe Parkway", City = "San Mateo", ZipCode = "94404", State = "CA", BirthDate = new System.DateTime(1978, 4, 26) },
|
||||
new Patient { SSN = "518-41-6271", FirstName = "Julie", LastName = "Taft-Rider", MiddleName = "", StreetAddress = "6996 South Lindbergh", City = "Saint Louis", ZipCode = "63103", State = "MS", BirthDate = new System.DateTime(1992, 12, 9) },
|
||||
new Patient { SSN = "554-31-5202", FirstName = "Clarence", LastName = "Tatman", MiddleName = "R.", StreetAddress = "San Diego Factory", City = "San Ysidro", ZipCode = "92173", State = "CA", BirthDate = new System.DateTime(1975, 10, 7) },
|
||||
new Patient { SSN = "591-44-7136", FirstName = "Chad", LastName = "Tedford", MiddleName = "J.", StreetAddress = "9500b E. Central Texas Expressway", City = "Killeen", ZipCode = "76541", State = "TX", BirthDate = new System.DateTime(1994, 4, 24) },
|
||||
new Patient { SSN = "069-09-3831", FirstName = "Vanessa", LastName = "Tench", MiddleName = "J.", StreetAddress = "2500 N Serene Blvd", City = "El Segundo", ZipCode = "90245", State = "CA", BirthDate = new System.DateTime(1951, 11, 9) },
|
||||
new Patient { SSN = "523-93-8801", FirstName = "Judy", LastName = "Thames", MiddleName = "J.", StreetAddress = "25102 Springwater", City = "Wenatchee", ZipCode = "98801", State = "WA", BirthDate = new System.DateTime(1989, 3, 14) },
|
||||
new Patient { SSN = "266-03-4963", FirstName = "Daniel", LastName = "Thompson", MiddleName = "P.", StreetAddress = "755 Nw Grandstand", City = "Issaquah", ZipCode = "98027", State = "WA", BirthDate = new System.DateTime(2010, 8, 7) },
|
||||
new Patient { SSN = "496-54-0726", FirstName = "Donald", LastName = "Thompson", MiddleName = "M.", StreetAddress = "25472 Marlay Ave", City = "Fontana", ZipCode = "92335", State = "CA", BirthDate = new System.DateTime(1974, 7, 22) },
|
||||
new Patient { SSN = "984-43-6756", FirstName = "Kendra", LastName = "Thompson", MiddleName = "N.", StreetAddress = "22571 South 2500 East", City = "Idaho Falls", ZipCode = "83402", State = "ID", BirthDate = new System.DateTime(2011, 10, 8) },
|
||||
new Patient { SSN = "047-31-4129", FirstName = "Diane", LastName = "Tibbott", MiddleName = "", StreetAddress = "8525 South Parker Road", City = "Parker", ZipCode = "80138", State = "CO", BirthDate = new System.DateTime(1991, 8, 15) },
|
||||
new Patient { SSN = "217-20-9777", FirstName = "Delia", LastName = "Toone", MiddleName = "B.", StreetAddress = "755 Columbia Ctr Blvd", City = "Kennewick", ZipCode = "99337", State = "WA", BirthDate = new System.DateTime(1983, 3, 6) },
|
||||
new Patient { SSN = "420-28-0429", FirstName = "Michael John", LastName = "Troyer", MiddleName = "R.", StreetAddress = "Oxnard Outlet", City = "Oxnard", ZipCode = "93030", State = "CA", BirthDate = new System.DateTime(1992, 1, 23) },
|
||||
new Patient { SSN = "236-75-2355", FirstName = "Christie", LastName = "Trujillo", MiddleName = "J.", StreetAddress = "One Dancing, Rr No. 25", City = "Round Rock", ZipCode = "78664", State = "TX", BirthDate = new System.DateTime(1986, 11, 24) },
|
||||
new Patient { SSN = "984-20-5166", FirstName = "Sairaj", LastName = "Uddin", MiddleName = "", StreetAddress = "Natomas Marketplace", City = "Sacramento", ZipCode = "95814", State = "CA", BirthDate = new System.DateTime(1975, 11, 18) },
|
||||
new Patient { SSN = "353-75-0098", FirstName = "Sunil", LastName = "Uppal", MiddleName = "", StreetAddress = "25500 Old Spanish Trail", City = "Houston", ZipCode = "77003", State = "TX", BirthDate = new System.DateTime(1985, 6, 24) },
|
||||
new Patient { SSN = "934-96-8406", FirstName = "Jessie", LastName = "Valerio", MiddleName = "E.", StreetAddress = "Mall Of Orange", City = "Orange", ZipCode = "92867", State = "CA", BirthDate = new System.DateTime(2015, 4, 9) },
|
||||
new Patient { SSN = "773-23-3159", FirstName = "Gregory", LastName = "Vanderbout", MiddleName = "T.", StreetAddress = "950 Gateway Street", City = "Springfield", ZipCode = "97477", State = "OR", BirthDate = new System.DateTime(2013, 7, 9) },
|
||||
new Patient { SSN = "951-08-3331", FirstName = "Michael", LastName = "Vanderhyde", MiddleName = "", StreetAddress = "Lincoln Square", City = "Arlington", ZipCode = "76010", State = "TX", BirthDate = new System.DateTime(1993, 2, 22) },
|
||||
new Patient { SSN = "856-23-4990", FirstName = "Margaret", LastName = "Vanderkamp", MiddleName = "J.", StreetAddress = "62500 Neil Road", City = "Reno", ZipCode = "89502", State = "NV", BirthDate = new System.DateTime(1976, 9, 13) },
|
||||
new Patient { SSN = "359-67-5826", FirstName = "Gary", LastName = "Vargas", MiddleName = "T", StreetAddress = "Stevens Creek Shopping Center", City = "San Jose", ZipCode = "95112", State = "CA", BirthDate = new System.DateTime(1991, 3, 12) },
|
||||
new Patient { SSN = "743-66-8203", FirstName = "Nieves", LastName = "Vargas", MiddleName = "J.", StreetAddress = "Kensington Valley Shops", City = "Howell", ZipCode = "48843", State = "MI", BirthDate = new System.DateTime(1988, 11, 2) },
|
||||
new Patient { SSN = "368-97-5673", FirstName = "Ranjit", LastName = "Varkey Chudukatil", MiddleName = "Rudra", StreetAddress = "455 256th St.", City = "Moline", ZipCode = "61265", State = "IL", BirthDate = new System.DateTime(1992, 5, 9) },
|
||||
new Patient { SSN = "890-04-1424", FirstName = "Patricia", LastName = "Vasquez", MiddleName = "M.", StreetAddress = "409 S. Main Ste. 25", City = "Ellensburg", ZipCode = "98926", State = "WA", BirthDate = new System.DateTime(2013, 9, 7) },
|
||||
new Patient { SSN = "267-37-1036", FirstName = "Wanda", LastName = "Vernon", MiddleName = "F.", StreetAddress = "Ontario Mills", City = "Ontario", ZipCode = "91764", State = "CA", BirthDate = new System.DateTime(2004, 9, 28) },
|
||||
new Patient { SSN = "101-14-5907", FirstName = "Robert", LastName = "Vessa", MiddleName = "R.", StreetAddress = "72540 Blanco Rd.", City = "San Antonio", ZipCode = "78204", State = "TX", BirthDate = new System.DateTime(1955, 2, 27) },
|
||||
new Patient { SSN = "148-51-2717", FirstName = "Caroline", LastName = "Vicknair", MiddleName = "A.", StreetAddress = "660 Lindbergh", City = "Saint Louis", ZipCode = "63103", State = "MS", BirthDate = new System.DateTime(2007, 9, 10) }
|
||||
);
|
||||
|
||||
// Create visits
|
||||
context.Visits.AddOrUpdate(
|
||||
new Visit { PatientID = 1, Date = new System.DateTime(2016, 1, 10), Reason = "Headache", Treatment = "A nap" },
|
||||
new Visit { PatientID = 1, Date = new System.DateTime(2016, 1, 10), Reason = "Worse headache", Treatment = "A longer nap" }
|
||||
);
|
||||
|
||||
|
||||
// Create test userts
|
||||
var manager = new UserManager<ApplicationUser>(
|
||||
new UserStore<ApplicationUser>(
|
||||
new ApplicationDbContext()));
|
||||
|
||||
var password = "Password!1";
|
||||
var user1 = new ApplicationUser()
|
||||
{
|
||||
UserName = string.Format("rachel@contoso.com"),
|
||||
Patients = new List<Patient>()
|
||||
};
|
||||
|
||||
manager.Create(user1, string.Format(password));
|
||||
var user2 = new ApplicationUser()
|
||||
{
|
||||
UserName = string.Format("alice@contoso.com"),
|
||||
//Patients = (from p in context.Patients where p.LastName.StartsWith("B") select p).ToList()
|
||||
};
|
||||
manager.Create(user2, string.Format(password));
|
||||
context.SaveChanges();
|
||||
user1.Patients = (from p in context.Patients where p.LastName.StartsWith("B") select p).ToList();
|
||||
/*var patient = context.Patients.Find(1);
|
||||
patient.ApplicationUsers.Add(user1);*/
|
||||
|
||||
context.SaveChanges();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ContosoClinic.Models
|
||||
{
|
||||
public class ExternalLoginConfirmationViewModel
|
||||
{
|
||||
[Required]
|
||||
[Display(Name = "Email")]
|
||||
public string Email { get; set; }
|
||||
}
|
||||
|
||||
public class ExternalLoginListViewModel
|
||||
{
|
||||
public string ReturnUrl { get; set; }
|
||||
}
|
||||
|
||||
public class SendCodeViewModel
|
||||
{
|
||||
public string SelectedProvider { get; set; }
|
||||
public ICollection<System.Web.Mvc.SelectListItem> Providers { get; set; }
|
||||
public string ReturnUrl { get; set; }
|
||||
public bool RememberMe { get; set; }
|
||||
}
|
||||
|
||||
public class VerifyCodeViewModel
|
||||
{
|
||||
[Required]
|
||||
public string Provider { get; set; }
|
||||
|
||||
[Required]
|
||||
[Display(Name = "Code")]
|
||||
public string Code { get; set; }
|
||||
public string ReturnUrl { get; set; }
|
||||
|
||||
[Display(Name = "Remember this browser?")]
|
||||
public bool RememberBrowser { get; set; }
|
||||
|
||||
public bool RememberMe { get; set; }
|
||||
}
|
||||
|
||||
public class ForgotViewModel
|
||||
{
|
||||
[Required]
|
||||
[Display(Name = "Email")]
|
||||
public string Email { get; set; }
|
||||
}
|
||||
|
||||
public class LoginViewModel
|
||||
{
|
||||
[Required]
|
||||
[Display(Name = "Email")]
|
||||
[EmailAddress]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Password")]
|
||||
public string Password { get; set; }
|
||||
|
||||
[Display(Name = "Remember me?")]
|
||||
public bool RememberMe { get; set; }
|
||||
}
|
||||
|
||||
public class RegisterViewModel
|
||||
{
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
[Display(Name = "Email")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Password")]
|
||||
public string Password { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Confirm password")]
|
||||
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
}
|
||||
|
||||
public class ResetPasswordViewModel
|
||||
{
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
[Display(Name = "Email")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Password")]
|
||||
public string Password { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Confirm password")]
|
||||
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
|
||||
public string Code { get; set; }
|
||||
}
|
||||
|
||||
public class ForgotPasswordViewModel
|
||||
{
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
[Display(Name = "Email")]
|
||||
public string Email { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ContosoClinic.Models
|
||||
{
|
||||
public class Patient
|
||||
{
|
||||
public Patient() { }
|
||||
public int PatientID { get; set; }
|
||||
|
||||
[StringLength(11)]
|
||||
[Column(TypeName = "char")]
|
||||
[Required]
|
||||
public string SSN { get; set; }
|
||||
|
||||
[StringLength(50)]
|
||||
public string FirstName { get; set; }
|
||||
|
||||
[StringLength(50)]
|
||||
[Required]
|
||||
public string LastName { get; set; }
|
||||
|
||||
[StringLength(50)]
|
||||
public string MiddleName { get; set; }
|
||||
|
||||
[StringLength(50)]
|
||||
[Required]
|
||||
public string StreetAddress { get; set; }
|
||||
|
||||
[StringLength(50)]
|
||||
[Required]
|
||||
public string City { get; set; }
|
||||
|
||||
[StringLength(5)]
|
||||
[Column(TypeName = "char")]
|
||||
[Required]
|
||||
public string ZipCode { get; set; }
|
||||
|
||||
[StringLength(2)]
|
||||
[Column(TypeName = "char")]
|
||||
[Required]
|
||||
public string State { get; set; }
|
||||
|
||||
[Column(TypeName = "date")]
|
||||
[Required]
|
||||
public System.DateTime BirthDate { get; set; }
|
||||
|
||||
public virtual ICollection<Visit> Visits { get; set; }
|
||||
public virtual ICollection<ApplicationUser> ApplicationUsers { get; set; }
|
||||
}
|
||||
|
||||
public class Visit
|
||||
{
|
||||
public int VisitID { get; set; }
|
||||
|
||||
[Required]
|
||||
public int PatientID { get; set; }
|
||||
|
||||
[Column(TypeName = "date")]
|
||||
[Required]
|
||||
public System.DateTime Date { get; set; }
|
||||
|
||||
[StringLength(4000)]
|
||||
[Required]
|
||||
public string Reason { get; set; }
|
||||
|
||||
[StringLength(4000)]
|
||||
[Required]
|
||||
public string Treatment { get; set; }
|
||||
[Column(TypeName = "date")]
|
||||
public Nullable<System.DateTime> FollowUpDate { get; set; }
|
||||
|
||||
public virtual Patient Patient { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System.Data.Entity;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ContosoClinic.Models
|
||||
{
|
||||
// You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more.
|
||||
public class ApplicationUser : IdentityUser
|
||||
{
|
||||
public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser> manager)
|
||||
{
|
||||
// Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
|
||||
var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
|
||||
// Add custom user claims here
|
||||
return userIdentity;
|
||||
}
|
||||
public virtual ICollection<Patient> Patients { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
|
||||
{
|
||||
public ApplicationDbContext()
|
||||
: base("DefaultConnection", throwIfV1Schema: false)
|
||||
{
|
||||
}
|
||||
|
||||
public static ApplicationDbContext Create()
|
||||
{
|
||||
return new ApplicationDbContext();
|
||||
}
|
||||
|
||||
public System.Data.Entity.DbSet<ContosoClinic.Models.Patient> Patients { get; set; }
|
||||
|
||||
public System.Data.Entity.DbSet<ContosoClinic.Models.Visit> Visits { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.Owin.Security;
|
||||
|
||||
namespace ContosoClinic.Models
|
||||
{
|
||||
public class IndexViewModel
|
||||
{
|
||||
public bool HasPassword { get; set; }
|
||||
public IList<UserLoginInfo> Logins { get; set; }
|
||||
public string PhoneNumber { get; set; }
|
||||
public bool TwoFactor { get; set; }
|
||||
public bool BrowserRemembered { get; set; }
|
||||
}
|
||||
|
||||
public class ManageLoginsViewModel
|
||||
{
|
||||
public IList<UserLoginInfo> CurrentLogins { get; set; }
|
||||
public IList<AuthenticationDescription> OtherLogins { get; set; }
|
||||
}
|
||||
|
||||
public class FactorViewModel
|
||||
{
|
||||
public string Purpose { get; set; }
|
||||
}
|
||||
|
||||
public class SetPasswordViewModel
|
||||
{
|
||||
[Required]
|
||||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "New password")]
|
||||
public string NewPassword { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Confirm new password")]
|
||||
[Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
}
|
||||
|
||||
public class ChangePasswordViewModel
|
||||
{
|
||||
[Required]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Current password")]
|
||||
public string OldPassword { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "New password")]
|
||||
public string NewPassword { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Confirm new password")]
|
||||
[Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
}
|
||||
|
||||
public class AddPhoneNumberViewModel
|
||||
{
|
||||
[Required]
|
||||
[Phone]
|
||||
[Display(Name = "Phone Number")]
|
||||
public string Number { get; set; }
|
||||
}
|
||||
|
||||
public class VerifyPhoneNumberViewModel
|
||||
{
|
||||
[Required]
|
||||
[Display(Name = "Code")]
|
||||
public string Code { get; set; }
|
||||
|
||||
[Required]
|
||||
[Phone]
|
||||
[Display(Name = "Phone Number")]
|
||||
public string PhoneNumber { get; set; }
|
||||
}
|
||||
|
||||
public class ConfigureTwoFactorViewModel
|
||||
{
|
||||
public string SelectedProvider { get; set; }
|
||||
public ICollection<System.Web.Mvc.SelectListItem> Providers { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Data.Common;
|
||||
using System.Data.Entity;
|
||||
using System.Data.Entity.Infrastructure.Interception;
|
||||
using Microsoft.AspNet.Identity;
|
||||
|
||||
namespace ContactManager.Models
|
||||
{
|
||||
public class SessionContextInterceptor : IDbConnectionInterceptor
|
||||
{
|
||||
public void Opened(DbConnection connection, DbConnectionInterceptionContext interceptionContext)
|
||||
{
|
||||
// Set SESSION_CONTEXT to current UserId whenever EF opens a connection
|
||||
try
|
||||
{
|
||||
var userId = System.Web.HttpContext.Current.User.Identity.GetUserId();
|
||||
if (userId != null)
|
||||
{
|
||||
DbCommand cmd = connection.CreateCommand();
|
||||
cmd.CommandText = "EXEC sp_set_session_context @key=N'UserId', @value=@UserId";
|
||||
DbParameter param = cmd.CreateParameter();
|
||||
param.ParameterName = "@UserId";
|
||||
param.Value = userId;
|
||||
cmd.Parameters.Add(param);
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
catch (System.NullReferenceException)
|
||||
{
|
||||
// If no user is logged in, leave SESSION_CONTEXT null (all rows will be filtered)
|
||||
}
|
||||
}
|
||||
|
||||
public void Opening(DbConnection connection, DbConnectionInterceptionContext interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void BeganTransaction(DbConnection connection, BeginTransactionInterceptionContext interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void BeginningTransaction(DbConnection connection, BeginTransactionInterceptionContext interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void Closed(DbConnection connection, DbConnectionInterceptionContext interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void Closing(DbConnection connection, DbConnectionInterceptionContext interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void ConnectionStringGetting(DbConnection connection, DbConnectionInterceptionContext<string> interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void ConnectionStringGot(DbConnection connection, DbConnectionInterceptionContext<string> interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void ConnectionStringSet(DbConnection connection, DbConnectionPropertyInterceptionContext<string> interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void ConnectionStringSetting(DbConnection connection, DbConnectionPropertyInterceptionContext<string> interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void ConnectionTimeoutGetting(DbConnection connection, DbConnectionInterceptionContext<int> interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void ConnectionTimeoutGot(DbConnection connection, DbConnectionInterceptionContext<int> interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void DataSourceGetting(DbConnection connection, DbConnectionInterceptionContext<string> interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void DataSourceGot(DbConnection connection, DbConnectionInterceptionContext<string> interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void DatabaseGetting(DbConnection connection, DbConnectionInterceptionContext<string> interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void DatabaseGot(DbConnection connection, DbConnectionInterceptionContext<string> interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void Disposed(DbConnection connection, DbConnectionInterceptionContext interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void Disposing(DbConnection connection, DbConnectionInterceptionContext interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void EnlistedTransaction(DbConnection connection, EnlistTransactionInterceptionContext interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void EnlistingTransaction(DbConnection connection, EnlistTransactionInterceptionContext interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void ServerVersionGetting(DbConnection connection, DbConnectionInterceptionContext<string> interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void ServerVersionGot(DbConnection connection, DbConnectionInterceptionContext<string> interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void StateGetting(DbConnection connection, DbConnectionInterceptionContext<System.Data.ConnectionState> interceptionContext)
|
||||
{
|
||||
}
|
||||
|
||||
public void StateGot(DbConnection connection, DbConnectionInterceptionContext<System.Data.ConnectionState> interceptionContext)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class SessionContextConfiguration : DbConfiguration
|
||||
{
|
||||
public SessionContextConfiguration()
|
||||
{
|
||||
AddInterceptor(new SessionContextInterceptor());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("ContosoClinic")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ContosoClinic")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("95662cf0-2d48-4a49-8433-34919b38cab7")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,7 @@
|
||||
/// <reference path="modernizr-2.6.2.js" />
|
||||
/// <reference path="jquery-1.10.2.js" />
|
||||
/// <autosync enabled="true" />
|
||||
/// <reference path="jquery.validate.js" />
|
||||
/// <reference path="jquery.validate.unobtrusive.js" />
|
||||
/// <reference path="bootstrap.js" />
|
||||
/// <reference path="respond.js" />
|
||||
@@ -0,0 +1,429 @@
|
||||
/* NUGET: BEGIN LICENSE TEXT
|
||||
*
|
||||
* Microsoft grants you the right to use these script files for the sole
|
||||
* purpose of either: (i) interacting through your browser with the Microsoft
|
||||
* website or online service, subject to the applicable licensing or use
|
||||
* terms; or (ii) using the files as included with a Microsoft product subject
|
||||
* to that product's license terms. Microsoft reserves all other rights to the
|
||||
* files not expressly granted by Microsoft, whether by implication, estoppel
|
||||
* or otherwise. Insofar as a script file is dual licensed under GPL,
|
||||
* Microsoft neither took the code under GPL nor distributes it thereunder but
|
||||
* under the terms set out in this paragraph. All notices and licenses
|
||||
* below are for informational purposes only.
|
||||
*
|
||||
* NUGET: END LICENSE TEXT */
|
||||
/*!
|
||||
** Unobtrusive validation support library for jQuery and jQuery Validate
|
||||
** Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*/
|
||||
|
||||
/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */
|
||||
/*global document: false, jQuery: false */
|
||||
|
||||
(function ($) {
|
||||
var $jQval = $.validator,
|
||||
adapters,
|
||||
data_validation = "unobtrusiveValidation";
|
||||
|
||||
function setValidationValues(options, ruleName, value) {
|
||||
options.rules[ruleName] = value;
|
||||
if (options.message) {
|
||||
options.messages[ruleName] = options.message;
|
||||
}
|
||||
}
|
||||
|
||||
function splitAndTrim(value) {
|
||||
return value.replace(/^\s+|\s+$/g, "").split(/\s*,\s*/g);
|
||||
}
|
||||
|
||||
function escapeAttributeValue(value) {
|
||||
// As mentioned on http://api.jquery.com/category/selectors/
|
||||
return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1");
|
||||
}
|
||||
|
||||
function getModelPrefix(fieldName) {
|
||||
return fieldName.substr(0, fieldName.lastIndexOf(".") + 1);
|
||||
}
|
||||
|
||||
function appendModelPrefix(value, prefix) {
|
||||
if (value.indexOf("*.") === 0) {
|
||||
value = value.replace("*.", prefix);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function onError(error, inputElement) { // 'this' is the form element
|
||||
var container = $(this).find("[data-valmsg-for='" + escapeAttributeValue(inputElement[0].name) + "']"),
|
||||
replaceAttrValue = container.attr("data-valmsg-replace"),
|
||||
replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) !== false : null;
|
||||
|
||||
container.removeClass("field-validation-valid").addClass("field-validation-error");
|
||||
error.data("unobtrusiveContainer", container);
|
||||
|
||||
if (replace) {
|
||||
container.empty();
|
||||
error.removeClass("input-validation-error").appendTo(container);
|
||||
}
|
||||
else {
|
||||
error.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function onErrors(event, validator) { // 'this' is the form element
|
||||
var container = $(this).find("[data-valmsg-summary=true]"),
|
||||
list = container.find("ul");
|
||||
|
||||
if (list && list.length && validator.errorList.length) {
|
||||
list.empty();
|
||||
container.addClass("validation-summary-errors").removeClass("validation-summary-valid");
|
||||
|
||||
$.each(validator.errorList, function () {
|
||||
$("<li />").html(this.message).appendTo(list);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function onSuccess(error) { // 'this' is the form element
|
||||
var container = error.data("unobtrusiveContainer"),
|
||||
replaceAttrValue = container.attr("data-valmsg-replace"),
|
||||
replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null;
|
||||
|
||||
if (container) {
|
||||
container.addClass("field-validation-valid").removeClass("field-validation-error");
|
||||
error.removeData("unobtrusiveContainer");
|
||||
|
||||
if (replace) {
|
||||
container.empty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onReset(event) { // 'this' is the form element
|
||||
var $form = $(this),
|
||||
key = '__jquery_unobtrusive_validation_form_reset';
|
||||
if ($form.data(key)) {
|
||||
return;
|
||||
}
|
||||
// Set a flag that indicates we're currently resetting the form.
|
||||
$form.data(key, true);
|
||||
try {
|
||||
$form.data("validator").resetForm();
|
||||
} finally {
|
||||
$form.removeData(key);
|
||||
}
|
||||
|
||||
$form.find(".validation-summary-errors")
|
||||
.addClass("validation-summary-valid")
|
||||
.removeClass("validation-summary-errors");
|
||||
$form.find(".field-validation-error")
|
||||
.addClass("field-validation-valid")
|
||||
.removeClass("field-validation-error")
|
||||
.removeData("unobtrusiveContainer")
|
||||
.find(">*") // If we were using valmsg-replace, get the underlying error
|
||||
.removeData("unobtrusiveContainer");
|
||||
}
|
||||
|
||||
function validationInfo(form) {
|
||||
var $form = $(form),
|
||||
result = $form.data(data_validation),
|
||||
onResetProxy = $.proxy(onReset, form),
|
||||
defaultOptions = $jQval.unobtrusive.options || {},
|
||||
execInContext = function (name, args) {
|
||||
var func = defaultOptions[name];
|
||||
func && $.isFunction(func) && func.apply(form, args);
|
||||
}
|
||||
|
||||
if (!result) {
|
||||
result = {
|
||||
options: { // options structure passed to jQuery Validate's validate() method
|
||||
errorClass: defaultOptions.errorClass || "input-validation-error",
|
||||
errorElement: defaultOptions.errorElement || "span",
|
||||
errorPlacement: function () {
|
||||
onError.apply(form, arguments);
|
||||
execInContext("errorPlacement", arguments);
|
||||
},
|
||||
invalidHandler: function () {
|
||||
onErrors.apply(form, arguments);
|
||||
execInContext("invalidHandler", arguments);
|
||||
},
|
||||
messages: {},
|
||||
rules: {},
|
||||
success: function () {
|
||||
onSuccess.apply(form, arguments);
|
||||
execInContext("success", arguments);
|
||||
}
|
||||
},
|
||||
attachValidation: function () {
|
||||
$form
|
||||
.off("reset." + data_validation, onResetProxy)
|
||||
.on("reset." + data_validation, onResetProxy)
|
||||
.validate(this.options);
|
||||
},
|
||||
validate: function () { // a validation function that is called by unobtrusive Ajax
|
||||
$form.validate();
|
||||
return $form.valid();
|
||||
}
|
||||
};
|
||||
$form.data(data_validation, result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
$jQval.unobtrusive = {
|
||||
adapters: [],
|
||||
|
||||
parseElement: function (element, skipAttach) {
|
||||
/// <summary>
|
||||
/// Parses a single HTML element for unobtrusive validation attributes.
|
||||
/// </summary>
|
||||
/// <param name="element" domElement="true">The HTML element to be parsed.</param>
|
||||
/// <param name="skipAttach" type="Boolean">[Optional] true to skip attaching the
|
||||
/// validation to the form. If parsing just this single element, you should specify true.
|
||||
/// If parsing several elements, you should specify false, and manually attach the validation
|
||||
/// to the form when you are finished. The default is false.</param>
|
||||
var $element = $(element),
|
||||
form = $element.parents("form")[0],
|
||||
valInfo, rules, messages;
|
||||
|
||||
if (!form) { // Cannot do client-side validation without a form
|
||||
return;
|
||||
}
|
||||
|
||||
valInfo = validationInfo(form);
|
||||
valInfo.options.rules[element.name] = rules = {};
|
||||
valInfo.options.messages[element.name] = messages = {};
|
||||
|
||||
$.each(this.adapters, function () {
|
||||
var prefix = "data-val-" + this.name,
|
||||
message = $element.attr(prefix),
|
||||
paramValues = {};
|
||||
|
||||
if (message !== undefined) { // Compare against undefined, because an empty message is legal (and falsy)
|
||||
prefix += "-";
|
||||
|
||||
$.each(this.params, function () {
|
||||
paramValues[this] = $element.attr(prefix + this);
|
||||
});
|
||||
|
||||
this.adapt({
|
||||
element: element,
|
||||
form: form,
|
||||
message: message,
|
||||
params: paramValues,
|
||||
rules: rules,
|
||||
messages: messages
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$.extend(rules, { "__dummy__": true });
|
||||
|
||||
if (!skipAttach) {
|
||||
valInfo.attachValidation();
|
||||
}
|
||||
},
|
||||
|
||||
parse: function (selector) {
|
||||
/// <summary>
|
||||
/// Parses all the HTML elements in the specified selector. It looks for input elements decorated
|
||||
/// with the [data-val=true] attribute value and enables validation according to the data-val-*
|
||||
/// attribute values.
|
||||
/// </summary>
|
||||
/// <param name="selector" type="String">Any valid jQuery selector.</param>
|
||||
|
||||
// $forms includes all forms in selector's DOM hierarchy (parent, children and self) that have at least one
|
||||
// element with data-val=true
|
||||
var $selector = $(selector),
|
||||
$forms = $selector.parents()
|
||||
.addBack()
|
||||
.filter("form")
|
||||
.add($selector.find("form"))
|
||||
.has("[data-val=true]");
|
||||
|
||||
$selector.find("[data-val=true]").each(function () {
|
||||
$jQval.unobtrusive.parseElement(this, true);
|
||||
});
|
||||
|
||||
$forms.each(function () {
|
||||
var info = validationInfo(this);
|
||||
if (info) {
|
||||
info.attachValidation();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
adapters = $jQval.unobtrusive.adapters;
|
||||
|
||||
adapters.add = function (adapterName, params, fn) {
|
||||
/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation.</summary>
|
||||
/// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used
|
||||
/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>
|
||||
/// <param name="params" type="Array" optional="true">[Optional] An array of parameter names (strings) that will
|
||||
/// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and
|
||||
/// mmmm is the parameter name).</param>
|
||||
/// <param name="fn" type="Function">The function to call, which adapts the values from the HTML
|
||||
/// attributes into jQuery Validate rules and/or messages.</param>
|
||||
/// <returns type="jQuery.validator.unobtrusive.adapters" />
|
||||
if (!fn) { // Called with no params, just a function
|
||||
fn = params;
|
||||
params = [];
|
||||
}
|
||||
this.push({ name: adapterName, params: params, adapt: fn });
|
||||
return this;
|
||||
};
|
||||
|
||||
adapters.addBool = function (adapterName, ruleName) {
|
||||
/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
|
||||
/// the jQuery Validate validation rule has no parameter values.</summary>
|
||||
/// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used
|
||||
/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>
|
||||
/// <param name="ruleName" type="String" optional="true">[Optional] The name of the jQuery Validate rule. If not provided, the value
|
||||
/// of adapterName will be used instead.</param>
|
||||
/// <returns type="jQuery.validator.unobtrusive.adapters" />
|
||||
return this.add(adapterName, function (options) {
|
||||
setValidationValues(options, ruleName || adapterName, true);
|
||||
});
|
||||
};
|
||||
|
||||
adapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) {
|
||||
/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
|
||||
/// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and
|
||||
/// one for min-and-max). The HTML parameters are expected to be named -min and -max.</summary>
|
||||
/// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used
|
||||
/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>
|
||||
/// <param name="minRuleName" type="String">The name of the jQuery Validate rule to be used when you only
|
||||
/// have a minimum value.</param>
|
||||
/// <param name="maxRuleName" type="String">The name of the jQuery Validate rule to be used when you only
|
||||
/// have a maximum value.</param>
|
||||
/// <param name="minMaxRuleName" type="String">The name of the jQuery Validate rule to be used when you
|
||||
/// have both a minimum and maximum value.</param>
|
||||
/// <param name="minAttribute" type="String" optional="true">[Optional] The name of the HTML attribute that
|
||||
/// contains the minimum value. The default is "min".</param>
|
||||
/// <param name="maxAttribute" type="String" optional="true">[Optional] The name of the HTML attribute that
|
||||
/// contains the maximum value. The default is "max".</param>
|
||||
/// <returns type="jQuery.validator.unobtrusive.adapters" />
|
||||
return this.add(adapterName, [minAttribute || "min", maxAttribute || "max"], function (options) {
|
||||
var min = options.params.min,
|
||||
max = options.params.max;
|
||||
|
||||
if (min && max) {
|
||||
setValidationValues(options, minMaxRuleName, [min, max]);
|
||||
}
|
||||
else if (min) {
|
||||
setValidationValues(options, minRuleName, min);
|
||||
}
|
||||
else if (max) {
|
||||
setValidationValues(options, maxRuleName, max);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
adapters.addSingleVal = function (adapterName, attribute, ruleName) {
|
||||
/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
|
||||
/// the jQuery Validate validation rule has a single value.</summary>
|
||||
/// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used
|
||||
/// in the data-val-nnnn HTML attribute(where nnnn is the adapter name).</param>
|
||||
/// <param name="attribute" type="String">[Optional] The name of the HTML attribute that contains the value.
|
||||
/// The default is "val".</param>
|
||||
/// <param name="ruleName" type="String" optional="true">[Optional] The name of the jQuery Validate rule. If not provided, the value
|
||||
/// of adapterName will be used instead.</param>
|
||||
/// <returns type="jQuery.validator.unobtrusive.adapters" />
|
||||
return this.add(adapterName, [attribute || "val"], function (options) {
|
||||
setValidationValues(options, ruleName || adapterName, options.params[attribute]);
|
||||
});
|
||||
};
|
||||
|
||||
$jQval.addMethod("__dummy__", function (value, element, params) {
|
||||
return true;
|
||||
});
|
||||
|
||||
$jQval.addMethod("regex", function (value, element, params) {
|
||||
var match;
|
||||
if (this.optional(element)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
match = new RegExp(params).exec(value);
|
||||
return (match && (match.index === 0) && (match[0].length === value.length));
|
||||
});
|
||||
|
||||
$jQval.addMethod("nonalphamin", function (value, element, nonalphamin) {
|
||||
var match;
|
||||
if (nonalphamin) {
|
||||
match = value.match(/\W/g);
|
||||
match = match && match.length >= nonalphamin;
|
||||
}
|
||||
return match;
|
||||
});
|
||||
|
||||
if ($jQval.methods.extension) {
|
||||
adapters.addSingleVal("accept", "mimtype");
|
||||
adapters.addSingleVal("extension", "extension");
|
||||
} else {
|
||||
// for backward compatibility, when the 'extension' validation method does not exist, such as with versions
|
||||
// of JQuery Validation plugin prior to 1.10, we should use the 'accept' method for
|
||||
// validating the extension, and ignore mime-type validations as they are not supported.
|
||||
adapters.addSingleVal("extension", "extension", "accept");
|
||||
}
|
||||
|
||||
adapters.addSingleVal("regex", "pattern");
|
||||
adapters.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");
|
||||
adapters.addMinMax("length", "minlength", "maxlength", "rangelength").addMinMax("range", "min", "max", "range");
|
||||
adapters.addMinMax("minlength", "minlength").addMinMax("maxlength", "minlength", "maxlength");
|
||||
adapters.add("equalto", ["other"], function (options) {
|
||||
var prefix = getModelPrefix(options.element.name),
|
||||
other = options.params.other,
|
||||
fullOtherName = appendModelPrefix(other, prefix),
|
||||
element = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(fullOtherName) + "']")[0];
|
||||
|
||||
setValidationValues(options, "equalTo", element);
|
||||
});
|
||||
adapters.add("required", function (options) {
|
||||
// jQuery Validate equates "required" with "mandatory" for checkbox elements
|
||||
if (options.element.tagName.toUpperCase() !== "INPUT" || options.element.type.toUpperCase() !== "CHECKBOX") {
|
||||
setValidationValues(options, "required", true);
|
||||
}
|
||||
});
|
||||
adapters.add("remote", ["url", "type", "additionalfields"], function (options) {
|
||||
var value = {
|
||||
url: options.params.url,
|
||||
type: options.params.type || "GET",
|
||||
data: {}
|
||||
},
|
||||
prefix = getModelPrefix(options.element.name);
|
||||
|
||||
$.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) {
|
||||
var paramName = appendModelPrefix(fieldName, prefix);
|
||||
value.data[paramName] = function () {
|
||||
var field = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(paramName) + "']");
|
||||
// For checkboxes and radio buttons, only pick up values from checked fields.
|
||||
if (field.is(":checkbox")) {
|
||||
return field.filter(":checked").val() || field.filter(":hidden").val() || '';
|
||||
}
|
||||
else if (field.is(":radio")) {
|
||||
return field.filter(":checked").val() || '';
|
||||
}
|
||||
return field.val();
|
||||
};
|
||||
});
|
||||
|
||||
setValidationValues(options, "remote", value);
|
||||
});
|
||||
adapters.add("password", ["min", "nonalphamin", "regex"], function (options) {
|
||||
if (options.params.min) {
|
||||
setValidationValues(options, "minlength", options.params.min);
|
||||
}
|
||||
if (options.params.nonalphamin) {
|
||||
setValidationValues(options, "nonalphamin", options.params.nonalphamin);
|
||||
}
|
||||
if (options.params.regex) {
|
||||
setValidationValues(options, "regex", options.params.regex);
|
||||
}
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$jQval.unobtrusive.parse(document);
|
||||
});
|
||||
}(jQuery));
|
||||
@@ -0,0 +1,326 @@
|
||||
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
|
||||
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
|
||||
window.matchMedia = window.matchMedia || (function(doc, undefined){
|
||||
|
||||
var bool,
|
||||
docElem = doc.documentElement,
|
||||
refNode = docElem.firstElementChild || docElem.firstChild,
|
||||
// fakeBody required for <FF4 when executed in <head>
|
||||
fakeBody = doc.createElement('body'),
|
||||
div = doc.createElement('div');
|
||||
|
||||
div.id = 'mq-test-1';
|
||||
div.style.cssText = "position:absolute;top:-100em";
|
||||
fakeBody.style.background = "none";
|
||||
fakeBody.appendChild(div);
|
||||
|
||||
return function(q){
|
||||
|
||||
div.innerHTML = '­<style media="'+q+'"> #mq-test-1 { width: 42px; }</style>';
|
||||
|
||||
docElem.insertBefore(fakeBody, refNode);
|
||||
bool = div.offsetWidth == 42;
|
||||
docElem.removeChild(fakeBody);
|
||||
|
||||
return { matches: bool, media: q };
|
||||
};
|
||||
|
||||
})(document);
|
||||
|
||||
|
||||
|
||||
|
||||
/*! Respond.js v1.2.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
|
||||
(function( win ){
|
||||
//exposed namespace
|
||||
win.respond = {};
|
||||
|
||||
//define update even in native-mq-supporting browsers, to avoid errors
|
||||
respond.update = function(){};
|
||||
|
||||
//expose media query support flag for external use
|
||||
respond.mediaQueriesSupported = win.matchMedia && win.matchMedia( "only all" ).matches;
|
||||
|
||||
//if media queries are supported, exit here
|
||||
if( respond.mediaQueriesSupported ){ return; }
|
||||
|
||||
//define vars
|
||||
var doc = win.document,
|
||||
docElem = doc.documentElement,
|
||||
mediastyles = [],
|
||||
rules = [],
|
||||
appendedEls = [],
|
||||
parsedSheets = {},
|
||||
resizeThrottle = 30,
|
||||
head = doc.getElementsByTagName( "head" )[0] || docElem,
|
||||
base = doc.getElementsByTagName( "base" )[0],
|
||||
links = head.getElementsByTagName( "link" ),
|
||||
requestQueue = [],
|
||||
|
||||
//loop stylesheets, send text content to translate
|
||||
ripCSS = function(){
|
||||
var sheets = links,
|
||||
sl = sheets.length,
|
||||
i = 0,
|
||||
//vars for loop:
|
||||
sheet, href, media, isCSS;
|
||||
|
||||
for( ; i < sl; i++ ){
|
||||
sheet = sheets[ i ],
|
||||
href = sheet.href,
|
||||
media = sheet.media,
|
||||
isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
|
||||
|
||||
//only links plz and prevent re-parsing
|
||||
if( !!href && isCSS && !parsedSheets[ href ] ){
|
||||
// selectivizr exposes css through the rawCssText expando
|
||||
if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
|
||||
translate( sheet.styleSheet.rawCssText, href, media );
|
||||
parsedSheets[ href ] = true;
|
||||
} else {
|
||||
if( (!/^([a-zA-Z:]*\/\/)/.test( href ) && !base)
|
||||
|| href.replace( RegExp.$1, "" ).split( "/" )[0] === win.location.host ){
|
||||
requestQueue.push( {
|
||||
href: href,
|
||||
media: media
|
||||
} );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
makeRequests();
|
||||
},
|
||||
|
||||
//recurse through request queue, get css text
|
||||
makeRequests = function(){
|
||||
if( requestQueue.length ){
|
||||
var thisRequest = requestQueue.shift();
|
||||
|
||||
ajax( thisRequest.href, function( styles ){
|
||||
translate( styles, thisRequest.href, thisRequest.media );
|
||||
parsedSheets[ thisRequest.href ] = true;
|
||||
makeRequests();
|
||||
} );
|
||||
}
|
||||
},
|
||||
|
||||
//find media blocks in css text, convert to style blocks
|
||||
translate = function( styles, href, media ){
|
||||
var qs = styles.match( /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi ),
|
||||
ql = qs && qs.length || 0,
|
||||
//try to get CSS path
|
||||
href = href.substring( 0, href.lastIndexOf( "/" )),
|
||||
repUrls = function( css ){
|
||||
return css.replace( /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, "$1" + href + "$2$3" );
|
||||
},
|
||||
useMedia = !ql && media,
|
||||
//vars used in loop
|
||||
i = 0,
|
||||
j, fullq, thisq, eachq, eql;
|
||||
|
||||
//if path exists, tack on trailing slash
|
||||
if( href.length ){ href += "/"; }
|
||||
|
||||
//if no internal queries exist, but media attr does, use that
|
||||
//note: this currently lacks support for situations where a media attr is specified on a link AND
|
||||
//its associated stylesheet has internal CSS media queries.
|
||||
//In those cases, the media attribute will currently be ignored.
|
||||
if( useMedia ){
|
||||
ql = 1;
|
||||
}
|
||||
|
||||
|
||||
for( ; i < ql; i++ ){
|
||||
j = 0;
|
||||
|
||||
//media attr
|
||||
if( useMedia ){
|
||||
fullq = media;
|
||||
rules.push( repUrls( styles ) );
|
||||
}
|
||||
//parse for styles
|
||||
else{
|
||||
fullq = qs[ i ].match( /@media *([^\{]+)\{([\S\s]+?)$/ ) && RegExp.$1;
|
||||
rules.push( RegExp.$2 && repUrls( RegExp.$2 ) );
|
||||
}
|
||||
|
||||
eachq = fullq.split( "," );
|
||||
eql = eachq.length;
|
||||
|
||||
for( ; j < eql; j++ ){
|
||||
thisq = eachq[ j ];
|
||||
mediastyles.push( {
|
||||
media : thisq.split( "(" )[ 0 ].match( /(only\s+)?([a-zA-Z]+)\s?/ ) && RegExp.$2 || "all",
|
||||
rules : rules.length - 1,
|
||||
hasquery: thisq.indexOf("(") > -1,
|
||||
minw : thisq.match( /\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" ),
|
||||
maxw : thisq.match( /\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" )
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
applyMedia();
|
||||
},
|
||||
|
||||
lastCall,
|
||||
|
||||
resizeDefer,
|
||||
|
||||
// returns the value of 1em in pixels
|
||||
getEmValue = function() {
|
||||
var ret,
|
||||
div = doc.createElement('div'),
|
||||
body = doc.body,
|
||||
fakeUsed = false;
|
||||
|
||||
div.style.cssText = "position:absolute;font-size:1em;width:1em";
|
||||
|
||||
if( !body ){
|
||||
body = fakeUsed = doc.createElement( "body" );
|
||||
body.style.background = "none";
|
||||
}
|
||||
|
||||
body.appendChild( div );
|
||||
|
||||
docElem.insertBefore( body, docElem.firstChild );
|
||||
|
||||
ret = div.offsetWidth;
|
||||
|
||||
if( fakeUsed ){
|
||||
docElem.removeChild( body );
|
||||
}
|
||||
else {
|
||||
body.removeChild( div );
|
||||
}
|
||||
|
||||
//also update eminpx before returning
|
||||
ret = eminpx = parseFloat(ret);
|
||||
|
||||
return ret;
|
||||
},
|
||||
|
||||
//cached container for 1em value, populated the first time it's needed
|
||||
eminpx,
|
||||
|
||||
//enable/disable styles
|
||||
applyMedia = function( fromResize ){
|
||||
var name = "clientWidth",
|
||||
docElemProp = docElem[ name ],
|
||||
currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[ name ] || docElemProp,
|
||||
styleBlocks = {},
|
||||
lastLink = links[ links.length-1 ],
|
||||
now = (new Date()).getTime();
|
||||
|
||||
//throttle resize calls
|
||||
if( fromResize && lastCall && now - lastCall < resizeThrottle ){
|
||||
clearTimeout( resizeDefer );
|
||||
resizeDefer = setTimeout( applyMedia, resizeThrottle );
|
||||
return;
|
||||
}
|
||||
else {
|
||||
lastCall = now;
|
||||
}
|
||||
|
||||
for( var i in mediastyles ){
|
||||
var thisstyle = mediastyles[ i ],
|
||||
min = thisstyle.minw,
|
||||
max = thisstyle.maxw,
|
||||
minnull = min === null,
|
||||
maxnull = max === null,
|
||||
em = "em";
|
||||
|
||||
if( !!min ){
|
||||
min = parseFloat( min ) * ( min.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 );
|
||||
}
|
||||
if( !!max ){
|
||||
max = parseFloat( max ) * ( max.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 );
|
||||
}
|
||||
|
||||
// if there's no media query at all (the () part), or min or max is not null, and if either is present, they're true
|
||||
if( !thisstyle.hasquery || ( !minnull || !maxnull ) && ( minnull || currWidth >= min ) && ( maxnull || currWidth <= max ) ){
|
||||
if( !styleBlocks[ thisstyle.media ] ){
|
||||
styleBlocks[ thisstyle.media ] = [];
|
||||
}
|
||||
styleBlocks[ thisstyle.media ].push( rules[ thisstyle.rules ] );
|
||||
}
|
||||
}
|
||||
|
||||
//remove any existing respond style element(s)
|
||||
for( var i in appendedEls ){
|
||||
if( appendedEls[ i ] && appendedEls[ i ].parentNode === head ){
|
||||
head.removeChild( appendedEls[ i ] );
|
||||
}
|
||||
}
|
||||
|
||||
//inject active styles, grouped by media type
|
||||
for( var i in styleBlocks ){
|
||||
var ss = doc.createElement( "style" ),
|
||||
css = styleBlocks[ i ].join( "\n" );
|
||||
|
||||
ss.type = "text/css";
|
||||
ss.media = i;
|
||||
|
||||
//originally, ss was appended to a documentFragment and sheets were appended in bulk.
|
||||
//this caused crashes in IE in a number of circumstances, such as when the HTML element had a bg image set, so appending beforehand seems best. Thanks to @dvelyk for the initial research on this one!
|
||||
head.insertBefore( ss, lastLink.nextSibling );
|
||||
|
||||
if ( ss.styleSheet ){
|
||||
ss.styleSheet.cssText = css;
|
||||
}
|
||||
else {
|
||||
ss.appendChild( doc.createTextNode( css ) );
|
||||
}
|
||||
|
||||
//push to appendedEls to track for later removal
|
||||
appendedEls.push( ss );
|
||||
}
|
||||
},
|
||||
//tweaked Ajax functions from Quirksmode
|
||||
ajax = function( url, callback ) {
|
||||
var req = xmlHttp();
|
||||
if (!req){
|
||||
return;
|
||||
}
|
||||
req.open( "GET", url, true );
|
||||
req.onreadystatechange = function () {
|
||||
if ( req.readyState != 4 || req.status != 200 && req.status != 304 ){
|
||||
return;
|
||||
}
|
||||
callback( req.responseText );
|
||||
}
|
||||
if ( req.readyState == 4 ){
|
||||
return;
|
||||
}
|
||||
req.send( null );
|
||||
},
|
||||
//define ajax obj
|
||||
xmlHttp = (function() {
|
||||
var xmlhttpmethod = false;
|
||||
try {
|
||||
xmlhttpmethod = new XMLHttpRequest();
|
||||
}
|
||||
catch( e ){
|
||||
xmlhttpmethod = new ActiveXObject( "Microsoft.XMLHTTP" );
|
||||
}
|
||||
return function(){
|
||||
return xmlhttpmethod;
|
||||
};
|
||||
})();
|
||||
|
||||
//translate CSS
|
||||
ripCSS();
|
||||
|
||||
//expose update for re-running respond later on
|
||||
respond.update = ripCSS;
|
||||
|
||||
//adjust on resize
|
||||
function callMedia(){
|
||||
applyMedia( true );
|
||||
}
|
||||
if( win.addEventListener ){
|
||||
win.addEventListener( "resize", callMedia, false );
|
||||
}
|
||||
else if( win.attachEvent ){
|
||||
win.attachEvent( "onresize", callMedia );
|
||||
}
|
||||
})(this);
|
||||
@@ -0,0 +1,6 @@
|
||||
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
|
||||
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
|
||||
window.matchMedia=window.matchMedia||(function(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div");g.id="mq-test-1";g.style.cssText="position:absolute;top:-100em";d.style.background="none";d.appendChild(g);return function(h){g.innerHTML='­<style media="'+h+'"> #mq-test-1 { width: 42px; }</style>';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document);
|
||||
|
||||
/*! Respond.js v1.2.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
|
||||
(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B<y;B++){A=D[B],z=A.href,C=A.media,x=A.rel&&A.rel.toLowerCase()==="stylesheet";if(!!z&&x&&!o[z]){if(A.styleSheet&&A.styleSheet.rawCssText){m(A.styleSheet.rawCssText,z,C);o[z]=true}else{if((!/^([a-zA-Z:]*\/\/)/.test(z)&&!g)||z.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:z,media:C})}}}}u()},u=function(){if(d.length){var x=d.shift();n(x.href,function(y){m(y,x.href,x.media);o[x.href]=true;u()})}},m=function(I,x,z){var G=I.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),J=G&&G.length||0,x=x.substring(0,x.lastIndexOf("/")),y=function(K){return K.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+x+"$2$3")},A=!J&&z,D=0,C,E,F,B,H;if(x.length){x+="/"}if(A){J=1}for(;D<J;D++){C=0;if(A){E=z;k.push(y(I))}else{E=G[D].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&y(RegExp.$2))}B=E.split(",");H=B.length;for(;C<H;C++){F=B[C];i.push({media:F.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:k.length-1,hasquery:F.indexOf("(")>-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l<h){clearTimeout(r);r=setTimeout(j,h);return}else{l=z}for(var E in i){var K=i[E],C=K.minw,J=K.maxw,A=C===null,L=J===null,y="em";if(!!C){C=parseFloat(C)*(C.indexOf(y)>-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this);
|
||||
@@ -0,0 +1,14 @@
|
||||
using Microsoft.Owin;
|
||||
using Owin;
|
||||
|
||||
[assembly: OwinStartupAttribute(typeof(ContosoClinic.Startup))]
|
||||
namespace ContosoClinic
|
||||
{
|
||||
public partial class Startup
|
||||
{
|
||||
public void Configuration(IAppBuilder app)
|
||||
{
|
||||
ConfigureAuth(app);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
@{
|
||||
ViewBag.Title = "Confirm Email";
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
<div>
|
||||
<p>
|
||||
Thank you for confirming your email. Please @Html.ActionLink("Click here to Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
|
||||
</p>
|
||||
</div>
|
||||
@@ -0,0 +1,36 @@
|
||||
@model ContosoClinic.Models.ExternalLoginConfirmationViewModel
|
||||
@{
|
||||
ViewBag.Title = "Register";
|
||||
}
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
<h3>Associate your @ViewBag.LoginProvider account.</h3>
|
||||
|
||||
@using (Html.BeginForm("ExternalLoginConfirmation", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<h4>Association Form</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
|
||||
<p class="text-info">
|
||||
You've successfully authenticated with <strong>@ViewBag.LoginProvider</strong>.
|
||||
Please enter a user name for this site below and click the Register button to finish
|
||||
logging in.
|
||||
</p>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
|
||||
@Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" class="btn btn-default" value="Register" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
@{
|
||||
ViewBag.Title = "Login Failure";
|
||||
}
|
||||
|
||||
<hgroup>
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
<h3 class="text-danger">Unsuccessful login with service.</h3>
|
||||
</hgroup>
|
||||
@@ -0,0 +1,29 @@
|
||||
@model ContosoClinic.Models.ForgotPasswordViewModel
|
||||
@{
|
||||
ViewBag.Title = "Forgot your password?";
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
|
||||
@using (Html.BeginForm("ForgotPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<h4>Enter your email.</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary("", new { @class = "text-danger" })
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" class="btn btn-default" value="Email Link" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
@{
|
||||
ViewBag.Title = "Forgot Password Confirmation";
|
||||
}
|
||||
|
||||
<hgroup class="title">
|
||||
<h1>@ViewBag.Title.</h1>
|
||||
</hgroup>
|
||||
<div>
|
||||
<p>
|
||||
Please check your email to reset your password.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
@using ContosoClinic.Models
|
||||
@model LoginViewModel
|
||||
@{
|
||||
ViewBag.Title = "Log in";
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<section id="loginForm">
|
||||
@using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<h4>Use a local account to log in.</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
|
||||
@Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.Password, new { @class = "form-control" })
|
||||
@Html.ValidationMessageFor(m => m.Password, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div class="checkbox">
|
||||
@Html.CheckBoxFor(m => m.RememberMe)
|
||||
@Html.LabelFor(m => m.RememberMe)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Log in" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
@Html.ActionLink("Register as a new user", "Register")
|
||||
</p>
|
||||
@* Enable this once you have account confirmation enabled for password reset functionality
|
||||
<p>
|
||||
@Html.ActionLink("Forgot your password?", "ForgotPassword")
|
||||
</p>*@
|
||||
}
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<section id="socialLoginForm">
|
||||
@Html.Partial("_ExternalLoginsListPartial", new ExternalLoginListViewModel { ReturnUrl = ViewBag.ReturnUrl })
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
@model ContosoClinic.Models.RegisterViewModel
|
||||
@{
|
||||
ViewBag.Title = "Register";
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
|
||||
@using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<h4>Create a new account.</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary("", new { @class = "text-danger" })
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.Password, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" class="btn btn-default" value="Register" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
@model ContosoClinic.Models.ResetPasswordViewModel
|
||||
@{
|
||||
ViewBag.Title = "Reset password";
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
|
||||
@using (Html.BeginForm("ResetPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<h4>Reset your password.</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary("", new { @class = "text-danger" })
|
||||
@Html.HiddenFor(model => model.Code)
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.Password, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" class="btn btn-default" value="Reset" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
@{
|
||||
ViewBag.Title = "Reset password confirmation";
|
||||
}
|
||||
|
||||
<hgroup class="title">
|
||||
<h1>@ViewBag.Title.</h1>
|
||||
</hgroup>
|
||||
<div>
|
||||
<p>
|
||||
Your password has been reset. Please @Html.ActionLink("click here to log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
|
||||
</p>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
@model ContosoClinic.Models.SendCodeViewModel
|
||||
@{
|
||||
ViewBag.Title = "Send";
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
|
||||
@using (Html.BeginForm("SendCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) {
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.Hidden("rememberMe", @Model.RememberMe)
|
||||
<h4>Send verification code</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
Select Two-Factor Authentication Provider:
|
||||
@Html.DropDownListFor(model => model.SelectedProvider, Model.Providers)
|
||||
<input type="submit" value="Submit" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
@model ContosoClinic.Models.VerifyCodeViewModel
|
||||
@{
|
||||
ViewBag.Title = "Verify";
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
|
||||
@using (Html.BeginForm("VerifyCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) {
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.Hidden("provider", @Model.Provider)
|
||||
@Html.Hidden("rememberMe", @Model.RememberMe)
|
||||
<h4>Enter verification code</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary("", new { @class = "text-danger" })
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.TextBoxFor(m => m.Code, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div class="checkbox">
|
||||
@Html.CheckBoxFor(m => m.RememberBrowser)
|
||||
@Html.LabelFor(m => m.RememberBrowser)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" class="btn btn-default" value="Submit" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
@model ContosoClinic.Models.ExternalLoginListViewModel
|
||||
@using Microsoft.Owin.Security
|
||||
|
||||
<h4>Use another service to log in.</h4>
|
||||
<hr />
|
||||
@{
|
||||
var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes();
|
||||
if (loginProviders.Count() == 0) {
|
||||
<div>
|
||||
<p>
|
||||
There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=403804">this article</a>
|
||||
for details on setting up this ASP.NET application to support logging in via external services.
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
else {
|
||||
using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = Model.ReturnUrl })) {
|
||||
@Html.AntiForgeryToken()
|
||||
<div id="socialLoginList">
|
||||
<p>
|
||||
@foreach (AuthenticationDescription p in loginProviders) {
|
||||
<button type="submit" class="btn btn-default" id="@p.AuthenticationType" name="provider" value="@p.AuthenticationType" title="Log in using your @p.Caption account">@p.AuthenticationType</button>
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
@{
|
||||
ViewBag.Title = "About";
|
||||
}
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
<h3>@ViewBag.Message</h3>
|
||||
|
||||
<p>Use this area to provide additional information.</p>
|
||||
@@ -0,0 +1,17 @@
|
||||
@{
|
||||
ViewBag.Title = "Contact";
|
||||
}
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
<h3>@ViewBag.Message</h3>
|
||||
|
||||
<address>
|
||||
One Microsoft Way<br />
|
||||
Redmond, WA 98052-6399<br />
|
||||
<abbr title="Phone">P:</abbr>
|
||||
425.555.0100
|
||||
</address>
|
||||
|
||||
<address>
|
||||
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.com</a><br />
|
||||
<strong>Marketing:</strong> <a href="mailto:Marketing@example.com">Marketing@example.com</a>
|
||||
</address>
|
||||
@@ -0,0 +1,7 @@
|
||||
@{
|
||||
ViewBag.Title = "Home Page";
|
||||
}
|
||||
|
||||
<div class="jumbotron">
|
||||
<h1>Contoso Clinic</h1>
|
||||
</div>
|
||||
@@ -0,0 +1,29 @@
|
||||
@model ContosoClinic.Models.AddPhoneNumberViewModel
|
||||
@{
|
||||
ViewBag.Title = "Phone Number";
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
|
||||
@using (Html.BeginForm("AddPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<h4>Add a phone number</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary("", new { @class = "text-danger" })
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.Number, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.TextBoxFor(m => m.Number, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" class="btn btn-default" value="Submit" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
@model ContosoClinic.Models.ChangePasswordViewModel
|
||||
@{
|
||||
ViewBag.Title = "Change Password";
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
|
||||
@using (Html.BeginForm("ChangePassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<h4>Change Password Form</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary("", new { @class = "text-danger" })
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.OldPassword, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Change password" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
@model ContosoClinic.Models.IndexViewModel
|
||||
@{
|
||||
ViewBag.Title = "Manage";
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
|
||||
<p class="text-success">@ViewBag.StatusMessage</p>
|
||||
<div>
|
||||
<h4>Change your account settings</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Password:</dt>
|
||||
<dd>
|
||||
[
|
||||
@if (Model.HasPassword)
|
||||
{
|
||||
@Html.ActionLink("Change your password", "ChangePassword")
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.ActionLink("Create", "SetPassword")
|
||||
}
|
||||
]
|
||||
</dd>
|
||||
<dt>External Logins:</dt>
|
||||
<dd>
|
||||
@Model.Logins.Count [
|
||||
@Html.ActionLink("Manage", "ManageLogins") ]
|
||||
</dd>
|
||||
@*
|
||||
Phone Numbers can used as a second factor of verification in a two-factor authentication system.
|
||||
|
||||
See <a href="http://go.microsoft.com/fwlink/?LinkId=403804">this article</a>
|
||||
for details on setting up this ASP.NET application to support two-factor authentication using SMS.
|
||||
|
||||
Uncomment the following block after you have set up two-factor authentication
|
||||
*@
|
||||
@*
|
||||
<dt>Phone Number:</dt>
|
||||
<dd>
|
||||
@(Model.PhoneNumber ?? "None") [
|
||||
@if (Model.PhoneNumber != null)
|
||||
{
|
||||
@Html.ActionLink("Change", "AddPhoneNumber")
|
||||
@: |
|
||||
@Html.ActionLink("Remove", "RemovePhoneNumber")
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.ActionLink("Add", "AddPhoneNumber")
|
||||
}
|
||||
]
|
||||
</dd>
|
||||
*@
|
||||
<dt>Two-Factor Authentication:</dt>
|
||||
<dd>
|
||||
<p>
|
||||
There are no two-factor authentication providers configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=403804">this article</a>
|
||||
for details on setting up this ASP.NET application to support two-factor authentication.
|
||||
</p>
|
||||
@*@if (Model.TwoFactor)
|
||||
{
|
||||
using (Html.BeginForm("DisableTwoFactorAuthentication", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<text>Enabled
|
||||
<input type="submit" value="Disable" class="btn btn-link" />
|
||||
</text>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
using (Html.BeginForm("EnableTwoFactorAuthentication", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<text>Disabled
|
||||
<input type="submit" value="Enable" class="btn btn-link" />
|
||||
</text>
|
||||
}
|
||||
}*@
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
@@ -0,0 +1,70 @@
|
||||
@model ContosoClinic.Models.ManageLoginsViewModel
|
||||
@using Microsoft.Owin.Security
|
||||
@{
|
||||
ViewBag.Title = "Manage your external logins";
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
|
||||
<p class="text-success">@ViewBag.StatusMessage</p>
|
||||
@{
|
||||
var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes();
|
||||
if (loginProviders.Count() == 0) {
|
||||
<div>
|
||||
<p>
|
||||
There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=313242">this article</a>
|
||||
for details on setting up this ASP.NET application to support logging in via external services.
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Model.CurrentLogins.Count > 0)
|
||||
{
|
||||
<h4>Registered Logins</h4>
|
||||
<table class="table">
|
||||
<tbody>
|
||||
@foreach (var account in Model.CurrentLogins)
|
||||
{
|
||||
<tr>
|
||||
<td>@account.LoginProvider</td>
|
||||
<td>
|
||||
@if (ViewBag.ShowRemoveButton)
|
||||
{
|
||||
using (Html.BeginForm("RemoveLogin", "Manage"))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<div>
|
||||
@Html.Hidden("loginProvider", account.LoginProvider)
|
||||
@Html.Hidden("providerKey", account.ProviderKey)
|
||||
<input type="submit" class="btn btn-default" value="Remove" title="Remove this @account.LoginProvider login from your account" />
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@:
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
if (Model.OtherLogins.Count > 0)
|
||||
{
|
||||
using (Html.BeginForm("LinkLogin", "Manage"))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<div id="socialLoginList">
|
||||
<p>
|
||||
@foreach (AuthenticationDescription p in Model.OtherLogins)
|
||||
{
|
||||
<button type="submit" class="btn btn-default" id="@p.AuthenticationType" name="provider" value="@p.AuthenticationType" title="Log in using your @p.Caption account">@p.AuthenticationType</button>
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
@model ContosoClinic.Models.SetPasswordViewModel
|
||||
@{
|
||||
ViewBag.Title = "Create Password";
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
<p class="text-info">
|
||||
You do not have a local username/password for this site. Add a local
|
||||
account so you can log in without an external login.
|
||||
</p>
|
||||
|
||||
@using (Html.BeginForm("SetPassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<h4>Create Local Login</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary("", new { @class = "text-danger" })
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Set password" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
@model ContosoClinic.Models.VerifyPhoneNumberViewModel
|
||||
@{
|
||||
ViewBag.Title = "Verify Phone Number";
|
||||
}
|
||||
|
||||
<h2>@ViewBag.Title.</h2>
|
||||
|
||||
@using (Html.BeginForm("VerifyPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.Hidden("phoneNumber", @Model.PhoneNumber)
|
||||
<h4>Enter verification code</h4>
|
||||
<h5>@ViewBag.Status</h5>
|
||||
<hr />
|
||||
@Html.ValidationSummary("", new { @class = "text-danger" })
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" })
|
||||
<div class="col-md-10">
|
||||
@Html.TextBoxFor(m => m.Code, new { @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" class="btn btn-default" value="Submit" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
@model ContosoClinic.Models.Patient
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Create";
|
||||
}
|
||||
|
||||
<h2>Create</h2>
|
||||
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<div class="form-horizontal">
|
||||
<h4>Patient</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.SSN, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.SSN, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.SSN, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.FirstName, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.FirstName, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.FirstName, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.LastName, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.LastName, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.LastName, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.MiddleName, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.MiddleName, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.MiddleName, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.StreetAddress, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.StreetAddress, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.StreetAddress, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.City, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.City, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.City, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.ZipCode, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.ZipCode, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.ZipCode, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.State, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.State, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.State, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.BirthDate, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.BirthDate, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.BirthDate, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div>
|
||||
@Html.ActionLink("Back to List", "Index")
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
@model ContosoClinic.Models.Patient
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Patient</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.SSN)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.SSN)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.FirstName)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.FirstName)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LastName)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LastName)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.MiddleName)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.MiddleName)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.StreetAddress)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.StreetAddress)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.City)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.City)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ZipCode)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ZipCode)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.State)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.State)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.BirthDate)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.BirthDate)
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
@using (Html.BeginForm()) {
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<div class="form-actions no-color">
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
@Html.ActionLink("Back to List", "Index")
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -0,0 +1,90 @@
|
||||
@model ContosoClinic.Models.Patient
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>Patient</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.SSN)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.SSN)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.FirstName)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.FirstName)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LastName)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LastName)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.MiddleName)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.MiddleName)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.StreetAddress)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.StreetAddress)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.City)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.City)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ZipCode)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ZipCode)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.State)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.State)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.BirthDate)
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.BirthDate)
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
@Html.ActionLink("Edit", "Edit", new { id = Model.PatientID }) |
|
||||
@Html.ActionLink("Back to List", "Index")
|
||||
</p>
|
||||
@@ -0,0 +1,106 @@
|
||||
@model ContosoClinic.Models.Patient
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<div class="form-horizontal">
|
||||
<h4>Patient</h4>
|
||||
<hr />
|
||||
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
|
||||
@Html.HiddenFor(model => model.PatientID)
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.SSN, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.SSN, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.SSN, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.FirstName, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.FirstName, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.FirstName, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.LastName, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.LastName, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.LastName, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.MiddleName, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.MiddleName, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.MiddleName, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.StreetAddress, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.StreetAddress, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.StreetAddress, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.City, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.City, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.City, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.ZipCode, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.ZipCode, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.ZipCode, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.State, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.State, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.State, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.BirthDate, htmlAttributes: new { @class = "control-label col-md-2" })
|
||||
<div class="col-md-10">
|
||||
@Html.EditorFor(model => model.BirthDate, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.BirthDate, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div>
|
||||
@Html.ActionLink("Back to List", "Index")
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
@model IEnumerable<ContosoClinic.Models.Patient>
|
||||
@{
|
||||
ViewBag.Title = "Index";
|
||||
}
|
||||
<h2>Index</h2>
|
||||
<p>
|
||||
@Html.ActionLink("Create New", "Create")
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
<p>
|
||||
Name or SSN: @Html.TextBox("SearchString")
|
||||
Max age: @Html.TextBox("MaxAgeString")
|
||||
<input type="submit" value="Search" />
|
||||
</p>
|
||||
}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SSN)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.FirstName)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.LastName)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.MiddleName)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.StreetAddress)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.City)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ZipCode)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.State)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.BirthDate)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SSN)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.FirstName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.LastName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.MiddleName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.StreetAddress)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.City)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ZipCode)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.State)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.BirthDate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.ActionLink("Edit", "Edit", new { id = item.PatientID }) |
|
||||
@Html.ActionLink("Details", "Details", new { id = item.PatientID }) |
|
||||
@Html.ActionLink("Delete", "Delete", new { id = item.PatientID })
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
@@ -0,0 +1,9 @@
|
||||
@model System.Web.Mvc.HandleErrorInfo
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Error";
|
||||
}
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
@model System.Web.Mvc.HandleErrorInfo
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Locked Out";
|
||||
}
|
||||
|
||||
<hgroup>
|
||||
<h1 class="text-danger">Locked out.</h1>
|
||||
<h2 class="text-danger">This account has been locked out, please try again later.</h2>
|
||||
</hgroup>
|
||||
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>@ViewBag.Title - Contoso Clinic</title>
|
||||
@Styles.Render("~/Content/css")
|
||||
@Scripts.Render("~/bundles/modernizr")
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
@Html.ActionLink("Contoso Clinic", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>@Html.ActionLink("Home", "Index", "Home")</li>
|
||||
<li>@Html.ActionLink("Patients", "Index", "Patients")</li>
|
||||
<li>@Html.ActionLink("Visits", "Index", "Visits")</li>
|
||||
<li>@Html.ActionLink("About", "About", "Home")</li>
|
||||
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>
|
||||
</ul>
|
||||
@Html.Partial("_LoginPartial")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container body-content">
|
||||
@RenderBody()
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© @DateTime.Now.Year - Contoso Clinic</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@Scripts.Render("~/bundles/jquery")
|
||||
@Scripts.Render("~/bundles/bootstrap")
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,22 @@
|
||||
@using Microsoft.AspNet.Identity
|
||||
@if (Request.IsAuthenticated)
|
||||
{
|
||||
using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
@Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" })
|
||||
</li>
|
||||
<li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>
|
||||
</ul>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
|
||||
<li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
|
||||
</ul>
|
||||
}
|
||||