Exemple #1
0
        public static Loadwlinqhdrresults BuildLoadwlinqhdrresultsFromRow(DataRow row)
        {
            Loadwlinqhdrresults entity = new Loadwlinqhdrresults();

            entity.cono        = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.orderno     = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf    = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.statcd      = row.IsNull("statcd") ? string.Empty : row.Field <string>("statcd");
            entity.lcount      = row.IsNull("lcount") ? 0 : row.Field <int>("lcount");
            entity.enterdt     = row.Field <DateTime?>("enterdt");
            entity.@class      = row.IsNull("class") ? string.Empty : row.Field <string>("class");
            entity.carrier     = row.IsNull("carrier") ? string.Empty : row.Field <string>("carrier");
            entity.shipdt      = row.Field <DateTime?>("shipdt");
            entity.rcvdt       = row.Field <DateTime?>("rcvdt");
            entity.wave        = row.IsNull("wave") ? 0 : row.Field <int>("wave");
            entity.actfreight  = row.IsNull("actfreight") ? decimal.Zero : row.Field <decimal>("actfreight");
            entity.sxenterdt   = row.Field <DateTime?>("sxenterdt");
            entity.sxshipdt    = row.Field <DateTime?>("sxshipdt");
            entity.sxrcvdt     = row.Field <DateTime?>("sxrcvdt");
            entity.addonnet    = row.IsNull("addonnet") ? decimal.Zero : row.Field <decimal>("addonnet");
            entity.outbndfrt   = row.IsNull("outbndfrt") ? decimal.Zero : row.Field <decimal>("outbndfrt");
            entity.sxreqshipdt = row.Field <DateTime?>("sxreqshipdt");
            entity.sxduedt     = row.Field <DateTime?>("sxduedt");
            entity.descrip     = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            return(entity);
        }
Exemple #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadwlinqhdrresults(ref DataRow row, Loadwlinqhdrresults entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("statcd", entity.statcd);
     row.SetField("lcount", entity.lcount);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("class", entity.@class);
     row.SetField("carrier", entity.carrier);
     row.SetField("shipdt", entity.shipdt);
     row.SetField("rcvdt", entity.rcvdt);
     row.SetField("wave", entity.wave);
     row.SetField("actfreight", entity.actfreight);
     row.SetField("sxenterdt", entity.sxenterdt);
     row.SetField("sxshipdt", entity.sxshipdt);
     row.SetField("sxrcvdt", entity.sxrcvdt);
     row.SetField("addonnet", entity.addonnet);
     row.SetField("outbndfrt", entity.outbndfrt);
     row.SetField("sxreqshipdt", entity.sxreqshipdt);
     row.SetField("sxduedt", entity.sxduedt);
     row.SetField("descrip", entity.descrip);
 }