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

            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.noteRowid     = row.Field <byte[]>("note-rowid").ToStringEncoded();
            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.transdt       = row.Field <DateTime?>("transdt");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }