コード例 #1
0
 public static void FillObject(Business.DataObjectPollAnswer item, SqlDataReader sqlReader)
 {
     item.Answer   = (int)(sqlReader["Answer"]);
     item.Position = (int)(sqlReader["Position"]);
     item.Comment  = sqlReader["Comment"].ToString();
     item.IP       = sqlReader["IP"].ToString();
 }
コード例 #2
0
 private static void SetParameters(Business.DataObjectPollAnswer item, SqlParameterCollection parameters)
 {
     parameters.AddWithValue("@Position", item.Position);
     parameters.AddWithValue("@Answer", item.Answer);
     if (!string.IsNullOrEmpty(item.Comment))
     {
         parameters.AddWithValue("@AnswerComment", item.Comment);
     }
     else
     {
         parameters.AddWithValue("@AnswerComment", DBNull.Value);
     }
     parameters.AddWithValue("@AnswerIP", item.IP);
 }
コード例 #3
0
        public static string GetUpdateSQL(Business.DataObjectPollAnswer item, SqlParameterCollection parameters)
        {
//            SetParameters(item, parameters);
//            return "UPDATE hiobj_PollAnswer SET [Answer] = @Answer, [Comment] = @AnswerComment";
            return(string.Empty);
        }
コード例 #4
0
 public static string GetInsertSQL(Business.DataObjectPollAnswer item, SqlParameterCollection parameters)
 {
     SetParameters(item, parameters);
     return("INSERT INTO hiobj_PollAnswer ([OBJ_ID],[Position],[Answer],[Comment],[IP]) VALUES (@OBJ_ID,@Position,@Answer,@AnswerComment,@AnswerIP)");
 }