当前位置: 首页>>代码示例>>C#>>正文


C# WebInterface.GetGridSettings方法代码示例

本文整理汇总了C#中WhiteCore.Modules.Web.WebInterface.GetGridSettings方法的典型用法代码示例。如果您正苦于以下问题:C# WebInterface.GetGridSettings方法的具体用法?C# WebInterface.GetGridSettings怎么用?C# WebInterface.GetGridSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WhiteCore.Modules.Web.WebInterface的用法示例。


在下文中一共展示了WebInterface.GetGridSettings方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Fill

        public Dictionary<string, object> Fill (WebInterface webInterface, string filename, OSHttpRequest httpRequest,
                                               OSHttpResponse httpResponse, Dictionary<string, object> requestParameters,
                                               ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary<string, object> ();
            var settings = webInterface.GetGridSettings ();

            if (requestParameters.ContainsKey ("Submit")) {
                settings.Gridname = requestParameters ["Gridname"].ToString ();
                settings.Gridnick = requestParameters ["Gridnick"].ToString ();
                settings.WelcomeMessage = requestParameters ["WelcomeMessage"].ToString ();
                settings.GovernorName = requestParameters ["GovernorName"].ToString ();
                settings.RealEstateOwnerName = requestParameters ["RealEstateOwnerName"].ToString ();
                settings.BankerName = requestParameters ["BankerName"].ToString ();
                settings.MarketplaceOwnerName = requestParameters ["MarketplaceOwnerName"].ToString ();
                settings.MainlandEstateName = requestParameters ["MainlandEstateName"].ToString ();
                settings.SystemEstateName = requestParameters ["SystemEstateName"].ToString ();

                // update main grid setup
                webInterface.SaveGridSettings (settings);
                response = "Successfully updated grid settings.";

                return null;
            }

            vars.Add ("Gridname", settings.Gridname);
            vars.Add ("Gridnick", settings.Gridnick);
            vars.Add ("WelcomeMessage", settings.WelcomeMessage);
            vars.Add ("GovernorName", settings.GovernorName);
            vars.Add ("RealEstateOwnerName", settings.RealEstateOwnerName);
            vars.Add ("BankerName", settings.BankerName);
            vars.Add ("MarketplaceOwnerName", settings.MarketplaceOwnerName);
            vars.Add ("MainlandEstateName", settings.MainlandEstateName);
            vars.Add ("SystemEstateName", settings.SystemEstateName);


            vars.Add ("GridSettingsManager", translator.GetTranslatedString ("GridSettingsManager"));
            vars.Add ("GridnameText", translator.GetTranslatedString ("GridnameText"));
            vars.Add ("GridnickText", translator.GetTranslatedString ("GridnickText"));
            vars.Add ("WelcomeMessageText", translator.GetTranslatedString ("WelcomeMessageText"));
            vars.Add ("GovernorNameText", translator.GetTranslatedString ("GovernorNameText"));
            vars.Add ("RealEstateOwnerNameText", translator.GetTranslatedString ("RealEstateOwnerNameText"));
            vars.Add ("BankerNameText", translator.GetTranslatedString ("BankerNameText"));
            vars.Add ("MarketPlaceOwnerNameText", translator.GetTranslatedString ("MarketPlaceOwnerNameText"));
            vars.Add ("MainlandEstateNameText", translator.GetTranslatedString ("MainlandEstateNameText"));
            vars.Add ("SystemEstateNameText", translator.GetTranslatedString ("SystemEstateNameText"));



            vars.Add ("Save", translator.GetTranslatedString ("Save"));
            vars.Add ("No", translator.GetTranslatedString ("No"));
            vars.Add ("Yes", translator.GetTranslatedString ("Yes"));

            return vars;
        }
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:56,代码来源:gridsettings_manager.cs


注:本文中的WhiteCore.Modules.Web.WebInterface.GetGridSettings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。