Exemple #1
0
        public async Task <IHttpActionResult> PutUser(int id, User user)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != user.Id)
            {
                return(BadRequest());
            }

            db.Entry(user).State = EntityState.Modified;

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!UserExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public async Task <IActionResult> OnPostAsync()
        {
            tblDiferimiento FormTable = new tblDiferimiento();

            string FullName = inputNAMESelection + " " + inputINICIALSelection + " " + inputAPELLIDOSelection + " " + inputAPELLIDO2Selection;


            FormTable.strFullName         = FullName;
            FormTable.strEmail            = inputEmailSelection;
            FormTable.strPhone            = inputPhoneSelection;
            FormTable.strSignature        = inputSignatureSelection;
            FormTable.gradYear            = inputGradDateSelection;
            FormTable.strActiveOrInactive = activeOrInactiveSelection;
            FormTable.strStudentProgram   = programaDeEstudioSelection;
            FormTable.strCredits          = inputCreditsSelection;
            FormTable.strSemesters        = inputSemestersSelection;
            FormTable.date = inputDateSelection;

            _context.insertDataDiferimiento(FormTable);


            await _context.SaveChangesAsync();

            return(RedirectToPage("/Application/HomePage"));
        }
Exemple #3
0
        public async Task <IActionResult> OnPostAsync()
        {
            tblForm FormTable = new tblForm();

            string FullName = inputNAMESelection + " " + inputINICIALSelection + " " + inputAPELLIDOSelection + " " + inputAPELLIDO2Selection;


            FormTable.strFullName         = FullName;
            FormTable.strActiveOrInactive = activeOrInactiveSelection;
            FormTable.strStudentProgram   = programaDeEstudioSelection;

            _context.insertDataForm(FormTable);


            await _context.SaveChangesAsync();

            return(RedirectToPage("/Application/HomePage"));
        }
Exemple #4
0
        public async Task <IActionResult> OnPostAsync()
        {
            tblPlanillaContribucion FormTable = new tblPlanillaContribucion();

            string FullName = inputNAMESelection + " " + inputINICIALSelection + " " + inputAPELLIDOSelection + " " + inputAPELLIDO2Selection;


            FormTable.strFullName         = FullName;
            FormTable.strEmail            = inputEmailSelection;
            FormTable.strPhone            = inputPhoneSelection;
            FormTable.strSignature        = inputSignatureSelection;
            FormTable.strDate             = inputDateSelection;
            FormTable.strActiveOrInactive = activeOrInactiveSelection;
            FormTable.strStudentProgram   = programaDeEstudioSelection;

            _context.insertDataPlanillaContribucion(FormTable);


            await _context.SaveChangesAsync();

            return(RedirectToPage("/Application/HomePage"));
        }
Exemple #5
0
        public async Task <IActionResult> OnPostAsync()
        {
            tblCopiaDeDiploma FormTable = new tblCopiaDeDiploma();

            string FullName = inputNAMESelection + " " + inputINICIALSelection + " " + inputAPELLIDOSelection + " " + inputAPELLIDO2Selection;


            FormTable.strFullName       = FullName;
            FormTable.strEmail          = inputEmailSelection;
            FormTable.strPhone          = inputPhoneSelection;
            FormTable.strDegree         = inputDegreeSelection;
            FormTable.strGradYear       = inputGradYearSelection;
            FormTable.strStudentProgram = programaDeEstudioSelection;
            FormTable.strSignature      = inputSignatureSelection;
            FormTable.date = inputDateSelection;

            _context.insertDataCopiaDeDiploma(FormTable);


            await _context.SaveChangesAsync();

            return(RedirectToPage("/Application/HomePage"));
        }