Esempio n. 1
0
    protected void OnCandidateExperieceDeleteClicked(object sender, EventArgs e)
    {
        LinkButton lnkItem = (LinkButton)sender;
        int canExperienceID = int.Parse(lnkItem.CommandArgument);
        CandidateExperience deleteItem = new CandidateExperience(canExperienceID);
        CandidateExperienceRepository repo = new CandidateExperienceRepository();
        repo.Delete(deleteItem);

        BindExperienceGridOfCurrentCandidate(null);
    }
 private CandidateExperience GetCadidateExperience()
 {
     CandidateExperience saveItem = new CandidateExperience();
     if (SessionManager.CurrentCandidate != null)
         saveItem.CandidateID = SessionManager.CurrentCandidate.CandidateId;
     if (!string.IsNullOrEmpty(ddlPeriodeYearTo.SelectedValue)
         && !string.IsNullOrEmpty(ddlPeriodeYearFrom.SelectedValue)
         && !string.IsNullOrEmpty(ddlPeriodeMonthFrom.SelectedValue)
         && !string.IsNullOrEmpty(ddlPeriodeMonthTo.SelectedValue))
     {
         saveItem.Period = ddlPeriodeMonthFrom.SelectedValue + "/" + ddlPeriodeYearFrom.SelectedValue
                         + " - " + ddlPeriodeMonthTo.SelectedValue + "/" + ddlPeriodeYearTo.SelectedValue;
     }
     else
     {
         saveItem.Period = txtPeriodeString.Text;
     }
     saveItem.Company = txtCompany.Text.Trim();
     saveItem.Salary = ddlSalary.Text.Trim();
     saveItem.ExtraAdvantage = txtSalaryPackage.Text.Trim();
     saveItem.FunctionDesc = txtJobTitle.Text.Trim();
     saveItem.LeftReason = txtQuitReason.Text.Trim();
     if (!string.IsNullOrEmpty(ddlFunction.SelectedValue) && ddlFunction.SelectedValue != "-1")
         saveItem.FunctionID = int.Parse(ddlFunction.SelectedValue);
     else
         saveItem.FunctionID = null;
     return saveItem;
 }