public void GetAllFields(Action<List<FieldModel>> callback) { FieldRepository fieldRepository = new FieldRepository(); ViewCallback = callback; GetAllFieldsCallback handler = new GetAllFieldsCallback(GetAllFieldsCompleted); fieldRepository.getAllFields(new Action<List<FieldModel>>(handler)); }
public void GetFieldById(Action<FieldModel> callback, int id) { FieldRepository fieldRepository = new FieldRepository(); ViewFieldByIdCallback = callback; GetFieldByIdCallback handler = new GetFieldByIdCallback(GetFieldByIdCompleted); fieldRepository.getFieldById(new Action<FieldModel>(handler),id); }
public void SaveField(Action<int> callback, FieldModel fieldModel) { FieldRepository fieldRepository = new FieldRepository(); ViewSaveFieldCallback = callback; SaveFieldCallback handler = new SaveFieldCallback(SaveFieldCompleted); fieldRepository.saveField(new Action<int>(handler), fieldModel); }