Пример #1
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (IsCorrectEntries())
     {
         int intResults = 0;
         clsEmployeeQualification eq = new clsEmployeeQualification();
         eq.QualificationCode = _strQualificationCode;
         eq.Qualification     = txtQualification.Text;
         eq.InclusiveDates    = txtInclusiveDates.Text;
         eq.Remarks           = txtRemarks.Text;
         intResults           = eq.Edit();
         if (intResults > 0)
         {
             _frmEmployeeDetails.LoadQualificationList();
             this.Close();
         }
     }
 }
Пример #2
0
    protected void btnQualSave_Click(object sender, EventArgs e)
    {
        foreach (DataGridItem itm in dgQualifications.Items)
        {
            HiddenField phdnQualCode       = (HiddenField)itm.FindControl("hdnQualCode");
            TextBox     ptxtQualification  = (TextBox)itm.FindControl("txtQualification");
            TextBox     ptxtInclusiveDates = (TextBox)itm.FindControl("txtInclusiveDates");
            TextBox     ptxtRemarks        = (TextBox)itm.FindControl("txtRemarks");

            clsEmployeeQualification eq = new clsEmployeeQualification();
            eq.QualificationCode = phdnQualCode.Value;
            eq.Qualification     = ptxtQualification.Text;
            eq.InclusiveDates    = ptxtInclusiveDates.Text;
            eq.Remarks           = (ptxtRemarks.Text.Length > 255 ? ptxtRemarks.Text.Substring(0, 255) : ptxtRemarks.Text);
            eq.Edit();
        }
        BindQualificationList();
    }