Example #1
0
        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;
        }
Example #2
0
 public void ValidateModel(ITipeModel model)
 {
     _modelDAC.ValidateModel(model);
 }
Example #3
0
 public void Update(ITipeModel model)
 {
     ValidateModel(model);
     _repo.Update(model);
 }
Example #4
0
 public void Delete(ITipeModel model)
 {
     _repo.Delete(model);
 }
Example #5
0
 public void Insert(ITipeModel model)
 {
     ValidateModel(model);
     _repo.Insert(model);
 }