Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromNotecreateurl(ref DataRow row, Notecreateurl entity)
 {
     row.SetField("tablename", entity.tablename);
     row.SetField("primarykey", entity.primarykey);
     row.SetField("secondarykey", entity.secondarykey);
     row.SetField("urldesc", entity.urldesc);
     row.SetField("urlreference", entity.urlreference);
     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);
     row.SetField("notecategory", entity.notecategory);
     row.SetField("headerfl", entity.headerfl);
 }
Esempio n. 2
0
        public static Notecreateurl BuildNotecreateurlFromRow(DataRow row)
        {
            Notecreateurl entity = new Notecreateurl();

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