private void vizualizareNemotivateToolStripMenuItem_Click(object sender, EventArgs e) { AbsentaBL abs = new AbsentaBL(); DataTable absente = abs.GetAbsenteNemotivateByIDElev(id_elev); VizualizareAbsentaNemotivataElev absT = new VizualizareAbsentaNemotivataElev(absente); absT.ShowDialog(); absT.Dispose(); }
private void ListAbsente(int semID, int elevID, int materieID) { AbsentaBL absBL = new AbsentaBL(); comboBoxListaAbsenteMotivare.DisplayMember = "data_absenta"; comboBoxListaAbsenteMotivare.ValueMember = "id_absenta"; //labelMotivareAbsenta.Text = comboBoxListaAbsenteMotivare.SelectedValue.ToString(); comboBoxListaAbsenteMotivare.DataSource = absBL.GetAbsenteByIDuri(semID, elevID, materieID).Rows; }
private void buttonVizAbsClsNemoti_Click(object sender, EventArgs e) { int clasaID = int.Parse(comboBoxAbsentaClasa.SelectedValue.ToString()); AbsentaBL absBl = new AbsentaBL(); DataTable numarAbs = absBl.GetAbsenteClasaNemotivate(clasaID); TotalAbsClasa viz = new TotalAbsClasa(numarAbs); viz.ShowDialog(); viz.Dispose(); }
private void buttonAbsentaVizualizare_Click(object sender, EventArgs e) { int semID = int.Parse(comboBoxAbsentaSem.SelectedValue.ToString()); int elevID = int.Parse(comboBoxAbsentaElev.SelectedValue.ToString()); int materieID = int.Parse(comboBoxAbsentaMaterie.SelectedValue.ToString()); AbsentaBL absBl = new AbsentaBL(); DataTable listaAbs = absBl.GetAbsenteByIDuri(semID, elevID, materieID); VizualizareAbsente viz = new VizualizareAbsente(listaAbs); viz.ShowDialog(); viz.Dispose(); }
private void buttonAddAbsForm_Click(object sender, EventArgs e) { bool motivata = bool.Parse(textBoxAddAbsMotivata.Text); bool motivabila = bool.Parse(textBoxAddAbsMotivabila.Text); AbsentaBL absBL = new AbsentaBL(); if (motivata != null && motivabila != null) { absBL.AddAbsenta(semID, elevID, materieID, motivata, motivabila); labelMsgAddAbsentaForm.Text = "Adaugare absenta cu succes!"; } else { labelMsgAddAbsentaForm.Text = "Adaugare esuta, camp incomplet!"; } }
private void buttonMotiveazaAbsenta_Click(object sender, EventArgs e) { AbsentaBL a = new AbsentaBL(); int idAbs = int.Parse(comboBoxListaAbsenteMotivare.SelectedValue.ToString()); DataTable m = a.GetMotivabilitateById(idAbs); bool motivabila = bool.Parse(m.Rows[0]["motivabila"].ToString()); if (motivabila == true) { a.MotivareAbsenta(idAbs); labelMotivareAbsenta.Text = "Absenta a fost motivata cu succes!"; } else { labelMotivareAbsenta.Text = "Absenta nu poate fi motivata pentru ca nu este motivabila!"; } }