public ActionResult CreatePP() { ProcurementPlan model = new ProcurementPlan(); model.RefNumber = "--NEW PP--"; model.Projects = new SelectList(orService.GetProjectsWithoutPP(), "Id", "Name"); model.ProjectDonors = new SelectList(orService.GetProjectNosWithoutPP(Guid.Empty), "Id", "ProjectNumber"); model.SubOffices = new SelectList(csoService.GetCountrySubOffices(countryProg.Id), "Id", "Name"); model.PreparedOn = DateTime.Today; ViewBag.FormHeader = Resources.ProcurementPlanController_String_NewProcurementPlan; return(View("CreatePP", model)); }
public ActionResult SwitchCountryProgramme() { if (!userContext.HasPermission(StandardPermissionProvider.MultipleCountryProgrammeAccess)) { return(Content("<b><font color=Red>" + Resources.SystemUserController_String_ActionNotPermitted + "</font></b>", "text/html")); } SwitchCPModel model = new SwitchCPModel(); model.CountryProgrammes = new SelectList(m_CountrySubOfficeService.CountryProgObj.GetCountryProgrammes(), "Id", "ProgrammeName", countryProg.Id); model.CountryProgrammeId = countryProg.Id; model.SubOffices = new SelectList(m_CountrySubOfficeService.GetCountrySubOffices(countryProg.Id), "Id", "Name", currentStaff.CountrySubOfficeId); model.SubOfficeId = currentStaff.CountrySubOfficeId.HasValue ? currentStaff.CountrySubOfficeId.Value : Guid.Empty; return(View("SwitchCountryProgramme", model)); }
public ActionResult LoadCC() { var model = new CompletionCertificate() { StaffList = new SelectList(staffService.GetStaffByCountryProgramme(countryProg.Id), "StaffId", "StaffName"), Offices = new SelectList(subOfficeService.GetCountrySubOffices(countryProg.Id), "Id", "Name"), PurchaseOrders = new SelectList(ccService.GetGRNPurchaseOrders(), "Id", "RefNumber") }; model.RefNumber = string.Format("--{0}--", Resources.Global_String_NewCC); model.PreparedOn = DateTime.Now; return(View("LoadCC", model)); }