private void Click_Them(object sender, RoutedEventArgs e) { ThemHangHoa a = new ThemHangHoa(); a.ShowDialog(); LoadDuLieu(); }
//thêm hàng hoá private void navBarItem4_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { HangHoaDTO HangHoaDTO = new HangHoaDTO() { ConQuanLy = true }; ThemHangHoa frm = new ThemHangHoa(true, HangHoaDTO); frm.ShowDialog(); }
private void btnThem_Click(object sender, EventArgs e) { HangHoaDTO HangHoaDTO = new HangHoaDTO() { ConQuanLy = true }; ThemHangHoa frm = new ThemHangHoa(true, HangHoaDTO); frm.ShowDialog(); hienThi(); }
private void btnSua_Click(object sender, EventArgs e) { _currentRowIndex = gridView1.FocusedRowHandle; if (_currentRowIndex < 0) { return; } HangHoaDTO HangHoaDTO = new HangHoaDTO() { MaHang = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["MaHang"]).ToString(), TenHang = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["TenHang"]).ToString(), DonVi = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["DonVi"]).ToString(), GiaMua = int.Parse(gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["GiaMua"]).ToString()), GiaBan = int.Parse(gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["GiaBan"]).ToString()), NhomHang = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["NhomHang"]).ToString(), TenKho = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["TenKho"]).ToString(), ConQuanLy = bool.Parse(gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["ConQuanLy"]).ToString()), }; ThemHangHoa frm = new ThemHangHoa(false, HangHoaDTO); frm.ShowDialog(); hienThi(); }