Exemple #1
0
        /// <summary>
        /// 确认按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_OK_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(textBox_COM_NAME_BUYER.Text))
            {
                MessageBox.Show("名称不应为空!", "警告");
                return;
            }

            if (string.IsNullOrEmpty(textBox_COM_CODE_BUYER.Text))
            {
                MessageBox.Show("公司代码不应为空!", "警告");
                return;
            }

            if (string.IsNullOrEmpty(textBox_ADDR_BUYER.Text))
            {
                MessageBox.Show("地址不应为空!", "警告");
                return;
            }

            if (string.IsNullOrEmpty(textBox_CONTACT_BUYER.Text))
            {
                MessageBox.Show("联系人不应为空!", "警告");
                return;
            }

            if (string.IsNullOrEmpty(textBox_PHONE_BUYER.Text))
            {
                MessageBox.Show("联系电话不应为空!", "警告");
                return;
            }

            createBuyer(buyer);
            if (addBuyer(buyer))
            {
                offerForm.refresh_buyer_comboBox();
                this.Close();
            }
        }