Ejemplo n.º 1
0
 private void btnThem_Click(object sender, EventArgs e)
 {
     btnXoa.Enabled    = false;
     btnLuu.Enabled    = true;
     btnHuy.Enabled    = true;
     btnThemHD.Enabled = false;
     ResetValues();
     txtSoHDN.Text = DAO.CreateKey("SoHDN");
     LoadDataToGridView();
 }
 private void btnThemHD_Click(object sender, EventArgs e)
 {
     btnXoa.Enabled    = false;
     btnLuu.Enabled    = true;
     btnHuyHD.Enabled  = true;
     btnThemHD.Enabled = false;
     ResetValues();
     txtSoDDH.Text = DAO.CreateKey("SoDDH");
     Load_DataGridViewChitiet();
 }
Ejemplo n.º 3
0
 private void GridViewHoaDonNhap_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     cmbMaNoiThat.Text  = GridViewHoaDonNhap.CurrentRow.Cells["MaNoiThat"].Value.ToString();
     txtTenNoiThat.Text = GridViewHoaDonNhap.CurrentRow.Cells["TenNoiThat"].Value.ToString();
     txtSoLuong.Text    = GridViewHoaDonNhap.CurrentRow.Cells["SoLuong"].Value.ToString();
     txtDonGia.Text     = GridViewHoaDonNhap.CurrentRow.Cells["DonGiaNhap"].Value.ToString();
     txtGiamGia.Text    = GridViewHoaDonNhap.CurrentRow.Cells["GiamGia"].Value.ToString();
     txtThanhTien.Text  = GridViewHoaDonNhap.CurrentRow.Cells["ThanhTien"].Value.ToString();
     txtSoHDN.Text      = DAO.CreateKey("SoHDN");
 }
 private void DataGridViewChitiet_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     cmbMaNoiThat.Text  = DataGridViewChitiet.CurrentRow.Cells["MaNoiThat"].Value.ToString();
     txtTenNoiThat.Text = DataGridViewChitiet.CurrentRow.Cells["TenNoiThat"].Value.ToString();
     txtSoLuong.Text    = DataGridViewChitiet.CurrentRow.Cells["SoLuong"].Value.ToString();
     txtGiamGia.Text    = DataGridViewChitiet.CurrentRow.Cells["GiamGia"].Value.ToString();
     txtThanhTien.Text  = DataGridViewChitiet.CurrentRow.Cells["ThanhTien"].Value.ToString();
     txtDonGiaBan.Text  = DataGridViewChitiet.CurrentRow.Cells["DonGiaBan"].Value.ToString();
     txtSoDDH.Text      = DAO.CreateKey("SoDDH");
 }