public ActionResult Create(OrganizationWorkforcePlan organizationworkforceplan,int organizationId) { if (ModelState.IsValid) { organizationworkforceplanRepository.InsertOrUpdate(organizationworkforceplan); organizationworkforceplanRepository.Save(); return RedirectToAction("Index",new { organizationId=organizationId }); } else { return View(organizationworkforceplan); } }
public ViewResult Search(OrganizationWorkforcePlan searchOrganizationWorkforcePlan,int organizationId) { if(searchOrganizationWorkforcePlan!=null) { } return View("Index",organizationworkforceplanRepository.AllIncluding(organizationId,organizationworkforceplan => organizationworkforceplan.Organization)); }
public ActionResult Create(int organizationId) { OrganizationWorkforcePlan organizationworkforceplan = new OrganizationWorkforcePlan(); organizationworkforceplan.OrganizationID = organizationId; return View(organizationworkforceplan); }
public void InsertOrUpdate(OrganizationWorkforcePlan organizationworkforceplan) { if (organizationworkforceplan.OrganizationWorkforcePlanID == default(int)) { // New entity context.OrganizationWorkforcePlan.Add(organizationworkforceplan); } else { // Existing entity context.Entry(organizationworkforceplan).State = EntityState.Modified; } }