Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromRssjcomponents(ref DataRow row, Rssjcomponents entity)
 {
     row.SetField("groupnm", entity.groupnm);
     row.SetField("componentnm", entity.componentnm);
     row.SetField("cono", entity.cono);
     row.SetField("inusety", entity.inusety);
     row.SetField("pidno", entity.pidno);
     row.SetField("posno", entity.posno);
     row.SetField("priority", entity.priority);
     row.SetField("reportfl", entity.reportfl);
     row.SetField("jobtmp", entity.jobtmp);
     row.SetField("grouptmp", entity.grouptmp);
     row.SetField("inusetydesc", entity.inusetydesc);
     row.SetField("rssjcrowid", entity.rssjcrowid.ToByteArray());
     row.SetField("conoenabled", entity.conoenabled);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Rssjcomponents BuildRssjcomponentsFromRow(DataRow row)
        {
            Rssjcomponents entity = new Rssjcomponents();

            entity.groupnm     = row.IsNull("groupnm") ? string.Empty : row.Field <string>("groupnm");
            entity.componentnm = row.IsNull("componentnm") ? string.Empty : row.Field <string>("componentnm");
            entity.cono        = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.inusety     = row.IsNull("inusety") ? string.Empty : row.Field <string>("inusety");
            entity.pidno       = row.IsNull("pidno") ? 0 : row.Field <int>("pidno");
            entity.posno       = row.IsNull("posno") ? 0 : row.Field <int>("posno");
            entity.priority    = row.IsNull("priority") ? 0 : row.Field <int>("priority");
            entity.reportfl    = row.Field <bool>("reportfl");
            entity.jobtmp      = row.IsNull("jobtmp") ? string.Empty : row.Field <string>("jobtmp");
            entity.grouptmp    = row.IsNull("grouptmp") ? string.Empty : row.Field <string>("grouptmp");
            entity.inusetydesc = row.IsNull("inusetydesc") ? string.Empty : row.Field <string>("inusetydesc");
            entity.rssjcrowid  = row.Field <byte[]>("rssjcrowid").ToStringEncoded();
            entity.conoenabled = row.Field <bool>("conoenabled");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }