Exemplo n.º 1
0
        private async void Btn_delete_Click(object sender, EventArgs e)
        {
            string url    = "https://localhost:5001/api/Route/delete?routeId=" + route.RouteId;
            Client client = new Client();

            try
            {
                HttpResponseMessage result = await client.Delete(url);

                if (result.IsSuccessStatusCode)
                {
                    UC_AllSites uc_as = new UC_AllSites(changePanel, TravelTitle, travelId);
                    changePanel(uc_as);
                }
                else
                {
                    using (Form_Tips tip = new Form_Tips("警告", "初始化信息失败"))
                    {
                        tip.ShowDialog();
                    }
                }
            }
            catch (Exception ex)
            {
                using (Form_Tips tip = new Form_Tips("警告", ex.Message))
                {
                    tip.ShowDialog();
                }
            }
        }
Exemplo n.º 2
0
        private void Btn_TravelTitle_Click(object sender, EventArgs e)
        {
            UC_AllSites uc_AllSites = new UC_AllSites(changePanel, travelTiltle, travelID);

            changePanel(uc_AllSites);
        }
Exemplo n.º 3
0
        private void Btn_backToRoute_Click(object sender, EventArgs e)
        {
            UC_AllSites uc_as = new UC_AllSites(changePanel, TravelTitle, travelId);

            changePanel(uc_as);
        }