protected void ProceedButton_Click(object sender, EventArgs e) { FunctionalLevelEntity entity = new FunctionalLevelEntity(); entity.Title = TitleTextBox.Text; entity.Description = OtherInfoTextBox.Text; new FunctionalLevelMapper().Insert(entity); Response.Redirect("List.aspx"); }
protected void ProceedButton_Click(object sender, EventArgs e) { FunctionalLevelEntity entity = new FunctionalLevelEntity(); entity.Id = Convert.ToInt32(Request.QueryString["FunctionalLevelId"]); entity.Title = TitleTextBox.Text; entity.Description = OtherInfoTextBox.Text; entity.Status = StatusEnum.Active; new FunctionalLevelMapper().Update(entity); Response.Redirect("List.aspx"); }
protected void ProceedButton_Click(object sender, EventArgs e) { JobDetailsSessionView jbs = new JobDetailsSessionView(); FunctionalLevelEntity flentity = new FunctionalLevelEntity(); flentity.Id = Convert.ToInt32(FunctionalLevelDropDownList.SelectedValue); flentity = new FunctionalLevelMapper().Get(flentity); jbs.FunctionalLevel = flentity; OrganizationalUnitEntity ouentity = new OrganizationalUnitEntity(); ouentity.Id = Convert.ToInt32(OrganisationalUnitDropDownList.SelectedValue); OrganizationalUnitView ouView = new OrganizationalUnitMapper().Get(ouentity); jbs.OrganisationalUnit = ouView; GradeEntity gentity = new GradeEntity(); gentity.Id = GradeDropDownList.SelectedValue; gentity = new GradeMapper().Get(gentity); jbs.Grade = gentity; JobTitleEntity job = new JobTitleEntity(); job.JobCode = JobDetailsDropDownList.SelectedValue; JobTitleView jobview = new JobTitleMapper().Get(job); jbs.Job = jobview; StepEntity sentity = new StepEntity(); sentity.Id = StepDropDownList.SelectedValue; sentity = new StepMapper().Get(sentity); jbs.Step = sentity; foreach (ListItem item in ContractsCheckBoxList.Items) { if (item.Selected == true) { jbs.ContractsTemplates.Add(new ContractTemplateEntity() { Id = Convert.ToInt32(item.Value), Title = item.Text }); } } Session.Add("JobDetails", jbs); Response.Redirect("Contract.aspx?EmployeeId=" + Request.QueryString["EmployeeId"] + "&ContractTemplateId=" + jbs.ContractsTemplates[0].Id); }