Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCommentcriteria(ref DataRow row, Commentcriteria entity)
 {
     row.SetField("type", entity.type);
     row.SetField("id", entity.id);
     row.SetField("line", entity.line);
     row.SetField("line_sequence", entity.lineSequence);
     row.SetField("comment_line", entity.commentLine);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Commentcriteria BuildCommentcriteriaFromRow(DataRow row)
        {
            Commentcriteria entity = new Commentcriteria();

            entity.type         = row.IsNull("type") ? string.Empty : row.Field <string>("type");
            entity.id           = row.IsNull("id") ? 0 : row.Field <int>("id");
            entity.line         = row.IsNull("line") ? 0 : row.Field <int>("line");
            entity.lineSequence = row.IsNull("line_sequence") ? 0 : row.Field <int>("line_sequence");
            entity.commentLine  = row.IsNull("comment_line") ? 0 : row.Field <int>("comment_line");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }