public object GetEntityByPerameters(object Entity, Dictionary <string, COM.MyEnumration.Operation> parFields) { object objEntity = null; try { objEntity = new COM.DBHelper().GetEnityByPerameters(Entity, parFields); } catch (Exception) { objEntity = null; throw; } finally { if (sqlCON != null) { if (sqlCON.State == ConnectionState.Open) { sqlCON.Close(); } COM.MySqlConnection.GetConnection.CloseConnection(sqlCON); sqlCON.Dispose(); } } return(objEntity); }
public object GetEntityByPrimartKey(object Entity) { object objEntity = null; try { objEntity = new COM.DBHelper().GetEnityByPrimaryKey(Entity); } catch (Exception) { objEntity = null; throw; } finally { if (sqlCON != null) { if (sqlCON.State == ConnectionState.Open) { sqlCON.Close(); } COM.MySqlConnection.GetConnection.CloseConnection(sqlCON); sqlCON.Dispose(); } } return(objEntity); }