/// <summary> /// Abre el formulario para borrar item /// <returns>void</returns> /// </summary> public override void DeleteObject(long oid) { //if (MessageBox.Show(moleQule.Face.Resources.Messages.DELETE_CONFIRM, // moleQule.Face.Resources.Labels.ADVISE_TITLE, // MessageBoxButtons.YesNoCancel, // MessageBoxIcon.Question) == DialogResult.Yes) //{ try { HorarioInfo horario = HorarioInfo.Get(oid, true); if (horario.Asistencias.Count > 0) { foreach (ParteAsistenciaInfo asist in horario.Asistencias) { if (asist.Confirmada || (asist.Alumno_Partes != null && asist.Alumno_Partes.Count > 0) || (asist.Alumnos_Practicas != null && asist.Alumnos_Practicas.Count > 0)) { MessageBox.Show(Resources.Messages.HORARIO_CONFIRMADO, moleQule.Face.Resources.Labels.ERROR_TITLE, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); _action_result = DialogResult.Ignore; return; } } } Horario.Delete(oid); _action_result = DialogResult.OK; //Se eliminan todos los formularios de ese objeto foreach (ItemMngBaseForm form in _list_active_form) { if (form.Oid == oid) { form.Dispose(); break; } } } catch (Csla.DataPortalException ex) { MessageBox.Show(iQExceptionHandler.GetiQException(ex).Message); } //} }