public RefundFromSupplierView(RefundFromSupplierViewModel model)
        {
            InitializeComponent();
            this._ViewModel = model;

            this.DataContext = this._ViewModel;
            if (_ViewModel.PQDetailsEntity != null)
            {
                this.dg1.ItemsSource = this._ViewModel.PQDetailsEntity;
            }
            CustomGridLines.ItemsSource = DataGridTableCollection.GridLines(6, 50).AsEnumerable();
        }
        public RefundFromSupplierView(RefundFromSupplierViewModel model)
        {
            InitializeComponent();
            this._ViewModel = model;

            this.DataContext = this._ViewModel;
            if (_ViewModel.PQDetailsEntity != null)
            {
                this.dg1.ItemsSource = this._ViewModel.PQDetailsEntity;
            }
            if (_ViewModel.MustCompare == true)
            {
                RefundDatepicker.IsEnabled = true;
                PART_TextBox.IsReadOnly    = false;
            }
            else
            {
                btnNew.IsEnabled           = false;
                RefundDatepicker.IsEnabled = false;
                PART_TextBox.IsReadOnly    = true;
            }
            CustomGridLines.ItemsSource = DataGridTableCollection.GridLines(6, 50).AsEnumerable();
        }