/// <summary>
 /// Create a new JobPost object.
 /// </summary>
 /// <param name="jobID">Initial value of the JobID property.</param>
 /// <param name="jobName">Initial value of the JobName property.</param>
 /// <param name="jobDescription">Initial value of the JobDescription property.</param>
 /// <param name="jobPostStatusID">Initial value of the JobPostStatusID property.</param>
 /// <param name="locationDescription">Initial value of the LocationDescription property.</param>
 /// <param name="jobCategoryID">Initial value of the JobCategoryID property.</param>
 /// <param name="postToBlog">Initial value of the PostToBlog property.</param>
 public static JobPost CreateJobPost(global::System.Int32 jobID, global::System.String jobName, global::System.String jobDescription, global::System.Int32 jobPostStatusID, global::System.String locationDescription, global::System.Int32 jobCategoryID, global::System.Boolean postToBlog)
 {
     JobPost jobPost = new JobPost();
     jobPost.JobID = jobID;
     jobPost.JobName = jobName;
     jobPost.JobDescription = jobDescription;
     jobPost.JobPostStatusID = jobPostStatusID;
     jobPost.LocationDescription = locationDescription;
     jobPost.JobCategoryID = jobCategoryID;
     jobPost.PostToBlog = postToBlog;
     return jobPost;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the JobPosts EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToJobPosts(JobPost jobPost)
 {
     base.AddObject("JobPosts", jobPost);
 }
Ejemplo n.º 3
0
 public ActionResult Edit(JobPost jobpost)
 {
     if (ModelState.IsValid)
     {
         db.JobPosts.Attach(jobpost);
         db.ObjectStateManager.ChangeObjectState(jobpost, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.JobCategoryID = new SelectList(db.JobCategories, "CategoryID", "CategoryName", jobpost.JobCategoryID);
     ViewBag.JobPostStatusID = new SelectList(db.JobPostStatus1, "PostStatusID", "JobPostStatusName", jobpost.JobPostStatusID);
     ViewBag.JobOfficeID = new SelectList(db.OfficeAssigneds, "OfficeID", "OfficeName", jobpost.JobOfficeID);
     ViewBag.RecruiterAssignedTo = new SelectList(db.AssignedToes, "AssignedID", "AssignedName", jobpost.RecruiterAssignedTo);
     return View(jobpost);
 }