Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string                    supplierId       = textBox1_GHSID.Text;
            string                    businessName     = textBox2_Shop.Text;
            string                    contacts         = textBox3_Name.Text;
            string                    phone            = textBox4_Phone.Text;
            string                    address          = textBox5_Address.Text;
            string                    settlementMethod = comboBox1_Cost.Text;
            SupplierEntity            entity           = new SupplierEntity(supplierId, businessName, contacts, phone, address, settlementMethod);
            ISupplierManageController manageController = new SupplierManageControllerImpl();

            bool term = manageController.InsertSupplierInfo(entity);

            if (term == true)
            {
                WorkerManage form = new WorkerManage();
                MessageBox.Show("添加供货商信息成功");
                this.DialogResult = DialogResult.OK;
                this.Hide();
            }
            else
            {
                MessageBox.Show("添加供货商信息失败!");
            }
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            SupplierEntity            entity           = SupplierUpdate();
            ISupplierManageController manageController = new SupplierManageControllerImpl();
            bool term = manageController.UpdateSupplierInfo(entity, supplierId);

            if (term == true)
            {
                MessageBox.Show("修改供货商信息成功!");
                this.DialogResult = DialogResult.OK;
                this.Hide();
            }
        }