public DataSet GetPigeonByGender(BIZ.PigeonDetails pigeonDetails) { try { DataSet dataResult = new DataSet(); dbconn = new DatabaseConnection(); dbconn.DatabaseConn("GetPigeonList"); if (dbconn.sqlConn.State == ConnectionState.Open) { dbconn.sqlConn.Close(); } dbconn.sqlConn.Open(); dbconn.sqlComm.CommandTimeout = 0; dbconn.sqlComm.Parameters.Clear(); dbconn.sqlComm.Parameters.AddWithValue("@UserID", pigeonDetails.UserID); dbconn.sqlComm.Parameters.AddWithValue("@Gender", pigeonDetails.Gender); SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = dbconn.sqlComm; da.Fill(dataResult); dbconn.sqlConn.Close(); return(dataResult); } catch (Exception ex) { throw ex; } }
public DataSet GetPigeonList(BIZ.PigeonDetails pigeonDetails) { try { DataSet dataResult = new DataSet(); dbconn = new DatabaseConnection(); dbconn.DatabaseConn("PigeonDetailsGetAll"); if (dbconn.sqlConn.State == ConnectionState.Open) { dbconn.sqlConn.Close(); } dbconn.sqlConn.Open(); dbconn.sqlComm.Parameters.Clear(); dbconn.sqlComm.Parameters.AddWithValue("@UserID", pigeonDetails.UserID); dbconn.sqlComm.Parameters.AddWithValue("@PigeonID", pigeonDetails.PigeonID); dbconn.sqlComm.Parameters.AddWithValue("@Gender", pigeonDetails.FilterGender); dbconn.sqlComm.Parameters.AddWithValue("@Year", pigeonDetails.FilterYear); dbconn.sqlComm.Parameters.AddWithValue("@Breed", pigeonDetails.FilterBreed); dbconn.sqlComm.Parameters.AddWithValue("@PigeonName", pigeonDetails.FilterPigeonName); SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = dbconn.sqlComm; da.Fill(dataResult); dbconn.sqlConn.Close(); return(dataResult); } catch (Exception ex) { throw ex; } }