Exemplo n.º 1
0
        public ActionResult Submit(ValidationRequest request)
        {
            string id = User.Identity.GetUserId();

            //db.ValidationRequests.Where(e => e.RequestID.Equals(request.RequestID)).FirstOrDefault().AdminID = id;
            //db.ValidationRequests.Where(e => e.RequestID.Equals(request.RequestID)).FirstOrDefault().AspNetUser1 = db.AspNetUsers.Where(e => e.Id.Equals(id)).FirstOrDefault();
            //db.ValidationRequests.Where(e => e.RequestID.Equals(request.RequestID)).FirstOrDefault().DateEvaluated = DateTime.Now;
            //db.ValidationRequests.Where(e => e.RequestID.Equals(request.RequestID)).FirstOrDefault().StatusID = request.StatusID;
            //db.ValidationRequests.Where(e => e.RequestID.Equals(request.RequestID)).FirstOrDefault().Remarks = request.Remarks;

            request.AdminID         = id;
            request.AspNetUser1     = db.AspNetUsers.Where(e => e.Id.Equals(id)).FirstOrDefault();
            request.DateEvaluated   = DateTime.Now;
            request.ValidationStatu = db.ValidationStatus.Where(e => e.StatusID == request.RequestID).FirstOrDefault();

            db.Entry(request).State = System.Data.Entity.EntityState.Modified;

            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public void UpdateStudentRequest(ValidationRequest requestModel)
 {
     dbObject.Entry(requestModel).State = System.Data.Entity.EntityState.Modified;
     dbObject.SaveChanges();
 }
 public void UpdateAnnouncement(Announcement announcementModel)
 {
     dbObject.Entry(announcementModel).State = System.Data.Entity.EntityState.Modified;
     dbObject.SaveChanges();
 }