Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWtrrarreptlistresults(ref DataRow row, Wtrrarreptlistresults entity)
 {
     row.SetField("reportno", entity.reportno);
     row.SetField("shipfmwhse", entity.shipfmwhse);
     row.SetField("shipfmname", entity.shipfmname);
     row.SetField("shiptowhse", entity.shiptowhse);
     row.SetField("shiptoname", entity.shiptoname);
     row.SetField("duedt", entity.duedt);
     row.SetField("reqshipdt", entity.reqshipdt);
     row.SetField("nolines", entity.nolines);
     row.SetField("mergefl", entity.mergefl);
     row.SetField("totsuper", entity.totsuper);
     row.SetField("amounti", entity.amounti);
     row.SetField("totlineamtdec", entity.totlineamtdec);
     row.SetField("rowid-wterah", entity.rowidWterah.ToByteArray());
     row.SetField("seqno", entity.seqno);
     row.SetField("rushfl", entity.rushfl);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Wtrrarreptlistresults BuildWtrrarreptlistresultsFromRow(DataRow row)
        {
            Wtrrarreptlistresults entity = new Wtrrarreptlistresults();

            entity.reportno      = row.IsNull("reportno") ? 0 : row.Field <int>("reportno");
            entity.shipfmwhse    = row.IsNull("shipfmwhse") ? string.Empty : row.Field <string>("shipfmwhse");
            entity.shipfmname    = row.IsNull("shipfmname") ? string.Empty : row.Field <string>("shipfmname");
            entity.shiptowhse    = row.IsNull("shiptowhse") ? string.Empty : row.Field <string>("shiptowhse");
            entity.shiptoname    = row.IsNull("shiptoname") ? string.Empty : row.Field <string>("shiptoname");
            entity.duedt         = row.Field <DateTime?>("duedt");
            entity.reqshipdt     = row.Field <DateTime?>("reqshipdt");
            entity.nolines       = row.IsNull("nolines") ? 0 : row.Field <int>("nolines");
            entity.mergefl       = row.Field <bool>("mergefl");
            entity.totsuper      = row.IsNull("totsuper") ? 0 : row.Field <int>("totsuper");
            entity.amounti       = row.IsNull("amounti") ? 0 : row.Field <int>("amounti");
            entity.totlineamtdec = row.IsNull("totlineamtdec") ? decimal.Zero : row.Field <decimal>("totlineamtdec");
            entity.rowidWterah   = row.Field <byte[]>("rowid-wterah").ToStringEncoded();
            entity.seqno         = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.rushfl        = row.Field <bool>("rushfl");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }