protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["FunctionalLevelId"] != null) { if (!IsPostBack) { FunctionalLevelEntity entity = new FunctionalLevelMapper().Get(new FunctionalLevelEntity() { Id = Convert.ToInt32(Request.QueryString["FunctionalLevelId"]) }); if (entity != null) { TitleTextBox.Text = entity.Title; OtherInfoTextBox.Text = entity.Description; } else { Response.Redirect("List.aspx"); } } } else { 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); }
public CascadingDropDownNameValue[] GetFunctionalLevels(string knownCategoryValues, string category) { List <CascadingDropDownNameValue> values = new List <CascadingDropDownNameValue>(); List <FunctionalLevelEntity> list = new FunctionalLevelMapper().List(""); foreach (FunctionalLevelEntity ent in list) { CascadingDropDownNameValue cdnv = new CascadingDropDownNameValue(ent.Title, ent.Id.ToString()); values.Add(cdnv); } return(values.ToArray()); }
public CascadingDropDownNameValue[] GetFunctionalLevels(string knownCategoryValues, string category) { List<CascadingDropDownNameValue> values = new List<CascadingDropDownNameValue>(); List<FunctionalLevelEntity> list = new FunctionalLevelMapper().List(""); foreach (FunctionalLevelEntity ent in list) { CascadingDropDownNameValue cdnv = new CascadingDropDownNameValue(ent.Title, ent.Id.ToString()); values.Add(cdnv); } return values.ToArray(); }