public SatuanEntryView(bool isNewData = true, ISatuanModel model = null) { InitializeComponent(); _isNewData = isNewData; panelUp.LabelInfo = isNewData ? $"TAMBAH {_typeName.ToUpper()}" : $"UBAH {_typeName.ToUpper()}"; if (!_isNewData) { _model = model; textBoxNama.Text = _model.nama; textBoxKeterangan.Text = _model.keterangan; } operationButtons.OnSaveButtonClick += OperationButtons_OnSaveButtonClick; }
public void ValidateModel(ISatuanModel model) { _modelDAC.ValidateModel(model); }
public void Update(ISatuanModel model) { ValidateModel(model); _repo.Update(model); }
public void Delete(ISatuanModel model) { _repo.Delete(model); }
public void Insert(ISatuanModel model) { ValidateModel(model); _repo.Insert(model); }