private void frmAlumno_Load(object sender, EventArgs e) { RecorridoForm.CambiarIdioma(this); LlenarGrilla(); txtFechaNacimiento.MaxDate = DateTime.Now.AddYears(-3); txtFechaNacimiento.MinDate = DateTime.Now.AddYears(-18); }
private void frmCursoMaestra_Load(object sender, EventArgs e) { RecorridoForm.CambiarIdioma(this); CursoComponent cursoAlumnoComponent = new CursoComponent(); List <Curso> cursos = new List <Curso>(); int año = DateTime.Now.Year; cursos = cursoAlumnoComponent.ReadByMaestro(persona.Id); mgReserva.Rows.Clear(); int n = 0; foreach (var item in cursos) { n = mgReserva.Rows.Add(); mgReserva.Rows[n].Cells[0].Value = item.Id; mgReserva.Rows[n].Cells[1].Value = item.nombre; mgReserva.Rows[n].Cells[2].Value = item.sala.tipoSala; mgReserva.Rows[n].Cells[3].Value = item.sala.capacidad; mgReserva.Rows[n].Cells[4].Value = item.salaHorario.turno; mgReserva.Rows[n].Cells[5].Value = item.salaHorario.hora; mgReserva.Rows[n].Cells[6].Value = item.salaHorario.año; mgReserva.Rows[n].Cells[7].Value = item.sala.nombre; mgReserva.Rows[n].Cells[8].Value = item.grado.nombre; } }
private void frmExamen_Load(object sender, EventArgs e) { RecorridoForm.CambiarIdioma(this); llenarGrillaMateria(); CursoComponent cursoComponent = new CursoComponent(); txtCurso.DataSource = cursoComponent.ReadByAño(DateTime.Now.Year); txtCurso.DisplayMember = "nombre"; txtCurso.ValueMember = "Id"; EspecialidadComponent especialidadComponent = new EspecialidadComponent(); txtEspecialidad.DataSource = especialidadComponent.Read(); txtEspecialidad.ValueMember = "Id"; txtEspecialidad.DisplayMember = "especialidad"; int año = DateTime.Now.Year; DateTime min = new DateTime(año, 3, 1); txtFecha.MinDate = min; txtFecha.MaxDate = DateTime.Now; SalaHorarioComponent salaHorario = new SalaHorarioComponent(); txtAño.DataSource = salaHorario.SoloAño(); txtAño.DisplayMember = "Año"; }
private void btnAlta_Click(object sender, EventArgs e) { if (verificarCamposCurso()) { Sala sala = new Sala(); sala.Id = salaHorario.sala.Id; Grado grado = new Grado(); grado.Id = int.Parse(txtGrado.SelectedValue.ToString()); SalaHorarioComponent salaHorarioComponent = new SalaHorarioComponent(); salaHorarioComponent.Create(salaHorario); Curso curso = new Curso(sala, grado, salaHorarioComponent.ReadBySalaYañoYTurnoGrado(salaHorario)); curso.nombre = txtNombreCurso.Text; CursoComponent cursoComponent = new CursoComponent(); if (cursoComponent.Create(curso) == null) { ValidadoresComponent.ErrorAltaModificacado("Curso", this); } else { ValidadoresComponent.Alta("Curso", this); llenarGrillaReservas(); mgSala.Rows.Clear(); } RecorridoForm.LimpiarTXT(this); } }
private void btnAltaProveedor_Click(object sender, EventArgs e) { if (VerificarCampos()) { List <Telefono> listaTelefono = new List <Telefono>(); Telefono telefono = new Telefono(); telefono.numero = double.Parse(txtTelefono.Text); listaTelefono.Add(telefono); Proveedor proveedor = new Proveedor(listaTelefono); proveedor.matricula = txtMatricula.Text; proveedor.nombre = txtNombreProveedor.Text; proveedor.tipoProveedor = txtTipo.Text; proveedor.contacto = txtContacto.Text; proveedor.cuit = txtCUIT.Text; ProveedorComponenent proveedorComponenent = new ProveedorComponenent(); if (proveedorComponenent.Create(proveedor) == null) { ValidadoresComponent.ErrorAltaModificacado("Proveedor", this); } else { ValidadoresComponent.Alta("Proveedor", this); RecorridoForm.LimpiarTXT(this); llenarGrillaProveedor(); } } }
private void frmComunicadoAlumno_Load(object sender, EventArgs e) { RecorridoForm.CambiarIdioma(this); CursoComponent cursoAlumnoComponent = new CursoComponent(); cursos = cursoAlumnoComponent.ReadByPersona(persona.Id); llenarGrilla(); }
private void frmMateria_Load(object sender, EventArgs e) { RecorridoForm.CambiarIdioma(this); EspecialidadComponent especialidadComponent = new EspecialidadComponent(); txtEspecialidad.DataSource = especialidadComponent.Read(); txtEspecialidad.DisplayMember = "especialidad"; txtEspecialidad.ValueMember = "Id"; llenargrilla(); }
private void frmDatosPersonales_Load(object sender, EventArgs e) { RecorridoForm.CambiarIdioma(this); txtApellido.Text = persona.apellido; txtDireccion.Text = persona.direccion; txtDNI.Text = persona.DNI; txtFechaNaciemiento.Text = persona.fechaNacimiento.ToString("dd-MM-yyyy"); txtNombre.Text = persona.nombre; }
private void frmCursos_Load(object sender, EventArgs e) { RecorridoForm.CambiarIdioma(this); llenarAños(); llenarGrillaReservas(); SalaHorarioComponent salaHorario = new SalaHorarioComponent(); txtAño.DataSource = salaHorario.SoloAño(); txtAño.DisplayMember = "Año"; }
private void frmExamenMaestra_Load(object sender, EventArgs e) { RecorridoForm.CambiarIdioma(this); RecorridoForm.CambiarIdioma(this); llenarGrillaCursos(); MateriaComponent materiaComponent = new MateriaComponent(); txtMateriaAlta.DataSource = materiaComponent.ReadByEspecialidad(persona.Id); txtMateriaAlta.ValueMember = "Id"; txtMateriaAlta.DisplayMember = "materia"; }
private void frmMantenimiento_Load(object sender, EventArgs e) { RecorridoForm.CambiarIdioma(this); llenarGrillaMantenimiento(); ProveedorComponenent tipoProveedorComponent = new ProveedorComponenent(); txtTipoProvv.DataSource = tipoProveedorComponent.Read(); txtTipoProvv.ValueMember = "Id"; txtTipoProvv.DisplayMember = "tipoProveedor"; llenarGrillaTipoM(); txtFecha.MinDate = DateTime.Now; }
private void metroButton6_Click(object sender, EventArgs e) { if (verificarCamposTipo()) { Proveedor tipoProveedor = new Proveedor(); tipoProveedor.tipoProveedor = txtTipoProveedor.Text; tipoProveedor.Id = int.Parse(mgTipoProveedor.CurrentRow.Cells[0].Value.ToString()); ProveedorComponenent tipoProveedorComponent = new ProveedorComponenent(); tipoProveedorComponent.UpdateTipoProveedor(tipoProveedor); RecorridoForm.LimpiarTXT(this); llenargrillaTipo(); } }
private void frmCursoAlumnosVerBaja_Load(object sender, EventArgs e) { if (b == 1) { metroButton1.Visible = false; } CursoComponent cursoComponent = new CursoComponent(); unCurso = cursoComponent.ReadBy(curso); this.Text = " Alumnos y Maestros de la sala " + unCurso.nombre + " Del año " + unCurso.salaHorario.año + " Turno " + unCurso.salaHorario.turno; llenarGrillaAlumno(); llenarGrillaMaestro(); RecorridoForm.CambiarIdioma(this); }
private void btnEliminar_Click(object sender, EventArgs e) { if (mgAlumno.CurrentRow.Cells[0].Value == null) { MetroMessageBox.Show(this, "Sellecione un alumno", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { ParienteComponent parentescoComponent = new ParienteComponent(); parentescoComponent.Delete(int.Parse(mgAlumno.CurrentRow.Cells[8].Value.ToString())); llenarGrilla(); RecorridoForm.LimpiarTXT(this); } }
private void frmInscripcion_Load(object sender, EventArgs e) { tabIncripcion.SelectedIndex = 0; RecorridoForm.CambiarIdioma(this); txtFechaNaciemiento.MaxDate = DateTime.Now.AddYears(-3); txtFechaNaciemiento.MinDate = DateTime.Now.AddYears(-6); txtMedicamentosCuales.Visible = false; txtAlimentoCuales.Visible = false; txtElementosCuales.Visible = false; txtCualOS.Visible = false; txtTelefonoOS.Visible = false; txtSocioOS.Visible = false; txtMedicamentosCuales.Text = ""; }
private void frmPersonal_Load(object sender, EventArgs e) { RecorridoForm.CambiarIdioma(this); txtFechaNaciemiento.MaxDate = DateTime.Now.AddYears(-18); txtFechaNaciemiento.MinDate = DateTime.Now.AddYears(-65); txtFechaNacimiento.MaxDate = DateTime.Now.AddYears(-18); txtFechaNacimiento.MinDate = DateTime.Now.AddYears(-65); txtFechaNacimiento.MaxDate = DateTime.Now.AddYears(-18); txtFechaNacimiento.MinDate = DateTime.Now.AddYears(-65); llenarGrillaEspecialidades(); llenarGrillaMaestro(); llenarEspecialidad(); }
private void btnModificarEsp_Click(object sender, EventArgs e) { if (verificarcampos()) { Especialidad especialidad = new Especialidad(); especialidad = (Especialidad)txtEspecialidad.SelectedItem; Materia materia = new Materia(especialidad); materia.materia = txtMateria.Text; materia.Id = int.Parse(mgEspecialidades.CurrentRow.Cells[0].Value.ToString()); MateriaComponent materiaComponent = new MateriaComponent(); materiaComponent.Update(materia); RecorridoForm.LimpiarTXT(this); llenargrilla(); } }
private void btnAltaMaestro_Click(object sender, EventArgs e) { if (verificarCamposDocumentacionMaestro()) { Documento documentacion1 = new Documento(); documentacion1.openFileDialog = openFileDialogAlumno; documentacion1.tipo_Documentancion = "DNI"; documentacion1.NombreDocumento = "DNI"; Documento documentacion2 = new Documento(); documentacion2.openFileDialog = openFileDialogPadre; documentacion2.tipo_Documentancion = "Titulo"; documentacion2.NombreDocumento = "Titulo"; Documento documentacion3 = new Documento(); documentacion3.openFileDialog = openFileDialogCertificado; documentacion3.tipo_Documentancion = "Certificado"; documentacion3.NombreDocumento = "Certificado"; List <Documento> listaDocumentacion = new List <Documento>(); listaDocumentacion.Add(documentacion1); listaDocumentacion.Add(documentacion2); listaDocumentacion.Add(documentacion3); MaestroCreator maestroCreator = new MaestroCreator(); List <Telefono> telefonos = new List <Telefono>(); telefonos.Add(telefono); List <Especialidad> especialidades = new List <Especialidad>(); especialidades.Add(especialidad); Maestro unMaestro = new Maestro(especialidades, listaDocumentacion, telefonos); unMaestro.apellido = persona.apellido; unMaestro.nombre = persona.nombre; unMaestro.fechaNacimiento = persona.fechaNacimiento; unMaestro.direccion = persona.direccion; unMaestro.DNI = persona.DNI; string error = maestroCreator.CrearPersonaContructor(unMaestro, usuarios); if (error != "") { MetroMessageBox.Show(this, error, "error", MessageBoxButtons.OK, MessageBoxIcon.Warning); RecorridoForm.LimpiarTXT(this); } else { llenarGrillaMaestro(); ValidadoresComponent.Alta("Maestro", this); RecorridoForm.LimpiarTXT(this); } } }
private void frmMaestro_Load(object sender, EventArgs e) { this.Text = "Bienvenido " + persona.nombreCompleto; UsuarioPersonaComponent usuarioPersonaComponent = new UsuarioPersonaComponent(); persona = usuarioPersonaComponent.ReadByPersona(SessionManager.instance.GetUSuario().Id).persona; List <Idioma> idiomas = new List <Idioma>(); IdiomaComponent idiomaComponent = new IdiomaComponent(); idiomas = idiomaComponent.Read(); cbIdioma.DataSource = idiomas; cbIdioma.DisplayMember = "idioma"; cbIdioma.ValueMember = "Id"; RecorridoForm.CambiarIdioma(this); }
private void frmAsistencia_Load(object sender, EventArgs e) { RecorridoForm.CambiarIdioma(this); CursoComponent cursoComponent = new CursoComponent(); unCurso = cursoComponent.ReadBy(curso); AlumnoComponent alumnocomponent = new AlumnoComponent(); alumnos = alumnocomponent.ObtenerAlumnodeCunCurso(curso); txtAlumno.DataSource = alumnos; txtAlumno.ValueMember = "Id"; txtAlumno.DisplayMember = "nombreCompleto"; llenarGrillaAsistencias(); llenarCOmboMesVer(); }
void llenargrilla() { RecorridoForm.LimpiarTXT(this); mgEspecialidades.Rows.Clear(); MateriaComponent personaComponent = new MateriaComponent(); int n = 0; foreach (var item in personaComponent.Read()) { n = mgEspecialidades.Rows.Add(); mgEspecialidades.Rows[n].Cells[0].Value = item.Id; mgEspecialidades.Rows[n].Cells[1].Value = item.materia; mgEspecialidades.Rows[n].Cells[2].Value = item.especialidad.especialidad; n++; } }
private void btnModificarEsp_Click(object sender, EventArgs e) { if (mgEspecialidades.CurrentRow.Cells[0].Value != null) { EspecialidadComponent especialidadComponent = new EspecialidadComponent(); Especialidad especialidad = new Especialidad(); especialidad.Id = int.Parse(mgEspecialidades.CurrentRow.Cells[0].Value.ToString()); especialidad.especialidad = txtEspecialidad.Text; especialidadComponent.Update(especialidad); llenarGrillaEspecialidades(); llenarEspecialidad(); RecorridoForm.LimpiarTXT(this); } else { MetroMessageBox.Show(this, "Sellecione una especialidad", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void btnAlta_Click(object sender, EventArgs e) { MaestroHorario maestroHorario = new MaestroHorario(); MaestroHorarioComponent maestroHorarioComponent = new MaestroHorarioComponent(); maestroHorario.persona.Id = legajo; maestroHorario.turno = txtturno.Text; maestroHorario.año = int.Parse(txtAño.Text); if (maestroHorarioComponent.Create(maestroHorario) == null) { ValidadoresComponent.ErrorAltaModificacado("Horario", this); } else { ValidadoresComponent.Alta("Horario", this); RecorridoForm.LimpiarTXT(this); llenarGrilla(); } }
private void metroButton3_Click(object sender, EventArgs e) { Documento documentacion1 = new Documento(); documentacion1.openFileDialog = openFileDialogAlumno; documentacion1.NombreDocumento = "DNI Alumno"; Documento documentacion2 = new Documento(); documentacion2.openFileDialog = openFileDialogPadre; documentacion2.NombreDocumento = "DNI Padre"; Documento documentacion3 = new Documento(); documentacion3.openFileDialog = openFileDialogCertificado; documentacion3.NombreDocumento = "Certificado Nacimientos"; Documento documentacion4 = new Documento(); documentacion4.openFileDialog = openFileDialogVacuna; documentacion4.NombreDocumento = "Vacunas"; listaDocumentacion.Add(documentacion1); listaDocumentacion.Add(documentacion2); listaDocumentacion.Add(documentacion3); listaDocumentacion.Add(documentacion4); persona.AgregarTelefono(telefono); string error = alumnoContructor.CrearAlumno(persona, usuarios, listaDocumentacion, alergias, casa, familia, obrasSocial); if (error != "") { MetroMessageBox.Show(this, error, "error", MessageBoxButtons.OK, MessageBoxIcon.Warning); RecorridoForm.LimpiarTXT(this); } else { ValidadoresComponent.Alta("Incripcion", this); RecorridoForm.LimpiarTXT(this); } }
private void metroButton4_Click(object sender, EventArgs e) { if (verificarCamposTipo()) { Proveedor tipoProveedor = new Proveedor(); tipoProveedor.tipoProveedor = txtTipoProveedor.Text; ProveedorComponenent tipoProveedorComponent = new ProveedorComponenent(); if (tipoProveedorComponent.CreateTipoProveedor(tipoProveedor) == null) { ValidadoresComponent.ErrorAltaModificacado("Tipo Proveedor", this); } else { ValidadoresComponent.Alta("Tipo Proveedor", this); RecorridoForm.LimpiarTXT(this); llenargrillaTipo(); } } }
private void metroButton2_Click(object sender, EventArgs e) { if (verificarCampos()) { GradoComponent gradoComponent = new GradoComponent(); Grado grado = new Grado(); grado.nombre = txtNombre.Text; grado.año = int.Parse(txtGrado.Text); if (gradoComponent.Create(grado) == null) { ValidadoresComponent.ErrorAltaModificacado("Grado", this); } else { ValidadoresComponent.Alta("Grado", this); llenarGrilla(); } RecorridoForm.LimpiarTXT(this); } }
private void btnAlta_Click(object sender, EventArgs e) { if (verificarCampos()) { Alumno alumno = new Alumno(); alumno.Id = id_Alumno; Pariente parentesco = new Pariente(alumno); parentesco.autorizadoRetirar = chRetirar.Checked; parentesco.parentesco = txtParentesco.Text; parentesco.apellido = txtApellido.Text; parentesco.DNI = txtDNI.Text; parentesco.direccion = txtDireccion.Text; parentesco.fechaNacimiento = txtFechaNacimiento.Value; parentesco.nombre = txtNombre.Text; parentesco.tipoPersona = "Pariente"; Telefono telefono = new Telefono(); telefono.numero = int.Parse(txtTelefono.Text); telefono.codigo_Area = int.Parse(txtTelefonoArea.Text); ParienteComponent parienteComponent = new ParienteComponent(); Pariente parienteCreado = new Pariente(); parienteCreado = parienteComponent.Create(parentesco); TelefonoComponent unTelefono = new TelefonoComponent(); Telefono telefonoCreado = new Telefono(); telefonoCreado = unTelefono.Create(telefono); unTelefono.AgregarTelefonoAUnaPersona(telefonoCreado, parienteCreado); llenarGrilla(); RecorridoForm.LimpiarTXT(this); } }
private void btnAltaEsp_Click(object sender, EventArgs e) { if (verificarCamposEspecialidad()) { EspecialidadComponent especialidadComponent = new EspecialidadComponent(); Especialidad especialidad = new Especialidad(); especialidad.especialidad = txtEspecialidad.Text; if (especialidadComponent.Create(especialidad) == null) { ValidadoresComponent.ErrorAltaModificacado("Especialidad", this); } else { RecorridoForm.LimpiarTXT(this); llenarEspecialidad(); llenarGrillaEspecialidades(); RecorridoForm.LimpiarTXT(this); } } }
private void metroButton1_Click(object sender, EventArgs e) { if (txtNuevaComunicacion.Text == "") { MetroMessageBox.Show(this, "Campo Comunicado esta vacio", "error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { Alumno alumno = new Alumno(); alumno.Id = int.Parse(mgAlumno.CurrentRow.Cells[0].Value.ToString()); Comunicado comunicado = new Comunicado(persona, alumno); comunicado.comunicado = txtNuevaComunicacion.Text; ComunicadoComponent comunicadoComponent = new ComunicadoComponent(); comunicadoComponent.Create(comunicado); ValidadoresComponent.Alta("Comunicacion", this); llenarListaComunicado(); RecorridoForm.LimpiarTXT(this); } }
private void btnAltaEsp_Click(object sender, EventArgs e) { if (verificarcampos()) { Especialidad especialidad = new Especialidad(); especialidad = (Especialidad)txtEspecialidad.SelectedItem; Materia materia = new Materia(especialidad); materia.materia = txtMateria.Text; MateriaComponent materiaComponent = new MateriaComponent(); if (materiaComponent.Create(materia) == null) { ValidadoresComponent.ErrorAltaModificacado("Materia", this); RecorridoForm.LimpiarTXT(this); } else { ValidadoresComponent.Alta("Materia", this); RecorridoForm.LimpiarTXT(this); llenargrilla(); } } }