This file was deleted.

@@ -307,6 +307,26 @@ public override void Up()
})
.PrimaryKey(t => t.ID);

CreateTable(
"dbo.PostingTemplate",
c => new
{
ID = c.Int(nullable: false, identity: true),
pstNumPosition = c.Int(nullable: false),
pstFTE = c.Decimal(nullable: false, precision: 18, scale: 2),
pstSalary = c.Decimal(nullable: false, precision: 18, scale: 2),
pstCompensationType = c.Short(nullable: false),
pstJobDescription = c.String(),
pstOpenDate = c.DateTime(nullable: false),
pstEndDate = c.DateTime(nullable: false),
PositionID = c.Int(nullable: false),
RequirementIDs = c.String(),
SkillIDs = c.String(),
LocationIDs = c.String(),
dayIDs = c.String(),
})
.PrimaryKey(t => t.ID);

CreateTable(
"dbo.DayPosting",
c => new
@@ -378,6 +398,7 @@ public override void Down()
DropIndex("dbo.Applicant", new[] { "UserRoleID" });
DropIndex("dbo.Applicant", "IX_Unique_Email");
DropTable("dbo.DayPosting");
DropTable("dbo.PostingTemplate");
DropTable("dbo.Archive");
DropTable("dbo.FileContentTemp");
DropTable("dbo.BinaryFileTemp");

Large diffs are not rendered by default.

@@ -246,6 +246,13 @@ protected override void Seed(JobPosting.DAL.JBEntities context)
applicationSkills.ForEach(a => context.ApplicationSkills.AddOrUpdate(n => new { n.ApplicationId, n.skillID }, a));
SaveChanges(context);


//var postingTemplate = new List<PostingTemplate>
//{

// new PostingTemplate { RequirementIDs = "1,2,3" }
//};

//var applicationsCart = new List<ApplicationCart>
// {
// new ApplicationCart { PostingID = 1, ApplicantID=(context.Applicants.Where(p=>p.apEMail == "testuser@hotmail.com").SingleOrDefault().ID), Priority = 2},
@@ -189,6 +189,7 @@
<Compile Include="App_Start\IdentityConfig.cs" />
<Compile Include="App_Start\RouteConfig.cs" />
<Compile Include="App_Start\Startup.Auth.cs" />
<Compile Include="Code\ConvertStringToArray.cs" />
<Compile Include="Controllers\AccountController.cs" />
<Compile Include="Controllers\ApplicantsController.cs" />
<Compile Include="Controllers\ApplicationCartsController.cs" />
@@ -204,9 +205,9 @@
<Compile Include="Controllers\UnionsController.cs" />
<Compile Include="DAL\ApplicationDbContext.cs" />
<Compile Include="DAL\JBEntities.cs" />
<Compile Include="DAL\JBMigrations\201803120203249_InitialCreate.cs" />
<Compile Include="DAL\JBMigrations\201803120203249_InitialCreate.Designer.cs">
<DependentUpon>201803120203249_InitialCreate.cs</DependentUpon>
<Compile Include="DAL\JBMigrations\201803141553022_InitialCreate.cs" />
<Compile Include="DAL\JBMigrations\201803141553022_InitialCreate.Designer.cs">
<DependentUpon>201803141553022_InitialCreate.cs</DependentUpon>
</Compile>
<Compile Include="DAL\JBMigrations\Configuration.cs" />
<Compile Include="DAL\SecurityMigrations\201803011756159_InitialCreate.cs" />
@@ -239,6 +240,7 @@
<Compile Include="Models\ManageViewModels.cs" />
<Compile Include="Models\Posting.cs" />
<Compile Include="Models\PostingSkill.cs" />
<Compile Include="Models\PostingTemplate.cs" />
<Compile Include="Models\Qualification.cs" />
<Compile Include="Models\Skill.cs" />
<Compile Include="Models\Union.cs" />
@@ -247,6 +249,7 @@
<Compile Include="Startup.cs" />
<Compile Include="ViewModels\DayVM.cs" />
<Compile Include="ViewModels\ApplicationVM.cs" />
<Compile Include="ViewModels\PostingTemplateVM.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Commands.txt" />
@@ -374,8 +377,8 @@
<Content Include="Scripts\jquery-1.10.2.min.map" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="DAL\JBMigrations\201803120203249_InitialCreate.resx">
<DependentUpon>201803120203249_InitialCreate.cs</DependentUpon>
<EmbeddedResource Include="DAL\JBMigrations\201803141553022_InitialCreate.resx">
<DependentUpon>201803141553022_InitialCreate.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DAL\SecurityMigrations\201803011756159_InitialCreate.resx">
<DependentUpon>201803011756159_InitialCreate.cs</DependentUpon>
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace JobPosting.Models
{
public class PostingTemplate
{
public int ID { get; set; }

public int pstNumPosition { get; set; }

public decimal pstFTE { get; set; }

public decimal pstSalary { get; set; }

public Int16 pstCompensationType { get; set; }

public string pstJobDescription { get; set; }

public DateTime pstOpenDate { get; set; }

public DateTime pstEndDate { get; set; }

public int PositionID { get; set; }

public string RequirementIDs { get; set; }

public string SkillIDs { get; set; }

public string LocationIDs { get; set; }

public string dayIDs { get; set; }
}
}
@@ -0,0 +1,13 @@
using JobPosting.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace JobPosting.ViewModels
{
public class PostingTemplateVM
{
public IList<PostingTemplate> postingTemplate { get; set; }
}
}
@@ -152,25 +152,51 @@
<label class="control-label col-md-2">Locations</label>
<div class="col-md-offset-2 col-md-10">
<table>
<tr>

@{
int cnt = 0;
foreach (var l in ViewBag.Locations)
if (!ViewBag.Flag)
{

if (cnt++ % 3 == 0)
@: <tr>
foreach (var l in ViewBag.Locations)
{

if (cnt++ % 3 == 0)
{
@:</tr><tr>
}
@:<td>
}
@:<td>
<input type="checkbox"
name="selectedLocation"
id="selectedLocation"
value="@l.ID" />
@l.Address @:&nbsp;&nbsp;
@:</td>
}
}
@:</tr>
}
else
{

@:<tr>
foreach (var l in ViewBag.Locations)
{
bool Assigned = (ViewBag.LocationIDs.Contains(l.ID)) ? true : false;
if (cnt++ % 3 == 0)
{
@:</tr><tr>
}
@:<td>
<input type="checkbox"
name="selectedLocation"
id="selectedLocation"
value="@l.ID"
@(Html.Raw(Assigned ? "checked=\"checked\"" : "")) />
@l.Address @:&nbsp;&nbsp;
@:</td>
}
@:</tr>
}
}
</table>
</div>
@@ -180,25 +206,51 @@
<label class="control-label col-md-2">Skills</label>
<div class="col-md-offset-2 col-md-10">
<table>
<tr>

@{

int cnt3 = 0;
foreach (var s in ViewBag.Skills)
if (!ViewBag.Flag)
{

if (cnt3++ % 3 == 0)
@: <tr>
foreach (var s in ViewBag.Skills)
{
@:</tr><tr>

if (cnt3++ % 3 == 0)
{
@:</tr><tr>
}
@:<td>
<input type="checkbox"
name="selectedSkill"
id="selectedSkill"
value="@s.ID" />
@s.SkillDescription @:&nbsp;&nbsp;
@:</td>
}
@:<td>
@:</tr>
}
else
{
@: <tr>
foreach (var s in ViewBag.Skills)
{
bool Assigned = (ViewBag.SkillIDs.Contains(s.ID)) ? true : false;
if (cnt3++ % 3 == 0)
{
@:</tr><tr>
}
@:<td>
<input type="checkbox"
name="selectedSkill"
id="selectedSkill"
value="@s.ID" />
value="@s.ID"
@(Html.Raw(Assigned ? "checked=\"checked\"" : "")) />
@s.SkillDescription @:&nbsp;&nbsp;
@:</td>
}
@: </tr>
}
@:</tr>
}
</table>
</div>
@@ -208,26 +260,52 @@
<label class="control-label col-md-2">Day of Work</label>
<div class="col-md-offset-2 col-md-10">
<table>
<tr>

@{

int cnt1 = 0;
List<JobPosting.ViewModels.DayVM> days = ViewBag.Day;
foreach (var d in days)
if (!ViewBag.Flag)
{
if (cnt1++ % 3 == 0)
@: <tr>
List<JobPosting.ViewModels.DayVM> days = ViewBag.Day;
foreach (var d in days)
{
if (cnt1++ % 3 == 0)
{
@:</tr><tr>
}
@:<td>
}
@:<td>
<input type="checkbox"
name="selectedDay"
id="selectedDay"
value="@d.DayID"
@(Html.Raw(d.Assigned ? "checked=\"checked\"" : "")) />
@*@(Html.Raw(d.Assigned ? "checked=\"checked\"" : ""))*@ />
@d.dayName @:&nbsp;&nbsp;
@:</td>
}
@:</tr>
}
else
{
@: <tr>
foreach (var d in ViewBag.Days)
{
bool Assigned = (ViewBag.DayIDs.Contains(d.ID)) ? true : false;
if (cnt1++ % 3 == 0)
{
@:</tr><tr>
}
@:<td>
<input type="checkbox"
name="selectedDay"
id="selectedDay"
value="@d.ID"
@(Html.Raw(Assigned ? "checked=\"checked\"" : "")) />
@d.dayName @:&nbsp;&nbsp;
@:</td>
}
@:</tr>
}
@:</tr>
}
</table>
</div>
@@ -237,13 +315,17 @@
<label class="control-label col-md-2">Requirements</label>
<div class="col-md-offset-2 col-md-10">
<table>
<tr>

@{
int cnt2 = 0;
foreach (var q in ViewBag.Qualifications)
if (!ViewBag.Flag)
{
if (cnt2++ % 3 == 0)
@: <tr>

foreach (var q in ViewBag.Qualifications)
{
if (cnt2++ % 3 == 0)
{
@:</tr><tr>
}
@:<td>
@@ -254,19 +336,48 @@
/>
@q.QlfDescription @:&nbsp;&nbsp;
@:</td>
}
@:</tr>
}
else
{
@:<tr>
foreach (var q in ViewBag.Qualifications)
{
bool Assigned = (ViewBag.RequirementIDs.Contains(q.ID)) ? true : false;
if (cnt2++ % 3 == 0)
{
@:</tr><tr>
}
@:<td>
<input type="checkbox"
name="selectedQualification"
id="selectedQualification"
value="@q.ID"
@(Html.Raw(Assigned ? "checked=\"checked\"" : "")) />
@q.QlfDescription @:&nbsp;&nbsp;
@:</td>
}
}
@:</tr>
}
</table>
</div>
</div>

</div>
@if (!ViewBag.Flag)
{
@: <input type="checkbox" name="SavedAsTemplate" value="true"> Do you wish to save this Posting as Template?
}
else {
@: <input type="hidden" name="SavedAsTemplate" value="false">
}
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Create" class="btn btn-default" />
<input type="button" value="Save Posting" class="btn btn-default" id="submit">
@*<input type="button" value="Save Posting" class="btn btn-default" id="submit">*@
</div>
</div>


</div>
}

@@ -37,7 +37,7 @@
<div class="form-group">
@Html.LabelFor(model => model.pstCompensationType, "Compensation Type", htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.DropDownList("PositionCompensationType", new SelectListItem[]
@Html.DropDownList("pstCompensationType", new SelectListItem[]
{
new SelectListItem { Value = "1", Text = "Hourly"},
new SelectListItem { Value = "2", Text = "Monthly"},
@@ -189,7 +189,7 @@
</div>

<div class="form-group">
<label class="control-label col-md-2">Requirements</label>
<label class="control-label col-md-2">Skills</label>
<div class="col-md-offset-2 col-md-10">
<table>
<tr>
@@ -212,9 +212,9 @@
}
@:<td>
<input type="checkbox"
name="selectedQualification"
name="selectedSkill"
value="@s.ID"
@(Html.Raw(Assigned2 ? "checked=\"checked\"" : "")) />
@(Html.Raw(Assigned3 ? "checked=\"checked\"" : "")) />
@s.SkillDescription @:&nbsp;&nbsp;
@:</td>
}
@@ -2,13 +2,25 @@

@{
ViewBag.Title = "Index";
var Positions = ViewBag.Positions;
}

<h2>Index</h2>

<p>
@Html.ActionLink("Create New", "Create")
</p>
<ul>
<li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Create New - Menu<b class="caret"></b></a>
<ul class="dropdown-menu">
<li>@Html.ActionLink("Create New", "Create")</li>
@foreach (var p in Positions)
{
string positionName = p.PositionDescription;
<li class="divider"></li>
<li>@Html.ActionLink("Follow " + positionName, "Create", new { id = p.ID })</li>
}
</ul>
</li>
</ul>
<table class="table">
<tr>
<th>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
ace0dffcff16de60562c04cbdd973c83548b447b
32719550e13451df284f2737767f2a39dfaf4bfa
Binary file not shown.
Binary file not shown.
Binary file not shown.