Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeheaderediresults(ref DataRow row, Oeheaderediresults entity)
 {
     row.SetField("approvty", entity.approvty);
     row.SetField("approvtyenabled", entity.approvtyenabled);
     row.SetField("hdrerr", entity.hdrerr);
     row.SetField("hdrexc", entity.hdrexc);
     row.SetField("lnerr", entity.lnerr);
     row.SetField("lnexc", entity.lnexc);
     row.SetField("errcnt", entity.errcnt);
     row.SetField("exccnt", entity.exccnt);
     row.SetField("lfirsttime", entity.lfirsttime);
     row.SetField("origerrcnt", entity.origerrcnt);
     row.SetField("origexccnt", entity.origexccnt);
     row.SetField("lrefreshcnt", entity.lrefreshcnt);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Oeheaderediresults BuildOeheaderediresultsFromRow(DataRow row)
        {
            Oeheaderediresults entity = new Oeheaderediresults();

            entity.approvty        = row.IsNull("approvty") ? string.Empty : row.Field <string>("approvty");
            entity.approvtyenabled = row.Field <bool>("approvtyenabled");
            entity.hdrerr          = row.IsNull("hdrerr") ? 0 : row.Field <int>("hdrerr");
            entity.hdrexc          = row.IsNull("hdrexc") ? 0 : row.Field <int>("hdrexc");
            entity.lnerr           = row.IsNull("lnerr") ? 0 : row.Field <int>("lnerr");
            entity.lnexc           = row.IsNull("lnexc") ? 0 : row.Field <int>("lnexc");
            entity.errcnt          = row.IsNull("errcnt") ? 0 : row.Field <int>("errcnt");
            entity.exccnt          = row.IsNull("exccnt") ? 0 : row.Field <int>("exccnt");
            entity.lfirsttime      = row.Field <bool>("lfirsttime");
            entity.origerrcnt      = row.IsNull("origerrcnt") ? 0 : row.Field <int>("origerrcnt");
            entity.origexccnt      = row.IsNull("origexccnt") ? 0 : row.Field <int>("origexccnt");
            entity.lrefreshcnt     = row.Field <bool>("lrefreshcnt");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }