Ejemplo n.º 1
0
        public void Save(string Fieldedcar_Make, string Fieldedcar_Model, string Fieldedcar_Owner, int Fieldedcar_Year)
        {
            bool isnew = _fieldedCar.CarID == 0;

            DataAccess.UpdateCar(_fieldedCar);
            if (isnew)
            {
                _sortedCars.CommitNew();
                _sortedCars.MoveCurrentTo(_fieldedCar);
            }
            else
            {
                _sortedCars.CommitEdit();
            }
            _carList.Sort();
            _sortedCars.Refresh();
            ScreenEditingMode = false;
        }
Ejemplo n.º 2
0
        public void Save(bool fieldedService_IsValidState, bool screenEditingMode)
        {
            bool isnew = _fieldedService.ServiceID == 0;

            _fieldedService.ServiceLineList.RemoveAll(SL => SL.Delete != 0);


            DataAccess.UpdateService(_fieldedService);
            if (isnew)
            {
                _sortedServices.CommitNew();
                _sortedServices.MoveCurrentTo(_fieldedService);
            }
            else
            {
                _sortedServices.CommitEdit();
            }
            _serviceList.Sort();
            _sortedServices.Refresh();
            ServiceLines.Refresh();
            NotifyOfPropertyChange(() => CanDelete);
            ScreenEditingMode = false;
        }