0
 public static CustomizeCourseCompletionWithModuleList GetCustomizeCourseCompletionWithModuleList()
{
    var cmd = new StoredProcedure
    {
        CommandText = "CustomizeCourseCompletionWithModuleSelectById",
        CommandType = System.Data.CommandType.StoredProcedure
    };
    cmd.Parameters.Add("@ID", DBNull.Value);
    return DataPortal.Fetch<CustomizeCourseCompletionWithModuleList>(cmd);
}

最後に、DataPortal を返す代わりに DataTable を返したいのですが、どうすればよいですか?

CustomizeCourseCompletionWwithModuleList クラス:

public class CustomizeCourseCompletionWithModuleList : BusinessListBase<CustomizeCourseCompletionWithModule>
{
    #region  Business Methods

    public CustomizeCourseCompletionWithModule GetItem(int childId)
    {
        return this.FirstOrDefault(child => child.Id == childId);
    }

    public override void Remove(int childId)
    {
        foreach (var child in this.Where(child => child.Id == childId))
        {
            RemoveChild(child);
            break;
        }
    }

    public bool Contains(int childId)
    {
        return this.Any(child => child.Id == childId);
    }

    public bool ContainsDeleted(int childId)
    {
        return DeletedList.Any(child => child.Id == childId && child.IsDeleted);
    }

    #endregion

StoredProcedure :

public class StoredProcedure : ICloneable
{
    private Parameters _parameters = new Parameters();
    private string _procName;

    public StoredProcedure(string name)
    {
        _procName = name;
        CommandType = System.Data.CommandType.StoredProcedure;
    }

    public StoredProcedure()
    {
        CommandType = System.Data.CommandType.StoredProcedure;
    }

    [DataMember]
    public String CommandText
    {
        get { return _procName; }
        set { _procName = value; }
    }

    [DataMember]
    public System.Data.CommandType CommandType { get; set; }
    [DataMember]
    public string Name
    {
        get { return _procName; }
        set { _procName = value; }
    }
    [DataMember]
    public Parameters Parameters
    {
        get { return _parameters; }
        set { _parameters = value; }
    }


    #region ICloneable Members

    object ICloneable.Clone()
    {
        return GetClone();
    }

    [EditorBrowsable(EditorBrowsableState.Advanced)]
    protected virtual object GetClone()
    {
        return ObjectCloner.Clone(this);
    }

    #endregion
}

他の情報が必要な場合は、お問い合わせください。適切な回答が得られます。前もって感謝します。

4

1 に答える 1