/// <summary> /// Create an approval chain record associated with the given requision / user combination /// </summary> /// <param name="requisitionId"></param> /// <param name="username"></param> /// <returns></returns> public JobPostingApprovalChain CreateApprovalChainRecord(int requisitionId, string username) { var approver = new JobPostingApprovalChain { Approver = username, JobPostingRequisitionId = requisitionId, Status = JobPostingApprovalChainStatus.Pending, SortOrder = 1, IsFinalApprover = true }; approver.Id = (int)_readWriteData.Create(approver, true); return(approver); }
/// <summary> /// Set up records needed for a requisition approval notification /// </summary> public void CreateNotificationData() { Requisition = jpData.CreateJobRequisition(Faker.Company.Name(), Faker.Company.Name()); RequisitionApprover = jpData.CreateApprovalChainRecord(Requisition.Id, LoginData.SuperUserName); ExpectedResult = new NotificationResult() { Title = Requisition.AdditionalTitle + " at " + Requisition.Location, PopupInfo = new NotificationPopupResult { FrameId = "MainContentsIFrame", Url = $"JobPostings-Edit.aspx?id={Requisition.Id}", Content = Requisition.AdditionalTitle } }; }