Beispiel #1
0
        public ActionResult SaveDevelopMessageBoard(string dev_message)
        {
            FormsAuthenticationTicket authentication = CommonFuntion.GetAuthenticationTicket();
            int mana_id = authentication == null ? 0 : Convert.ToInt32(authentication.Name);
            InterfaceSettingService setting_service = new SettingService();

            try
            {
                t_setting setting = setting_service.SearchByManagerID(mana_id).FirstOrDefault();
                if (setting == null)
                {
                    setting = new t_setting();
                    setting.deve_message_board = dev_message;
                    setting.mana_id            = mana_id;
                    setting_service.Insert(setting);
                }
                else
                {
                    setting.deve_message_board = dev_message;
                    setting_service.Update(setting);
                }
            }
            catch
            {
            }
            return(RedirectToAction("DevelopMessageBoard", "System"));
        }
Beispiel #2
0
        public ActionResult DevelopMessageBoard()
        {
            ViewBag.Title = HtmlExtensions.Lang("_Layout_menu_DevMessageBoard");

            FormsAuthenticationTicket authentication = CommonFuntion.GetAuthenticationTicket();
            int mana_id = authentication == null ? 0 : Convert.ToInt32(authentication.Name);

            string    return_data = "";
            t_setting setting     = null;
            InterfaceSettingService setting_service = new SettingService();

            try
            {
                setting = setting_service.SearchByManagerID(mana_id).FirstOrDefault();
                if (setting != null)
                {
                    return_data = setting.deve_message_board;
                }
            }
            catch
            {
            }
#if login_debug
            return_data = "Debug 内容测试";
#endif
            ViewBag.DATA = JsonConvert.SerializeObject(return_data);
            return(View());
        }