|
|
@ -160,7 +160,7 @@ namespace Sevomin.WebFrontend.Controllers |
|
|
|
[HttpPost] |
|
|
|
public async Task<ActionResult> ProfileDovomin(string JalaliBirthDate, string FirstName, |
|
|
|
string LastName, string ContactPersonEMail, bool IsFullTime, |
|
|
|
bool IsPartTime, string Description, FormCollection form) |
|
|
|
bool IsPartTime, string Description, HttpPostedFileBase EnglishResume, HttpPostedFileBase PersianResume, FormCollection form) |
|
|
|
{ |
|
|
|
User u = await UserManager.FindByNameAsync(User.Identity.Name); |
|
|
|
if (u == null || !(u is Dovomin)) |
|
|
@ -182,6 +182,17 @@ namespace Sevomin.WebFrontend.Controllers |
|
|
|
string value = form[string.Format("value-{0}", jp.Parameter.Id)]; |
|
|
|
jp.SetValue(value); |
|
|
|
} |
|
|
|
|
|
|
|
if (EnglishResume != null) |
|
|
|
{ |
|
|
|
dovomin.EnglishResume = string.Format("{0}-resume-en{2}", User.Identity.Name, "", System.IO.Path.GetExtension(EnglishResume.FileName)); |
|
|
|
EnglishResume.SaveAs(System.IO.Path.Combine(Server.MapPath("~/App_Data/resumes"), dovomin.EnglishResume)); |
|
|
|
} |
|
|
|
if (PersianResume != null) |
|
|
|
{ |
|
|
|
dovomin.PersianResume = string.Format("{0}-resume-fa{2}", User.Identity.Name, "", System.IO.Path.GetExtension(PersianResume.FileName)); |
|
|
|
PersianResume.SaveAs(System.IO.Path.Combine(Server.MapPath("~/App_Data/resumes"), dovomin.PersianResume)); |
|
|
|
} |
|
|
|
|
|
|
|
SevominDbContext.Current.SaveChanges(); |
|
|
|
} |
|
|
@ -189,9 +200,8 @@ namespace Sevomin.WebFrontend.Controllers |
|
|
|
{ |
|
|
|
throw; |
|
|
|
} |
|
|
|
|
|
|
|
DovominViewModel dvm = new DovominViewModel(u as Dovomin); |
|
|
|
return View("ProfileDovomin", dvm); |
|
|
|
|
|
|
|
return RedirectToAction("MyProfile"); |
|
|
|
} |
|
|
|
|
|
|
|
[Authorize] |
|
|
|