public void AddClient(object param) { // save to database _dao.Add(NewClient); // reset the view NewClient = new Client(); OnPropertyChanged("NewClientName"); OnPropertyChanged("NewClientContact"); OnPropertyChanged("NewClientPhone"); OnPropertyChanged("NewClientEmail"); OnPropertyChanged("NewClientStatus"); SelectedStateOption = Statuses.First(); RefreshClients(); }
public ClientTabVM() { Name = "Clients"; _dao = new SqliteDataAccess(); RefreshClients(); Statuses.Add(new ComboBoxItem() { ComboBoxOption = "Active" }); Statuses.Add(new ComboBoxItem() { ComboBoxOption = "Inactive" }); SelectedStateOption = Statuses.First(); }
public List <List <string> > GetPDFDAta() { List <List <string> > ListOfRecord = new List <List <string> >(); foreach (var item in ReportRecords) { List <string> SingleRecord = new List <string>(); if (PdfFilterZeus) { SingleRecord.Add(item.Zeus); } if (PdfFilterStatus) { SingleRecord.Add(Statuses.First(x => x.Id.Equals(item.StatusID)).Name.ToString()); } if (PdfFilterEndDate) { SingleRecord.Add(item.EndDate); } if (PdfFilterGamma) { SingleRecord.Add(Gammas.First(x => x.Id.Equals(item.GammaID)).Name.ToString()); } if (PdfFilterBeta) { SingleRecord.Add(Betas.First(x => x.Id.Equals(item.BetaID)).Name.ToString()); } if (PdfFilterAlpha) { SingleRecord.Add(Alphas.First(x => x.Id.Equals(item.AlphaID)).Name.ToString()); } if (PdfFilterHera) { SingleRecord.Add(item.Hera); } if (PdfFilterDelta) { SingleRecord.Add(Deltas.First(x => x.Id.Equals(item.DeltaID)).Name.ToString()); } if (PdfFilterBeginDate) { SingleRecord.Add(item.BeginDate); } if (PdfFilterPoseidon) { SingleRecord.Add(item.Poseidon); } if (PdfFilterAres) { SingleRecord.Add(item.Ares); } if (PdfFilterAthena) { SingleRecord.Add(item.Athena); } if (PdfFilterTheta) { SingleRecord.Add(Thetas.First(x => x.Id.Equals(item.ThetaID)).Name.ToString()); } if (PdfFilterArtemis) { SingleRecord.Add(item.Artemis); } if (PdfFilterTargetDate) { SingleRecord.Add(item.TargetDate); } if (PdfFilterApollo) { SingleRecord.Add(item.Apollo); } ListOfRecord.Add(SingleRecord); } return(ListOfRecord); }
public Guid ResolveStatusId(string text) { return(Statuses.First(item => item.Text == text).Id); }