Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromNoteupdatetext(ref DataRow row, Noteupdatetext 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("textdelimiter", entity.textdelimiter);
     row.SetField("textreference", entity.textreference);
     row.SetField("printfl", entity.printfl);
     row.SetField("printfl2", entity.printfl2);
     row.SetField("printfl3", entity.printfl3);
     row.SetField("printfl4", entity.printfl4);
     row.SetField("printfl5", entity.printfl5);
     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 Noteupdatetext BuildNoteupdatetextFromRow(DataRow row)
        {
            Noteupdatetext entity = new Noteupdatetext();

            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.textdelimiter = row.IsNull("textdelimiter") ? string.Empty : row.Field <string>("textdelimiter");
            entity.textreference = row.IsNull("textreference") ? string.Empty : row.Field <string>("textreference");
            entity.printfl       = row.Field <bool>("printfl");
            entity.printfl2      = row.Field <bool>("printfl2");
            entity.printfl3      = row.Field <bool>("printfl3");
            entity.printfl4      = row.Field <bool>("printfl4");
            entity.printfl5      = row.Field <bool>("printfl5");
            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);
        }