/// <summary> /// Initializes a new instance of the StatusViewModel class. /// </summary> /// public StatusViewModel() { var s = new StatusInfo() { StatusMessage = "Welcome to Coopcheck", ErrorMessage = "", IsBusy =false }; Status = s; Messenger.Default.Register<NotificationMessage<StatusInfo>>(this, message => { Status = ObjectCopier.Clone(message.Content); //if (Status.ShowMessageBox) //{ // Messenger.Default.Send(new NotificationMessage(Notifications.ShowPopupStatus)); // Status.ShowMessageBox = false; //} }); }
public async void PhoneJobMgr() { Status = new StatusInfo() { StatusMessage = "placing call...", }; var j = JobSvc.GetJob(SelectedPayment.job_num.GetValueOrDefault()); PhoneSvc.PlaceAudioCall(PhoneSvc.SearchForContacts(j.projmgr).FirstOrDefault()); Status = new StatusInfo() { StatusMessage = String.Format("call has been placed ") }; }
public async void PhonePayee() { Status = new StatusInfo() { StatusMessage = "placing call...", }; PhoneSvc.PlaceAudioCall(SelectedPayment.phone_number); Status = new StatusInfo() { StatusMessage = String.Format("call has been placed ") }; }
public async void GetPayments() { Status = new StatusInfo() { ErrorMessage = "", IsBusy = true, StatusMessage = "getting payments..." }; try { Payments = await Task<ObservableCollection<vwPayment>>.Factory.StartNew(() => { return new ObservableCollection<vwPayment>(Notifications.RptSvc.GetPayments()); }); } catch (Exception e) { Status = new StatusInfo() { StatusMessage = "Error loading payments", ErrorMessage = e.Message }; } }
public async void EmailJobMgr() { Status = new StatusInfo() { StatusMessage = "creating email", IsBusy = true }; await Task.Factory.StartNew(() => { try { var j = JobSvc.GetJob(SelectedPayment.job_num.GetValueOrDefault()); var h = ListToHTMLTable.GetTable<vwPayment>(SelectedPayments, x => x.first_name, x => x.last_name); EmailSvc.CreateOutlookEmail(new List<string>() {j.projmgr }, string.Format("Job manager payment info {0} - {1}", j.job_num, j.jobname), h); } catch (Exception ex) { Status = new StatusInfo() { StatusMessage = String.Format("failed to create email "), ErrorMessage = ex.Message }; } }); Status = new StatusInfo() { StatusMessage = String.Format("check number {0} has been emailed ", SelectedPayment.check_num) }; }
public async void EmailPayee() { Status = new StatusInfo() { StatusMessage = "creating email", IsBusy = true }; await Task.Factory.StartNew(() => { try { var h = ListToHTMLTable.GetTable<vwPayment>(SelectedPayments, x => x.first_name, x => x.last_name); EmailSvc.CreateOutlookEmail(new List<string>() {SelectedPayment.email}, string.Format("payment info {0} check number {1}", SelectedPayment.pay_date, SelectedPayment.check_num), h); } catch (Exception ex) { Status = new StatusInfo() { StatusMessage = String.Format("failed to create email "), ErrorMessage = ex.Message }; } }); Status = new StatusInfo() { StatusMessage = String.Format("check number {0} has been emailed ", SelectedPayment.check_num) }; }
public async void EmailOther() { Status = new StatusInfo() { StatusMessage = "creating email", IsBusy = true }; await Task.Factory.StartNew(() => { try { var h = ListToHTMLTable.GetTable<vwPayment>(SelectedPayments, x => x.first_name, x => x.last_name); EmailSvc.CreateOutlookEmail(null, string.Format("payment info {0} check number {1}", SelectedPayment.pay_date, SelectedPayment.check_num), h); // if we are sending a file it should be pathed //@"c:\temp\63185842-0eca-4880-be37-f4194440d064.wma"); } catch (Exception ex) { Status = new StatusInfo() { StatusMessage = String.Format("failed to create email "), ErrorMessage = ex.Message }; } }); Status = new StatusInfo() { StatusMessage = String.Format("check number {0} has been emailed ", SelectedPayment.check_num) }; }