public GlCashCostCenterChildWindow(GlCashTransactionViewModel viewModel) { InitializeComponent(); DataContext = viewModel; _viewModel = viewModel; _viewModel.GetSubDetailData(); }
public GlCashTransaction(TblGlCashTypeSetting setting, ObservableCollection <Entity> entityList) { InitializeComponent(); _setting = setting; _viewModel = new GlCashTransactionViewModel(setting, entityList); DataContext = _viewModel; _viewModel.PremCompleted += (s, sv) => { if (_viewModel.CustomePermissions.SingleOrDefault(x => x.Ename == "Approval") != null) { BtnApprove.Visibility = Visibility.Visible; } else { BtnApprove.Visibility = Visibility.Collapsed; } if (_viewModel.CustomePermissions.SingleOrDefault(x => x.Ename == "DefaultBank") != null) { ChaingSetupMethod.GetSettings("GlCashTransaction", _viewModel.Client); } }; SwitchFormMode(FormMode.Add); //if (setting.Iserial == 1) //{ DetailGrid.Columns.SingleOrDefault(x => x.SortMemberPath == "CostCenter").Visibility = Visibility.Visible; //} }
public GlCashTransactionChildWindow(GlCashTransactionViewModel viewModel) { InitializeComponent(); _viewModel = viewModel; DataContext = _viewModel; }