Ejemplo n.º 1
0
        private void btnThemNhaCungCap_Click(object sender, EventArgs e)
        {
            NhaCungCap ncc = new NhaCungCap(txtMaNhaCungCap.Text, txtTenNhaCungCap.Text, txtDiaChi.Text, txtSoDienThoai.Text);

            bulncc.themNhaCungCap(ncc);
            MessageBox.Show("Thêm Nhà Cung Cấp Thành Công", "Thêm Nhà Cung Cấp", MessageBoxButtons.OK);
        }
Ejemplo n.º 2
0
 private void btnThem_Click(object sender, EventArgs e)
 {
     try
     {
         BULNhaCungCap bul = new BULNhaCungCap();
         bul.themNhaCungCap(new NhaCungCap(1, txtTenNCC.Text, txtDiaChi.Text));
         frmST.hienDanhSachNhaCungCap();
         MessageBox.Show("Thêm thành công", "Thành công", MessageBoxButtons.OK, MessageBoxIcon.Information);
         this.Close();
     }
     catch (Exception)
     {
         MessageBox.Show("Thao tác thất bạt, dữ liệu sai", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Stop);
     }
 }