public TipeEntryView(bool isNewData = true, ITipeModel 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(ITipeModel model) { _modelDAC.ValidateModel(model); }
public void Update(ITipeModel model) { ValidateModel(model); _repo.Update(model); }
public void Delete(ITipeModel model) { _repo.Delete(model); }
public void Insert(ITipeModel model) { ValidateModel(model); _repo.Insert(model); }