Beispiel #1
0
        private void UcRawImported_Loaded(object sender, RoutedEventArgs e)
        {
            NhaCungCapController nhaCungCap = new NhaCungCapController();
            NguyenLieuController nguyenLieu = new NguyenLieuController();
            PhieuNhapController  phieuNhap  = new PhieuNhapController();

            cbbNhaCungCap.ItemsSource    = nhaCungCap.GetName();
            cbbTenNguyenLieu.ItemsSource = nguyenLieu.GetName();

            cbbNhaCungCap.SelectedIndex = 0;

            btnLuu.IsEnabled = false;
            btnHuy.IsEnabled = false;

            cbbTenNguyenLieu.IsEnabled = false;
            txtSoLuongNhap.IsEnabled   = false;
            dtpHanSuDung.IsEnabled     = false;
            txtGia.IsEnabled           = false;
            txtGhiChu.IsEnabled        = false;

            LoadDSPhieuNhap();

            dgvPhieuNhap.Columns[0].Header = "Tên nguyên liệu";
            dgvPhieuNhap.Columns[1].Header = "Số lượng";
            dgvPhieuNhap.Columns[2].Header = "Hạn sử dụng";
            dgvPhieuNhap.Columns[3].Header = "Giá";
            dgvPhieuNhap.Columns[4].Header = "Ghi chú";
            dgvPhieuNhap.Columns[5].Header = "Tổng tiền";
        }
        private void UcRawUsed_Loaded(object sender, RoutedEventArgs e)
        {
            NguyenLieuController nguyenLieu = new NguyenLieuController();
            PhieuXuatController  phieuXuat  = new PhieuXuatController();

            cbbTenNguyenLieu.ItemsSource = nguyenLieu.GetName();

            btnLuu.IsEnabled = false;
            btnHuy.IsEnabled = false;

            cbbTenNguyenLieu.IsEnabled = false;
            txtSoLuong.IsEnabled       = false;
            txtGhiChu.IsEnabled        = false;

            LoadDSPhieuXuat();

            dgvPhieuXuat.Columns[0].Header = "Tên nguyên liệu";
            dgvPhieuXuat.Columns[1].Header = "Số lượng";
            dgvPhieuXuat.Columns[2].Header = "Ghi chú";
        }