Пример #1
0
              public ActionResult AddressSystem()
              {
                  if (Request.Form["changeSettings"] != null)
                  {
                      if (Request.Form["makeAddressMode"] != null)
                      {
                          switch (Request.Form["makeAddressMode"].ToString())
                          {
                          case "1":
                              AppCore.Config["makeAddressMode"] = 1;
                              break;

                          case "0":
                          default:
                              AppCore.Config["makeAddressMode"] = 0;

                              break;
                          }
                      }

                      if (Request.Form.HasKey("kladrInCloudToken"))
                      {
                          AppCore.Config["kladrInCloudToken"] = Request.Form["kladrInCloudToken"];
                      }
                      if (Request.Form.HasKey("kladrInCloudKey"))
                      {
                          AppCore.Config["kladrInCloudKey"] = Request.Form["kladrInCloudKey"];
                      }
                      if (Request.Form.HasKey("mapsYandexKey"))
                      {
                          AppCore.Config["mapsYandexKey"] = Request.Form["mapsYandexKey"];
                      }
                      if (Request.Form.HasKey("dadataSecretKey"))
                      {
                          AppCore.Config["dadataSecretKey"] = Request.Form["dadataSecretKey"];
                      }
                      if (Request.Form.HasKey("dadataApiKey"))
                      {
                          AppCore.Config["dadataApiKey"] = Request.Form["dadataApiKey"];
                      }

                      AppCore.ConfigurationSave();
                  }

                  return(this.display("admin_adminmain_addresses.tpl"));
              }