Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSastplresults(ref DataRow row, Sastplresults entity)
 {
     row.SetField("appname", entity.appname);
     row.SetField("apptype", entity.apptype);
     row.SetField("lastuseddt", entity.lastuseddt);
     row.SetField("lastusedtm", entity.lastusedtm);
     row.SetField("licensedt", entity.licensedt);
     row.SetField("licexpdt", entity.licexpdt);
     row.SetField("msgdt", entity.msgdt);
     row.SetField("numusers", entity.numusers);
     row.SetField("numusertype", entity.numusertype);
     row.SetField("operinit", entity.operinit);
     row.SetField("secure", entity.secure);
     row.SetField("statusfl", entity.statusfl);
     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("userfield", entity.userfield);
     row.SetField("sastplRowID", entity.sastplRowID.ToByteArray());
 }
Exemple #2
0
        public static Sastplresults BuildSastplresultsFromRow(DataRow row)
        {
            Sastplresults entity = new Sastplresults();

            entity.appname     = row.IsNull("appname") ? string.Empty : row.Field <string>("appname");
            entity.apptype     = row.IsNull("apptype") ? string.Empty : row.Field <string>("apptype");
            entity.lastuseddt  = row.Field <DateTime?>("lastuseddt");
            entity.lastusedtm  = row.IsNull("lastusedtm") ? string.Empty : row.Field <string>("lastusedtm");
            entity.licensedt   = row.Field <DateTime?>("licensedt");
            entity.licexpdt    = row.Field <DateTime?>("licexpdt");
            entity.msgdt       = row.Field <DateTime?>("msgdt");
            entity.numusers    = row.IsNull("numusers") ? 0 : row.Field <int>("numusers");
            entity.numusertype = row.IsNull("numusertype") ? string.Empty : row.Field <string>("numusertype");
            entity.operinit    = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.secure      = row.IsNull("secure") ? string.Empty : row.Field <string>("secure");
            entity.statusfl    = row.Field <bool>("statusfl");
            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.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            entity.sastplRowID = row.Field <byte[]>("sastplRowID").ToStringEncoded();
            return(entity);
        }