Exemple #1
0
        public FavoriteScript Add(string token, string scriptId)
        {
            FavoriteScript script = new FavoriteScript();

            script.id       = Guid.NewGuid().ToString();
            script.addTime  = DateTime.Now;
            script.scriptId = scriptId;
            script.userId   = _SessionMgeSvr.Get(token).Name;
            _FavoriteScriptDao.Insert(script);
            return(script);
        }
        public BuildingScript Create(string token, BuildingScript buildingScript)
        {
            buildingScript.id         = Guid.NewGuid().ToString();
            buildingScript.createTime = DateTime.Now;
            buildingScript.userId     = _SessionMgeSvr.Get(token).Name;
            _BuildingScriptDao.Insert(buildingScript);
            SaveJsFile(buildingScript);
            FavoriteScript script = new FavoriteScript();

            script.id       = Guid.NewGuid().ToString();
            script.addTime  = DateTime.Now;
            script.scriptId = buildingScript.id;
            script.userId   = _SessionMgeSvr.Get(token).Name;
            _FavoriteScriptDao.Insert(script);
            return(buildingScript);
        }