public static void DeletePlatform(PlatformDto pPlatform, out Result pResult) { pResult = new Result(); using (var _db = new Rbr_Db()) { _db.BeginTransaction(); try { var _currNode = PlatformManager.GetNode(_db, CurrentPlatformNode.Id); if (_currNode.Platform_id == pPlatform.PlatformId) { throw new Exception("Cannot delete Current Platform."); } var _platformRow = MapToPlatformRow(pPlatform); PlatformManager.DeletePlatform(_db, _platformRow); _db.CommitTransaction(); } catch (Exception _ex) { _db.RollbackTransaction(); pResult.Success = false; pResult.ErrorMessage = _ex.Message; TimokLogger.Instance.LogRbr(LogSeverity.Critical, "PlatformController.DeletePlatform", string.Format("Exception:\r\n{0}", _ex)); } } }