private Boolean Actualizar() { try { string mensaje = string.Empty; Aca_Anio_Lectivo_Info infoAnio = new Aca_Anio_Lectivo_Info(); Bus_Anio_Lectivo = new Aca_Anio_Lectivo_Bus(); infoAnio = GetPeriodoLectivo(ref mensaje); infoAnio.UsuarioModificacion = param.IdUsuario; infoAnio.FechaModificacion = DateTime.Now; bool resultado = Bus_Anio_Lectivo.ActualizarDB(infoAnio, ref mensaje); if (resultado == true) { MessageBox.Show(mensaje, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Information); this.ucGe_Menu_Superior_Mant.Visible_bntGuardar_y_Salir = true; this.ucGe_Menu_Superior_Mant.Visible_btnGuardar = true; this.Accion = Cl_Enumeradores.eTipo_action.grabar; Limpiar(); return(true); } else { Log_Error_bus.Log_Error(mensaje.ToString()); MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Error_encontrado) + mensaje + " ", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) + ex.Message + " ", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } }
private void llenar_grid() { Aca_Anio_Lectivo_Bus neg = new Aca_Anio_Lectivo_Bus(); List <Aca_Anio_Lectivo_Info> lista = new List <Aca_Anio_Lectivo_Info>(); lista = neg.Get_List_Anio_Lectivo(param.IdInstitucion); this.gridControlAnioLectivo.DataSource = lista; }
private Boolean Eliminar() { try { if (Info_Anio_Lectivo.Estado != "I") { if (MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Esta_seguro_que_desea_anular_el) + " Periodo Lectivo " + txtIdAnioLectivo.Text.Trim() + " ?", param.Nombre_sistema, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { FrmGe_MotivoAnulacion fr = new FrmGe_MotivoAnulacion(); fr.ShowDialog(); string mensaje = string.Empty; Aca_Anio_Lectivo_Info infoAnio = new Aca_Anio_Lectivo_Info(); Bus_Anio_Lectivo = new Aca_Anio_Lectivo_Bus(); infoAnio = GetPeriodoLectivo(ref mensaje); infoAnio.UsuarioAnulacion = param.IdUsuario; infoAnio.MotivoAnulacion = fr.motivoAnulacion; bool resultado = Bus_Anio_Lectivo.EliminarDB(infoAnio, ref mensaje); if (resultado == true) { MessageBox.Show(mensaje, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Information); this.ucGe_Menu_Superior_Mant.Visible_bntGuardar_y_Salir = false; this.ucGe_Menu_Superior_Mant.Visible_btnGuardar = false; return(true); } else { Log_Error_bus.Log_Error(mensaje.ToString()); MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) + mensaje + " ", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Information); return(false); } } else { return(false); } } else { MessageBox.Show("El Periodo Lectivo " + txtIdAnioLectivo.Text.Trim() + param.Get_Mensaje_sys(enum_Mensajes_sys.Ya_se_encuentra_anulado), param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Information); return(false); } } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.Message); return(false); } }
void LLenar_AnioLectivo() { try { Bus_Anio_Lectivo = new Aca_Anio_Lectivo_Bus(); Lista = new List <Aca_Anio_Lectivo_Info>(); Lista = Bus_Anio_Lectivo.Get_List_Anio_Lectivo(param.IdInstitucion); searchLookUpAnio_Lectivo.Properties.DataSource = Lista; } catch (Exception ex) { MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) + ":" + ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); Log_Error_bus.Log_Error(ex.ToString()); } }
public void CargarCombos() { try { // Con quien vive el alumno Aca_Catalogo_Bus neg = new Aca_Catalogo_Bus(); cmbConQuienVive.Properties.DataSource = neg.Get_List_CatalogoXtipo("GRP_FAM_CONV"); // Religion cmbReligion.Properties.DataSource = neg.Get_List_CatalogoXtipo("RELIG"); //Idioma Nativo cmbIdiomaNativo.Properties.DataSource = neg.Get_List_CatalogoXtipo("IDIOMA"); //Tipo Sangre cmbTipoSangre.Properties.DataSource = neg.Get_List_CatalogoXtipo("GRUP_SAN"); //Sede Aca_Sede_Bus negSede = new Aca_Sede_Bus(); cmbSede.Properties.DataSource = negSede.Get_List_Sede(param.IdInstitucion); Aca_Anio_Lectivo_Bus negPeriodoLec = new Aca_Anio_Lectivo_Bus(); cmbAnioLectivo.Properties.DataSource = negPeriodoLec.Get_List_Anio_Lectivo(param.IdInstitucion); Aca_Jornada_Bus negJornada = new Aca_Jornada_Bus(); cmbJornada.Properties.DataSource = negJornada.Get_Lista_Jornada(param.IdInstitucion); Aca_Curso_Bus negCurwso = new Aca_Curso_Bus(); cmbCurso.Properties.DataSource = negCurwso.Get_Lista_Curso(param.IdInstitucion); Aca_Seccion_Bus negSeccion = new Aca_Seccion_Bus(); cmbSeccion.Properties.DataSource = negSeccion.Get_Lista_Seccion(param.IdInstitucion); tb_pais_Bus negPais = new tb_pais_Bus(); cmbNacionalidad.DataSource = negPais.Get_List_pais(); cmbNacionalidad.SelectedValue = "1"; } catch (Exception ex) { string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name; MessageBox.Show(NameMetodo + " " + param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) + ex.Message + " ", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString()); } }