Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromNotecreatefile(ref DataRow row, Notecreatefile entity)
 {
     row.SetField("tablename", entity.tablename);
     row.SetField("primarykey", entity.primarykey);
     row.SetField("secondarykey", entity.secondarykey);
     row.SetField("filedesc", entity.filedesc);
     row.SetField("filereference", entity.filereference);
     row.SetField("securefl", entity.securefl);
     row.SetField("requirefl", entity.requirefl);
     row.SetField("pageno", entity.pageno);
     row.SetField("transdt", entity.transdt);
     row.SetField("note-rowid", entity.noteRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Notecreatefile BuildNotecreatefileFromRow(DataRow row)
        {
            Notecreatefile entity = new Notecreatefile();

            entity.tablename     = row.IsNull("tablename") ? string.Empty : row.Field <string>("tablename");
            entity.primarykey    = row.IsNull("primarykey") ? string.Empty : row.Field <string>("primarykey");
            entity.secondarykey  = row.IsNull("secondarykey") ? string.Empty : row.Field <string>("secondarykey");
            entity.filedesc      = row.IsNull("filedesc") ? string.Empty : row.Field <string>("filedesc");
            entity.filereference = row.IsNull("filereference") ? string.Empty : row.Field <string>("filereference");
            entity.securefl      = row.Field <bool>("securefl");
            entity.requirefl     = row.Field <bool>("requirefl");
            entity.pageno        = row.IsNull("pageno") ? 0 : row.Field <int>("pageno");
            entity.transdt       = row.Field <DateTime?>("transdt");
            entity.noteRowid     = row.Field <byte[]>("note-rowid").ToStringEncoded();
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }