Exemple #1
0
        public JsonResult GetContent(string Name)
        {
            GoogleManager mng = new GoogleManager();

            mng.Authentications();
            string[] res = mng.DownloadContentFile(Name);
            return(Json(res, JsonRequestBehavior.AllowGet));
        }
Exemple #2
0
        public JsonResult DeletFiles(string name)
        {
            GoogleManager mng = new GoogleManager();

            mng.Authentications();
            bool res = mng.DeleteFiles(name);

            return(Json(res, JsonRequestBehavior.AllowGet));
        }
Exemple #3
0
        // GET: GoogleDrive
        public ActionResult Index()
        {
            GoogleManager mng = new GoogleManager();

            mng.Authentications();
            List <string> title = mng.GetFiles();

            ViewBag.name = title;
            return(View());
        }
Exemple #4
0
        public JsonResult EditDoc(MitemEditModel json)
        {
            string        content = json.theHtml;
            string        idFile  = json.idFile;
            GoogleManager mng     = new GoogleManager();

            mng.Authentications();
            bool res = mng.UpdataDocument(idFile, content);

            return(Json(res, JsonRequestBehavior.AllowGet));
        }
Exemple #5
0
        public JsonResult CreateDoc(MItemtModel jsonObject)
        {
            string        text  = jsonObject.theHtml;
            string        title = jsonObject.title;
            GoogleManager mng   = new GoogleManager();

            mng.Authentications();
            bool res = mng.CreateDocument(title, text);

            return(Json(res, JsonRequestBehavior.AllowGet));
        }