Пример #1
0
        private static void Init()
        {
            IBasicService service = ServiceFactory.GetService <IBasicService>();

            basicParameterList = new List <BasicParameter>();

            if (!service.CheckExists_Parameter(new BasicParameter()
            {
                ParamKey = "BlacklistVersion"
            }))
            {
                basicParameterList.Add(new BasicParameter()
                {
                    ParamKey = "BlacklistVersion", ParamName = "黑名单版本号", ParamValue = "20130101"
                });
            }

            if (!service.CheckExists_Parameter(new BasicParameter()
            {
                ParamKey = "DataStorageDays"
            }))
            {
                basicParameterList.Add(new BasicParameter()
                {
                    ParamKey = "DataStorageDays", ParamName = "数据保存天数", ParamValue = "30"
                });
            }

            if (!service.CheckExists_Parameter(new BasicParameter()
            {
                ParamKey = "DataClearTime"
            }))
            {
                basicParameterList.Add(new BasicParameter()
                {
                    ParamKey = "DataClearTime", ParamName = "数据清理时间", ParamValue = "00:00:00"
                });
            }

            if (!service.CheckExists_Parameter(new BasicParameter()
            {
                ParamKey = "FileStorageCount"
            }))
            {
                basicParameterList.Add(new BasicParameter()
                {
                    ParamKey = "FileStorageCount", ParamName = "文件保存数量", ParamValue = "20"
                });
            }

            if (!service.CheckExists_Parameter(new BasicParameter()
            {
                ParamKey = "CurrencyInfoColumn"
            }))
            {
                basicParameterList.Add(new BasicParameter()
                {
                    ParamKey = "CurrencyInfoColumn", ParamName = "纸币信息字段", ParamValue = "[1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18]"
                });
            }

            if (!service.CheckExists_Parameter(new BasicParameter()
            {
                ParamKey = "CollectSystemName"
            }))
            {
                basicParameterList.Add(new BasicParameter()
                {
                    ParamKey = "CollectSystemName", ParamName = "采集系统名称", ParamValue = "纸币流通管理系统"
                });
            }

            if (!service.CheckExists_Parameter(new BasicParameter()
            {
                ParamKey = "SystemLogoPicture"
            }))
            {
                basicParameterList.Add(new BasicParameter()
                {
                    ParamKey = "SystemLogoPicture", ParamName = "系统标志图片", ParamValue = ""
                });
            }

            if (basicParameterList.Count > 0)
            {
                SystemParameter.Save();
            }
        }
Пример #2
0
 static SystemParameter()
 {
     SystemParameter.Init();
     SystemParameter.Refresh();
 }