public DocenteCursoDesktop(int ID, ModoForm modo) : this() { this.Modo = modo; DocCursoLogic docCurso = new DocCursoLogic(); DocCursoActual = docCurso.GetOne(ID); MapearDeDatos(); }
public override void GuardarCambios() { MapearADatos(); DocCursoLogic docCurso = new DocCursoLogic(); docCurso.Save(DocCursoActual); }
private void btnAceptar_Click(object sender, EventArgs e) { if(Validar()) { if (btnAceptar.Text == "Guardar") { GuardarCambios(); DocCursoActual.State = Entidad.States.Modificado; this.Close(); } } if (btnAceptar.Text == "Eliminar") { DocCursoLogic doc = new DocCursoLogic(); doc.Delete(DocCursoActual.ID); DocCursoActual.State = Entidad.States.Eliminado; GuardarCambios(); this.Close(); } }
public void Listar() { DocCursoLogic dcl = new DocCursoLogic(); this.dgvDocCursos.DataSource = dcl.GetAll(); }