コード例 #1
0
ファイル: TimelineForward.cs プロジェクト: magicJhon/Game
 public TimelineForward[] GetSubForward()
 {
     DataTable dt = DBHelper.GetDataTable(" select * from timeline_forward where from_id = " + ID.ToString(),
         Util.ConnectionStringMall.Trim());
     TimelineForward[] timelineForwardArr = new TimelineForward[dt.Rows.Count];
     for (int i = 0; i < dt.Rows.Count; i++)
     {
         timelineForwardArr[i] = new TimelineForward();
         timelineForwardArr[i]._fields = dt.Rows[i];
     }
     return timelineForwardArr;
 }
コード例 #2
0
ファイル: TimelineForward.cs プロジェクト: magicJhon/Game
    public TimelineForward[] GetSubForward()
    {
        DataTable dt = DBHelper.GetDataTable(" select * from timeline_forward where from_id = " + ID.ToString(),
                                             Util.ConnectionStringMall.Trim());

        TimelineForward[] timelineForwardArr = new TimelineForward[dt.Rows.Count];
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            timelineForwardArr[i]         = new TimelineForward();
            timelineForwardArr[i]._fields = dt.Rows[i];
        }
        return(timelineForwardArr);
    }
コード例 #3
0
ファイル: TimelineForward.cs プロジェクト: magicJhon/Game
    public static void ComputeForwardTimesForOriginUsers(int actId)
    {
        DataTable dt = DBHelper.GetDataTable(" select * from timeline_forward where from_id = 0 and act_id = " + actId.ToString(), Util.ConnectionStringMall);

        foreach (DataRow dr in dt.Rows)
        {
            if (int.Parse(dr["from_id"].ToString().Trim()) == 0)
            {
                TimelineForward timelineForward = new TimelineForward();
                timelineForward._fields = dr;
                timelineForward.GetSubForwardNum();
            }
        }
    }
コード例 #4
0
ファイル: TimelineForward.cs プロジェクト: zzcbyl/Game
    public static TimelineForward CreateForward(int userId, int actId, int fatherUId)
    {
        string[,] insertParameters = { { "uid", "int", userId.ToString() }, { "act_id", "int", actId.ToString() }, { "from_uid", "int", fatherUId.ToString() } };

        TimelineForward timeLineForward;

        int i = DBHelper.InsertData("timeline_forward", insertParameters, Util.ConnectionStringMall);
        if (i == 1)
        {
            timeLineForward = new TimelineForward(userId, actId, fatherUId);
        }
        else
        {
            timeLineForward = new TimelineForward();
        }
        return timeLineForward;
    }
コード例 #5
0
ファイル: TimelineForward.cs プロジェクト: magicJhon/Game
    public static TimelineForward CreateForward(int userId, int actId, int fatherId)
    {
        string[,] insertParameters = { { "uid", "int", userId.ToString() }, { "act_id", "int", actId.ToString() }, { "from_id", "int", fatherId.ToString() } };

        TimelineForward timeLineForward;

        int i = DBHelper.InsertData("timeline_forward", insertParameters, Util.ConnectionStringMall);

        if (i == 1)
        {
            timeLineForward = new TimelineForward(userId, actId);
        }
        else
        {
            timeLineForward = new TimelineForward();
        }
        return(timeLineForward);
    }
コード例 #6
0
ファイル: TimelineForward.cs プロジェクト: magicJhon/Game
 public static void ComputeForwardTimesForOriginUsers(int actId)
 {
     DataTable dt = DBHelper.GetDataTable(" select * from timeline_forward where from_id = 0 and act_id = " + actId.ToString(), Util.ConnectionStringMall);
     foreach (DataRow dr in dt.Rows)
     {
         if (int.Parse(dr["from_id"].ToString().Trim()) == 0)
         {
             TimelineForward timelineForward = new TimelineForward();
             timelineForward._fields = dr;
             timelineForward.GetSubForwardNum();
         }
     }
 }