public void ShowEditClientDebt(IFormFactory formFactory, IClientDebtRepository clientDebtRepository, int debtId, IMainController mainController) { IEditClientDebtForm form = formFactory.CreateEditClientDebtForm(); ClientDebt clientDebt = clientDebtRepository.GetClientDebtWithId(debtId); form.ShowModal(mainController, clientDebt); }
public void ShowClientDebts(IViewClientDebtsForm form, IClientDebtRepository clientDebtRepository, IMainController mainController) { List <ClientDebt> clientDebts = clientDebtRepository.GetAllClientDebts(); Subject subject = (Subject)clientDebtRepository; subject.Attach((IObserver)form); form.ShowModaless(mainController, clientDebts); }
public MainController(IFormFactory formFactory, IClientDebtRepository clientDebtRepository, IClientRepository clientRepository, IExerciseRepository exerciseRepository, ITrainingGroupRepository trainingGroupRepository, ITrainingPeriodRepository trainingPeriodRepository, ITrainingRepository trainingRepository) { this.formFactory = formFactory; this.clientDebtRepository = clientDebtRepository; this.clientRepository = clientRepository; this.exerciseRepository = exerciseRepository; this.trainingGroupRepository = trainingGroupRepository; this.trainingPeriodRepository = trainingPeriodRepository; this.trainingRepository = trainingRepository; }
public void RemoveClientDebtWithId(int debtId, IClientDebtRepository clientDebtRepository) { clientDebtRepository.RemoveClientDebtWithId(debtId); }
public void EditClientDebtWithId(int debtId, ClientDebt clientDebt, IClientDebtRepository clientDebtRepository) { clientDebtRepository.EditClientDebtWithId(debtId, clientDebt); }
public void AddClientDebt(ClientDebt clientDebt, IClientDebtRepository clientDebtRepository) { clientDebtRepository.AddClientDebt(clientDebt); }
public void RemoveClientWithOib(string oib, IClientRepository clientRepository, IClientDebtRepository clientDebtRepository) { if (clientDebtRepository.GetAllDebtsOfClientWithOib(oib).Count == 0) { clientRepository.RemoveClientWithOib(oib); } else { throw new DependantDataNotDeletableException(); } }