private void SelectedItem(AccountView pv) { ACC_TRANSACTION ac = Acc_transactionDao.Instance().SelectbyId(pv.id); Account_tranObj = new Account_tran(ac); Account_tranLists = new ObservableCollection <Account_tran>(); Account_tranLists.Add(Account_tranObj); }
public AccountEditVM() { if (AccountViewObj == null) { AccountViewObj = new AccountView(); AccountViewObj.open_date = DateTime.Now; AccountViewObj.last_date = DateTime.Now; Account_tranObj = new Account_tran(); Account_tranObj.fund_date = DateTime.Now; Account_tranObj.txndate = DateTime.Now; } OKCommand = new RelayCommand <Window>((p) => { return(p != null ? true : false); }, (p) => { OKevent(p); }); CancelCommand = new RelayCommand <Window>((p) => true, (p) => { p.Close(); }); }