Example #1
0
        public void SavePlatFormInfo(Platform platform)
        {
            var old = PlatformSection.GetInstances();

            foreach (PlatFormElement m in old.Platforms)
            {
                if (string.Equals(m.Name, platform.Name, StringComparison.CurrentCultureIgnoreCase))
                {
                    m.Code       = platform.Code;
                    m.IsClosed   = platform.IsClosed;
                    m.ShowCount  = platform.ShowCount;
                    m.paidIsTest = platform.PaidIsTest;
                    m.IssueSpeed = platform.IssueSpeed;
                    m.bspClose   = platform.bspClose;
                    m.b2bClose   = platform.b2bClose;
                }
            }
            PlatformSection.Save();
            InitSystemSwitch.InitPlatSystem();
        }
Example #2
0
        public void SaveParatersConfig(string platName, Area areaDto)
        {
            var old = PlatformSection.GetInstances();

            foreach (PlatFormElement m in old.Platforms)
            {
                if (m.Name.ToLower().Equals(platName.ToLower()))
                {
                    foreach (AreaElement area in m.Areas)
                    {
                        if (area.City.ToLower().Equals(areaDto.City.ToLower()))
                        {
                            foreach (var dp in areaDto.Parameters)
                            {
                                area.Parameters[dp.Name].Value = dp.Value;
                            }
                        }
                    }
                }
            }

            PlatformSection.Save();
            InitSystemSwitch.InitPlatSystem();
        }