1
0
mirror of https://github.com/chyzy/RSystem-MVC synced 2024-11-21 15:05:29 +01:00

Add project files.

This commit is contained in:
Bartosz Chyży 2018-04-17 11:20:49 +02:00
commit cbfc88fdbe
188 changed files with 48310 additions and 0 deletions

63
.gitattributes vendored Normal file
View File

@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
*.rb linguist-language=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain

265
.gitignore vendored Normal file
View File

@ -0,0 +1,265 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
*.[Pp]ublish.xml
*.azurePubxml
*.pubxml
*.publishproj
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
project.fragment.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
#*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc

57
README.md Normal file
View File

@ -0,0 +1,57 @@
# RSystem
Prototype of dynamic recuitment system for Adam Mickiewicz University.
## Used technolgies
<ul>
<li>ASP.NET MVC 5</li>
<li>Entity Framework 6</li>
<li>.NET Identity</li>
<li>JavaScript</li>
<li>Ajax</li>
<li>jQuery</li>
<li>Json.NET</li>
<li>Modernizr</li>
<li>Bootstrap 3</li>
<li>HTML 5</li>
<li>CSS 3</li>
<li>Bootbox</li>
<li>AutoMapper</li>
<li>Others</li>
</ul>
## How can I check it out
<b>The first way:</b></br>
Just clone this reposotory ( ```git clone https://github.com/chyzy/RSystem```).</br>
Uncomment Seed method placed in Configuration.cs and execute all migrations (SQL Server/SQLite required).</br>
Deploy the solution on Your's local IIS.</br></br>
<b>The second way:</b></br>
Entire solution is hosted by Azure and available <a href="http://rsystemchyzy.azurewebsites.net">here</a>.
## Admin features
If You host RSystem on your's local ISS You can sign in as an admin and customize all specialization and faculties.</br>
Default Admin PESEL: <b>11111111111</b></br>
Default Admin Password: <b>Admin123</b>
## In near future
Add second language (english) for Recruit and Account controllers.
## Credits
Login page is inspired by <a href="https://rekrutacja.put.poznan.pl/en/">Ksantypa</a> canditate's portal of Poznan University of Technology.
## Author
Bartosz Chyży

25
RSystem.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2005
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RSystem", "RSystem\RSystem.csproj", "{4C4DD8E0-19F4-4990-8314-B5E10EB6EC60}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4C4DD8E0-19F4-4990-8314-B5E10EB6EC60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C4DD8E0-19F4-4990-8314-B5E10EB6EC60}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C4DD8E0-19F4-4990-8314-B5E10EB6EC60}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C4DD8E0-19F4-4990-8314-B5E10EB6EC60}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B6C59A0E-5E0E-4E48-9B6E-13EEA6B91800}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Security.Cryptography.X509Certificates;
using System.Web.Http;
using RSystem.DAL;
namespace RSystem.Api
{
[Authorize]
public class SpecializationsController : ApiController
{
private ApplicationDbContext db = new ApplicationDbContext();
[HttpDelete]
public IHttpActionResult DeleteMaturaSubejct(int? id)
{
if (id == null)
return BadRequest();
var toRemove = db.PointsMultipilers.FirstOrDefault(i => i.PointsMultipilerId == id);
if (toRemove != null)
{
db.PointsMultipilers.Remove(toRemove);
db.SaveChanges();
return Ok();
}
return NotFound();
}
}
}

View File

@ -0,0 +1,207 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace RSystem.App_LocalResources.Account {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Login {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Login() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RSystem.App_LocalResources.Account.Login", typeof(Login).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to Proszę podać hasło dla.
/// </summary>
public static string GivePassword {
get {
return ResourceManager.GetString("GivePassword", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Aby kontynuowac, prosze podac PESEL.
/// </summary>
public static string GivePESEL {
get {
return ResourceManager.GetString("GivePESEL", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Jeśli potrzebujesz pomocy, zachęcamy do kontaktu..
/// </summary>
public static string Help {
get {
return ResourceManager.GetString("Help", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to O tutaj!.
/// </summary>
public static string Here {
get {
return ResourceManager.GetString("Here", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Nieprawidłowe hasło, spróbuj jeszcze raz..
/// </summary>
public static string IncorrectPassword {
get {
return ResourceManager.GetString("IncorrectPassword", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Potrzebujesz pomocy?.
/// </summary>
public static string NeedHelp {
get {
return ResourceManager.GetString("NeedHelp", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Dalej.
/// </summary>
public static string Next {
get {
return ResourceManager.GetString("Next", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Podany PESEL nie został znaleziony..
/// </summary>
public static string PESELNotFound {
get {
return ResourceManager.GetString("PESELNotFound", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to PESEL powinien składać się z 11 cyfr..
/// </summary>
public static string RegexPESEL {
get {
return ResourceManager.GetString("RegexPESEL", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to regulaminie.
/// </summary>
public static string Regulations {
get {
return ResourceManager.GetString("Regulations", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to PESEL jest wymagany..
/// </summary>
public static string ReqPESEL {
get {
return ResourceManager.GetString("ReqPESEL", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Zaloguj.
/// </summary>
public static string SignIn {
get {
return ResourceManager.GetString("SignIn", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Zaloguj się.
/// </summary>
public static string Title {
get {
return ResourceManager.GetString("Title", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Odwiedź strone rekrutacji!.
/// </summary>
public static string VisitRecrutationSite {
get {
return ResourceManager.GetString("VisitRecrutationSite", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Chcesz wiedziec wiecej?.
/// </summary>
public static string WantMore {
get {
return ResourceManager.GetString("WantMore", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Wprowadzając numer PESEL w powyższym formularzu godzisz się na warunki opisane w ..
/// </summary>
public static string Warning {
get {
return ResourceManager.GetString("Warning", resourceCulture);
}
}
}
}

View File

View File

@ -0,0 +1,168 @@
<?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="GivePassword" xml:space="preserve">
<value>Please fill in with passord for</value>
</data>
<data name="GivePESEL" xml:space="preserve">
<value>Please fill in your PESEL to continue</value>
</data>
<data name="Help" xml:space="preserve">
<value>If you need help contact us.</value>
</data>
<data name="Here" xml:space="preserve">
<value>Here!</value>
</data>
<data name="NeedHelp" xml:space="preserve">
<value>Need help?</value>
</data>
<data name="Next" xml:space="preserve">
<value>Next</value>
</data>
<data name="Regulations" xml:space="preserve">
<value>regulations</value>
</data>
<data name="SignIn" xml:space="preserve">
<value>Sign In</value>
</data>
<data name="Title" xml:space="preserve">
<value>Sign In</value>
</data>
<data name="VisitRecrutationSite" xml:space="preserve">
<value>Visit our recrutation site!</value>
</data>
<data name="WantMore" xml:space="preserve">
<value>Want more?</value>
</data>
<data name="Warning" xml:space="preserve">
<value>By entering the PESEL number in above form you accept the conditions in our</value>
</data>
<data name="IncorrectPassword" xml:space="preserve">
<value>Incorrect password, try again.</value>
</data>
<data name="PESELNotFound" xml:space="preserve">
<value>Given PESEL was not found.</value>
</data>
<data name="RegexPESEL" xml:space="preserve">
<value>PESEL should consist of 11 digits.</value>
</data>
<data name="ReqPESEL" xml:space="preserve">
<value>PESEL is required.</value>
</data>
</root>

View File

@ -0,0 +1,168 @@
<?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="GivePassword" xml:space="preserve">
<value>Proszę podać hasło dla</value>
</data>
<data name="GivePESEL" xml:space="preserve">
<value>Aby kontynuowac, prosze podac PESEL</value>
</data>
<data name="Help" xml:space="preserve">
<value>Jeśli potrzebujesz pomocy, zachęcamy do kontaktu.</value>
</data>
<data name="Here" xml:space="preserve">
<value>O tutaj!</value>
</data>
<data name="NeedHelp" xml:space="preserve">
<value>Potrzebujesz pomocy?</value>
</data>
<data name="Next" xml:space="preserve">
<value>Dalej</value>
</data>
<data name="Regulations" xml:space="preserve">
<value>regulaminie</value>
</data>
<data name="SignIn" xml:space="preserve">
<value>Zaloguj</value>
</data>
<data name="Title" xml:space="preserve">
<value>Zaloguj się</value>
</data>
<data name="VisitRecrutationSite" xml:space="preserve">
<value>Odwiedź strone rekrutacji!</value>
</data>
<data name="WantMore" xml:space="preserve">
<value>Chcesz wiedziec wiecej?</value>
</data>
<data name="Warning" xml:space="preserve">
<value>Wprowadzając numer PESEL w powyższym formularzu godzisz się na warunki opisane w .</value>
</data>
<data name="IncorrectPassword" xml:space="preserve">
<value>Nieprawidłowe hasło, spróbuj jeszcze raz.</value>
</data>
<data name="RegexPESEL" xml:space="preserve">
<value>PESEL powinien składać się z 11 cyfr.</value>
</data>
<data name="ReqPESEL" xml:space="preserve">
<value>PESEL jest wymagany.</value>
</data>
<data name="PESELNotFound" xml:space="preserve">
<value>Podany PESEL nie został znaleziony.</value>
</data>
</root>

View File

@ -0,0 +1,153 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace RSystem.App_LocalResources.Layout {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Layout {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Layout() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RSystem.App_LocalResources.Layout.Layout", typeof(Layout).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to Portal kandytata.
/// </summary>
public static string CandidatesPortal {
get {
return ResourceManager.GetString("CandidatesPortal", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Kontakt UAM.
/// </summary>
public static string ContactUAM {
get {
return ResourceManager.GetString("ContactUAM", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to O tutaj!.
/// </summary>
public static string Here {
get {
return ResourceManager.GetString("Here", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Logowanie.
/// </summary>
public static string Login {
get {
return ResourceManager.GetString("Login", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to /Content/img/uam-logo2.png.
/// </summary>
public static string LogoPath {
get {
return ResourceManager.GetString("LogoPath", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Strona główna UAM.
/// </summary>
public static string MainSiteUAM {
get {
return ResourceManager.GetString("MainSiteUAM", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Rekrutacja UAM.
/// </summary>
public static string RecrutationUAM {
get {
return ResourceManager.GetString("RecrutationUAM", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Rejestracja.
/// </summary>
public static string Register {
get {
return ResourceManager.GetString("Register", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to UAM Rekrutacja.
/// </summary>
public static string Title {
get {
return ResourceManager.GetString("Title", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Uniwersytet im. Adama Mickiewicza.
/// </summary>
public static string UAM {
get {
return ResourceManager.GetString("UAM", resourceCulture);
}
}
}
}

View File

View File

@ -0,0 +1,150 @@
<?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="CandidatesPortal" xml:space="preserve">
<value>Candidate's portal</value>
</data>
<data name="ContactUAM" xml:space="preserve">
<value>Contact with UAM</value>
</data>
<data name="Here" xml:space="preserve">
<value>Here!</value>
</data>
<data name="Login" xml:space="preserve">
<value>Sign In</value>
</data>
<data name="LogoPath" xml:space="preserve">
<value>/Content/img/uam-logo2en.png</value>
</data>
<data name="MainSiteUAM" xml:space="preserve">
<value>Main site of UAM</value>
</data>
<data name="RecrutationUAM" xml:space="preserve">
<value>Recrutation site of UAM</value>
</data>
<data name="Register" xml:space="preserve">
<value>Sign Up</value>
</data>
<data name="Title" xml:space="preserve">
<value>UAM Recrutation</value>
</data>
<data name="UAM" xml:space="preserve">
<value>Adam Mickiewicz University</value>
</data>
</root>

View File

@ -0,0 +1,150 @@
<?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="CandidatesPortal" xml:space="preserve">
<value>Portal kandytata</value>
</data>
<data name="ContactUAM" xml:space="preserve">
<value>Kontakt UAM</value>
</data>
<data name="Here" xml:space="preserve">
<value>O tutaj!</value>
</data>
<data name="Login" xml:space="preserve">
<value>Logowanie</value>
</data>
<data name="LogoPath" xml:space="preserve">
<value>/Content/img/uam-logo2.png</value>
</data>
<data name="MainSiteUAM" xml:space="preserve">
<value>Strona główna UAM</value>
</data>
<data name="RecrutationUAM" xml:space="preserve">
<value>Rekrutacja UAM</value>
</data>
<data name="Register" xml:space="preserve">
<value>Rejestracja</value>
</data>
<data name="Title" xml:space="preserve">
<value>UAM Rekrutacja</value>
</data>
<data name="UAM" xml:space="preserve">
<value>Uniwersytet im. Adama Mickiewicza</value>
</data>
</root>

View File

@ -0,0 +1,135 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace RSystem.App_LocalResources.Recruit {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Home {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Home() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RSystem.App_LocalResources.Recruit.Home", typeof(Home).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to Kierunki.
/// </summary>
public static string Courses {
get {
return ResourceManager.GetString("Courses", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Dane.
/// </summary>
public static string Data {
get {
return ResourceManager.GetString("Data", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Edukacja.
/// </summary>
public static string Education {
get {
return ResourceManager.GetString("Education", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Witaj.
/// </summary>
public static string Hello {
get {
return ResourceManager.GetString("Hello", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Skorzystaj z menu, aby przejść kolejno do wymaganych sekcji formularza. Po wypełnieniu każdej z nich, będziesz wracał na tę stronę, a wypełnione przez Ciebie sekcje oznaczymy kolorem zielonym. Sekcje, które wymagają Twojej uwagi oznaczyliśmy kolorem białem..
/// </summary>
public static string Hint {
get {
return ResourceManager.GetString("Hint", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to .
/// </summary>
public static string Hint2 {
get {
return ResourceManager.GetString("Hint2", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Zdjęcie.
/// </summary>
public static string Photo {
get {
return ResourceManager.GetString("Photo", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Prosimy o rzetelne i dokładne wypełnienie podania wszystkie dane będą weryfikowane na podstawie świadectwa dojrzałości i innych dokumentów..
/// </summary>
public static string Warning {
get {
return ResourceManager.GetString("Warning", resourceCulture);
}
}
}
}

View File

View File

@ -0,0 +1,144 @@
<?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="Courses" xml:space="preserve">
<value>Courses</value>
</data>
<data name="Data" xml:space="preserve">
<value>Data</value>
</data>
<data name="Education" xml:space="preserve">
<value>Education</value>
</data>
<data name="Hello" xml:space="preserve">
<value>Hello</value>
</data>
<data name="Hint" xml:space="preserve">
<value>Use this menu to fill required data. Will be added.....</value>
</data>
<data name="Hint2" xml:space="preserve">
<value />
</data>
<data name="Photo" xml:space="preserve">
<value>Photo</value>
</data>
<data name="Warning" xml:space="preserve">
<value>Please fill all data carefully and honestly. All data will be verified based on your's matura exam cerificate and other documents.</value>
</data>
</root>

View File

@ -0,0 +1,144 @@
<?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="Courses" xml:space="preserve">
<value>Kierunki</value>
</data>
<data name="Data" xml:space="preserve">
<value>Dane</value>
</data>
<data name="Education" xml:space="preserve">
<value>Edukacja</value>
</data>
<data name="Hello" xml:space="preserve">
<value>Witaj</value>
</data>
<data name="Hint" xml:space="preserve">
<value>Skorzystaj z menu, aby przejść kolejno do wymaganych sekcji formularza. Po wypełnieniu każdej z nich, będziesz wracał na tę stronę, a wypełnione przez Ciebie sekcje oznaczymy kolorem zielonym. Sekcje, które wymagają Twojej uwagi oznaczyliśmy kolorem białem.</value>
</data>
<data name="Hint2" xml:space="preserve">
<value />
</data>
<data name="Photo" xml:space="preserve">
<value>Zdjęcie</value>
</data>
<data name="Warning" xml:space="preserve">
<value>Prosimy o rzetelne i dokładne wypełnienie podania wszystkie dane będą weryfikowane na podstawie świadectwa dojrzałości i innych dokumentów.</value>
</data>
</root>

View File

@ -0,0 +1,33 @@
using System.Web;
using System.Web.Optimization;
namespace RSystem
{
public class BundleConfig
{
// For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/scale.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 https://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/bootbox.js",
"~/Scripts/respond.js"));
bundles.Add(new StyleBundle("~/Content/cssboundle").Include(
"~/Content/bootstrap.css",
"~/Content/Site.css"));
}
}
}

View File

@ -0,0 +1,14 @@
using System.Web;
using System.Web.Mvc;
namespace RSystem
{
public class FilterConfig
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
filters.Add(new AuthorizeAttribute());
}
}
}

View File

@ -0,0 +1,110 @@
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 RSystem.DAL;
using RSystem.Models;
namespace RSystem
{
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 = true,
RequireUniqueEmail = true
};
// Configure validation logic for passwords
manager.PasswordValidator = new PasswordValidator
{
RequiredLength = 6,
RequireNonLetterOrDigit = false,
RequireDigit = true,
RequireLowercase = false,
RequireUppercase = false,
};
// Configure user lockout defaults
manager.UserLockoutEnabledByDefault = false;
manager.DefaultAccountLockoutTimeSpan = TimeSpan.FromMinutes(2);
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);
}
}
}

View File

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace RSystem
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapMvcAttributeRoutes();
routes.MapRoute(
name: "WithLanguage",
url: "{lang}/{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
constraints: new { lang = "pl|en" },
namespaces: new[] { "RSystem.Controllers" }
);
routes.MapRoute(
name: "Defaut",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
namespaces: new[] { "RSystem.Controllers" }
);
}
}
}

View File

@ -0,0 +1,69 @@
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 RSystem.DAL;
using RSystem.Models;
namespace RSystem
{
public partial class Startup
{
// For more information on configuring authentication, please visit https://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 = ""
//});
}
}
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Http;
namespace RSystem
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
}
}
}

View File

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings">
<TelemetryInitializers>
<Add Type="Microsoft.ApplicationInsights.DependencyCollector.HttpDependenciesParsingTelemetryInitializer, Microsoft.AI.DependencyCollector"/>
<Add Type="Microsoft.ApplicationInsights.WindowsServer.AzureRoleEnvironmentTelemetryInitializer, Microsoft.AI.WindowsServer"/>
<Add Type="Microsoft.ApplicationInsights.WindowsServer.AzureWebAppRoleEnvironmentTelemetryInitializer, Microsoft.AI.WindowsServer"/>
<Add Type="Microsoft.ApplicationInsights.WindowsServer.BuildInfoConfigComponentVersionTelemetryInitializer, Microsoft.AI.WindowsServer"/>
<Add Type="Microsoft.ApplicationInsights.Web.WebTestTelemetryInitializer, Microsoft.AI.Web"/>
<Add Type="Microsoft.ApplicationInsights.Web.SyntheticUserAgentTelemetryInitializer, Microsoft.AI.Web">
<!-- Extended list of bots:
search|spider|crawl|Bot|Monitor|BrowserMob|BingPreview|PagePeeker|WebThumb|URL2PNG|ZooShot|GomezA|Google SketchUp|Read Later|KTXN|KHTE|Keynote|Pingdom|AlwaysOn|zao|borg|oegp|silk|Xenu|zeal|NING|htdig|lycos|slurp|teoma|voila|yahoo|Sogou|CiBra|Nutch|Java|JNLP|Daumoa|Genieo|ichiro|larbin|pompos|Scrapy|snappy|speedy|vortex|favicon|indexer|Riddler|scooter|scraper|scrubby|WhatWeb|WinHTTP|voyager|archiver|Icarus6j|mogimogi|Netvibes|altavista|charlotte|findlinks|Retreiver|TLSProber|WordPress|wsr-agent|http client|Python-urllib|AppEngine-Google|semanticdiscovery|facebookexternalhit|web/snippet|Google-HTTP-Java-Client-->
<Filters>search|spider|crawl|Bot|Monitor|AlwaysOn</Filters>
</Add>
<Add Type="Microsoft.ApplicationInsights.Web.ClientIpHeaderTelemetryInitializer, Microsoft.AI.Web"/>
<Add Type="Microsoft.ApplicationInsights.Web.OperationNameTelemetryInitializer, Microsoft.AI.Web"/>
<Add Type="Microsoft.ApplicationInsights.Web.OperationCorrelationTelemetryInitializer, Microsoft.AI.Web"/>
<Add Type="Microsoft.ApplicationInsights.Web.UserTelemetryInitializer, Microsoft.AI.Web"/>
<Add Type="Microsoft.ApplicationInsights.Web.AuthenticatedUserIdTelemetryInitializer, Microsoft.AI.Web"/>
<Add Type="Microsoft.ApplicationInsights.Web.AccountIdTelemetryInitializer, Microsoft.AI.Web"/>
<Add Type="Microsoft.ApplicationInsights.Web.SessionTelemetryInitializer, Microsoft.AI.Web"/>
</TelemetryInitializers>
<TelemetryModules>
<Add Type="Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule, Microsoft.AI.DependencyCollector">
<ExcludeComponentCorrelationHttpHeadersOnDomains>
<!--
Requests to the following hostnames will not be modified by adding correlation headers.
This is only applicable if Profiler is installed via either StatusMonitor or Azure Extension.
Add entries here to exclude additional hostnames.
NOTE: this configuration will be lost upon NuGet upgrade.
-->
<Add>core.windows.net</Add>
<Add>core.chinacloudapi.cn</Add>
<Add>core.cloudapi.de</Add>
<Add>core.usgovcloudapi.net</Add>
<Add>localhost</Add>
<Add>127.0.0.1</Add>
</ExcludeComponentCorrelationHttpHeadersOnDomains>
</Add>
<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule, Microsoft.AI.PerfCounterCollector">
<!--
Use the following syntax here to collect additional performance counters:
<Counters>
<Add PerformanceCounter="\Process(??APP_WIN32_PROC??)\Handle Count" ReportAs="Process handle count" />
...
</Counters>
PerformanceCounter must be either \CategoryName(InstanceName)\CounterName or \CategoryName\CounterName
NOTE: performance counters configuration will be lost upon NuGet upgrade.
The following placeholders are supported as InstanceName:
??APP_WIN32_PROC?? - instance name of the application process for Win32 counters.
??APP_W3SVC_PROC?? - instance name of the application IIS worker process for IIS/ASP.NET counters.
??APP_CLR_PROC?? - instance name of the application CLR process for .NET counters.
-->
</Add>
<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule, Microsoft.AI.PerfCounterCollector"/>
<Add Type="Microsoft.ApplicationInsights.WindowsServer.DeveloperModeWithDebuggerAttachedTelemetryModule, Microsoft.AI.WindowsServer"/>
<Add Type="Microsoft.ApplicationInsights.WindowsServer.UnhandledExceptionTelemetryModule, Microsoft.AI.WindowsServer"/>
<Add Type="Microsoft.ApplicationInsights.WindowsServer.UnobservedExceptionTelemetryModule, Microsoft.AI.WindowsServer">
<!--</Add>
<Add Type="Microsoft.ApplicationInsights.WindowsServer.FirstChanceExceptionStatisticsTelemetryModule, Microsoft.AI.WindowsServer">-->
</Add>
<Add Type="Microsoft.ApplicationInsights.Web.RequestTrackingTelemetryModule, Microsoft.AI.Web">
<Handlers>
<!--
Add entries here to filter out additional handlers:
NOTE: handler configuration will be lost upon NuGet upgrade.
-->
<Add>System.Web.Handlers.TransferRequestHandler</Add>
<Add>Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.RequestDataHttpHandler</Add>
<Add>System.Web.StaticFileHandler</Add>
<Add>System.Web.Handlers.AssemblyResourceLoader</Add>
<Add>System.Web.Optimization.BundleHandler</Add>
<Add>System.Web.Script.Services.ScriptHandlerFactory</Add>
<Add>System.Web.Handlers.TraceHandler</Add>
<Add>System.Web.Services.Discovery.DiscoveryRequestHandler</Add>
<Add>System.Web.HttpDebugHandler</Add>
</Handlers>
</Add>
<Add Type="Microsoft.ApplicationInsights.Web.ExceptionTrackingTelemetryModule, Microsoft.AI.Web"/>
<Add Type="Microsoft.ApplicationInsights.Web.AspNetDiagnosticTelemetryModule, Microsoft.AI.Web"/>
</TelemetryModules>
<TelemetryProcessors>
<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor, Microsoft.AI.PerfCounterCollector"/>
<Add Type="Microsoft.ApplicationInsights.Extensibility.AutocollectedMetricsExtractor, Microsoft.ApplicationInsights"/>
<Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
<MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond>
<ExcludedTypes>Event</ExcludedTypes>
</Add>
<Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
<MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond>
<IncludedTypes>Event</IncludedTypes>
</Add>
</TelemetryProcessors>
<TelemetryChannel Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel, Microsoft.AI.ServerTelemetryChannel"/>
<!--
Learn more about Application Insights configuration with ApplicationInsights.config here:
http://go.microsoft.com/fwlink/?LinkID=513840
Note: If not present, please add <InstrumentationKey>Your Key</InstrumentationKey> to the top of this file.
--></ApplicationInsights>

View File

@ -0,0 +1,24 @@
using System.Web.Mvc;
namespace RSystem.Areas.Admin
{
public class AdminAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "Admin";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"Admin_default",
"Admin/{controller}/{action}/{id}",
new { action = "Index",controller="Panel", id = UrlParameter.Optional }
);
}
}
}

View File

@ -0,0 +1,25 @@
.pref-info {
border-radius: 0;
background-color: rgb(0,44,105);
color: #fff;
padding: 7px 20px;
font-size: 16px;
}
.faculty > header {
width: 100%;
padding: 10px 0 10px 20px;
background-color: #eee;
}
.faculty {
padding-bottom: 20px;
font-size: 15px;
border: 1px solid #eee;
}
.spec-ratio {
margin: 10px 0 10px 10px;
font-size: 16px;
}

View File

@ -0,0 +1,47 @@
.faculty > header {
width: 100%;
padding: 10px 0 10px 20px;
background-color: rgb(0,44,105);
color: #fff;
}
.faculty {
padding-bottom: 20px;
font-size: 15px;
border: 1px solid #eee;
}
.color-rejected {
color: #9b0000;
}
.add-field {
width: 100%;
padding: 30px 0;
background-color: #eee;
}
.recrutation-button {
border-radius: 0;
background-color: #da521f;
color: #fff;
padding: 7px 20px;
font-size: 18px;
}
.recrutation-button:hover {
color: #eee;
text-decoration: none;
background-color: #FF4A08;
}
.btn-remove {
background-color: rgba(0, 0, 0, 0);
border: 0;
}
.main-table {
border: 1px #ccc solid;
font-size: 13px;
}

View File

@ -0,0 +1,32 @@
.students-list > header {
width: 100%;
padding: 10px 0 10px 20px;
background-color: rgb(0,44,105);
color: #fff;
font-size: 22px;
}
.students-list {
padding-bottom: 20px;
font-size: 15px;
}
.main-table {
border: 1px #ccc solid;
font-size: 13px;
}
.points
{
width: 20%;
}
.position {
width: 10%;
}
.firstname {
width: 40%;
}
.lastname {
width: 30%;
}

View File

@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Data.Entity.Migrations;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using RSystem.DAL;
using RSystem.Models;
namespace RSystem.Areas.Admin.Controllers
{
[Authorize(Roles = "Admin")]
public class FacultiesController : Controller
{
private ApplicationDbContext db=new ApplicationDbContext();
public ActionResult Index()
{
return View(db.Faculties.OrderBy(n=>n.Name));
}
[HttpPost]
public ActionResult Index(Faculty faculty)
{
if (string.IsNullOrWhiteSpace(faculty.Name))
{
ViewBag.Validation = "Wydział nie został dodany ponieważ nazwa wydziału nie została ustawiona";
return View(db.Faculties.OrderBy(n => n.Name));
}
if (string.IsNullOrWhiteSpace(faculty.Abbrevation))
{
ViewBag.Validation = "Wydział nie został dodany ponieważ skrót wydziału nie został ustawiony";
return View(db.Faculties.OrderBy(n => n.Name));
}
db.Faculties.AddOrUpdate(faculty);
db.SaveChanges();
return RedirectToAction("Index");
}
public ActionResult Delete(int?id)
{
var toRemove = id!=null
?db.Faculties.FirstOrDefault(f => f.FacultyId == id)
:null;
if (toRemove == null)
return HttpNotFound();
db.Faculties.Remove(toRemove);
db.SaveChanges();
return RedirectToAction("Index");
}
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace RSystem.Areas.Admin.Controllers
{
[Authorize(Roles = "Admin")]
public class PanelController : Controller
{
public ActionResult Index()
{
return View();
}
}
}

View File

@ -0,0 +1,92 @@
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using RSystem.DAL;
using RSystem.Managers;
using RSystem.Models;
namespace RSystem.Areas.Admin.Controllers
{
[Authorize(Roles = "Admin")]
public class RecrutationController : Controller
{
private ApplicationDbContext db=new ApplicationDbContext();
// GET: Admin/Recrutation
public ActionResult Index()
{
var model = new Dictionary<Faculty, IEnumerable<Specialization>>();
var faculties = db.Faculties.Include(s=>s.Specializations)
.OrderBy(s => s.Abbrevation);
foreach (var faculty in faculties)
{
if (faculty.Specializations.Any())
{
model.Add(faculty, faculty.Specializations
.OrderBy(s => s.Name));
}
}
@ViewBag.HideMainHeader = true;
return View(model);
}
// GET: Admin/Recruitation/StudentsList
public ActionResult StudentsList(int specializationId)
{
var specialization = db.Specializations.Include(r=>r.AcceptedRecruits)
.FirstOrDefault(id => id.SpecializationId == specializationId);
if (specialization == null)
return HttpNotFound();
var model =new List<KeyValuePair<RSystem.Models.Recruit,int>>();
var acceptedRecruits = specialization.AcceptedRecruits;
foreach (var recruit in acceptedRecruits)
{
var points = db.RecruitPreferences
.First(r => r.Recruit.RecruitId == recruit.RecruitId &&
r.SpecializationId == specializationId)
.Points;
model.Add(new KeyValuePair<RSystem.Models.Recruit, int>(recruit,points));
}
ViewBag.SpecializationName = specialization.Name;
return View(model.OrderBy(val=>val.Value).ToList());
}
// GET: Admin/Recrutation/ChooseSpecialization
public ActionResult ChooseSpecialization()
{
var faculties = db.Faculties.Include(s => s.Specializations);
var model = new Dictionary<Faculty, IEnumerable<Specialization>>();
foreach (var faculty in faculties)
{
if (faculty.Specializations.Any(d => DateTime.Compare(d.Deadline, DateTime.Today) == -1))
{
model.Add(faculty, faculty.Specializations
.Where(d => DateTime.Compare(d.Deadline, DateTime.Today) == -1));
}
}
return View(model);
}
[HttpPost]
// POST: Admin/Recrutation/ChooseSpecialization
public ActionResult ChooseSpecialization(IEnumerable<int> listOfId)
{
if (listOfId != null)
RecrutationManager.RecruitBySpecializations(listOfId);
return RedirectToAction("Index","Recrutation",new{area="Admin"});
}
}
}

View File

@ -0,0 +1,124 @@
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 RSystem.Areas.Admin.Models;
using RSystem.DAL;
using RSystem.Managers;
using RSystem.Models;
namespace RSystem.Areas.Admin.Controllers
{
[Authorize(Roles = "Admin")]
public class SpecializationsController : Controller
{
private ApplicationDbContext db = new ApplicationDbContext();
// GET: Specializations
public ActionResult Index()
{
var model = new Dictionary<Faculty, IEnumerable<Specialization>>();
var faculties = db.Faculties.Include(s => s.Specializations)
.OrderBy(s=>s.Abbrevation);
foreach (var faculty in faculties)
{
if (faculty.Specializations.Any())
{
model.Add(faculty, faculty.Specializations
.OrderBy(s=>s.Name));
}
}
return View(model);
}
// GET: Specializations/Create
public ActionResult Create(int? id)
{
ViewBag.Title = id==null?
"Dodaj Kierunek":
"Edytuj Kierunek";
var viewModel = new SpecializationCreateViewModel()
{
PointsMultipilers =
db.PointsMultipilers.Include(ms => ms.MaturaSubject).Where(s => s.SpecializationId == id),
Faculties = new SelectList(db.Faculties, "FacultyId", "Name"),
MaturaSubjects = db.MaturaSubjects,
Specialization = db.Specializations.FirstOrDefault(i => i.SpecializationId == id)
};
return View(viewModel);
}
// POST: Specializations/Create
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create(SpecializationCreatePOSTViewModel model)
{
//SpecializationId is null while creating
ModelState["Specialization.SpecializationId"].Errors.Clear();
if (ModelState.IsValid)
{
var specialization = model.Specialization;
var multipilers = new List<PointsMultipiler>();
if (!string.IsNullOrWhiteSpace(model.MultipilersJSON))
multipilers = JSONParserManager
.JsonToPointsMultipilers(model.MultipilersJSON, model.Specialization.SpecializationId)
.ToList();
if (specialization.SpecializationId == 0)
{
specialization.PointsMultipilers = multipilers;
db.Specializations.Add(specialization);
}
else
{
foreach (var multipiler in multipilers)
db.PointsMultipilers.Add(multipiler);
db.Entry(specialization).State = EntityState.Modified;
}
db.SaveChanges();
return RedirectToAction("Index");
}
return View(new SpecializationCreateViewModel
{
Specialization = model.Specialization,
Faculties = new SelectList(db.Faculties, "FacultyId", "Name"),
MaturaSubjects = db.MaturaSubjects,
PointsMultipilers = db.PointsMultipilers.Include(ms => ms.MaturaSubject)
.Where(s => s.SpecializationId == model.Specialization.SpecializationId)
});
}
// POST: Specializations/Delete/5
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Delete(int id)
{
Specialization specialization = db.Specializations.Find(id);
db.Specializations.Remove(specialization);
db.SaveChanges();
return RedirectToAction("Index");
}
protected override void Dispose(bool disposing)
{
if (disposing)
{
db.Dispose();
}
base.Dispose(disposing);
}
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using RSystem.Models;
namespace RSystem.Areas.Admin.Models
{
public class SpecializationCreatePOSTViewModel
{
public Specialization Specialization { get; set; }
public string MultipilersJSON { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using RSystem.Models;
namespace RSystem.Areas.Admin.Models
{
public class SpecializationCreateViewModel
{
public Specialization Specialization { get; set; }
public IEnumerable<MaturaSubject> MaturaSubjects { get; set; }
public IEnumerable<PointsMultipiler> PointsMultipilers { get; set; }
public SelectList Faculties { get; set; }
}
}

View File

@ -0,0 +1,124 @@
@using RSystem.Models
@model IEnumerable<RSystem.Models.Faculty>
@{
ViewBag.Title = "Panel wydziałów";
}
<div class="add-field text-center my-20">
<button class="add-button" data-toggle="modal" data-target="#myModal" onclick="showModalForm('','','')">Dodaj wydział</button>
</div>
<div class="text-center text-danger fs-19">
@ViewBag.Validation
</div>
<section class="faculties">
<header>
Lista wydziałów
</header>
<div class="table-responsive">
<table class="main-table table table-striped">
<tr>
<th>Nazwa wydziału</th>
<th>Operacje</th>
</tr>
@foreach (var faculty in Model)
{
<tr>
<td>
<span class="faculty" onclick="showModalForm('@faculty.FacultyId','@faculty.Name','@faculty.Abbrevation')" data-toggle="modal" data-target="#myModal">
<b>(@faculty.Abbrevation)</b> @faculty.Name
</span>
</td>
<td>
@using (Html.BeginForm("Delete", "Faculties", FormMethod.Post, new { @class = "js-delete" }))
{
@Html.AntiForgeryToken()
@Html.Hidden("id", faculty.FacultyId)
<button type="submit" class=" color-rejected btn-remove">Usuń</button>
}
</td>
</tr>
}
</table>
</div>
</section>
<!-- Modal-->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h2 class="modal-title">Dodaj/Edytuj wydział</h2>
</div>
@using (Html.BeginForm())
{
<div class="modal-body">
<input type="hidden" name="FacultyId" id="faculty-id"/>
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label for="faculty-abbrevation">Skrót wydziału</label>
<input type="text" name="Abbrevation" id="faculty-abbrevation" class="form-control" placeholder="WMI"/>
</div>
</div>
<div class="col-md-9">
<div class="form-group">
<label for="faculty-name">Nazwa Wydziału</label>
<input type="text" name="name" id="faculty-name" class="form-control" placeholder="Wydział Matemtyki i Informatyki"/>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-primary" value="Zapisz"/>
<button type="button" class="btn btn-danger" data-dismiss="modal">Anuluj</button>
</div>
}
</div>
</div>
</div>
@section DedicatedStyles
{
<link rel="stylesheet" href="/Content/css/AdminFaculties.css" />
}
@section scripts
{
<script>
function showModalForm(id,name,abbrevation) {
$('#faculty-name').val(name);
$('#faculty-abbrevation').val(abbrevation);
$('#faculty-id').val(id);
console.log(id+" "+name + " " + abbrevation);
}
$('.js-delete').submit(function(e) {
var currentForm = this;
e.preventDefault();
bootbox.confirm({
message: "Czy napewno chcesz usunąć ten wydział i wszyskie kierunki które do niego należą?",
buttons: {
confirm: {
label: 'Usuń',
className: 'btn-danger'
},
cancel: {
label: 'Anuluj',
}
},
callback: function(result) {
if (result) {
currentForm.submit();
}
}
});
});
</script>
}

View File

@ -0,0 +1,62 @@

@{
ViewBag.Title = "Panel Admina";
}
<div class="row main-col">
<div class="col-md-4">
<a href="@Url.Action("Index","Specializations",new{area="Admin"})" class="admintile">
Panel kierunków
</a>
</div>
<div class="col-md-4">
<a href="@Url.Action("Index","Faculties",new{area="Admin"})" class="admintile">
Panel wydziałów
</a>
</div>
<div class="col-md-4">
<a href="@Url.Action("Index","Recrutation",new{area="Admin"})" class="admintile">
Panel rekrutacji
</a>
</div>
</div>
<style>
.admintile {
display: block;
line-height: 330px;
height: 330px;
font-size: 25px;
text-decoration: none;
vertical-align: central;
text-align: center;
color: #ddd;
background-color: rgba(0,44,105,0.9);
margin-top: 10px;
transition: ease-in-out 0.3s;
}
.admintile:hover {
color: #fff;
background-color: rgb(2, 39, 91);
cursor: pointer;
text-decoration: none;
}
.main-col {
margin-top: 60px;
display: block;
margin-bottom: 60px;
}
@@media only screen and (max-width: 970px) {
.admintile {
height: 150px;
line-height: 150px;
margin-left: 15px;
margin-right: 15px;
}
}
</style>

View File

@ -0,0 +1,48 @@
@model Dictionary<RSystem.Models.Faculty, IEnumerable<RSystem.Models.Specialization>>
@{
ViewBag.Title = "Wybierz kierunki do rekrutacji";
}
<p class="pref-info">Lista kierunków, na które rekrutacja już się zakończyła:</p>
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="form-group">
@foreach (var faculty in Model)
{
<section class="faculty">
<header>
@faculty.Key.Name
</header>
@foreach (var specialization in faculty.Value)
{
<div class="radio">
<label class="spec-ratio">@Html.CheckBox("listOfId" + getNextIndex(),new { value = specialization.SpecializationId }) <b>@specialization.Name</b> (@specialization.Description)</label>
</div>
}
</section>
}
</div>
<div class="row col-sm-12 text-center p-submit">
<input type="submit" class="submit-blue form-btn" value="Rekrutuj" />
@Html.ActionLink("Anuluj", "Index", "Recruitation", new { @class = "form-cancel form-btn" })
</div>
}
@section DedicatedStyles
{
<link rel="stylesheet" href="@Url.Content("~/Areas/Admin/Content/Css/ChooseSpecialization.css")" />
}
@functions
{
int currentId = -1;
string getNextIndex()
{
currentId++;
return "[" + currentId + "]";
}
}

View File

@ -0,0 +1,74 @@
@using System.Web.UI.HtmlControls
@using System.Web.UI.WebControls
@using RSystem.Models
@model Dictionary<RSystem.Models.Faculty, IEnumerable<RSystem.Models.Specialization>>
@{
ViewBag.Title = "Panel rekrutacyjny";
}
<div class="container py-20">
<span class="h1 orange p-20">@ViewBag.Title</span>
@Html.ActionLink("Rozpocznij rekrutacje", "ChooseSpecialization", "Recrutation",new {area="Admin"}, new { @class = "recrutation-button pull-right" })
<hr />
@foreach (var faculty in Model)
{
<section class="faculty ">
<header>
@faculty.Key.Name
</header>
<div class="table-responsive">
<table class="main-table table table-striped">
<tr>
<th>Kierunek/Specialność</th>
<th>Termin zakończenia</th>
<th>Liczba przyjętych</th>
<th>Próg punktowy</th>
<th>Lista przyjętych</th>
</tr>
@foreach (var specialization in faculty.Value)
{
<tr>
<td>
<a href="@Url.Action("Create","Specializations",new{area="Admin",id=specialization.SpecializationId})"
title="Edytuj kierunek">
<b>
@specialization.Name (@specialization.Faculty.Abbrevation)
</b>
</a>
<br />
<span>@specialization.Description</span>
</td>
<td>
@specialization.Deadline.ToString("dd-MM-yyyy")
</td>
<td>
@getAmountOfAcceptedRecruit(@specialization)
</td>
<td>
0
</td>
<td>
@Html.ActionLink("Zobacz listę", "StudentsList", new { specializationId = @specialization.SpecializationId })
</td>
</tr>
}
</table>
</div>
</section>
}
</div>
@section DedicatedStyles
{
<link rel="stylesheet" href="@Url.Content("/Areas/Admin/Content/Css/RecrutationIndex.css")" />
}
@functions
{
string getAmountOfAcceptedRecruit(Specialization specialization)
{
return (specialization.AcceptedRecruits?.Count() ?? 0).ToString() + "/" + specialization.LimitOfPlaces;
}
}

View File

@ -0,0 +1,46 @@
@using RSystem.Models
@model List<KeyValuePair<RSystem.Models.Recruit,int>>
@{
ViewBag.Title = "Lista przyjętych";
}
<div class="row">
<section class="students-list col-md-8 col-md-offset-2">
<header>
@ViewBag.SpecializationName
</header>
<div class="table-responsive">
<table class="main-table table table-striped">
<tr>
<th class="position">Poz</th>
<th class="firstname">Imię</th>
<th class="lastname">Nazwisko</th>
<th class="points">Punkty</th>
</tr>
@for (int i=0;i<Model.Count;i++)
{
<tr>
<td>
@{ var position = i + 1;}
@position
</td>
<td>
@Model[i].Key.RecriutData.FirstName @Model[i].Key.RecriutData.SecondName
</td>
<td>
@Model[i].Key.RecriutData.LastName
</td>
<td>
@Model[i].Value
</td>
</tr>
}
</table>
</div>
</section>
</div>
@section DedicatedStyles
{
<link rel="stylesheet" href="@Url.Content("/Areas/Admin/Content/Css/StudentsList.css")" />
}

View File

@ -0,0 +1,360 @@
@using System.Web.Script.Serialization
@using Microsoft.Ajax.Utilities
@using RSystem.Models
@model RSystem.Areas.Admin.Models.SpecializationCreateViewModel
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
@Html.HiddenFor(model => model.Specialization.SpecializationId);
<section class="section-subject">
<header>Podstawowe informacje</header>
<div class="section-body">
<div class="row">
<div class="col-md-4">
<div class="form-group">
@Html.LabelFor(model => model.Specialization.FacultyId, "Wydział", htmlAttributes: new { @class = "label-form required" })
@Html.DropDownListFor(model=>model.Specialization.FacultyId, Model.Faculties, new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.Specialization.FacultyId, "", new { @class = "text-danger" })
</div>
</div>
<div class="col-md-3">
<div class="form-group">
@Html.LabelFor(m => m.Specialization.Name, new {@class = "label-form required"})
@Html.EditorFor(m => m.Specialization.Name, new {htmlAttributes = new {@class = "form-control no-radius",placeholder="Informatyka"}})
@Html.ValidationMessageFor(model => model.Specialization.Name, "", new {@class = "text-danger"})
</div>
</div>
<div class="col-md-3 col-xs-6">
<div class="form-group">
@Html.LabelFor(model => model.Specialization.Deadline, htmlAttributes: new {@class = "label-form required"})
@Html.EditorFor(model => model.Specialization.Deadline, new {htmlAttributes = new {@class = "form-control"}})
@Html.ValidationMessageFor(model => model.Specialization.Deadline, "", new {@class = "text-danger"})
</div>
</div>
<div class="col-md-2 col-xs-6">
<div class="form-group">
@Html.LabelFor(model => model.Specialization.Price, htmlAttributes: new { @class = "label-form required" })
<div class="input-group ">
@Html.EditorFor(model => model.Specialization.Price, new {htmlAttributes = new {@class = "form-control no-radius", placeholder = "35"}})
<span class="input-group-addon">zł</span>
</div>
@Html.ValidationMessageFor(model => model.Specialization.Price, "", new { @class = "text-danger" })
</div>
</div>
</div>
<hr />
<div class="row">
<div class="col-md-2">
@Html.LabelFor(model => model.Specialization.LimitOfPlaces, htmlAttributes: new { @class = "label-form required" })
@Html.EditorFor(model => model.Specialization.LimitOfPlaces, new { htmlAttributes = new { @class = "form-control no-radius",placeholder="150"} })
</div>
<div class="col-md-10 mobile-mt-20">
<div class="form-group">
@Html.LabelFor(model => model.Specialization.Description, htmlAttributes: new {@class = "label-form required"})
@Html.EditorFor(model => model.Specialization.Description, new {htmlAttributes = new {@class = "form-control no-radius", placeholder = "3,5 roczne studnia stacjonarne"}})
</div>
</div>
</div>
</div>
</section>
<div class="row">
<div class="col-md-4">
<section class="section-subject">
<header>Nowa Matura</header>
<div class="section-body">
<div id="added-new-matura-subjects">
@if (Model.PointsMultipilers != null)
{
for (int i = 0; i < Multipilers(MaturaType.Nowa).Count(); i++)
{
<div class="multipiler-section" id="js-delete-multipiler-@Multipilers(MaturaType.Nowa)[i].PointsMultipilerId">
<span class="multipiler">
@Multipilers(MaturaType.Nowa)[i].Multipiler
</span>
@Multipilers(MaturaType.Nowa)[i].MaturaSubject.Name
<span matura-multipiler-id="@Multipilers(MaturaType.Nowa)[i].PointsMultipilerId" class="glyphicon glyphicon-remove pull-right js-delete"></span>
</div>
}
}
</div>
<div id="js-to-add-new-matura">
</div>
<div class="text-center">
<input type="button" matura-type="new" class="js-matura-btn submit-blue form-btn mt-20" value="Dodaj"/>
</div>
</div>
</section>
</div>
<div class="col-md-4">
<section class="section-subject">
<header>Stara Matura</header>
<div class="section-body">
<div id="added-old-matura-subjects">
@if (Model.PointsMultipilers != null)
{
for (int i = 0; i < Multipilers(MaturaType.Stara).Count(); i++)
{
<div class="multipiler-section" id="js-delete-multipiler-@Multipilers(MaturaType.Stara)[i].PointsMultipilerId">
<span class="multipiler">
@Multipilers(MaturaType.Stara)[i].Multipiler
</span>
@Multipilers(MaturaType.Stara)[i].MaturaSubject.Name
<span matura-multipiler-id="@Multipilers(MaturaType.Stara)[i].PointsMultipilerId" class="glyphicon glyphicon-remove pull-right js-delete"></span>
</div>
}
}
</div>
<div id="js-to-add-old-matura">
</div>
<div class="text-center">
<input type="button" matura-type="old" class="js-matura-btn submit-blue form-btn mt-20" value="Dodaj" />
</div>
</div>
</section>
</div>
<div class="col-md-4">
<section class="section-subject">
<header>Matura Międzynarodowa</header>
<div class="section-body">
<div id="added-international-matura-subjects">
@if (Model.PointsMultipilers != null)
{
for (int i = 0; i < Multipilers(MaturaType.Międzynarodowa).Count(); i++)
{
<div class="multipiler-section" id="js-delete-multipiler-@Multipilers(MaturaType.Międzynarodowa)[i].PointsMultipilerId">
<span class="multipiler">
@Multipilers(MaturaType.Międzynarodowa)[i].Multipiler
</span>
@Multipilers(MaturaType.Międzynarodowa)[i].MaturaSubject.Name
<span matura-multipiler-id="@Multipilers(MaturaType.Międzynarodowa)s[i].PointsMultipilerId" class="glyphicon glyphicon-remove pull-right js-delete"></span>
</div>
}
}
</div>
<div id="js-to-add-int-matura">
</div>
<div class="text-center">
<input type="button" matura-type="int" class="js-matura-btn submit-blue form-btn mt-20" value="Dodaj" />
</div>
</div>
</section>
</div>
</div>
<!-- Input contains JSON with multipilers data-->
<input type="hidden" id="MultipilersJSON" style="width: 100%;"name="MultipilersJSON"/>
<div class="row col-sm-12 text-center p-submit">
<input type="submit" class="submit-blue form-btn" value="Zapisz" />
@Html.ActionLink("Anuluj", "Index", "Home", new { @class = "form-cancel form-btn" })
</div>
}
@section Scripts{
<script>
var newMaturaSubjectsJSON = @Html.Raw(DropDownListOptions(MaturaType.Nowa));
var oldMaturaSubjectsJSON = @Html.Raw(DropDownListOptions(MaturaType.Stara));
var intMaturaSubjectsJSON = @Html.Raw(DropDownListOptions(MaturaType.Międzynarodowa));
var PointsMultipilerJSON = [];
var counterToAddId = -1;
$(document).ready(function() {
$('.js-matura-btn').on('click',
function() {
var toAppendHandler = "";
var type = $(this).attr('matura-type');
switch (type) {
case "new":
toAppendHandler = "js-to-add-new-matura";
break;
case "old":
toAppendHandler = "js-to-add-old-matura";
break;
case "int":
toAppendHandler = "js-to-add-int-matura";
break;
}
counterToAddId++;
PointsMultipilerJSON.push({ id: counterToAddId, val: "", matura: "" });
UpdateMultipilersJSON();
$("#" + toAppendHandler).append('<div class="my-20" id="ToAddId' + counterToAddId+'">' +
'<input id="MultipilerInputId'+counterToAddId+'" type="text" class="form-control matura-multipiler-input add-matura-input fs-19" onchange="TrackInputChanges(' + counterToAddId +')"/>' +
FillDropDown(type) +
'<span class="add-matura-input glyphicon glyphicon-remove pull-right" onclick="RemoveUnsaved(' + counterToAddId +')"></span>' +
'</div>');
});
});
function FillDropDown(type) {
var content = '<select class="form-control add-matura-input matura-subjectid-input fs-15"' +
'name="add-new-matura-subjectid" id="DropDownInputId'+counterToAddId+'" onchange="TrackDropDownChanges('+counterToAddId+')">' +
FillDropDownOptions(type)+
'</select>';
return content;
}
function FillDropDownOptions(type) {
var json;
var toReturn = "";
if (type === "new")
json = newMaturaSubjectsJSON;
else if (type === "old")
json = oldMaturaSubjectsJSON;
else
json = intMaturaSubjectsJSON;
for (var i in json) {
toReturn+='<option value="'+json[i].id+'">'+json[i].name+'</option>';
}
return toReturn;
}
// Calling Api while removing saved MaturaSubject form multipilerList
$(document).ready(function() {
$('.js-delete').on('click',
function() {
var id = $(this).attr('matura-multipiler-id');
bootbox.confirm({
message: "Czy napewno chcesz usunąć ten mnożnik?",
buttons: {
confirm: {
label: 'Usuń',
className: 'btn-danger'
},
cancel: {
label: 'Anuluj'
}
},
callback: function(result) {
if (result) {
$.ajax({
url: "/api/specializations/" + id,
method: "DELETE",
success: function () {
var elementId = "js-delete-multipiler-" + id;
$("#" + elementId).hide();
},
error: function () {
alert("Cos poszło nie tak, skontaktuj sie z administratorem");
}
});
}
}
});
});
});
//Remove unsaved MaturaMultipiler
function RemoveUnsaved(n) {
bootbox.confirm({
message: "Czy napewno chcesz usunąć ten mnożnik?",
buttons: {
confirm: {
label: 'Usuń',
className: 'btn-danger'
},
cancel: {
label: 'Anuluj'
}
},
callback: function (result) {
if (result) {
$('#ToAddId' + n).hide();
DeleteDataFromJSON(n);
}
}
});
}
function FindIndexById(id) {
var index = -404;
for (var i = 0; i < PointsMultipilerJSON.length; i++) {
if (PointsMultipilerJSON[i].id === id)
index = i;
}
return index;
}
function TrackInputChanges(id) {
var multipile = $('#MultipilerInputId' + id).val();
PointsMultipilerJSON[FindIndexById(id)].val = multipile;
UpdateMultipilersJSON();
}
function TrackDropDownChanges(id) {
var maturaid = $('#DropDownInputId' + id).val();
PointsMultipilerJSON[FindIndexById(id)].matura = maturaid;
UpdateMultipilersJSON();
}
function DeleteDataFromJSON(id) {
var index = FindIndexById(id);
if (index !== -404)
PointsMultipilerJSON.splice(index, 1);
UpdateMultipilersJSON();
}
function UpdateMultipilersJSON() {
$("#MultipilersJSON").val(JSON.stringify(PointsMultipilerJSON));
}
$(document).ready(function () {
$('.required').prepend('<span class="glyphicon glyphicon-asterisk"></span>');
});
</script>
}
@section DedicatedStyles
{
<link rel="stylesheet" href="/Content/css/HomeEducation.css"/>
<link rel="stylesheet" href="/Content/css/SpecializationCreate.css"/>
}
@functions
{
string DropDownListOptions(MaturaType maturaType)
{
var serializer = new JavaScriptSerializer();
var availableSubjects = Model.MaturaSubjects.Where(mt => mt.MaturaType == maturaType);
var list=new List<dynamic>();
foreach (var subject in availableSubjects)
{
list.Add(new
{
id=subject.MaturaSubjectId,
name=subject.Name
});
}
return serializer.Serialize(list);
}
List<PointsMultipiler> Multipilers(MaturaType maturaType)
{
return Model.PointsMultipilers.Where(m => m.MaturaSubject.MaturaType == maturaType).ToList();
}
SelectList MaturaTypeSL(MaturaType type)
{
return new SelectList(Model.MaturaSubjects.Where(t=>t.MaturaType==type), "MaturaSubjectId","Name");
}
}

View File

@ -0,0 +1,97 @@
@model Dictionary<RSystem.Models.Faculty, IEnumerable<RSystem.Models.Specialization>>
@{
ViewBag.Title = "Lista kierunków";
}
<div class="add-field text-center my-20">
@Html.ActionLink("Dodaj kierunek", "Create", "Specializations", null, new { @class = "add-button" })
</div>
@foreach (var faculty in Model)
{
<section class="faculty ">
<header>
@faculty.Key.Name
</header>
<div class="table-responsive">
<table class="main-table table table-striped">
<tr>
<th>Kierunek/Specialność</th>
<th>Termin zakończenia</th>
<th>Opłata rekrutacyjna</th>
<th>Operacje</th>
<th>Próg punktowy</th>
</tr>
@foreach (var specialization in faculty.Value)
{
<tr>
<td>
<a href="@Url.Action("Create","Specializations",new{id=specialization.SpecializationId})">
<b>
@specialization.Name (@specialization.Faculty.Abbrevation)
</b>
</a>
<br />
<span>@specialization.Description</span>
</td>
<td>
@specialization.Deadline.ToString("dd'.'MM'.'yyyy")
</td>
<td>
@specialization.Price zl
</td>
<td>
@using (Html.BeginForm("Delete", "Specializations", FormMethod.Post, new { @class = "js-delete" }))
{
@Html.AntiForgeryToken()
@Html.Hidden("id", specialization.SpecializationId)
<button type="submit" class=" color-rejected btn-remove">Usuń</button>
}
</td>
<td>0</td>
</tr>
}
</table>
</div>
</section>
}
@section DedicatedStyles
{
<link rel="stylesheet" href="/Content/css/SpecializationIndex.css"/>
}
@section scripts
{
<script>
$('.js-delete').submit(function(e) {
var currentForm = this;
e.preventDefault();
bootbox.confirm({
message: "Czy napewno chcesz usunąć ten kierunek?",
buttons: {
confirm: {
label: 'Usuń',
className: 'btn-danger'
},
cancel: {
label: 'Anuluj',
}
},
callback: function(result) {
if (result) {
currentForm.submit();
}
}
});
});
</script>
}

View File

@ -0,0 +1,3 @@
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}

View File

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.Optimization" />
<add namespace="RSystem" />
</namespaces>
</pages>
</system.web.webPages.razor>
<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>
<system.webServer>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
</configuration>

View File

@ -0,0 +1,285 @@
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Validation;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using AutoMapper;
using Microsoft.Ajax.Utilities;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.Owin;
using RSystem.Controllers;
using RSystem.DAL;
using RSystem.Managers;
using RSystem.Models;
using RSystem.ViewModels;
namespace RSystem.Areas.Recruit.Controllers
{
[Authorize(Roles = "Recruit")]
public class HomeController : LangBaseController
{
private ApplicationDbContext db = new ApplicationDbContext();
//GET: Recruit/Home/Index
public ActionResult Index()
{
var user = GetUser();
var photoPath = Path.Combine(Server.MapPath("~/Content/photos/"), user.UserName + ".png");
var tilesManager = new TilesStatusManager(user.Id, photoPath);
var viewModel = tilesManager.GeHomeIndexViewModel();
return View(viewModel);
}
//GET: Recruit/Home/Data
public ActionResult Data()
{
var userId = User.Identity.GetUserId<string>();
if (userId == null)
return HttpNotFound();
Models.Recruit recruit = db.Recruits.First(r => r.ApplicationUserId == userId);
var data = db.RecruitDatas.First(r => r.RecruitDataId == recruit.RecruitId);
var toReturn = Mapper.Map<RecruitDataViewModel>(data);
toReturn.Countries = GetCountries();
return View(toReturn);
}
//POST: Recruit/Home/Data
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Data(RecruitDataViewModel recriutData)
{
RecruitData dataInDb = db.RecruitDatas.Find(recriutData.RecruitDataId);
if (dataInDb == null)
return HttpNotFound();
Mapper.Map(recriutData, dataInDb);
db.SaveChanges();
return RedirectToAction("Index");
}
//GET: Recruit/Home/Preference
public ActionResult Preferences()
{
var userId = User.Identity.GetUserId<string>();
if (userId == null)
return HttpNotFound();
Models.Recruit recruit = db.Recruits.First(r => r.ApplicationUserId == userId);
if (recruit == null)
return HttpNotFound();
var preferences = db.RecruitPreferences
.Include(s => s.Specialization.Faculty)
.Where(r => r.RecruitId == recruit.RecruitId)
.OrderBy(p => p.Priority);
return View(preferences);
}
//Remove Preference by id
//POST:Recruit/Home/Preferences
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Preferences(int? RecruitPreferenceId)
{
if (RecruitPreferenceId == null)
return HttpNotFound();
var user = GetUser();
var recruit = db.Recruits
.First(u => u.ApplicationUserId == user.Id);
var allowedToRemove = db.RecruitPreferences
.Where(r => r.RecruitId == recruit.RecruitId);
//To avoid now allowed user removing preference
if (!allowedToRemove.Any(r => r.RecruitPreferenceId == RecruitPreferenceId))
return HttpNotFound();
//If user is allowed to remove this preference
var toRemove = db.RecruitPreferences
.First(r => r.RecruitPreferenceId == RecruitPreferenceId);
db.RecruitPreferences.Remove(toRemove);
db.SaveChanges();
RecruitMenager.RepairPriorityOrder(recruit.RecruitId);
return RedirectToAction("Preferences");
}
//GET: Recruit/Home/AddPreference
public ActionResult AddPreference()
{
var faculties = db.Faculties.Include(s => s.Specializations);
var model = new Dictionary<Faculty, IEnumerable<Specialization>>();
foreach (var faculty in faculties)
{
if (faculty.Specializations.Any(d => DateTime.Compare(d.Deadline, DateTime.Today) >= 0))
{
model.Add(faculty, faculty.Specializations
.Where(d=>DateTime.Compare(d.Deadline,DateTime.Today)>=0)
);
}
}
return View(model);
}
//POST: Recruit/Home/AddPreference
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<ActionResult> AddPreference(int? Id)
{
if (Id == null)
return RedirectToAction("Preferences");
var user = GetUser();
var recruit = db.Recruits
.First(u => u.ApplicationUserId == user.Id);
var priorities = db.RecruitPreferences
.Where(r => r.RecruitId == recruit.RecruitId);
//max amount of preferences is 15
if (priorities.Count() >= 15)
return RedirectToAction("Preferences");
//Set priority to new preference
var priority = priorities.Any()
? priorities.Max(p => p.Priority) + 1
: 1;
//set preference model
var toAdd = new RecruitPreference()
{
RecruitId = recruit.RecruitId,
Specialization = db.Specializations.First(id => id.SpecializationId == Id),
Priority = (short)priority
};
db.RecruitPreferences.Add(toAdd);
db.SaveChanges();
await RecruitMenager.CalculatePointAsync(recruit.RecruitId, (int)Id);
return RedirectToAction("Preferences");
}
//GET: Recruit/Home/Education
public ActionResult Education()
{
var user = GetUser();
var recruit = db.Recruits
.Include(r => r.MaturaResults.Select(s => s.MaturaSubject))
.FirstOrDefault(u => u.ApplicationUserId == user.Id);
var model = new EducationViewModel()
{
MaturaResults = recruit.MaturaResults.ToArray(),
MaturaType = recruit.MaturaType,
MaturaNumber = recruit.MaturaNumber,
DateOfPass = recruit.DateOfPass
};
return View(model);
}
//POST: Recruit/Home/Education
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Education(EducationViewModel model)
{
var user = GetUser();
var recruit = db.Recruits.FirstOrDefault(u => u.ApplicationUserId == user.Id);
recruit.DateOfPass = model.DateOfPass;
recruit.MaturaNumber = model.MaturaNumber;
recruit.MaturaType = model.MaturaType;
var toUpdate = db.MaturaResults.Where(r => r.RecruitId == recruit.RecruitId);
foreach (var fromForm in model.MaturaResults)
{
var tmp = toUpdate.FirstOrDefault(m => m.MaturaResultId == fromForm.MaturaResultId);
if (tmp != null)
tmp.Points = fromForm.Points;
}
db.SaveChanges();
RecruitMenager.CalculatePointAsync(recruit.RecruitId);
return RedirectToAction("Index");
}
//GET: Recruit/Home/Photo
public ActionResult Photo()
{
//Default path to photos
var path = "~/Content/photos/";
var pesel = GetUser().UserName;
ViewBag.Photo = "Zmień";
if (System.IO.File.Exists(Path.Combine(Server.MapPath("~/Content/photos/"), pesel + ".png")))
return View(model: path + pesel + ".png");
ViewBag.Photo = "Dodaj";
return View(model: path + "default-user-men.png");
//return View(model: "default-user-girl-women.png");
}
//POST: Recruit/Home/Photo
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Photo(HttpPostedFileBase photo)
{
if (photo != null)
{
//var fileExtension = Path.GetExtension(photo.FileName);
var pesel = GetUser().UserName;
var path = Path.Combine(
Server.MapPath("~/Content/photos/"), pesel + ".png");
photo.SaveAs(path);
}
return RedirectToAction("Index");
}
private ApplicationUser GetUser()
{
return System.Web.HttpContext
.Current.GetOwinContext()
.GetUserManager<ApplicationUserManager>()
.FindById(System.Web.HttpContext.Current.User.Identity.GetUserId());
}
private SelectList GetCountries()
{
List<string> countries = new List<string>();
CultureInfo[] culturesInfo = CultureInfo.GetCultures(CultureTypes.SpecificCultures);
foreach (CultureInfo cultureInfo in culturesInfo)
{
RegionInfo region = new RegionInfo(cultureInfo.LCID);
if (!countries.Contains(region.NativeName))
countries.Add(region.NativeName);
}
countries.Sort();
var selectList = new SelectList(countries);
return selectList;
}
}
}

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using RSystem.Models;
namespace RSystem.ViewModels
{
public class EducationViewModel
{
public MaturaResult[] MaturaResults { get; set; }
public MaturaType MaturaType { get; set; }
[Display(Name = "Data zdania matury")]
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
public DateTime DateOfPass { get; set; }
[Display(Name = "Numer zdanej matury")]
public string MaturaNumber { get; set; }
}
}

View File

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.Ajax.Utilities;
using RSystem.Models;
namespace RSystem.ViewModels
{
public class HomeIndexViewModel
{
public string Greeting { get; set; }
public string DataStatus { get; set; }
public string PhotoStatus { get; set; }
public string EducationStatus { get; set; }
public string PreferenceStatus { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using RSystem.Models;
namespace RSystem.ViewModels
{
public class PreferencesViewModel
{
public int RecruitId { get; set; }
public IEnumerable<RecruitPreference> Preferences { get; set; }
}
}

View File

@ -0,0 +1,100 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Runtime.InteropServices;
using System.Web.Mvc;
using RSystem.Models;
namespace RSystem.ViewModels
{
public class RecruitDataViewModel
{
//List of Countries
public SelectList Countries { get; set; }
public int RecruitDataId { get; set; }
//Recruit Data
[Display(Name = "Imię")]
public string FirstName { get; set; }
[Display(Name = "Drugie imię")]
public string SecondName { get; set; }
[Display(Name = "Nazwisko")]
public string LastName { get; set; }
[Display(Name = "Płeć")]
public Sex Sex { get; set; }
//Identity
[Display(Name = "Obywatelstwo")]
public string Citizenship { get; set; }
[Display(Name = "Dokument Potwierdzający tożsamość")]
public DocumentType DocumentType { get; set; }
public string DocumentNumber { get; set; }
//Adress
[Display(Name = "Ulica")]
public string Street { get; set; }
[Display(Name = "Numer domu")]
public string House { get; set; }
[Display(Name = "Numer mieszkania")]
public string Flat { get; set; }
[Display(Name = "Kod pocztowy")]
public string PostalCode { get; set; }
[Display(Name = "Miasto")]
public string City { get; set; }
[Display(Name = "Kraj")]
public string Country { get; set; }
//Corespondent Adress
[Display(Name = "Adres do korespondencji taki sam jak adres zamieszkania")]
public bool CorespondentAdressSameAsResidence { get; set; }
[Display(Name = "Ulica")]
public string CorespondentStreet { get; set; }
[Display(Name = "Numer domu")]
public string CorespondentHouse { get; set; }
[Display(Name = "Numer Mieszkania")]
public string CorespondentFlat { get; set; }
[Display(Name = "Kod pocztowy")]
public string CorespondentPostalCode { get; set; }
[Display(Name = "Miasto")]
public string CorespondentCity { get; set; }
[Display(Name = "Kraj")]
public string CorespondentCountry { get; set; }
//E adress
[EmailAddress(ErrorMessage = "Adress email wygląda na niepoprawny")]
[Display(Name = "Adres E-mail")]
public string Email { get; set; }
[Display(Name = "Numer telefonu")]
public string Phone { get; set; }
//Disability
[Display(Name = "Osoba niepełnosprawna")]
public bool IsDisabled { get; set; }
//parents
[Display(Name = "Imię ojca")]
public string FathersName { get; set; }
[Display(Name = "Imię Matki")]
public string MothersName { get; set; }
//Place and date of birth
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
[Display(Name = "Data urodzenia")]
public DateTime DayOfBirth { get; set; }
[Display(Name = "Miejsce urodzenia")]
public string BirthCity { get; set; }
[Display(Name = "Kraj urodzenia")]
public string BirthCountry { get; set; }
//Military
[Display(Name = "Status wojskowy")]
public MilitaryAttitude MilitaryAttitude { get; set; }
}
}

View File

@ -0,0 +1,25 @@
using System.Web.Mvc;
namespace RSystem.Areas.Recruit
{
public class RecruitAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "Recruit";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"Recruit_default",
"{lang}/Recruit/{controller}/{action}/{id}",
new { action = "Index", controller="Home", id = UrlParameter.Optional,lang="pl"},
constraints: new { lang = "pl|en" }
);
}
}
}

View File

@ -0,0 +1,47 @@
@model Dictionary<RSystem.Models.Faculty, IEnumerable<RSystem.Models.Specialization>>
@{
ViewBag.Title = "Wybierz kierunek";
}
<p class="pref-info">Lista dostępnych kierunków na rok @DateTime.Now.Year/@DateTime.Now.AddYears(1).Year </p>
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="form-group">
@foreach (var faculty in Model)
{
<section class="faculty">
<header>
@faculty.Key.Name
</header>
@foreach (var specialization in faculty.Value)
{
<div class="radio">
<label class="spec-ratio">@Html.RadioButton("Id",specialization.SpecializationId) <b>@specialization.Name</b> (@specialization.Description)</label>
</div>
}
</section>
}
</div>
<div class="row col-sm-12 text-center p-submit">
<input type="submit" class="submit-blue form-btn" value="Dodaj kierunek"/>
@Html.ActionLink("Anuluj","Preferences","Home",new {@class="form-cancel form-btn"})
</div>
}
@section DedicatedStyles
{
<link rel="stylesheet" href="~/Content/css/HomePreferences.css" />
}

View File

@ -0,0 +1,264 @@

@using RSystem.Models
@model RSystem.ViewModels.RecruitDataViewModel
@{
ViewBag.Title = "Dane Osobowe";
}
@using (Html.BeginForm())
{
@Html.HiddenFor(m=>m.RecruitDataId)
@Html.AntiForgeryToken()
<div class="row py-20 ">
<div class="col-md-6 col-lg-4">
<section class="form-section">
<header>Dane Osobowe</header>
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.FirstName ,new { @class = "label-form required" })
@Html.EditorFor(model => model.FirstName, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group">
@Html.LabelFor(model => model.SecondName, new { @class = "label-form" })
@Html.EditorFor(model => model.SecondName, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group">
@Html.LabelFor(model => model.LastName, new { @class = "label-form required" })
@Html.EditorFor(model => model.LastName, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group">
@Html.LabelFor(model => model.Sex, new { @class = "label-form required" })
<div class="radio-switch">
<label class="label-ratio">@Html.RadioButtonFor(model => model.Sex, Sex.Female) Kobieta</label>
</div>
<div class="radio-switch">
<label class="label-ratio">@Html.RadioButtonFor(model => model.Sex, Sex.Male) Mężczyzna</label>
</div>
</div>
</div>
</section>
<section class="form-section">
<header>Rodzice</header>
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.FathersName, new { @class = "label-form required" })
@Html.EditorFor(model => model.FathersName, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group">
@Html.LabelFor(model => model.MothersName, new { @class = "label-form required" })
@Html.EditorFor(model => model.MothersName, new { htmlAttributes = new { @class = "form-control" } })
</div>
</div>
</section>
<section class="form-section">
<header>Data i miejsce urodzenia</header>
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.DayOfBirth, new { @class = "label-form required" })
@Html.EditorFor(model => model.DayOfBirth, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group">
@Html.LabelFor(model => model.BirthCity, new { @class = "label-form required" })
@Html.EditorFor(model => model.BirthCity, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group">
@Html.LabelFor(model => model.BirthCountry, new { @class = "label-form required" })
@Html.DropDownListFor(model=>model.BirthCountry,Model.Countries ,new { @class = "form-control" } )
</div>
</div>
</section>
</div>
<div class="col-md-6 col-lg-4">
<section class="form-section">
<header>Tożsamość</header>
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.Citizenship, new { @class = "label-form required" })
@Html.EditorFor(model => model.Citizenship, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group">
@Html.LabelFor(model => model.DocumentType, new { @class = "label-form required" })
<div class="radio-switch">
<label class="label-ratio">@Html.RadioButtonFor(model => model.DocumentType, DocumentType.ID, new { id = "ID-Card" }) Dowód osobisty</label>
</div>
<div class="radio-switch">
<label class="label-ratio">@Html.RadioButtonFor(model => model.DocumentType, DocumentType.Passport, new { id = "Passport" }) Paszport</label>
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.DocumentNumber,"Numer dowodu osobistego" ,new { @class = "label-form required", id="DocumentTypeId"})
@Html.EditorFor(model => model.DocumentNumber, new { htmlAttributes = new { @class = "form-control" } })
</div>
</div>
</section>
<section class="form-section">
<header>Niepełnosprawność</header>
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.IsDisabled, new { @class = "label-form required" })
<div class="radio-switch">
<label class="label-ratio">@Html.RadioButtonFor(model => model.IsDisabled,false) Nie</label>
</div>
<div class="radio-switch">
<label class="label-ratio">@Html.RadioButtonFor(model => model.IsDisabled, true) Tak</label>
</div>
</div>
</div>
</section>
<section class="form-section">
<header>Dane kontaktowe</header>
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.Email, new { @class = "label-form required" })
@Html.EditorFor(model=>model.Email, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group">
@Html.LabelFor(model => model.Phone, new { @class = "label-form required" })
@Html.EditorFor(model => model.Phone, new { htmlAttributes = new { @class = "form-control" } })
</div>
</div>
</section>
</div>
<div class="col-md-6 col-lg-4">
<section class="form-section">
<header>Adres zamieszkania</header>
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.Street, new { @class = "label-form required" })
@Html.EditorFor(model => model.Street, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="row">
<div class="form-group col-md-6">
@Html.LabelFor(model => model.House, new { @class = "label-form required" })
@Html.EditorFor(model => model.House, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group col-md-6">
@Html.LabelFor(model => model.Flat, new { @class = "label-form" })
@Html.EditorFor(model => model.Flat, new { htmlAttributes = new { @class = "form-control" } })
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.City, new { @class = "label-form required" })
@Html.EditorFor(model => model.City, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="row">
<div class="form-group col-md-6">
@Html.LabelFor(model => model.PostalCode, new { @class = "label-form required" })
@Html.EditorFor(model => model.PostalCode, new { htmlAttributes = new { @class = "form-control", PlaceHolder = "__-___" } })
</div>
<div class="form-group col-md-6">
@Html.LabelFor(model => model.Country, new { @class = "label-form required" })
@Html.DropDownListFor(model=>model.Country,Model.Countries ,new { @class = "form-control" } )
</div>
</div>
</div>
</section>
<section class="form-section">
<header>Adres do korespondencji</header>
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.CorespondentAdressSameAsResidence, new { @class = "label-form required" })
<div class="radio-switch">
<label class="label-ratio">@Html.RadioButtonFor(model => model.CorespondentAdressSameAsResidence, true, new { id = "SameAsResident" }) Tak</label>
</div>
<div class="radio-switch">
<label class="label-ratio">@Html.RadioButtonFor(model => model.CorespondentAdressSameAsResidence, false, new { id = "NotSameAsResident" }) Nie</label>
</div>
</div>
<div @if (Model.CorespondentAdressSameAsResidence)
{
<text>class="hidden" </text>
} id="corespondent-form">
<div class="form-group">
@Html.LabelFor(model => model.CorespondentStreet, new {@class = "label-form required" })
@Html.EditorFor(model => model.CorespondentStreet, new {htmlAttributes = new {@class = "form-control"}})
</div>
<div class="row">
<div class="form-group col-md-6">
@Html.LabelFor(model => model.CorespondentHouse, new {@class = "label-form required" })
@Html.EditorFor(model => model.CorespondentHouse, new {htmlAttributes = new {@class = "form-control"}})
</div>
<div class="form-group col-md-6">
@Html.LabelFor(model => model.CorespondentFlat, new {@class = "label-form"})
@Html.EditorFor(model => model.CorespondentFlat, new {htmlAttributes = new {@class = "form-control"}})
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.CorespondentCity, new {@class = "label-form required" })
@Html.EditorFor(model => model.CorespondentCity, new {htmlAttributes = new {@class = "form-control"}})
</div>
<div class="row">
<div class="form-group col-md-6">
@Html.LabelFor(model => model.CorespondentPostalCode, new {@class = "label-form required" })
@Html.EditorFor(model => model.CorespondentPostalCode, new {htmlAttributes = new {@class = "form-control", PlaceHolder = "__-___"}})
</div>
<div class="form-group col-md-6">
@Html.LabelFor(model => model.CorespondentCountry, new {@class = "label-form required" })
@Html.DropDownListFor(model=>model.CorespondentCountry,Model.Countries ,new { @class = "form-control" } )
</div>
</div>
</div>
</div>
</section>
<section class="form-section">
<header>Wojsko</header>
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.MilitaryAttitude, new { @class = "label-form required" })
@Html.EnumDropDownListFor(model => model.MilitaryAttitude, new { @class = "form-control" })
</div>
</div>
</section>
</div>
<div class="row col-sm-12 text-center pt-20">
<input type="submit" class="submit-blue form-btn" value="Zapisz"/>
@Html.ActionLink("Anuluj","Index","Home",new {@class="form-cancel form-btn"})
</div>
</div>
}
@section DedicatedStyles
{
<link rel="stylesheet" href="~/Content/css/HomeData.css" />
}
@section scripts
{
<script>
$(document).ready(function() {
$('.required').prepend('<span class="glyphicon glyphicon-asterisk"></span>');
});
$("#ID-Card").click(function () {
var handler = $("#DocumentTypeId");
handler.text('Numer dowodu osobistego');
handler.prepend('<span class="glyphicon glyphicon-asterisk"></span>');
});
$("#Passport").click(function () {
var hander=$("#DocumentTypeId");
hander.text('Numer paszportu');
hander.prepend('<span class="glyphicon glyphicon-asterisk"></span>');
});
$("#NotSameAsResident").click(function() {
$("#corespondent-form").removeClass('hidden');
});
$("#SameAsResident").click(function() {
$("#corespondent-form").addClass('hidden');
});
</script>
}

View File

@ -0,0 +1,136 @@
@using RSystem.Models
@model RSystem.ViewModels.EducationViewModel
@{
ViewBag.Title = "Edukacja";
}
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="row">
<div class="col-md-6">
<section class="section-subject">
<header>Świadectwo dojrzałości</header>
<div class="section-body">
<div class="row">
<div class="col-md-6">
<div class="form-group">
@Html.LabelFor(m => m.MaturaNumber, new { @class = "label-form required" })
@Html.EditorFor(m => m.MaturaNumber, new { htmlAttributes = new { @class = "form-control no-radius", placeholder= "CCI123456" } })
</div>
</div>
<div class="col-md-6">
<div class="form-group">
@Html.LabelFor(m => m.DateOfPass, new { @class = "label-form required" })
@Html.EditorFor(m => m.DateOfPass, new { htmlAttributes = new { @class = "form-control no-radius" } })
</div>
</div>
</div>
</div>
</section>
</div>
<div class="col-md-6">
<section class="section-subject">
<header>Rodzaj zdawanej matury</header>
<div class="section-body-2">
<div class="form-group">
<div class="radio">
<label class="spec-ratio">@Html.RadioButtonFor(m => m.MaturaType, MaturaType.Nowa,new {id="new-matura-ratio"}) Nowa</label>
</div>
<div class="radio">
<label class="spec-ratio">@Html.RadioButtonFor(m => m.MaturaType, MaturaType.Stara,new {id="old-matura-ratio"}) Stara</label>
</div>
<div class="radio">
<label class="spec-ratio">@Html.RadioButtonFor(m => m.MaturaType, MaturaType.Międzynarodowa,new { id = "international-matura-ratio"}) Międzynarodowa</label>
</div>
</div>
</div>
</section>
</div>
</div>
<div class="col-lg-12">
<span class="h1 orange p-20" >Wyniki z matury</span>
<hr/>
</div>
for (int i = 0; i < Model.MaturaResults.Count(); i++)
{
<div class="col-lg-3 col-md-4 col-sm-6 subject-field d-none @MaturaTypeClass(Model.MaturaResults[i].MaturaSubject.MaturaType)">
<section class="section-subject">
<header>
@Model.MaturaResults[i].MaturaSubject.Name
</header>
<div class="section-body">
@Html.HiddenFor(m=>m.MaturaResults[i].MaturaResultId)
<div class="form-group">
@Html.LabelFor(m => m.MaturaResults[i].Points, new {@style = "font-weight:500"})
@Html.EditorFor(m => m.MaturaResults[i].Points, new {htmlAttributes = new {@class = "form-control no-radius"}})
</div>
<p>@Model.MaturaResults[i].MaturaSubject.Description</p>
</div>
</section>
</div>
}
<div class="row col-sm-12 text-center p-submit">
<input type="submit" class="submit-blue form-btn" value="Zapisz"/>
@Html.ActionLink("Anuluj","Index","Home",new {@class="form-cancel form-btn"})
</div>
}
@section DedicatedStyles
{
<link rel="stylesheet" href="~/Content/css/HomeEducation.css" />
}
@functions
{
string MaturaTypeClass(MaturaType type)
{
if (type == MaturaType.Nowa)
return "new-matura";
else if (type == MaturaType.Stara)
return "old-matura";
return "internationtal-matura";
}
}
@section scripts
{
<script>
$(document).ready(function() {
if ($("#new-matura-ratio").prop("checked")) {
$(".new-matura").removeClass("d-none");
} else if ($("#old-matura-ratio").prop("checked")) {
$(".old-matura").removeClass("d-none");
} else {
$(".international-matura").removeClass("d-none");
}
});
$(document).ready(function () {
$('.required').prepend('<span class="glyphicon glyphicon-asterisk"></span>');
});
$("input[name *= 'MaturaType']").on('change',
function () {
$(".subject-field").addClass("d-none");
if ($("#new-matura-ratio").prop("checked")) {
$(".new-matura").removeClass("d-none");
} else if ($("#old-matura-ratio").prop("checked")) {
$(".old-matura").removeClass("d-none");
} else {
$(".international-matura").removeClass("d-none");
}
});
</script>
}

View File

@ -0,0 +1,52 @@
@using RSystem.App_LocalResources.Recruit
@model RSystem.ViewModels.HomeIndexViewModel
@{
ViewBag.Title = Model.Greeting;
}
<div class="warning-box white">
@Home.Warning
</div>
<div class="row py-20">
<div class="col-md-7 px-25">
<a href="@Url.Action("Data","Home",new{area="Recruit"})">
<div class="tile @Model.DataStatus">
<span class="icon">1</span>
@Home.Data
</div>
</a>
<a href="@Url.Action("Photo","Home",new{area="Recruit"})">
<div class="tile @Model.PhotoStatus">
<span class="icon">2</span>
@Home.Photo
</div>
</a>
<a href="@Url.Action("Education","Home",new{area="Recruit"})">
<div class="tile @Model.EducationStatus">
<span class="icon">3</span>
@Home.Education
</div>
</a>
<a href="@Url.Action("Preferences","Home",new{area="Recruit"})">
<div class="tile @Model.PreferenceStatus">
<span class="icon">4</span>
@Home.Courses
</div>
</a>
</div>
<div class="col-md-5">
<p id="tiles-hint">
Skorzystaj z menu, aby przejść kolejno do wymaganych sekcji formularza. Po wypełnieniu każdej z nich, będziesz wracał na tę stronę, a wypełnione przez Ciebie sekcje oznaczymy kolorem zielonym. Sekcje, które wymagają Twojej uwagi oznaczyliśmy kolorem białem.
</p>
</div>
</div>
<p class="p-20" id="remind-box">
W przypadku, gdy rejestracja została już zakończona, a w Twoich danych jest błąd, pobierz, wypełnij i dostarcz do Komisji Rekrutacynej <a href="#" class="highlight">formularz zmiany danych</a>.
</p>
@section DedicatedStyles
{
<link rel="stylesheet" href="~/Content/css/HomeIndex.css" />
}

View File

@ -0,0 +1,45 @@
@model string
@{
ViewBag.Title = "Zdjęcie do legitymacji";
}
<div id="photo-div">
<img id="photo" src="@Url.Content(Model)" />
</div>
@using (Html.BeginForm("Photo", "Home", FormMethod.Post,
new { enctype = "multipart/form-data" }))
{
@Html.AntiForgeryToken()
<div class="row col-sm-12 text-center p-submit mt-40">
<label for="photo-input" id="photo-label" class="form-btn form-file">@ViewBag.Photo</label>
<input type="file" name="photo" id="photo-input" class="inputfile"/>
<input type="submit" class="submit-blue form-btn" value="Zapisz"/>
@Html.ActionLink("Anuluj", "Index", "Home", new {@class = "form-cancel form-btn"})
</div>
}
@section Scripts{
<script>
$(document).ready(function () {
$('#photo-input').on('change',function() {
readURL(this);
$('#photo-label').html('Zmień');
});
});
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function(e) {
$('#photo').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}
</script>
}
@section DedicatedStyles
{
<link rel="stylesheet" href="~/Content/css/HomePhoto.css"/>
}

View File

@ -0,0 +1,120 @@
@using RSystem.Models
@model IEnumerable<RSystem.Models.RecruitPreference>
@{
ViewBag.Title = "Twoje kierunki";
}
<div class="add-field text-center my-20">
@Html.ActionLink("Dodaj kierunek","AddPreference","Home",new{area="Recruit"},new {@class="add-button"})
</div>
<p class="pref-info">
Wybrane kierunki
</p>
<div class="table-responsive">
<table class="main-table table table-striped mb-60">
<tr>
<th>Kierunek/Specialność</th>
<th>Termin zakończenia</th>
<th>Opłata rekrutacyjna</th>
<th>Czy opłacony</th>
<th>Operacje</th>
<th>Punkty</th>
<th>Status</th>
</tr>
@foreach (var p in Model)
{
<tr id="spec-id-@p.SpecializationId">
<td>
<b>#@p.Priority @p.Specialization.Name (@p.Specialization.Faculty.Abbrevation)</b><br />
<span>@p.Specialization.Description</span>
</td>
<td>@p.Specialization.Deadline.ToString("dd'.'MM'.'yyyy")</td>
<td>@p.Specialization.Price zl</td>
<td>@ConfirmationIcon(p.Paid) </td>
<td>
@using (Html.BeginForm("Preferences", "Home", FormMethod.Post, new { @class = "js-delete" }))
{
@Html.AntiForgeryToken()
@Html.Hidden("RecruitPreferenceId", p.RecruitPreferenceId)
<button type="submit" class="color-rejected btn-remove">Usuń</button>
}
</td>
<td>@p.Points</td>
<td class="@ClassForStatus(p.Status)">
@ContentForStatus(p.Status)
</td>
</tr>
}
</table>
</div>
@section DedicatedStyles
{
<link rel="stylesheet" href="~/Content/css/HomePreferences.css" />
}
@section scripts
{
<script>
$('.js-delete').submit(function(e) {
var currentForm = this;
e.preventDefault();
bootbox.confirm({
message: "Czy napewno chcesz usunąć ten kierunek?",
buttons: {
confirm: {
label: 'Usuń',
className: 'btn-danger'
},
cancel: {
label: 'Anuluj',
}
},
callback: function(result) {
if (result) {
currentForm.submit();
}
}
});
});
</script>
}
@functions
{
public string ClassForStatus(RecrutationStatus status)
{
if (status == RecrutationStatus.Accepted)
return "color-accepted";
else if (status == RecrutationStatus.Rejected)
return "color-rejected";
return "color-standby";
}
public string ContentForStatus(RecrutationStatus status)
{
if (status == RecrutationStatus.Accepted)
return "Przyjęty";
else if (status == RecrutationStatus.Rejected)
return "Odrzucony";
return "Oczekuje";
}
}
@helper ConfirmationIcon(bool b){
if (b)
{
@:<div class="glyphicon glyphicon-ok"> </div>
}
else
{
@:<div class="glyphicon glyphicon-remove"> </div>
}
}

View File

@ -0,0 +1,3 @@
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}

View File

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.Optimization" />
<add namespace="RSystem" />
</namespaces>
</pages>
</system.web.webPages.razor>
<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>
<system.webServer>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
</configuration>

264
RSystem/Content/Site.css Normal file
View File

@ -0,0 +1,264 @@
body, html {
height: 100%;
margin: 0;
font-family: 'Roboto', sans-serif;
overflow-x: hidden;
}
#wrapper {
min-height: 100%;
position: relative;
}
.white {
color: #fff;
}
.orange {
color: #da521f;
}
.main-color-background {
background-color: rgb(0,44,105);
}
#language-panel {
float: right;
}
.glyphicon-log-out {
font-size: 25px;
padding: 0;
margin: 0;
color: #dfdfdf;
}
.glyphicon-log-out:hover {
color: #fff;
cursor: pointer;
}
.header-text {
font-size: 40px;
color: #dddddd;
font-weight: 200;
padding-top: 25px;
}
.language-switch {
color: #dfdfdf;
font-size: 22px;
text-decoration: none;
}
.language-switch:hover {
text-decoration: none;
color: #fff;
}
.logoff {
border: 0;
opacity: 1;
}
#header {
padding: 30px 5px 55px 5px;
}
main {
padding-bottom: 180px;
}
footer {
width: 100%;
margin-top: -180px;
bottom: 0;
position:absolute;
padding: 0;
}
#footer {
height: 100%;
padding: 20px 0;
color: #eee;
font-size: 17px;
font-weight: 300;
}
#links a {
color: #eee;
font-weight: 500;
font-size: 16px;
}
#links a:hover {
cursor: pointer;
color: #ccc;
}
#copywright {
font-size: 12px;
color: #ccc;
}
.width-100 {
width: 100%;
}
.font-2 {
font-family: 'Exo 2', sans-serif;
}
.pt-20 {
padding-top: 20px;
}
.p-submit {
padding-top: 25px;
padding-bottom: 35px;
}
.py-20 {
padding: 20px 0;
}
.px-25 {
padding: 0 25px;
}
.p-20 {
padding: 20px;
}
.my-20 {
margin-top: 20px;
margin-bottom: 20px;
}
.mt-40 {
margin-top: 40px;
}
.ml-20 {
margin-left: 20px;
}
.my-40 {
margin: 40px 0;
}
.pb-60 {
padding-bottom: 60px;
}
.mb-60 {
margin-bottom: 40px;
}
.ratio-switch {
margin-top: 10px;
margin-bottom: 10px;
position: relative;
}
.end-form {
width: 140px;
padding: 5px;
font-size: 19px;
margin: 20px;
}
hr {
background-color: rgb(0,44,105);
height: 2px;
}
.submit-blue {
background-color: rgb(0,44,105);
}
.submit-blue:hover {
color: #eee;
text-decoration: none;
background-color: rgb(5, 28, 60);
}
.fs-17 {
font-size: 17px !important;
}
.fs-19 {
font-size: 19px !important;
}
.fs-16{
font-size: 16px !important;
}
.fs-15 {
font-size: 15px !important;
}
.fs-25 {
font-size: 25px !important;
}
.form-cancel {
background-color: #ee2222;
}
.form-cancel:hover {
color: #eee;
text-decoration: none;
background-color: #AF0505;
}
.form-btn {
width: 160px;
height: 40px;
line-height: 40px;
text-align: center;
vertical-align: middle;
border-radius: 0;
color: #fff;
border: 0;
font-size: 16px;
display: inline-block;
margin: 4px 10px;
}
.big-btn {
width: 100%;
color: #fff;
font-size: 18px;
line-height: 60px;
height: 60px;
border: 0;
text-align: center;
vertical-align: middle;
}
.no-radius {
border-radius: 0;
}
.bcg-blue {
background-color: rgb(0,44,105);
}
.mt-20 {
margin-top: 20px;
}
.glyphicon-asterisk {
color: #FF3333;
font-size: 15px;
}
.label-form {
font-weight: 500;
}
.fw-600 {
font-weight: 600;
}
.modal-open .modal {
display: flex !important;
align-items: center;
justify-content: center;
}
@media screen and (max-width: 545px) {
#header-row {
padding-left: 5px;
padding-right: 5px;
}
#main-logo {
padding-left: 0;
padding-right: 0;
width: 100%;
}
}

587
RSystem/Content/bootstrap-theme.css vendored Normal file
View File

@ -0,0 +1,587 @@
/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
.btn-default,
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(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, .125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
.btn-default.disabled,
.btn-primary.disabled,
.btn-success.disabled,
.btn-info.disabled,
.btn-warning.disabled,
.btn-danger.disabled,
.btn-default[disabled],
.btn-primary[disabled],
.btn-success[disabled],
.btn-info[disabled],
.btn-warning[disabled],
.btn-danger[disabled],
fieldset[disabled] .btn-default,
fieldset[disabled] .btn-primary,
fieldset[disabled] .btn-success,
fieldset[disabled] .btn-info,
fieldset[disabled] .btn-warning,
fieldset[disabled] .btn-danger {
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-default .badge,
.btn-primary .badge,
.btn-success .badge,
.btn-info .badge,
.btn-warning .badge,
.btn-danger .badge {
text-shadow: none;
}
.btn:active,
.btn.active {
background-image: none;
}
.btn-default {
text-shadow: 0 1px 0 #fff;
background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #dbdbdb;
border-color: #ccc;
}
.btn-default:hover,
.btn-default:focus {
background-color: #e0e0e0;
background-position: 0 -15px;
}
.btn-default:active,
.btn-default.active {
background-color: #e0e0e0;
border-color: #dbdbdb;
}
.btn-default.disabled,
.btn-default[disabled],
fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled.focus,
.btn-default[disabled].focus,
fieldset[disabled] .btn-default.focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
background-color: #e0e0e0;
background-image: none;
}
.btn-primary {
background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #245580;
}
.btn-primary:hover,
.btn-primary:focus {
background-color: #265a88;
background-position: 0 -15px;
}
.btn-primary:active,
.btn-primary.active {
background-color: #265a88;
border-color: #245580;
}
.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled.focus,
.btn-primary[disabled].focus,
fieldset[disabled] .btn-primary.focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
background-color: #265a88;
background-image: none;
}
.btn-success {
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #3e8f3e;
}
.btn-success:hover,
.btn-success:focus {
background-color: #419641;
background-position: 0 -15px;
}
.btn-success:active,
.btn-success.active {
background-color: #419641;
border-color: #3e8f3e;
}
.btn-success.disabled,
.btn-success[disabled],
fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled.focus,
.btn-success[disabled].focus,
fieldset[disabled] .btn-success.focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
background-color: #419641;
background-image: none;
}
.btn-info {
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #28a4c9;
}
.btn-info:hover,
.btn-info:focus {
background-color: #2aabd2;
background-position: 0 -15px;
}
.btn-info:active,
.btn-info.active {
background-color: #2aabd2;
border-color: #28a4c9;
}
.btn-info.disabled,
.btn-info[disabled],
fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled.focus,
.btn-info[disabled].focus,
fieldset[disabled] .btn-info.focus,
.btn-info.disabled:active,
.btn-info[disabled]:active,
fieldset[disabled] .btn-info:active,
.btn-info.disabled.active,
.btn-info[disabled].active,
fieldset[disabled] .btn-info.active {
background-color: #2aabd2;
background-image: none;
}
.btn-warning {
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #e38d13;
}
.btn-warning:hover,
.btn-warning:focus {
background-color: #eb9316;
background-position: 0 -15px;
}
.btn-warning:active,
.btn-warning.active {
background-color: #eb9316;
border-color: #e38d13;
}
.btn-warning.disabled,
.btn-warning[disabled],
fieldset[disabled] .btn-warning,
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
.btn-warning.disabled:focus,
.btn-warning[disabled]:focus,
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled.focus,
.btn-warning[disabled].focus,
fieldset[disabled] .btn-warning.focus,
.btn-warning.disabled:active,
.btn-warning[disabled]:active,
fieldset[disabled] .btn-warning:active,
.btn-warning.disabled.active,
.btn-warning[disabled].active,
fieldset[disabled] .btn-warning.active {
background-color: #eb9316;
background-image: none;
}
.btn-danger {
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #b92c28;
}
.btn-danger:hover,
.btn-danger:focus {
background-color: #c12e2a;
background-position: 0 -15px;
}
.btn-danger:active,
.btn-danger.active {
background-color: #c12e2a;
border-color: #b92c28;
}
.btn-danger.disabled,
.btn-danger[disabled],
fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled.focus,
.btn-danger[disabled].focus,
fieldset[disabled] .btn-danger.focus,
.btn-danger.disabled:active,
.btn-danger[disabled]:active,
fieldset[disabled] .btn-danger:active,
.btn-danger.disabled.active,
.btn-danger[disabled].active,
fieldset[disabled] .btn-danger.active {
background-color: #c12e2a;
background-image: none;
}
.thumbnail,
.img-thumbnail {
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
background-color: #e8e8e8;
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
background-repeat: repeat-x;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
background-color: #2e6da4;
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
.navbar-default {
background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
}
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .active > a {
background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
background-repeat: repeat-x;
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
}
.navbar-brand,
.navbar-nav > li > a {
text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}
.navbar-inverse {
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-radius: 4px;
}
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .active > a {
background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
background-repeat: repeat-x;
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
}
.navbar-inverse .navbar-brand,
.navbar-inverse .navbar-nav > li > a {
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
}
.navbar-static-top,
.navbar-fixed-top,
.navbar-fixed-bottom {
border-radius: 0;
}
@media (max-width: 767px) {
.navbar .navbar-nav .open .dropdown-menu > .active > a,
.navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #fff;
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
}
.alert {
text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
}
.alert-success {
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
background-repeat: repeat-x;
border-color: #b2dba1;
}
.alert-info {
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
background-repeat: repeat-x;
border-color: #9acfea;
}
.alert-warning {
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
background-repeat: repeat-x;
border-color: #f5e79e;
}
.alert-danger {
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
background-repeat: repeat-x;
border-color: #dca7a7;
}
.progress {
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar {
background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-success {
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-info {
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-warning {
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-danger {
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-striped {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
}
.list-group {
border-radius: 4px;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
}
.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus {
text-shadow: 0 -1px 0 #286090;
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
background-repeat: repeat-x;
border-color: #2b669a;
}
.list-group-item.active .badge,
.list-group-item.active:hover .badge,
.list-group-item.active:focus .badge {
text-shadow: none;
}
.panel {
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.panel-default > .panel-heading {
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
background-repeat: repeat-x;
}
.panel-primary > .panel-heading {
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
.panel-success > .panel-heading {
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
background-repeat: repeat-x;
}
.panel-info > .panel-heading {
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
background-repeat: repeat-x;
}
.panel-warning > .panel-heading {
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
background-repeat: repeat-x;
}
.panel-danger > .panel-heading {
background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
background-repeat: repeat-x;
}
.well {
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
background-repeat: repeat-x;
border-color: #dcdcdc;
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
}
/*# sourceMappingURL=bootstrap-theme.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

6757
RSystem/Content/bootstrap.css vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

6
RSystem/Content/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,54 @@
.faculties > header {
width: 100%;
padding: 10px 0 10px 20px;
background-color: rgb(0,44,105);
color: #fff;
}
.faculties {
font-size: 17px;
border: 1px solid #eee;
}
.faculty {
color: #094988;
}
.faculty:hover {
cursor: pointer;
}
.color-rejected {
color: #9b0000;
}
.add-field {
width: 100%;
padding: 30px 0;
background-color: #eee;
}
.add-button {
border-radius: 0;
border: 0;
background-color: rgb(0,44,105);
color: #fff;
padding: 7px 20px;
font-size: 18px;
}
.add-button:hover {
color: #eee;
text-decoration: none;
background-color: rgb(5, 28, 60);
}
.btn-remove {
background-color: rgba(0, 0, 0, 0);
border: 0;
}
.main-table {
border: 1px #ccc solid;
font-size: 13px;
}

View File

@ -0,0 +1,35 @@
#main-container {
font-size: 16px;
color: #141414;
}
.label-form {
font-weight: 500;
}
.form-section {
border: 1px solid #eee;
}
.form-section > header {
width: 100%;
padding: 10px 20px;
background-color: rgb(0,44,105);
font-size: 16px;
color: #fff;
}
.form-control {
border-radius: 0;
border-color: rgb(0,44,105);
}
.label-ratio {
font-size: 16px;
color: #141414;
font-weight: 400;
}
.label-ratio:hover {
cursor: pointer;
}

View File

@ -0,0 +1,36 @@
.section-subject {
width: 100%;
border: 1px solid #eee;
font-size: 17px;
margin-bottom: 30px;
}
.section-subject>header {
padding: 5px 10px;
background-color: rgb(0,44,105);
color: #fff;
}
.d-none {
display: none;
}
.section-body {
padding: 20px;
}
.section-body>p {
font-size: 14px;
padding-top: 30px;
text-align: justify;
color: #777;
}
.section-body-2 {
padding: 5px 20px;
}
@media (min-width: 992px) {
.section-body > p {
height: 140px;
}
}

View File

@ -0,0 +1,95 @@

.warning-box {
padding: 14px;
background-color: #DA521F;
font-size: 17px;
}
.tile {
width: 24%;
height: 190px;
text-align: center;
line-height: 110px;
border: 1px solid rgb(0,44,105);
display: inline-block;
color: rgb(0,44,105);
padding: 5px;
transition: ease-in-out 0.3s;
font-weight: 500;
font-size: 17px;
margin-top: 10px;
}
.tile:hover {
cursor: pointer;
background-color: rgb(0,44,105);
border-color: rgb(0,44,105);
color: #fff;
}
.tile-done {
color: #ffffff;
background-color: #5CB85C;
border-color: #5CB85C;
}
.tile-incomplete {
color: #ffffff;
background-color: #D75726;
border-color: #CE643C;
}
#tiles-hint {
background-color: rgb(0,44,105);
color: #ffffff;
height: 190px;
font-size: 17px;
font-weight: 500;
padding: 20px;
margin-top: 10px;
}
.icon {
display: block;
text-align: Center;
font-size: 20px;
border: solid 1px;
border-radius: 50%;
width: 30px;
height: 30px;
line-height: 30px;
margin: 4px;
}
#remind-box {
font-size: 16px;
}
.highlight {
color: #fff;
background-color: rgb(0,44,105);
padding: 1px 3px;
white-space: nowrap;
}
.highlight:hover {
background-color: #fff;
color:rgb(0,44,105);
border: 1px solid rgb(0,44,105);
text-decoration: none;
}
@media only screen and (max-width: 540px) {
.tile {
width: 49%;
margin-top: 4px;
box-sizing: border-box;
}
}

View File

@ -0,0 +1,25 @@
img {
width: 310px;
height: auto;
}
#photo-div {
text-align: center;
}
.inputfile {
width: 0.1px;
height: 0.1px;
opacity: 0;
overflow: hidden;
position: absolute;
z-index: -1;
}
.form-file {
background-color: #098520;
font-weight: 500 !important;
}
.form-file:hover {
background-color: #045D15;
cursor: pointer;
}

View File

@ -0,0 +1,82 @@
.main-table {
border: 1px #ccc solid;
font-size: 13px;
}
.color-accepted {
color: #009B00;
}
.color-rejected {
color: #9b0000;
}
.color-standby {
color: #eab71c;
}
.glyphicon-ok {
color: #009B00;
font-size: 15px;
}
.glyphicon-remove {
color: #9b0000;
font-size: 15px;
}
.btn-remove {
background-color: rgba(0, 0, 0, 0);
border: 0;
}
.add-field {
width: 100%;
padding: 30px 0;
background-color: #eee;
}
.add-button {
border-radius: 0;
background-color: rgb(0,44,105);
color: #fff;
padding: 7px 20px;
font-size: 18px;
}
.add-button:hover {
color: #eee;
text-decoration: none;
background-color: rgb(5, 28, 60);
}
.pref-info {
border-radius: 0;
background-color: rgb(0,44,105);
color: #fff;
padding: 7px 20px;
font-size: 16px;
}
.faculty > header {
width: 100%;
padding: 10px 0 10px 20px;
background-color: #eee;
}
.faculty {
padding-bottom: 20px;
font-size: 15px;
border: 1px solid #eee;
}
.spec-ratio {
margin: 10px 0 10px 10px;
font-size: 16px;
}
.modal-open .modal {
display: flex !important;
align-items: center;
justify-content: center;
}

View File

@ -0,0 +1,94 @@
#user-input, #user-next-submit {
height: 60px;
font-size: 33px;
border-radius: 0;
display: inline-block;
padding: 0;
margin: 0;
vertical-align: bottom;
}
#user-input {
width: 320px;
border: 2px solid rgb(0,44,105);
color: rgb(0,44,105);
padding: 0 10px;
font-weight: 300;
}
#user-next-submit {
background-color: rgb(0,44,105);
color: #fff;
text-align: center;
width: 200px;
margin-left: 5px;
font-size: 27px;
}
@media screen and (max-width: 545px) {
#user-next-submit {
width: 320px;
margin-top: 30px;
}
#LabelForInput {
font-size: 25px;
}
}
#user-next-submit:hover {
background-color: #333;
}
.triangle-top {
background-image: url("/Content/img/triangle.png");
background-repeat: repeat-x;
background-size: 35px;
padding: 0;
margin: 0;
width: 100%;
height: 35px;
}
.triangle-bottom {
background-image: url("/Content/img/triangle-gray.png");
background-repeat: repeat-x;
background-size: 35px;
padding: 0;
margin-top: 75px;
width: 100%;
height: 25px;
}
.triangle-bottom-reversed {
margin-top:-2px !important;
transform: rotate(180deg);
}
#help-div {
padding: 100px 0 100px 0;
background-color: #333;
}
#help-div > .container > p {
font-size: 16px;
padding: 30px 0;
}
#div-help > .container > .text-center > .h3 {
font-family: 'Exo 2', sans-serif;
}
#more-info {
color: #333;
padding: 40px 0 20px 0;
}
#more-info > .text-center > p {
padding: 20px 0;
font-size: 20px;
}
#LabelForInput {
margin-top: 20px;
font-family: 'Exo 2', sans-serif;
}

View File

@ -0,0 +1,53 @@

.multipiler {
font-size: 20px;
color: rgb(0,44,105);
}
.multipiler-section {
width: 100%;
margin-top: 12px;
}
.glyphicon-remove {
color: #ee2222;
font-size: 20px;
}
.glyphicon-ok {
color: #02B202;
font-size: 18px;
}
.glyphicon-ok:hover {
cursor: pointer;
}
.glyphicon-remove:hover {
cursor: pointer;
}
.add-matura-input {
display: inline-block;
vertical-align: top;
}
.matura-multipiler-input {
width: 40px;
padding: 0;
margin-left: -8px;
text-align: center;
}
.matura-subjectid-input {
width: 75%;
margin-left: 6px;
}
.add-subject-field {
padding-right: 20px;
}
@media screen and (max-width:992px) {
.mobile-mt-20 {
margin-top: 20px;
}
}

View File

@ -0,0 +1,46 @@
.faculty > header {
width: 100%;
padding: 10px 0 10px 20px;
background-color: rgb(0,44,105);
color: #fff;
}
.faculty {
padding-bottom: 20px;
font-size: 15px;
border: 1px solid #eee;
}
.color-rejected {
color: #9b0000;
}
.add-field {
width: 100%;
padding: 30px 0;
background-color: #eee;
}
.add-button {
border-radius: 0;
background-color: rgb(0,44,105);
color: #fff;
padding: 7px 20px;
font-size: 18px;
}
.add-button:hover {
color: #eee;
text-decoration: none;
background-color: rgb(5, 28, 60);
}
.btn-remove {
background-color: rgba(0, 0, 0, 0);
border: 0;
}
.main-table {
border: 1px #ccc solid;
font-size: 13px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

BIN
RSystem/Content/img/uam.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -0,0 +1,351 @@
using System;
using System.Collections.Generic;
using System.Data.Entity.Validation;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using System.Web;
using System.Web.Hosting;
using System.Web.Mvc;
using System.Web.Security;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin.Security;
using RSystem.DAL;
using RSystem.Managers;
using RSystem.Models;
using RSystem.ViewModels;
namespace RSystem.Controllers
{
[Authorize]
public class AccountController : LangBaseController
{
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)
{
//To logoff and get new AntiForgeryToken
if (User.Identity.IsAuthenticated)
{
AuthenticationManager.SignOut();
Session.Abandon();
return RedirectToAction("Login", returnUrl);
}
ViewBag.HideMainHeader = true;
ViewBag.ReturnUrl = returnUrl;
return View(new Tuple<LoginViewModel,bool>(new LoginViewModel(),false));
}
// POST: /Account/Login
[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public async Task<ActionResult> Login(LoginViewModel model)
{
ViewBag.HideMainHeader = true;
if (!ModelState.IsValidField("PESEL"))
return View(new Tuple<LoginViewModel, bool>(model, false));
var db=new ApplicationDbContext();
//Login if password is set
if (!string.IsNullOrEmpty(model.Password))
{
var result = await SignInManager.PasswordSignInAsync(model.PESEL, model.Password, false, shouldLockout: false);
if (result == SignInStatus.Success)
//return RedirectToAction("Index", "Home");
return RedirectToAction("Index", "Home", new { area = "" });
ViewBag.Message = App_LocalResources.Account.Login.IncorrectPassword;
return View(new Tuple<LoginViewModel, bool>(model, false));
}
//Check if there is an user with such a PESEL if password not set
if (!db.Users.Any(u => u.UserName == model.PESEL))
{
ViewBag.Message = App_LocalResources.Account.Login.PESELNotFound;
return View(new Tuple<LoginViewModel,bool>(model,false));
}
return View(new Tuple<LoginViewModel, bool>(model, true));
}
// GET: /Account/Register
[AllowAnonymous]
public ActionResult Register()
{
if (User.Identity.IsAuthenticated)
{
AuthenticationManager.SignOut();
Session.Abandon();
}
return View();
}
//
// POST: /Account/Register
[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public async Task<ActionResult> Register(RegisterViewModel model)
{
if (ModelState.IsValid)
{
var user = new ApplicationUser { UserName = model.PESEL,Email = model.Email };
var result = await UserManager.CreateAsync(user, model.Password);
if (result.Succeeded)
{
//Add user to Recruit role
var store = new UserStore<ApplicationUser>(new ApplicationDbContext());
var userMenager = new UserManager<ApplicationUser>(store);
userMenager.AddToRole(user.Id, "Recruit");
await SignInManager.SignInAsync(user, false, rememberBrowser:false);
//Recruit model initialization
await RecruitMenager.InitializeRecruitAsync(user.Id, model.Email);
// 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);
}
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 https://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/LogOff
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult LogOff()
{
AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie);
return RedirectToAction("Index", "Home");
}
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
}
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace RSystem.Controllers
{
[AllowAnonymous]
public class ErrorController : Controller
{
// GET: Error
public ActionResult Index(int? id)
{
ViewBag.ErrorCode = id==null? 404 : id;
return View();
}
}
}

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace RSystem.Controllers
{
[AllowAnonymous]
public class HomeController : Controller
{
// GET: Home
public ActionResult Index()
{
if (User.IsInRole("Recruit"))
return RedirectToAction("Index", "Home", new {area = "Recruit"});
else if (User.IsInRole("Admin"))
return RedirectToAction("Index", "Panel", new {area = "Admin"});
return RedirectToAction("Login", "Account");
}
}
}

View File

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace RSystem.Controllers
{
public abstract class LangBaseController : Controller
{
private string CurrentLanguageCode { get; set; }
protected override void Initialize(RequestContext requestContext)
{
if (requestContext.RouteData.Values["lang"] != null && requestContext.RouteData.Values["lang"] as string != "null")
{
CurrentLanguageCode = (string)requestContext.RouteData.Values["lang"];
if (CurrentLanguageCode != null)
{
try
{
Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = new CultureInfo(CurrentLanguageCode);
}
catch (Exception)
{
throw new NotSupportedException($"Invalid language code '{CurrentLanguageCode}'.");
}
}
}
base.Initialize(requestContext);
}
}
}

View File

@ -0,0 +1,388 @@
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 RSystem.Models;
namespace RSystem.Controllers
{
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);
}
//
// POST: /Manage/RemovePhoneNumber
[HttpPost]
[ValidateAntiForgeryToken]
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
}
}

View File

@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using Microsoft.AspNet.Identity.EntityFramework;
using RSystem.Models;
namespace RSystem.DAL
{
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext()
: base("DefaultConnection", throwIfV1Schema: false)
{
this.Configuration.LazyLoadingEnabled = false;
//Database.SetInitializer<ApplicationDbContext>(new CreateDatabaseIfNotExists<ApplicationDbContext>());
}
public DbSet<Recruit> Recruits { get; set; }
public DbSet<RecruitData> RecruitDatas { get; set; }
public DbSet<RecruitPreference> RecruitPreferences { get; set; }
public DbSet<Specialization> Specializations { get; set; }
public DbSet<Faculty> Faculties { get; set; }
public DbSet<MaturaSubject> MaturaSubjects { get; set; }
public DbSet<MaturaResult> MaturaResults { get; set; }
public DbSet<PointsMultipiler> PointsMultipilers { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<Recruit>()
.HasRequired(r => r.RecriutData)
.WithRequiredPrincipal(r => r.Recruit);
modelBuilder.Entity<Recruit>()
.HasRequired(u => u.ApplicationUser);
modelBuilder.Entity<Specialization>()
.HasMany(r => r.RecruitPreferences)
.WithRequired(s => s.Specialization);
modelBuilder.Entity<Specialization>()
.HasMany(r => r.AcceptedRecruits)
.WithOptional(s => s.AcceptedSpecialization);
modelBuilder.Entity<Recruit>()
.HasMany(r => r.RecruitPreferences)
.WithRequired(r => r.Recruit);
modelBuilder.Entity<Specialization>()
.HasRequired(s => s.Faculty)
.WithMany(s => s.Specializations);
modelBuilder.Entity<Recruit>()
.HasMany(m => m.MaturaResults)
.WithRequired(r => r.Recruit);
modelBuilder.Entity<MaturaResult>()
.HasRequired(m => m.MaturaSubject);
modelBuilder.Entity<Specialization>()
.HasMany(p => p.PointsMultipilers)
.WithRequired(s => s.Specialization);
modelBuilder.Entity<PointsMultipiler>()
.HasRequired(m => m.MaturaSubject);
}
public static ApplicationDbContext Create()
{
return new ApplicationDbContext();
}
}
}

1
RSystem/Global.asax Normal file
View File

@ -0,0 +1 @@
<%@ Application Codebehind="Global.asax.cs" Inherits="RSystem.MvcApplication" Language="C#" %>

50
RSystem/Global.asax.cs Normal file
View File

@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using AutoMapper;
using RSystem.Controllers;
using RSystem.Models;
using RSystem.ViewModels;
namespace RSystem
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
GlobalConfiguration.Configure(WebApiConfig.Register);
Mapper.Initialize(cfg => {
cfg.CreateMap<RecruitDataViewModel, RecruitData>();
cfg.CreateMap<RecruitData, RecruitDataViewModel>();
});
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
protected void Application_Error(object sender, EventArgs e)
{
var exception = Server.GetLastError();
Response.Clear();
var httpexception = exception as HttpException;
var route = new RouteData();
route.Values.Add("controller","Error");
route.Values.Add("action","Index");
if(httpexception!=null)
route.Values.Add("id",httpexception.GetHttpCode().ToString());
Server.ClearError();
Response.TrySkipIisCustomErrors = true;
IController errorController=new ErrorController();
errorController.Execute(new RequestContext(new HttpContextWrapper(Context),route ));
}
}
}

View File

@ -0,0 +1,31 @@
using System.Web.Mvc;
using System.Web.Routing;
namespace RSystem.Helpers
{
public static class LanguageHelper
{
public static MvcHtmlString LangSwitcher(this UrlHelper url, string Name, RouteData routeData, string lang)
{
var liTagBuilder = new TagBuilder("li");
var aTagBuilder = new TagBuilder("a");
aTagBuilder.AddCssClass("language-switch");
var routeValueDictionary = new RouteValueDictionary(routeData.Values);
if (routeValueDictionary.ContainsKey("lang"))
{
if(routeData.Values["lang"] as string != lang)
{
routeValueDictionary["lang"] = lang;
}
}
else if(lang!="pl")
routeValueDictionary.Add("lang",lang);
aTagBuilder.MergeAttribute("href", url.RouteUrl(routeValueDictionary));
aTagBuilder.SetInnerText(Name);
liTagBuilder.InnerHtml = aTagBuilder.ToString();
return new MvcHtmlString(liTagBuilder.ToString());
}
}
}

View File

@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Helpers;
using Microsoft.Ajax.Utilities;
using Newtonsoft.Json;
using RSystem.Models;
namespace RSystem.Managers
{
public class JsonIntermediateMutipiler
{
public int? matura { get; set; }
public float? val { get; set; }
}
public class JSONParserManager
{
public static IEnumerable<PointsMultipiler> JsonToPointsMultipilers(string json,int id)
{
var intermediateModel = JsonConvert.DeserializeObject<IEnumerable<JsonIntermediateMutipiler>>(json);
foreach (var mutipiler in intermediateModel)
{
if(mutipiler.matura!=null && mutipiler.val!=null)
yield return new PointsMultipiler()
{
Multipiler = (float)mutipiler.val,
MaturaSubjectId = (int)mutipiler.matura,
SpecializationId = id
};
}
}
}
}

View File

@ -0,0 +1,135 @@
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using RSystem.DAL;
using RSystem.Models;
namespace RSystem.Managers
{
public class RecruitMenager
{
public static Task InitializeRecruitAsync(string id,string email)
{
return Task.Run(() =>
{
var db = new ApplicationDbContext();
var recruit = new Recruit()
{
ApplicationUserId = id,
RecriutData = new RecruitData()
{
Email = email
},
MaturaType = MaturaType.Nowa,
DateOfPass = DateTime.Today,
MaturaNumber = "",
MaturaResults = new List<MaturaResult>()
};
foreach (var subject in db.MaturaSubjects)
{
recruit.MaturaResults.Add(new MaturaResult()
{
Points = 0,
MaturaSubject = subject
});
}
db.Recruits.Add(recruit);
db.SaveChanges();
});
}
public static Task CalculatePointAsync(int id)
{
return Task.Run((() =>
{
var db=new ApplicationDbContext();
var recruit = db.Recruits
.Include(r => r.RecruitPreferences.Select(s=>s.Specialization.PointsMultipilers))
.Include(m => m.MaturaResults.Select(s => s.MaturaSubject))
.FirstOrDefault(i => i.RecruitId == id);
if (recruit != null)
{
foreach (var preference in recruit.RecruitPreferences)
{
short points = 0;
foreach (var multipiler in preference.Specialization.PointsMultipilers
.Where(s=>s.MaturaSubject.MaturaType==recruit.MaturaType))
{
points += (short)(multipiler.Multipiler *
recruit.MaturaResults
.First(s => s.MaturaSubject == multipiler.MaturaSubject)
.Points);
}
preference.Points = points;
}
db.Entry(recruit).State = EntityState.Modified;
db.SaveChanges();
}
}));
}
//Calculate points for only one preference
public static Task CalculatePointAsync(int id, int specializationId)
{
return Task.Run(() =>
{
var db = new ApplicationDbContext();
var recruitPreference = db.RecruitPreferences
.Include(s => s.Specialization.PointsMultipilers)
.Include(r=>r.Recruit.MaturaResults.Select(m=>m.MaturaSubject))
.FirstOrDefault(r => r.RecruitId == id && r.SpecializationId == specializationId);
if (recruitPreference != null)
{
short points = 0;
foreach (var multipiler in recruitPreference.Specialization.PointsMultipilers)
{
points += (short) (multipiler.Multipiler *
recruitPreference.Recruit.MaturaResults
.First(s => s.MaturaSubject == multipiler.MaturaSubject)
.Points);
}
recruitPreference.Points = points;
db.Entry(recruitPreference).State = EntityState.Modified;
db.SaveChanges();
}
});
}
public static void RepairPriorityOrder(int id)
{
var db=new ApplicationDbContext();
var preferences = db.RecruitPreferences
.Where(r => r.RecruitId == id)
.OrderBy(p=>p.Priority)
.ToArray();
if(preferences==null)
return;
//First priority must be 1
int currentPriority = 1;
foreach (var preference in preferences)
{
preference.Priority =(short)currentPriority;
currentPriority++;
}
db.SaveChanges();
}
}
}

View File

@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Threading.Tasks;
using Microsoft.Ajax.Utilities;
using RSystem.DAL;
using RSystem.Models;
using WebGrease.Css.Extensions;
namespace RSystem.Managers
{
public class RecrutationManager
{
public static void RecruitBySpecializations(IEnumerable<int>specializationsId)
{
var db = new ApplicationDbContext();
//get all recruits, that contains at
//least one of selected specialization
var recruits = db.Recruits
.Include(p=>p.RecruitPreferences)
.Include(m=>m.MaturaResults)
.Where(r => r.RecruitPreferences
.Any(s => specializationsId.Contains(s.SpecializationId)));
//new list with Recruits and specialization left
var recrutationList=new List<KeyValuePair<Recruit,int>>();
foreach (var recruit in recruits)
{
var filteredPreferences = recruit.RecruitPreferences
.Where(r => specializationsId.Contains(r.SpecializationId))
.OrderBy(p=>p.Priority);
recrutationList.Add(new KeyValuePair<Recruit, int>(recruit,filteredPreferences.Count()));
}
//Final list
var finalList=new List<Specialization>(
db.Specializations
.Where(id=>specializationsId.Contains(id.SpecializationId)));
}
}
}

View File

@ -0,0 +1,105 @@
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Web;
using RSystem.App_LocalResources.Recruit;
using RSystem.DAL;
using RSystem.Models;
using RSystem.ViewModels;
namespace RSystem.Managers
{
public class TilesStatusManager
{
private ApplicationDbContext db;
private Recruit recruit;
private string photoPath;
private readonly string Done = "tile-done";
private readonly string Empty = "tile-empty";
//private readonly string Incomplete = "tile-incomplete";
private string getPhotoStatus()
{
return System.IO.File.Exists(this.photoPath)
? Done
: Empty;
}
private string getDataStatus()
{
//Get all required properties which are strings
var properties = typeof(RecruitData).GetProperties()
.Where( p=>p.PropertyType.Name ==typeof(string).Name &&
p.Name != "SecondName" &&
p.Name != "Flat" &&
p.Name != "CorespondentFlat"
);
//Filter properties if corespondent adress is not same as residence
if (recruit.RecriutData.CorespondentAdressSameAsResidence)
properties = properties.Where(p => !p.Name.StartsWith("Corespondent"));
foreach (var propertyInfo in properties)
{
var propertyValue = propertyInfo.GetValue(recruit.RecriutData) as string;
if (string.IsNullOrWhiteSpace(propertyValue))
return Empty;
}
//Return Done if pass
return Done;
}
private string getEducationStatus()
{
return !string.IsNullOrWhiteSpace(recruit.MaturaNumber)
? Done
: Empty;
}
private string getPreferencesStatus()
{
return recruit.RecruitPreferences.Any()
? Done
: Empty;
}
private string getGreeting()
{
var hello = Home.Hello;
return string.IsNullOrWhiteSpace(recruit.RecriutData.FirstName)
? hello
: hello+", "+ recruit.RecriutData.FirstName;
}
public HomeIndexViewModel GeHomeIndexViewModel()
{
return new HomeIndexViewModel()
{
DataStatus = this.getDataStatus(),
PhotoStatus = this.getPhotoStatus(),
EducationStatus = getEducationStatus(),
PreferenceStatus = this.getPreferencesStatus(),
Greeting = this.getGreeting()
};
}
public TilesStatusManager(string userId,string photoPath)
{
this.db=new ApplicationDbContext();
this.recruit = db.Recruits
.Include(r=>r.RecriutData)
.Include(p=>p.RecruitPreferences)
.FirstOrDefault(id=>id.ApplicationUser.Id==userId);
this.photoPath = photoPath;
}
}
}

View File

@ -0,0 +1,29 @@
// <auto-generated />
namespace RSystem.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class InitializeDB : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(InitializeDB));
string IMigrationMetadata.Id
{
get { return "201712201956089_InitializeDB"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@ -0,0 +1,208 @@
namespace RSystem.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class InitializeDB : DbMigration
{
public override void Up()
{
CreateTable(
"dbo.Faculties",
c => new
{
FacultyId = c.Int(nullable: false, identity: true),
Name = c.String(),
Abbrevation = c.String(),
})
.PrimaryKey(t => t.FacultyId);
CreateTable(
"dbo.Specializations",
c => new
{
SpecializationId = c.Int(nullable: false, identity: true),
Name = c.String(),
Description = c.String(),
Price = c.Single(nullable: false),
Deadline = c.DateTime(nullable: false),
FacultyId = c.Int(nullable: false),
})
.PrimaryKey(t => t.SpecializationId)
.ForeignKey("dbo.Faculties", t => t.FacultyId, cascadeDelete: true)
.Index(t => t.FacultyId);
CreateTable(
"dbo.RecruitPreferences",
c => new
{
RecruitPreferenceId = c.Int(nullable: false, identity: true),
SpecializationId = c.Int(nullable: false),
Priority = c.Short(nullable: false),
Status = c.Int(nullable: false),
Points = c.Short(nullable: false),
Paid = c.Boolean(nullable: false),
RecruitId = c.Int(nullable: false),
})
.PrimaryKey(t => t.RecruitPreferenceId)
.ForeignKey("dbo.Recruits", t => t.RecruitId, cascadeDelete: true)
.ForeignKey("dbo.Specializations", t => t.SpecializationId, cascadeDelete: true)
.Index(t => t.SpecializationId)
.Index(t => t.RecruitId);
CreateTable(
"dbo.Recruits",
c => new
{
RecruitId = c.Int(nullable: false, identity: true),
ApplicationUserId = c.String(nullable: false, maxLength: 128),
})
.PrimaryKey(t => t.RecruitId)
.ForeignKey("dbo.AspNetUsers", t => t.ApplicationUserId, cascadeDelete: true)
.Index(t => t.ApplicationUserId);
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);
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.AspNetUsers", t => t.UserId, cascadeDelete: true)
.ForeignKey("dbo.AspNetRoles", t => t.RoleId, cascadeDelete: true)
.Index(t => t.UserId)
.Index(t => t.RoleId);
CreateTable(
"dbo.RecruitDatas",
c => new
{
RecruitDataId = c.Int(nullable: false),
RecruitId = c.Int(nullable: false),
FirstName = c.String(),
SecondName = c.String(),
LastName = c.String(),
Sex = c.Int(nullable: false),
Citizenship = c.String(),
DocumentType = c.Int(nullable: false),
DocumentNumber = c.String(),
Street = c.String(),
House = c.String(),
Flat = c.String(),
PostalCode = c.String(),
City = c.String(),
Country = c.String(),
CorespondentAdressSameAsResidence = c.Boolean(nullable: false),
CorespondentStreet = c.String(),
CorespondentHouse = c.String(),
CorespondentFlat = c.String(),
CorespondentPostalCode = c.String(),
CorespondentCity = c.String(),
CorespondentCountry = c.String(),
Email = c.String(),
Phone = c.String(),
IsDisabled = c.Boolean(nullable: false),
FathersName = c.String(),
MothersName = c.String(),
DayOfBirth = c.DateTime(),
BirthCity = c.String(),
BirthCountry = c.String(),
MilitaryAttitude = c.Int(nullable: false),
})
.PrimaryKey(t => t.RecruitDataId)
.ForeignKey("dbo.Recruits", t => t.RecruitDataId)
.Index(t => t.RecruitDataId);
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");
}
public override void Down()
{
DropForeignKey("dbo.AspNetUserRoles", "RoleId", "dbo.AspNetRoles");
DropForeignKey("dbo.RecruitPreferences", "SpecializationId", "dbo.Specializations");
DropForeignKey("dbo.RecruitPreferences", "RecruitId", "dbo.Recruits");
DropForeignKey("dbo.RecruitDatas", "RecruitDataId", "dbo.Recruits");
DropForeignKey("dbo.Recruits", "ApplicationUserId", "dbo.AspNetUsers");
DropForeignKey("dbo.AspNetUserRoles", "UserId", "dbo.AspNetUsers");
DropForeignKey("dbo.AspNetUserLogins", "UserId", "dbo.AspNetUsers");
DropForeignKey("dbo.AspNetUserClaims", "UserId", "dbo.AspNetUsers");
DropForeignKey("dbo.Specializations", "FacultyId", "dbo.Faculties");
DropIndex("dbo.AspNetRoles", "RoleNameIndex");
DropIndex("dbo.RecruitDatas", new[] { "RecruitDataId" });
DropIndex("dbo.AspNetUserRoles", new[] { "RoleId" });
DropIndex("dbo.AspNetUserRoles", new[] { "UserId" });
DropIndex("dbo.AspNetUserLogins", new[] { "UserId" });
DropIndex("dbo.AspNetUserClaims", new[] { "UserId" });
DropIndex("dbo.AspNetUsers", "UserNameIndex");
DropIndex("dbo.Recruits", new[] { "ApplicationUserId" });
DropIndex("dbo.RecruitPreferences", new[] { "RecruitId" });
DropIndex("dbo.RecruitPreferences", new[] { "SpecializationId" });
DropIndex("dbo.Specializations", new[] { "FacultyId" });
DropTable("dbo.AspNetRoles");
DropTable("dbo.RecruitDatas");
DropTable("dbo.AspNetUserRoles");
DropTable("dbo.AspNetUserLogins");
DropTable("dbo.AspNetUserClaims");
DropTable("dbo.AspNetUsers");
DropTable("dbo.Recruits");
DropTable("dbo.RecruitPreferences");
DropTable("dbo.Specializations");
DropTable("dbo.Faculties");
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,29 @@
// <auto-generated />
namespace RSystem.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class AddMaturaResult : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(AddMaturaResult));
string IMigrationMetadata.Id
{
get { return "201801011912140_AddMaturaResult"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

Some files were not shown because too many files have changed in this diff Show More