Exemplo n.º 1
0
        private void btnLuu_Click(object sender, EventArgs e)
        {
            NhaCungCap.name    = txtTen.Text;
            NhaCungCap.phone   = txtSdt.Text;
            NhaCungCap.email   = txtEmail.Text;
            NhaCungCap.address = txtDiaChi.Text;

            if ((BusNhaCungCap.GetInstance()).Update(NhaCungCap))
            {
                DialogResult = DialogResult.OK;
                this.Close();
            }
            else
            {
                DialogResult = DialogResult.Cancel;
                XtraMessageBox.Show("Có lỗi trong quá trình cập nhật", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
                this.Close();
            }
        }