/// <summary> /// /// </summary> /// <param name="TradingConfigID"></param> internal bool DeleteTradingConfigByID(int TradingConfigID) { bool Result = false; System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(DBConnection.DBConnection.Connection); DSTableAdapters.TradingConfigTableAdapter adap = new DSTableAdapters.TradingConfigTableAdapter(); try { conn.Open(); adap.Connection = conn; adap.DeleteTradingConfigByTradingConfigID(TradingConfigID); Result = true; } catch (Exception ex) { Result = false; } finally { adap.Connection.Close(); conn.Close(); } return Result; }
/// <summary> /// delete funcion /// Delete trading config by id /// </summary> /// <param name="id"></param> /// <param name="connect"></param> /// <returns></returns> internal bool DFDeleteByID(int id,SqlConnection connect) { DSTableAdapters.TradingConfigTableAdapter adap = new DSTableAdapters.TradingConfigTableAdapter(); adap.Connection = connect; int effectRow= adap.DeleteTradingConfigByTradingConfigID(id); if (effectRow == 1) { return true; } else { return false; } }