public ActionResult Create(Solicitud solicitud)
        {
            CurrentUser();
            if (ModelState.IsValid)
            {
                db.Solicitudes.Add(solicitud);
                db.SaveChanges();
                return RedirectToAction("Details/" + solicitud.userId, "Usuario");
            }

            return View(solicitud);
        }
 public ActionResult Edit(Solicitud solicitud)
 {
     CurrentUser();
     if (ModelState.IsValid)
     {
         db.Entry(solicitud).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(solicitud);
 }
        public ActionResult Upload(HttpPostedFileBase file, Solicitud model)
        {
            CurrentUser();
            if (ModelState.IsValid)
            {
                if (file != null && file.ContentLength > 0)
                {
                    foreach (string f in Request.Files)
                    {
                        // extract only the fielname
                        var fileName = Request.Files[f];
                        string userid = current_user.fbId.ToString();

                        var fn = Server.MapPath("~/Content/files/" + userid + fileName);
                        fileName.SaveAs(fn);
                    }
                }
            }
            return RedirectToAction("Create");
        }