/// <summary> /// Creates a new instance of the sol_QueryDate class and populates it with data from the specified SqlDataReader. /// </summary> protected virtual Sol_QueryDate MakeSol_QueryDate(SqlDataReader dataReader) { Sol_QueryDate sol_QueryDate = new Sol_QueryDate(); sol_QueryDate.DateFrom = SqlClientUtility.GetDateTime(dataReader, "DateFrom", new DateTime(0)); sol_QueryDate.DateTo = SqlClientUtility.GetDateTime(dataReader, "DateTo", new DateTime(0)); sol_QueryDate.UserName = SqlClientUtility.GetString(dataReader, "UserName", String.Empty); return(sol_QueryDate); }
/// <summary> /// Updates a record in the sol_QueryDate table. /// </summary> public virtual void Update(Sol_QueryDate sol_QueryDate) { ValidationUtility.ValidateArgument("sol_QueryDate", sol_QueryDate); SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@DateFrom", sol_QueryDate.DateFrom), new SqlParameter("@DateTo", sol_QueryDate.DateTo), new SqlParameter("@UserName", sol_QueryDate.UserName) }; SqlClientUtility.ExecuteNonQuery(connectionStringName, CommandType.StoredProcedure, "sol_QueryDate_Update", parameters); }
/// <summary> /// Selects all records from the sol_QueryDate table. /// </summary> public virtual List <Sol_QueryDate> SelectAll() { using (SqlDataReader dataReader = SqlClientUtility.ExecuteReader(connectionStringName, CommandType.StoredProcedure, "sol_QueryDate_SelectAll")) { List <Sol_QueryDate> sol_QueryDateList = new List <Sol_QueryDate>(); while (dataReader.Read()) { Sol_QueryDate sol_QueryDate = MakeSol_QueryDate(dataReader); sol_QueryDateList.Add(sol_QueryDate); } return(sol_QueryDateList); } }