Ejemplo n.º 1
0
        private void Button_Them_Click(object sender, RoutedEventArgs e)
        {
            // Thêm kho xuống database
            ThemKho them = new ThemKho();

            them.Show();
        }
Ejemplo n.º 2
0
        //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();
        }
Ejemplo n.º 3
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            KhoDTO KhoDTO = new KhoDTO()
            {
                ConQuanLy = true
            };
            ThemKho frm = new ThemKho(true, KhoDTO);

            frm.ShowDialog();

            hienThi();
        }
Ejemplo n.º 4
0
        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();
        }