示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromAuditinqprimarykey(ref DataRow row, Auditinqprimarykey entity)
 {
     row.SetField("indexnum", entity.indexnum);
     row.SetField("fieldnm", entity.fieldnm);
     row.SetField("dataty", entity.dataty);
     row.SetField("lbl", entity.lbl);
     row.SetField("fmt", entity.fmt);
     row.SetField("searchvalue", entity.searchvalue);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Auditinqprimarykey BuildAuditinqprimarykeyFromRow(DataRow row)
        {
            Auditinqprimarykey entity = new Auditinqprimarykey();

            entity.indexnum    = row.IsNull("indexnum") ? 0 : row.Field <int>("indexnum");
            entity.fieldnm     = row.IsNull("fieldnm") ? string.Empty : row.Field <string>("fieldnm");
            entity.dataty      = row.IsNull("dataty") ? string.Empty : row.Field <string>("dataty");
            entity.lbl         = row.IsNull("lbl") ? string.Empty : row.Field <string>("lbl");
            entity.fmt         = row.IsNull("fmt") ? string.Empty : row.Field <string>("fmt");
            entity.searchvalue = row.IsNull("searchvalue") ? string.Empty : row.Field <string>("searchvalue");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }