TvDatabase.TvBusinessLayer.GetNewestProgramForChannel C# (CSharp) Method

GetNewestProgramForChannel() public method

public GetNewestProgramForChannel ( int idChannel ) : System.DateTime
idChannel int
return System.DateTime
    public DateTime GetNewestProgramForChannel(int idChannel)
    {
      SqlBuilder sb = new SqlBuilder(StatementType.Select, typeof (Program));
      sb.AddConstraint(Operator.Equals, "idChannel", idChannel);
      sb.AddOrderByField(false, "startTime");
      sb.SetRowLimit(1);
      SqlStatement stmt = sb.GetStatement(true);
      IList<Program> progs = ObjectFactory.GetCollection<Program>(stmt.Execute());
      return progs.Count > 0 ? progs[0].StartTime : DateTime.MinValue;
    }
TvBusinessLayer