예제 #1
0
        protected async override void OnClick()
        {
            //int test = await AddPortalItem();
            string stationTriplet = "Example: 13202000:ID:USGS";

            System.Windows.Forms.DialogResult res = GeneralTools.ShowInputDialog("Enter station triplet", ref stationTriplet, 400, 80);
            if (res == System.Windows.Forms.DialogResult.OK)
            {
                string[] pieces = stationTriplet.Split(':');
                if (pieces.Length != 3)
                {
                    MessageBox.Show("Please enter a valid station triplet!");
                    return;
                }
                Webservices ws      = new Webservices();
                var         success = await ws.UpdateAoiItemsAsync(stationTriplet.Trim());

                if (success == BA_ReturnCode.Success)
                {
                    MessageBox.Show("PDF items successfully updated for " + stationTriplet, "BAGIS-PRO");
                }
                else
                {
                    MessageBox.Show("PDF item update failed for " + stationTriplet + "!!", "BAGIS-PRO");
                }
            }
        }