static void GetMeetingTimesByGroupId(Repeater myRepeater, string group_id, DataRowView row) { using (SqlConnection connection = new Arena.DataLib.SqlDbConnection().GetDbConnection()) { // Create the command and set its properties. SqlCommand command = new SqlCommand(); command.Connection = connection; command.CommandText = "smgp_sp_JFBC_get_groupStartAndEndTimesByGroupID"; command.CommandType = CommandType.StoredProcedure; // Add the input parameter and set its properties. SqlParameter parameter = new SqlParameter(); parameter.ParameterName = "@group_id"; parameter.SqlDbType = SqlDbType.Int; parameter.Direction = ParameterDirection.Input; parameter.Value = group_id; // Add the parameter to the Parameters collection. command.Parameters.Add(parameter); // Open the connection and execute the reader. connection.Open(); SqlDataReader reader = command.ExecuteReader(); myRepeater.DataSource = reader; //myRepeater.ItemDataBound += Schedule_Repeater_ItemDataBound(); myRepeater.DataBind(); reader.Close(); } }
static void GetMeetingTimesByGroupId(Repeater myRepeater, string group_id, DataRowView row) { using (SqlConnection connection = new Arena.DataLib.SqlDbConnection().GetDbConnection()) { // Create the command and set its properties. SqlCommand command = new SqlCommand(); command.Connection = connection; command.CommandText = "smgp_sp_JFBC_get_groupStartAndEndTimesByGroupID"; command.CommandType = CommandType.StoredProcedure; // Add the input parameter and set its properties. SqlParameter parameter = new SqlParameter(); parameter.ParameterName = "@group_id"; parameter.SqlDbType = SqlDbType.Int; parameter.Direction = ParameterDirection.Input; parameter.Value = group_id; // Add the parameter to the Parameters collection. command.Parameters.Add(parameter); // Open the connection and execute the reader. connection.Open(); SqlDataReader reader = command.ExecuteReader(); myRepeater.DataSource = reader; //myRepeater.ItemDataBound += Schedule_Repeater_ItemDataBound(); myRepeater.DataBind(); reader.Close(); } }