コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSaeawho(ref DataRow row, Saeawho entity)
 {
     row.SetField("seqno", entity.seqno);
     row.SetField("descr", entity.descr);
     row.SetField("type", entity.type);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Saeawho BuildSaeawhoFromRow(DataRow row)
        {
            Saeawho entity = new Saeawho();

            entity.seqno     = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.descr     = row.IsNull("descr") ? string.Empty : row.Field <string>("descr");
            entity.type      = row.IsNull("type") ? string.Empty : row.Field <string>("type");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }