示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            SimpleService sv = new SimpleService();
            string message = "";
            button4.Enabled = false;

            if (textBox1.Text == "")
            {
                MessageBox.Show("請輸入帳號!");
                return;
            }

            if (textBox2.Text == "")
            {
                MessageBox.Show("請輸入密碼!");
                return;
            }

            if (textBox3.Text == "")
            {
                MessageBox.Show("請輸入起始單字數量!");
                return;
            }
            else {
                if (!IsNumeric(textBox3.Text))
                {
                    MessageBox.Show("起始單字數量必須是數字!");
                    return;
                }
            }

            if (textBox4.Text == "")
            {
                MessageBox.Show("請輸入價格!");
                return;
            }
            else {
                if (!IsNumeric(textBox4.Text))
                {
                    MessageBox.Show("價格必須是數字!");
                    return;
                }
            }

            bool IsAdd = sv.OrderAddOrderInfo(textBox1.Text,textBox2.Text,int.Parse(textBox3.Text), int.Parse(textBox4.Text), out message);

            if (IsAdd)
            {
                MessageBox.Show(message);
            }
            else {
                MessageBox.Show(message);
                return;
            }

            // listview repeat
            AddListView();
        }
示例#2
0
 // 改變訂單使用狀態
 private void ChangeOrderInfoStatus(int id, int NowEnCount, int status, int IsCheck)
 {
     string message = "";
     try
     {
         SimpleService nfu_service = new SimpleService();
         bool isSuccess = nfu_service.OrderChangeOrderInfoStatus(id, NowEnCount, status, IsCheck, out message);
     }
     catch (Exception ex)
     {
         MessageBox.Show("無法取得【更改訂單狀態】服務");
     }
 }
示例#3
0
        private string SearchOrderInfo()
        {
            SimpleService sv = new SimpleService();
            string OrderInfoData = "";
            string message = "";

            
            bool IsGet = sv.OrderSearchOrderInfo(out OrderInfoData, out message);

            if (IsGet)
            {
                return OrderInfoData;
            }
            else {
                return message;
            }            
        }