public pl_windowThemPhieuNhap()
        {
            try
            {
                bus_HH  = new bus_HangHoa();
                bus_PN  = new bus_PhieuNhapHang();
                bus_NCC = new bus_NhaCungCap();
                bus_NV  = new bus_NhanVien();

                vo_PN            = new vo_PhieuNhapHang();
                this.DataContext = this.vo_PN;
                InitializeComponent();

                this.InitValue();

                this.cbLoaiHH.Items.Add(new vo_LoaiHangHoa(0, "Tất cả"));
                this.cbLoaiHH.ItemsSource           = this.bus_LoaiHH.getAllLoaiHangHoa();
                this.lvHangHoa.ItemsSource          = this.dsHangHoaTrongKho;
                this.iGridViewPhieuNhap.ItemsSource = this.dsHangHoaCuaPhieuNhap;
                //vo_PN.MaPhieuNhap = this.bus_PN;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Lỗi!", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Exemple #2
0
        public pl_pagePhieuNhapHang()
        {
            InitializeComponent();

            bl_phieuNhap = new bus_PhieuNhapHang();
            this.initGridViewDataSource();
        }
Exemple #3
0
 private void luuGhiChu_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         this.bus_PN = new bus_PhieuNhapHang();
         int id = this.bus_PN.UpdateGhiChuPhieuNhap(this.vo_PN);
         if (id > 0)
         {
             MessageBox.Show("Luu thanh cong!", "Xac nhan!", MessageBoxButton.OK, MessageBoxImage.Information);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Loi!", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Exemple #4
0
        public pl_windowChiTietPhieuNhap(vo_PhieuNhapHang _vo)
        {
            try
            {
                this.bus_PN = new bus_PhieuNhapHang();
                InitializeComponent();

                vo_PN            = this.bus_PN.GetChiTietPhieuNhapHang(_vo.MaPhieuNhap);
                this.DataContext = vo_PN;
                this.iGridViewPhieuNhap.ItemsSource = vo_PN.DsHangHoa;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Loi!", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }