public JsonResult Delete(int id)
        {
            string conStr = Session["conStr"].ToString(); //ConfigurationManager.ConnectionStrings["MySQLConnectionString"].ConnectionString;
            DocumenteScanateRepository dsr = new DocumenteScanateRepository(Convert.ToInt32(Session["CURENT_USER_ID"]), conStr);
            DocumentScanat             d   = (DocumentScanat)dsr.Find(id).Result;
            response r = d.Delete();

            return(Json(r, JsonRequestBehavior.AllowGet));
        }
        public JsonResult Avizare(DocumentScanat CurDocumentScanat)
        {
            response r      = new response();
            string   conStr = Session["conStr"].ToString(); //ConfigurationManager.ConnectionStrings["MySQLConnectionString"].ConnectionString;
            DocumenteScanateRepository dsr = new DocumenteScanateRepository(Convert.ToInt32(Session["CURENT_USER_ID"]), conStr);
            DocumentScanat             d   = (DocumentScanat)dsr.Find(Convert.ToInt32(CurDocumentScanat.ID)).Result;

            r = d.Avizare(CurDocumentScanat.VIZA_CASCO);
            return(Json(r, JsonRequestBehavior.AllowGet));
        }
        //[AuthorizeUser(ActionName = "Dosare", Recursive = false)]
        //[AuthorizeToken]
        public JsonResult Detail(int id)
        {
            string conStr = Session["conStr"].ToString(); //ConfigurationManager.ConnectionStrings["MySQLConnectionString"].ConnectionString;
            DocumenteScanateRepository dsr = new DocumenteScanateRepository(Convert.ToInt32(Session["CURENT_USER_ID"]), conStr);
            response r = dsr.Find(id);

            //return Json(r, JsonRequestBehavior.AllowGet);
            JsonResult result = Json(r, JsonRequestBehavior.AllowGet);

            result.MaxJsonLength = Int32.MaxValue;
            return(result);
        }