public PurchaseInvoicePandSView(PurchaseInvoicePandSViewModel model) { InitializeComponent(); this.pandsViewModel = model; // this.pandsViewModel = PurchaseQuotationViewModel.GetInstance(); this.DataContext = this.pandsViewModel; if (pandsViewModel.PQDetailsEntity != null) { this.grdPandS.ItemsSource = this.pandsViewModel.PQDetailsEntity; } if (pandsViewModel.MustCompare == true) { PART_TextBox.IsReadOnly = false; PART_TextBox1.IsReadOnly = false; PayDueDatepicker.IsEnabled = true; InvoiceDatepicker.IsEnabled = true; } else { btnNew.IsEnabled = false; PART_TextBox.IsReadOnly = true; PART_TextBox1.IsReadOnly = true; PayDueDatepicker.IsEnabled = false; InvoiceDatepicker.IsEnabled = false; } CustomGridLines.ItemsSource = DataGridTableCollection.GridLines(8, 50).AsEnumerable(); }
public PurchaseInvoicePandSView(PurchaseInvoicePandSViewModel model) { InitializeComponent(); this.pandsViewModel = model; // this.pandsViewModel = PurchaseQuotationViewModel.GetInstance(); this.DataContext = this.pandsViewModel; if (pandsViewModel.PQDetailsEntity != null) { this.grdPandS.ItemsSource = this.pandsViewModel.PQDetailsEntity; } CustomGridLines.ItemsSource = DataGridTableCollection.GridLines(8, 50).AsEnumerable(); }