Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromNoteupdateurl(ref DataRow row, Noteupdateurl 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("urldesc", entity.urldesc);
     row.SetField("urlreference", entity.urlreference);
     row.SetField("securefl", entity.securefl);
     row.SetField("requirefl", entity.requirefl);
     row.SetField("transdt", entity.transdt);
     row.SetField("userfield", entity.userfield);
     row.SetField("notecategory", entity.notecategory);
     row.SetField("headerfl", entity.headerfl);
 }
Beispiel #2
0
        public static Noteupdateurl BuildNoteupdateurlFromRow(DataRow row)
        {
            Noteupdateurl entity = new Noteupdateurl();

            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.urldesc      = row.IsNull("urldesc") ? string.Empty : row.Field <string>("urldesc");
            entity.urlreference = row.IsNull("urlreference") ? string.Empty : row.Field <string>("urlreference");
            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");
            entity.notecategory = row.IsNull("notecategory") ? string.Empty : row.Field <string>("notecategory");
            entity.headerfl     = row.Field <bool>("headerfl");
            return(entity);
        }