internal void DisplayCustomerAccount(Customer customer)
 {
     FoundCustomers.Clear();
     if (customer != null)
     {
         FoundCustomers.Add(new CustomerViewModel(customer));
     }
     RaisePropertyChanged("SelectedCustomer");
     OnDisplayCustomerAccount("");
 }
        private void OnCreateCustomer(string obj)
        {
            FoundCustomers.Clear();
            var c = new Customer
            {
                Address     = AddressSearchText,
                Name        = CustomerNameSearchText,
                PhoneNumber = PhoneNumberSearchText
            };

            FoundCustomers.Add(new CustomerViewModel(c));
            SelectedView = 1;
            RaisePropertyChanged("SelectedCustomer");
        }
        public void RefreshSelectedCustomer()
        {
            ClearSearchValues();

            if (AppServices.MainDataContext.SelectedTicket != null && AppServices.MainDataContext.SelectedTicket.CustomerId > 0)
            {
                var customer = Dao.SingleWithCache <Customer>(x => x.Id == AppServices.MainDataContext.SelectedTicket.CustomerId);
                if (customer != null)
                {
                    FoundCustomers.Add(new CustomerViewModel(customer));
                }
                if (SelectedCustomer != null)
                {
                    SelectedView = 1;
                    SelectedCustomer.UpdateDetailedInfo();
                }
            }
            RaisePropertyChanged("SelectedCustomer");
            RaisePropertyChanged("IsClearVisible");
            RaisePropertyChanged("IsResetCustomerVisible");
            RaisePropertyChanged("IsMakePaymentVisible");
            ActiveView = 0;
            SelectedCustomerTransactions.Clear();
        }