예제 #1
0
        protected void fetchparametersButton_Click(object sender, EventArgs e)
        {
            PERSONALDETAILS pd  = pdlist.FirstOrDefault(p => (p.FirstName + " " + p.LastName) == NameTextBox.Text);
            EMPLOYEE        emp = elist.FirstOrDefault(em => em.PersonalDetailId == pd.PersonalDetailId);

            jt = getJobTitle(emp.JobtitleId.Value);

            List <PERFORMANCEPARAMETER> pplist = getparameters(jt.JobTitleId);
            int i = 1;

            foreach (PERFORMANCEPARAMETER p in pplist)
            {
                TableRow  tr       = new TableRow();
                TableCell tc       = new TableCell();
                Label     parlabel = new Label();
                parlabel.Text = i + ". " + p.ParameterName + " (" + p.MinRating + "-" + p.MaxRating + ")";
                tc.Controls.Add(parlabel);
                tr.Cells.Add(tc);
                SelectedParametersTable.Rows.Add(tr);
                i++;
            }
            if (pplist.Count == 0)
            {
                JobTitleLabel.Text    = "No parameters set for " + jt.JobTitleName;
                manageparameters.Text = "Add parameters...";
            }
            else
            {
                JobTitleLabel.Text = "Selected Parameters for: " + jt.JobTitleName;
                parametersfetched  = true;
            }
            manageparameters.Visible = true;
        }
예제 #2
0
        protected void Search_Click(object sender, EventArgs e)
        {
            AddNewAllowanceButton.Visible = true;
            DeleteButton.Visible          = true;
            int jtv = Convert.ToInt32(JobTitleValue.SelectedIndex);

            jt = getjobtitle(jtv);

            getallowances(jt.JobTitleId);

            filterdata();
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int jobtitleId = 2;
                //int jobtitleId = Session["JTID"];
                jt = getjobtitle(jobtitleId);
                getParameters(jt.JobTitleId);

                filterdata();
                deleteerrorlabel.Visible = false;
            }
            addparametertable.Visible = false;
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["JTID"] == null)
                {
                    Response.Redirect("ErrorPage.aspx");
                }

                int jobtitleId = (int)Session["JTID"];
                jt = getjobtitle(jobtitleId);
                getParameters(jt.JobTitleId);

                filterdata();
                deleteerrorlabel.Visible = false;

                jtlabel.Text = jt.JobTitleName;
            }
            addparametertable.Visible = false;
        }