private void Guardar()
        {
            var valorGenero = "";

            if (inputSexo1.Checked)
            {
                valorGenero = inputSexo1.Value.ToString();
            }
            else if (inputSexo2.Checked)
            {
                valorGenero = inputSexo2.Value;
            }

            var service = new ServiceReferenceSchool.ServiceSchoolClient();

            service.AddAlumno(
                new ServiceReferenceSchool.Alumno()
            {
                Nombres         = inputUserName.Value,
                Apellidos       = inputUserApellido.Value,
                Direccion       = inputUserAddress.Value,
                Sexo            = valorGenero,
                FechaNacimiento = Convert.ToDateTime(inputUserDateBirthday.Value)
            });
        }
예제 #2
0
        private void Consulta()
        {
            var service = new ServiceReferenceSchool.ServiceSchoolClient();

            Alumno[] data;

            data = service.GetAlumnosByNombes(txtNombreAlumno.Value);
            grdAlumnos.DataSource = data;
            grdAlumnos.DataBind();
        }
예제 #3
0
        private void cmbChanged()
        {
            var cliente =
                new ServiceReferenceSchool.ServiceSchoolClient();
            var secciones = cliente.GetAllSecciones();

            var selectGrado = cliente.GetIdGrado(ddlGrados.SelectedValue);

            ddlSecciones.DataSource = secciones.Where(item => item.GradoID == selectGrado).Select(item => item.Nombre).ToList();
            ddlSecciones.DataBind();
        }
예제 #4
0
        private void Guardar()
        {
            var service = new ServiceReferenceSchool.ServiceSchoolClient();

            service.AddMatricula(
                new ServiceReferenceSchool.Matricula()
            {
                Fecha     = DateTime.Now,
                GradoID   = service.GetIdGrado(ddlGrados.SelectedValue),
                SeccionID = service.GetIdSeccion(ddlSecciones.SelectedValue),
                AlumnoID  = Convert.ToInt32(alID.Value),
            });
        }
예제 #5
0
        private void GetAlumno()
        {
            if (String.IsNullOrWhiteSpace(Request.QueryString["id"]))
            {
                return;
            }
            var id = Convert.ToInt32(Request.QueryString["id"]);

            var cliente =
                new ServiceReferenceSchool.ServiceSchoolClient();

            var alumno = cliente.GetAlumnoById(id);
            var grados = cliente.GetAllGrados();

            inputUserName.Value     = alumno.Nombres;
            inputUserApellido.Value = alumno.Apellidos;

            ddlGrados.DataSource = grados.Select(item => item.Nivel).ToList();
            ddlGrados.DataBind();

            alID.Value = alumno.AlumnoID.ToString();
        }