Ejemplo n.º 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;
        }
Ejemplo n.º 2
0
 public void ValidateModel(ITipeBarangModel model)
 {
     _modelDAC.ValidateModel(model);
 }
Ejemplo n.º 3
0
 public void Update(ITipeBarangModel model)
 {
     ValidateModel(model);
     _repo.Update(model);
 }
Ejemplo n.º 4
0
 public void Delete(ITipeBarangModel model)
 {
     _repo.Delete(model);
 }
Ejemplo n.º 5
0
 public void Insert(ITipeBarangModel model)
 {
     ValidateModel(model);
     _repo.Insert(model);
 }