Ejemplo n.º 1
0
        public ActionResult Edit(string id)
        {
            AppDao appDao = new AppDao();
            App    app    = appDao.GetApp(id);

            ViewData["App"] = app;
            if (app != null)
            {
                ViewBag.Title = app.name + " - 編集";
            }
            ViewBag.PageId = id;
            return(View(app));
        }
Ejemplo n.º 2
0
        static Helper()
        {
            var appDao = new AppDao();

            App = appDao.GetApp();
            if (App == null)
            {
                App = new Application
                {
                    Id = Guid.NewGuid().ToString()
                };
                appDao.InsertApp(App);
            }
            _httpClient.DefaultRequestHeaders.Add("appid", App.Id);

            NiologManager.DefaultWriters = new ILogWriter[]
            {
                new ConsoleLogWriter(),
                new FileLogWriter(Path.Combine(ApplicationData.Current.LocalFolder.Path, "logs"), 10)
            };
        }