public void GetDocente() { try { GridViewRow row = gdvDocCur.SelectedRow; int ID = int.Parse(row.Cells[0].Text); DocenteActual = DocCursoLog.GetOne(ID); } catch (Exception ex) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('" + ex.Message + "')", true); } }
public void EliminarAsignacion() { try { int ID = (int)dgvDocCur.SelectedRows[0].Cells["ID"].Value; Docentes_Cursos DocCursoActual = DocCursoLog.GetOne(ID); DocCursoActual.State = BusinessEntity.States.Deleted; DocCursoLog.Save(DocCursoActual); } catch { MessageBox.Show("Error al eliminar la asignación del docente al curso, intente nuevamente", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }