コード例 #1
0
        private SvenTechCollection <SalesType> LoadAllSalesTypes()
        {
            SvenTechCollection <SalesType> allSalesTypes = new SvenTechCollection <SalesType>();

            allSalesTypes = SalesTypes.GetAll().ToSvenTechCollection();

            return(allSalesTypes);
        }
コード例 #2
0
 private void SaveSalesType()
 {
     if (SelectedSalesType.SalesTypeId != 0)
     {
         SalesTypes.Update(SelectedSalesType);
     }
     else
     {
         SelectedSalesType.SalesTypeId = SalesTypes.Insert(SelectedSalesType);
     }
 }
コード例 #3
0
        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;
        }