示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOelineedierrorresults(ref DataRow row, Oelineedierrorresults entity)
 {
     row.SetField("corrected", entity.corrected);
     row.SetField("level", entity.level);
     row.SetField("dspllevel", entity.dspllevel);
     row.SetField("lineno", entity.lineno);
     row.SetField("edilineno", entity.edilineno);
     row.SetField("errty", entity.errty);
     row.SetField("fieldid", entity.fieldid);
     row.SetField("fieldty", entity.fieldty);
     row.SetField("errdesc", entity.errdesc);
     row.SetField("edivalue", entity.edivalue);
     row.SetField("sxevalue", entity.sxevalue);
     row.SetField("edierowid", entity.edierowid.ToByteArray());
     row.SetField("errcolor", entity.errcolor);
     row.SetField("transdt", entity.transdt);
     row.SetField("transtm", entity.transtm);
     row.SetField("operinit", entity.operinit);
     row.SetField("selectedfl", entity.selectedfl);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Oelineedierrorresults BuildOelineedierrorresultsFromRow(DataRow row)
        {
            Oelineedierrorresults entity = new Oelineedierrorresults();

            entity.corrected  = row.Field <bool>("corrected");
            entity.level      = row.Field <bool>("level");
            entity.dspllevel  = row.IsNull("dspllevel") ? string.Empty : row.Field <string>("dspllevel");
            entity.lineno     = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.edilineno  = row.IsNull("edilineno") ? string.Empty : row.Field <string>("edilineno");
            entity.errty      = row.IsNull("errty") ? string.Empty : row.Field <string>("errty");
            entity.fieldid    = row.IsNull("fieldid") ? string.Empty : row.Field <string>("fieldid");
            entity.fieldty    = row.IsNull("fieldty") ? string.Empty : row.Field <string>("fieldty");
            entity.errdesc    = row.IsNull("errdesc") ? string.Empty : row.Field <string>("errdesc");
            entity.edivalue   = row.IsNull("edivalue") ? string.Empty : row.Field <string>("edivalue");
            entity.sxevalue   = row.IsNull("sxevalue") ? string.Empty : row.Field <string>("sxevalue");
            entity.edierowid  = row.Field <byte[]>("edierowid").ToStringEncoded();
            entity.errcolor   = row.IsNull("errcolor") ? string.Empty : row.Field <string>("errcolor");
            entity.transdt    = row.Field <DateTime?>("transdt");
            entity.transtm    = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm");
            entity.operinit   = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.selectedfl = row.Field <bool>("selectedfl");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }