/// <summary> /// Adauga o alerta /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAdaugaAlerta_Click(object sender, System.EventArgs e) { try { Salaries.Business.IstoricAlerte newAlerta = new Salaries.Business.IstoricAlerte(); newAlerta.AlertaId = 0; newAlerta.AngajatId = AngajatID; newAlerta.DataExpirare = Utilities.ConvertText2DateTime(txtDataExpirare.Text); newAlerta.Descriere = txtDescriere.Text; newAlerta.PerioadaCritica = int.Parse(txtPerioadaCritica.Text); newAlerta.Activ = chkActiv.Checked; newAlerta.InsertAlerta(); } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } LoadIstoricAlerte(); }