コード例 #1
0
ファイル: Add.aspx.cs プロジェクト: GramozKrasniqi/HRMS
        protected void ProceedButton_Click(object sender, EventArgs e)
        {
            JobTitleEntity jbe = new JobTitleEntity();
            jbe.JobCode = JobCodeTextBox.Text;
            jbe.Title = JobTitleTextBox.Text;
            jbe.Description = OtherInfoTextBox.Text;
            jbe.OrganizationalUnitId = Convert.ToInt32(OrganizationalUnitDropDownList.SelectedValue);
            if (ReportsToDropDownList.SelectedValue != "")
            {
                new JobTitleMapper().InsertWithParent(jbe, ReportsToDropDownList.SelectedValue);
            }
            else
            {
                new JobTitleMapper().InsertWithParent(jbe, null);
            }

            Response.Redirect("DefineGrade.aspx?jobCode="+ jbe.JobCode);
        }
コード例 #2
0
        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);
        }