Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWebextendrecord(ref DataRow row, Webextendrecord entity)
 {
     row.SetField("activefl", entity.activefl);
     row.SetField("cono", entity.cono);
     row.SetField("descrip", entity.descrip);
     row.SetField("extensiontype", entity.extensiontype);
     row.SetField("functionname", entity.functionname);
     row.SetField("operinit", entity.operinit);
     row.SetField("revision", entity.revision);
     row.SetField("rowpointer", entity.rowpointer);
     row.SetField("screenname", entity.screenname);
     row.SetField("settingvalue", entity.settingvalue);
     row.SetField("tag", entity.tag);
     row.SetField("transdt", entity.transdt);
     row.SetField("transproc", entity.transproc);
     row.SetField("transtm", entity.transtm);
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("user3", entity.user3);
     row.SetField("user4", entity.user4);
     row.SetField("user5", entity.user5);
     row.SetField("user6", entity.user6);
     row.SetField("user7", entity.user7);
     row.SetField("user8", entity.user8);
     row.SetField("user9", entity.user9);
     row.SetField("webextendRowID", entity.webextendRowID.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Webextendrecord BuildWebextendrecordFromRow(DataRow row)
        {
            Webextendrecord entity = new Webextendrecord();

            entity.activefl       = row.Field <bool>("activefl");
            entity.cono           = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.descrip        = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.extensiontype  = row.IsNull("extensiontype") ? string.Empty : row.Field <string>("extensiontype");
            entity.functionname   = row.IsNull("functionname") ? string.Empty : row.Field <string>("functionname");
            entity.operinit       = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.revision       = row.IsNull("revision") ? 0 : row.Field <int>("revision");
            entity.rowpointer     = row.IsNull("rowpointer") ? string.Empty : row.Field <string>("rowpointer");
            entity.screenname     = row.IsNull("screenname") ? string.Empty : row.Field <string>("screenname");
            entity.settingvalue   = row.IsNull("settingvalue") ? string.Empty : row.Field <string>("settingvalue");
            entity.tag            = row.IsNull("tag") ? string.Empty : row.Field <string>("tag");
            entity.transdt        = row.Field <DateTime?>("transdt");
            entity.transproc      = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc");
            entity.transtm        = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm");
            entity.user1          = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2          = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.user3          = row.IsNull("user3") ? string.Empty : row.Field <string>("user3");
            entity.user4          = row.IsNull("user4") ? string.Empty : row.Field <string>("user4");
            entity.user5          = row.IsNull("user5") ? string.Empty : row.Field <string>("user5");
            entity.user6          = row.Field <decimal?>("user6");
            entity.user7          = row.Field <decimal?>("user7");
            entity.user8          = row.Field <DateTime?>("user8");
            entity.user9          = row.Field <DateTime?>("user9");
            entity.webextendRowID = row.Field <byte[]>("webextendRowID").ToStringEncoded();
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }