Ejemplo n.º 1
0
 private void Refresh_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
 {
     try
     {
         this.dsHangHoa = bus_HH.GetAllHangHoa();
         this.iGridViewPhieuNhap.ItemsSource = this.dsHangHoa;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Loi!", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Ejemplo n.º 2
0
        public pl_pageHangHoa()
        {
            try
            {
                bus_HH         = new bus_HangHoa();
                this.dsHangHoa = bus_HH.GetAllHangHoa();
                InitializeComponent();

                this.iGridViewPhieuNhap.ItemsSource = this.dsHangHoa;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Loi!", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Ejemplo n.º 3
0
 private void loadPage()
 {
     try
     {
         hoaDon = new vo_HoaDon();
         //load danh sach hang hoa
         dsHangHoa             = bus_hangHoa.GetAllHangHoa();
         lvHangHoa.ItemsSource = dsHangHoa;
         //danh sach chi tiet hoa don
         dsHangHoaHoaDon      = new ObservableCollection <vo_HangHoaHoaDon>();
         gvHoaDon.ItemsSource = dsHangHoaHoaDon;
         //danh sach khach hang
         this.hoaDon.TenNhanVien = CurrentUser.User.HoTen;
         this.hoaDon.MaNhanVien  = CurrentUser.User.MaNhanVien;
         hoaDon.MaHoaDon         = bus_hoaDon.GenerateMaHoaDon();
         this.hoaDon.ThoiGian    = Utilities.DotNetToVietNam(DateTime.Now.ToString());
         this.DataContext        = hoaDon;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Loi!", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }