Browse Source

Merge branch 'master' of c:/Users/Milad/Documents/Jobs/Codiato/sevomin-git

confirmation-email
Milad Karbasizadeh 11 years ago
parent
commit
a8456c297f
7 changed files with 201 additions and 0 deletions
  1. +1
    -0
      Sevomin.Models/Job.cs
  2. +19
    -0
      Sevomin.Models/JobViewModel.cs
  3. +29
    -0
      Sevomin.Models/Migrations/201403310557099_Job CreateDate.Designer.cs
  4. +18
    -0
      Sevomin.Models/Migrations/201403310557099_Job CreateDate.cs
  5. +126
    -0
      Sevomin.Models/Migrations/201403310557099_Job CreateDate.resx
  6. +1
    -0
      Sevomin.Models/Repositories/JobRepository.cs
  7. +7
    -0
      Sevomin.Models/Sevomin.Models.csproj

+ 1
- 0
Sevomin.Models/Job.cs View File

@ -21,6 +21,7 @@ namespace Sevomin.Models
public virtual Avalin Avalin { get; set; } public virtual Avalin Avalin { get; set; }
public DateTime CreateDate { get; set; }
public DateTime ExpireDate { get; set; } public DateTime ExpireDate { get; set; }
public string Description { get; set; } public string Description { get; set; }
public byte ResumeType { get; set; } public byte ResumeType { get; set; }


+ 19
- 0
Sevomin.Models/JobViewModel.cs View File

@ -36,6 +36,24 @@ namespace Sevomin.Models
} }
} }
[DisplayName("تاریخ ایجاد")]
[DataType(DataType.Date)]
public DateTime CreateDate { get; set; }
[DisplayName("تاریخ ایجاد")]
[DataType(DataType.Date)]
public string JalaliCreateDate
{
get
{
return DateAssist.ToShamsi(this.CreateDate);
}
set
{
CreateDate = DateAssist.ValidateAndSetToMiladi(value) ?? DateTime.MinValue;
}
}
[DisplayName("سایر مشخصات")] [DisplayName("سایر مشخصات")]
public string Description { get; set; } public string Description { get; set; }
@ -68,6 +86,7 @@ namespace Sevomin.Models
this.Id = job.Id; this.Id = job.Id;
this.AvalinId = job.AvalinId; this.AvalinId = job.AvalinId;
this.ExpireDate = job.ExpireDate == DateTime.MinValue ? DateTime.Now.AddDays(14) : job.ExpireDate; this.ExpireDate = job.ExpireDate == DateTime.MinValue ? DateTime.Now.AddDays(14) : job.ExpireDate;
this.CreateDate = job.CreateDate == DateTime.MinValue ? DateTime.Now : job.CreateDate;
this.Description = job.Description; this.Description = job.Description;
this.ResumeType = job.ResumeType; this.ResumeType = job.ResumeType;
this.ContactPersonEMail = job.ContactPersonEMail; this.ContactPersonEMail = job.ContactPersonEMail;


+ 29
- 0
Sevomin.Models/Migrations/201403310557099_Job CreateDate.Designer.cs View File

@ -0,0 +1,29 @@
// <auto-generated />
namespace Sevomin.Models.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.1.0-30225")]
public sealed partial class JobCreateDate : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(JobCreateDate));
string IMigrationMetadata.Id
{
get { return "201403310557099_Job CreateDate"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

+ 18
- 0
Sevomin.Models/Migrations/201403310557099_Job CreateDate.cs View File

@ -0,0 +1,18 @@
namespace Sevomin.Models.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class JobCreateDate : DbMigration
{
public override void Up()
{
AddColumn("dbo.Jobs", "CreateDate", c => c.DateTime(nullable: false));
}
public override void Down()
{
DropColumn("dbo.Jobs", "CreateDate");
}
}
}

+ 126
- 0
Sevomin.Models/Migrations/201403310557099_Job CreateDate.resx
File diff suppressed because it is too large
View File


+ 1
- 0
Sevomin.Models/Repositories/JobRepository.cs View File

@ -78,6 +78,7 @@ namespace Sevomin.Models.Repositories
job.IsFullTime = true; job.IsFullTime = true;
job.ShowCompanyLogo = false; job.ShowCompanyLogo = false;
job.ShowCompanyName = false; job.ShowCompanyName = false;
job.CreateDate = DateTime.UtcNow;
job.Avalin = avalin; job.Avalin = avalin;
avalin.Jobs.Add(job); avalin.Jobs.Add(job);
return job; return job;


+ 7
- 0
Sevomin.Models/Sevomin.Models.csproj View File

@ -115,6 +115,10 @@
<Compile Include="Migrations\201403301120307_remove-dovominParameter-moscow.Designer.cs"> <Compile Include="Migrations\201403301120307_remove-dovominParameter-moscow.Designer.cs">
<DependentUpon>201403301120307_remove-dovominParameter-moscow.cs</DependentUpon> <DependentUpon>201403301120307_remove-dovominParameter-moscow.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Migrations\201403310557099_Job CreateDate.cs" />
<Compile Include="Migrations\201403310557099_Job CreateDate.Designer.cs">
<DependentUpon>201403310557099_Job CreateDate.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\Configuration.cs" /> <Compile Include="Migrations\Configuration.cs" />
<Compile Include="Parameter.cs" /> <Compile Include="Parameter.cs" />
<Compile Include="ParameterValue.cs" /> <Compile Include="ParameterValue.cs" />
@ -163,6 +167,9 @@
<EmbeddedResource Include="Migrations\201403301120307_remove-dovominParameter-moscow.resx"> <EmbeddedResource Include="Migrations\201403301120307_remove-dovominParameter-moscow.resx">
<DependentUpon>201403301120307_remove-dovominParameter-moscow.cs</DependentUpon> <DependentUpon>201403301120307_remove-dovominParameter-moscow.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Migrations\201403310557099_Job CreateDate.resx">
<DependentUpon>201403310557099_Job CreateDate.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.


Loading…
Cancel
Save