Ejemplo n.º 1
0
        private void actualizarNota(object sender, SelectionChangedEventArgs args)
        {
            int numTarea = (sender as ComboBox).SelectedIndex;

            if (numTarea != -1)
            {
                string idTareaSeleccionada = listaTareasAsignatura.ElementAt(numTarea).id;

                WebService   webService = new WebService();
                NotaResponse response   = webService.getNotaTarea(this.idAlumno, idTareaSeleccionada);

                if (response.estado == 1)
                {
                    txtNotaPerfilAlumno.Text = response.notas.ElementAt(0).puntuacion;
                }
                else
                {
                    txtNotaPerfilAlumno.Text = "-";
                }
            }
            else
            {
                txtNotaPerfilAlumno.Text = "";
            }
        }
Ejemplo n.º 2
0
        public NotaResponse cargarNota(NotaRequest request)
        {
            NotaResponse response;
            DataAccess   da = new DataAccess {
                CadenaConexion = ConfigurationManager.ConnectionStrings["jadetBD"].ConnectionString
            };
            var resultado = da.listarNota(new Nota {
                Folio = request.Folio
            }).FirstOrDefault();

            response = new NotaResponse {
                ErrorMensaje = string.Empty,
                ErrorNumero  = 0,
                Fecha        = resultado.Fecha,
                FechaEnvio   = resultado.FechaEnvio,
                Folio        = resultado.Folio,
                Guia         = resultado.Guia,
                IdCliente    = resultado.IdCliente,
                IdEstatus    = resultado.IdEstatus,
                IdPaqueteria = resultado.IdPaqueteria,
                IdTipo       = resultado.IdTipo,
                MontoMXN     = resultado.MontoMXN,
                MontoUSD     = resultado.MontoUSD,
                SaldoMXN     = resultado.SaldoMXN,
                SaldoUSD     = resultado.SaldoUSD
            };
            return(response);
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> CreateNota([FromBody] NotaRequest nota)
        {
            notaResponse = new NotaResponse();

            _service = new CrearNotaService(_unitOfWork);

            var rta = _service.Ejecutar(nota);

            if (rta.isOk())
            {
                await _context.SaveChangesAsync();

                return(CreatedAtAction("GetNota", new { nota = nota.IdEstudiante }, nota));
            }
            return(BadRequest(rta.Message));
        }
Ejemplo n.º 4
0
        public IHttpActionResult Gravar(Nota request)
        {
            NotaResponse response = null;

            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            try
            {
                response = repositorio.Gravar(request);
            }
            catch (Exception)
            {
                throw;
            }


            return(Ok(response));
        }