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