private SvenTechCollection <SalesType> LoadAllSalesTypes() { SvenTechCollection <SalesType> allSalesTypes = new SvenTechCollection <SalesType>(); allSalesTypes = SalesTypes.GetAll().ToSvenTechCollection(); return(allSalesTypes); }
private void SaveSalesType() { if (SelectedSalesType.SalesTypeId != 0) { SalesTypes.Update(SelectedSalesType); } else { SelectedSalesType.SalesTypeId = SalesTypes.Insert(SelectedSalesType); } }
private void DeleteSalesType() { if (SelectedSalesType == null) { return; } if (SelectedSalesType.SalesTypeId == 0) { _SalesTypes.Remove(SelectedSalesType); SelectedSalesType = null; return; } SalesTypes.Delete(SelectedSalesType.SalesTypeId); _SalesTypes.Remove(SelectedSalesType); SelectedSalesType = null; }