Ejemplo n.º 1
0
        private void ShowDialog(VMMessageDailog dm)
        {
            var messageWindow = new ModalDailogWindow(dm);

            messageWindow.ShowDialog();
            //dm.Callback(messageWindow.DialogResult);
        }
 private void OnEditCustomer()
 {
     try
     {
         var childVM = new AddCustomerViewModel(this.Messenger, this.UserLogin,
                                                this.Entity.InternalList.FirstOrDefault(x => x.IsSelected))
         {
             ParentViewModel = this
         };
         childVM.RefreshCustomers += this.GetCustomerCollection;
         //childVM.SaveCustomer +=
         //    customer => CustomerAction.UpdateCustomer(this.DBConnectionString,
         //                                              this.Entity.InternalList.FirstOrDefault(x => x.IsSelected));
         var messageDailog = new VMMessageDailog()
         {
             ChildViewModel = childVM
         };
         MessengerInstance.Send(messageDailog);
     }
     catch (Exception exception)
     {
         NLogLogger.LogError(exception, TitleResources.Error, ExceptionResources.ExceptionOccured,
                             ExceptionResources.ExceptionOccuredLogDetail);
     }
 }
Ejemplo n.º 3
0
        public void OnEditHearingAIDItem()
        {
            var childVM = new AddCustomerHearingAidOrderViewModel(this.Messenger, this.UserLogin, this.Entity.CustomerHearingAidOrderCollection.FirstOrDefault(x => x.IsSelected))
            {
                ParentViewModel = this
            };

            childVM.RefreshCustomerHearingAIDOrder += this.RefreshCustomerHearingAidOrderCollection;
            var messageDailog = new VMMessageDailog()
            {
                ChildViewModel = childVM
            };

            MessengerInstance.Send(messageDailog);
        }
        public override void OnEditItem()
        {
            var childVM = new AddReminderViewModel(this.Messenger, this.UserLogin, this.Entity.InternalList.FirstOrDefault(x => x.IsSelected))
            {
                ParentViewModel = this
            };

            childVM.RefreshReminders += this.GetReminderCollectionByDate;
            var messageDailog = new VMMessageDailog()
            {
                ChildViewModel = childVM
            };

            MessengerInstance.Send(messageDailog);
        }
        public override void OnEditItem()
        {
            var childVM = new AppointmentViewModel(this.Messenger, this.UserLogin, this.Entity.InternalList.FirstOrDefault(x => x.IsSelected), this.SelectedCustomer)
            {
                ParentViewModel = this
            };

            childVM.RefreshCustomerAppointment += this.GetCustomerAppointments;
            var messageDailog = new VMMessageDailog()
            {
                ChildViewModel = childVM
            };

            MessengerInstance.Send(messageDailog);
        }
        public override void OnEditItem()
        {
            var childVM = new AddCustomerWarrantyInformedViewModel(this.Messenger, this.UserLogin, this.Entity.InternalList.FirstOrDefault(x => x.IsSelected))
            {
                ParentViewModel = this
            };

            childVM.RefreshCustomerWarrantyInformed += this.GetRefreshCustomerWarrantyInformedCollection;
            var messageDailog = new VMMessageDailog()
            {
                ChildViewModel = childVM
            };

            MessengerInstance.Send(messageDailog);
        }
Ejemplo n.º 7
0
 private void OnPrintEarMoldReceipt()
 {
     try
     {
         var childVM = new PrintViewModel(this.Messenger, this.UserLogin, this.Entity.CustomerEarMoldOrderCollection.FirstOrDefault(x => x.IsSelected))
         {
             ParentViewModel = this
         };
         var messageDailog = new VMMessageDailog()
         {
             ChildViewModel = childVM
         };
         MessengerInstance.Send(messageDailog);
     }
     catch (Exception exception)
     {
         NLogLogger.LogError(exception, TitleResources.Error, ExceptionResources.ExceptionOccured,
                             ExceptionResources.ExceptionOccuredLogDetail);
     }
 }
Ejemplo n.º 8
0
 public void OnAddHearingAIDItem()
 {
     try
     {
         var childVM = new AddCustomerHearingAidOrderViewModel(this.Messenger, this.UserLogin, this.Entity)
         {
             ParentViewModel = this
         };
         childVM.RefreshCustomerHearingAIDOrder += this.RefreshCustomerHearingAidOrderCollection;
         var messageDailog = new VMMessageDailog()
         {
             ChildViewModel = childVM
         };
         MessengerInstance.Send(messageDailog);
     }
     catch (Exception exception)
     {
         NLogLogger.LogError(exception, TitleResources.Error, ExceptionResources.ExceptionOccured,
                             ExceptionResources.ExceptionOccuredLogDetail);
     }
 }
 private void OnAddAppointment()
 {
     try
     {
         var childVM = new AppointmentViewModel(this.MessengerInstance, this.UserLogin,
                                                this.Entity.InternalList.FirstOrDefault(x => x.IsSelected))
         {
             ParentViewModel = this.ParentViewModel
         };
         var messageDailog = new VMMessageDailog()
         {
             ChildViewModel = childVM
         };
         MessengerInstance.Send(messageDailog);
     }
     catch (Exception exception)
     {
         NLogLogger.LogError(exception, TitleResources.Error, ExceptionResources.ExceptionOccured,
                             ExceptionResources.ExceptionOccuredLogDetail);
     }
 }
 private void OnAddCustomer()
 {
     try
     {
         var childVM = new AddCustomerViewModel(this.Messenger, this.UserLogin)
         {
             ParentViewModel = this
         };
         childVM.RefreshCustomers += this.GetCustomerCollection;
         var messageDailog = new VMMessageDailog()
         {
             ChildViewModel = childVM
         };
         MessengerInstance.Send(messageDailog);
     }
     catch (Exception exception)
     {
         NLogLogger.LogError(exception, TitleResources.Error, ExceptionResources.ExceptionOccured,
                             ExceptionResources.ExceptionOccuredLogDetail);
     }
 }
 private void OnUpdateRepairStatus()
 {
     try
     {
         var childVM = new UpdateCustomerRepairStatusViewModel(this.Messenger, this.UserLogin, this.Entity.InternalList.FirstOrDefault(x => x.IsSelected))
         {
             ParentViewModel = this
         };
         childVM.RefreshCustomerRepair += this.GetRefreshCustomerRepairCollection;
         var messageDailog = new VMMessageDailog()
         {
             ChildViewModel = childVM
         };
         MessengerInstance.Send(messageDailog);
     }
     catch (Exception exception)
     {
         NLogLogger.LogError(exception, TitleResources.Error, ExceptionResources.ExceptionOccured,
                             ExceptionResources.ExceptionOccuredLogDetail);
     }
 }
Ejemplo n.º 12
0
 public override void OnAddItem()
 {
     try
     {
         var childVM = new AddCallLogViewModel(this.Messenger, this.UserLogin)
         {
             ParentViewModel = this
         };
         childVM.RefreshCallRegistry += this.GetCallRegisterCollectionByDate;
         var messageDailog = new VMMessageDailog()
         {
             ChildViewModel = childVM
         };
         MessengerInstance.Send(messageDailog);
     }
     catch (Exception exception)
     {
         NLogLogger.LogError(exception, TitleResources.Error, ExceptionResources.ExceptionOccured,
                             ExceptionResources.ExceptionOccuredLogDetail);
     }
 }
 public override void OnAddItem()
 {
     try
     {
         var childVM = new AppointmentViewModel(this.Messenger, this.UserLogin, this.SelectedCustomer)
         {
             ParentViewModel = this
         };
         childVM.RefreshCustomerAppointment += this.GetCustomerAppointments;
         var messageDailog = new VMMessageDailog()
         {
             ChildViewModel = childVM
         };
         MessengerInstance.Send(messageDailog);
     }
     catch (Exception exception)
     {
         NLogLogger.LogError(exception, TitleResources.Error, ExceptionResources.ExceptionOccured,
                             ExceptionResources.ExceptionOccuredLogDetail);
     }
 }
Ejemplo n.º 14
0
 public ModalDailogWindow(VMMessageDailog vmMessageDailog)
 {
     VMMessageDailog = vmMessageDailog;
     ApplyVM();
     Container = CreateContainer();
 }