public void editData(mstSparePart data) { try { this._carSparePart.EditData(data); } catch (Exception) { throw; } }
public void deleteData(mstSparePart data) { try { this._carSparePart.DeleteData(data); } catch (Exception) { throw; } }
public void DeleteData(mstSparePart data) { try { _uow.Open(DBConnection.BMIERP); _uow.BeginTransaction(); var repo = new mstSparePartRepository(_uow); repo.Delete(data); _uow.CommitTransaction(); } catch (Exception) { _uow.RollbackTransaction(); throw; } finally { _uow.Dispose(); } }
public void SaveDataFacade(mstSparePart data, IUnitofWork uow) { try { var repo = new mstSparePartRepository(uow); if (data.SparePartDescription.Length > 10) { data.SparePartDescription = "Panjang karakter lebih dari 10"; } else { data.SparePartDescription = "Panjang karakter tidak lebih dari 10"; } repo.Add(data); } catch (Exception) { throw; } }