private void Button_Them_Click(object sender, RoutedEventArgs e) { // Thêm kho xuống database ThemKho them = new ThemKho(); them.Show(); }
//thêm kho private void navBarItem6_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { KhoDTO KhoDTO = new KhoDTO() { ConQuanLy = true }; ThemKho frm = new ThemKho(true, KhoDTO); frm.ShowDialog(); }
private void btnThem_Click(object sender, EventArgs e) { KhoDTO KhoDTO = new KhoDTO() { ConQuanLy = true }; ThemKho frm = new ThemKho(true, KhoDTO); frm.ShowDialog(); hienThi(); }
private void btnSua_Click(object sender, EventArgs e) { _currentRowIndex = gridView1.FocusedRowHandle; if (_currentRowIndex < 0) { return; } KhoDTO KhoDTO = new KhoDTO() { MaKho = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["MaKho"]).ToString(), TenKho = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["TenKho"]).ToString(), DiaChiKho = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["DiaChiKho"]).ToString(), DTKho = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["DTKho"]).ToString(), ghichu = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["ghichu"]).ToString(), ConQuanLy = bool.Parse(gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["ConQuanLy"]).ToString()), }; ThemKho frm = new ThemKho(false, KhoDTO); frm.ShowDialog(); hienThi(); }