Example #1
0
 private void btnXacNhan_Click(object sender, EventArgs e)
 {
     if (_nccService.ThemNhaCungCap(getNhaCungCap()))
     {
         _main.dataGridView.DataSource = _nccService.DanhSachNhaCungCap();
         this.Close();
     }
     ViewErrors();
 }
Example #2
0
        private void btnXacNhan_Click(object sender, EventArgs e)
        {
            NhaCungCap ncc = _main.getNhaCungCap();

            ncc.tenncc = txtTenNCC.Text.Trim();
            ncc.diachi = txtDiaChi.Text.Trim();
            ncc.sdt    = txtDienThoai.Text.Trim();
            ncc.email  = txtEmail.Text.Trim();

            if (_nccService.SuaNhaCungCap(ncc))
            {
                _main.dataGridView.DataSource = _nccService.DanhSachNhaCungCap();
                this.Close();
            }
            ViewErrors();
        }
Example #3
0
 private void btnNCC_Click(object sender, EventArgs e)
 {
     txtTimKiem.Clear();
     lblHienHanh.Text        = "Nhà cung cấp";
     dataGridView.DataSource = _nccService.DanhSachNhaCungCap();
 }