Example #1
0
        public string ReplaceTemplateContractWithConcreteContract(string content, JobDetailsSessionView jbs, EmployeeView employeeView)
        {
            //Employee
            content = content.Replace(@"{#EmployeeName}", employeeView.ToString());
            content = content.Replace(@"{#EmployeeNo}", employeeView.EmployeeNo);
            content = content.Replace(@"{#DateOfBirth}", employeeView.DateOfBirth.ToString("dd.MM.yyyy"));
            content = content.Replace(@"{#PersonalNo}", employeeView.PersonalNumber);
            content = content.Replace(@"{#Gender}", employeeView.Gender.ToString());
            content = content.Replace(@"{#Address}", employeeView.Address);
            content = content.Replace(@"{#Country}", employeeView.Country);

            //JobTitle
            content = content.Replace(@"{#JobCode}", jbs.Job.Code);
            content = content.Replace(@"{#JobTitle}", jbs.Job.Title);
            content = content.Replace(@"{#OrganisationalUnit}", jbs.OrganisationalUnit.Title);
            #warning changed please review and edit
            //content = content.Replace(@"{#GradeKCB}", jbs.Grade.KCB.ToString("f2"));
            content = content.Replace(@"{#Step}", jbs.Step.Id);
            //content = content.Replace(@"{#StepEntry}", jbs.Step.Entry.ToString("f2"));
            content = content.Replace(@"{#Step}", jbs.Step.Id);
            content = content.Replace(@"{#Grade}", jbs.Grade.Id);
            content = content.Replace(@"{#JobDescription}", jbs.Job.Description);
            //content = content.Replace(@"{#ReportsTo}", jbs.Job.Description);

            //Contract

            content = content.Replace(@"{#OfficiallyApprovedDate}", DateTime.Now.ToString("dd.MM.yyyy"));
            //content = content.Replace(@"{#GrossValue}", jbs.Job.Code);

            //General
            content = content.Replace(@"{#TodayDate}", DateTime.Now.ToString("dd.MM.yyyy"));
            content = content.Replace(@"{#Time}", DateTime.Now.ToString("HH:mm"));

            return content;
        }