public List <Attraction> GetCheckedAttractions()
        {
            var    httpWebRequest = Request("GetCheckedSoftZoneSale");
            string result         = "";
            var    httpResponse   = (HttpWebResponse)httpWebRequest.GetResponse();
            AttractionsInfoResponce attractionInfoResponce = new AttractionsInfoResponce();

            using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
            {
                result = streamReader.ReadToEnd();
                if (result != "null")
                {
                    string r = result.Remove(result.Length - 1);
                    var    k = JsonConvert.DeserializeObject(result);
                    attractionInfoResponce = JsonConvert.DeserializeObject <AttractionsInfoResponce>(k.ToString());
                    if (attractionInfoResponce.active)
                    {
                        checkBox4.Checked = true;
                    }
                    else
                    {
                        checkBox4.Checked = false;
                    }
                    return(attractionInfoResponce.attractions);
                }
                else
                {
                    throw new Exception("Ошибка получения данных об атракционах.");
                }
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            var httpWebRequest = (HttpWebRequest)WebRequest.Create(APP_PATH + "/api/AttractionInfo/UpdateSoftZoneSale");

            httpWebRequest.ContentType = "application/json";
            httpWebRequest.Method      = "POST";
            AttractionInfoRequest attractionInfoRequest = new AttractionInfoRequest();

            attractionInfoRequest.attractions = checkedAttractions;
            attractionInfoRequest.admin       = admin;
            attractionInfoRequest.active      = checkBox4.Checked;
            using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
            {
                String json = JsonConvert.SerializeObject(attractionInfoRequest);
                streamWriter.Write(json);
                streamWriter.Flush();
                streamWriter.Close();
            }
            string result       = "";
            var    httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
            AttractionsInfoResponce attractionInfoResponce = new AttractionsInfoResponce();

            using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
            {
                result = streamReader.ReadToEnd();
                if (result != "null")
                {
                    string r = result.Remove(result.Length - 1);
                    var    k = JsonConvert.DeserializeObject(result);
                    attractionInfoResponce = JsonConvert.DeserializeObject <AttractionsInfoResponce>(k.ToString());
                    if (attractionInfoResponce.active)
                    {
                        checkBox4.Checked = true;
                    }
                    else
                    {
                        checkBox4.Checked = false;
                    }
                    fillAttractionDataGridView(attractionInfoResponce.attractions);
                    Close();
                }
                else
                {
                    throw new Exception("Ошибка получения данных об атракционах.");
                }
            }
        }