Beispiel #1
0
        private void button4_Click(object sender, EventArgs e)
        {
            Dictionary <string, string> serviceInfo = Comms.ExecuteService();

            /*
             * MessageBox.Show("Testing Response: PUB|OK|||5|RSP|1|PST|string|0>|RSP|2|HST|string|13|RSP|3|GST|string|0|RSP|4|SubTotalAmount|string|100|RSP|5|TotalPurchaseAmount|string|113| \nReturn: " + ExecuteService.ParseMessage("PUB|OK|||5|RSP|1|PST|string|0>|RSP|2|HST|string|13|RSP|3|GST|string|0|RSP|4|SubTotalAmount|string|100|RSP|5|TotalPurchaseAmount|string|113|"));
             * MessageBox.Show("Testing Response: PUB|NOT-OK|-4|No team '<teamName>' (ID : <teamID>) found registered in Dbase|| \nReturn: " + ExecuteService.ParseMessage("PUB|NOT-OK|-4|No team '<teamName>' (ID : <teamID>) found registered in Dbase||"));
             * */
        }
Beispiel #2
0
        private void Execute()
        {
            if (ValidateData())
            {
                float  purchaseSubtotal = float.Parse(textBoxPurchaseSubtotal.Text);
                string province         = getCode(comboBoxProvince.SelectedValue.ToString());

                try
                {
                    Dictionary <string, string> serviceInfo = Comms.ExecuteService(purchaseSubtotal, province);
                }
                catch
                {
                    MessageBox.Show("Error executing service: [" + ExecuteService.GetErrorCode() + "] " + ExecuteService.GetErrorMessage());
                    Logger.LogMessage("(PurchaseTotallerInput:Execute) Error executing service: {" + ExecuteService.GetErrorCode() + "} ", ExecuteService.GetErrorMessage());
                }

                this.Close();
                // new PurchaseTotallerResults().Show();
            }
        }