Exemple #1
0
        public static Wtrrarlineextend BuildWtrrarlineextendFromRow(DataRow row)
        {
            Wtrrarlineextend entity = new Wtrrarlineextend();

            entity.rowidWteral      = row.Field <byte[]>("rowid-wteral").ToStringEncoded();
            entity.descrip          = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.descrip2         = row.IsNull("descrip2") ? string.Empty : row.Field <string>("descrip2");
            entity.descripenabled   = row.Field <bool>("descripenabled");
            entity.qtyord           = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.stkqtyord        = row.IsNull("stkqtyord") ? decimal.Zero : row.Field <decimal>("stkqtyord");
            entity.weight           = row.IsNull("weight") ? decimal.Zero : row.Field <decimal>("weight");
            entity.cubes            = row.IsNull("cubes") ? decimal.Zero : row.Field <decimal>("cubes");
            entity.totweight        = row.IsNull("totweight") ? decimal.Zero : row.Field <decimal>("totweight");
            entity.totcubes         = row.IsNull("totcubes") ? decimal.Zero : row.Field <decimal>("totcubes");
            entity.duedt            = row.Field <DateTime?>("duedt");
            entity.bofl             = row.Field <bool>("bofl");
            entity.usagefl          = row.Field <bool>("usagefl");
            entity.usageflenabled   = row.Field <bool>("usageflenabled");
            entity.vendno           = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendnovisible    = row.Field <bool>("vendnovisible");
            entity.prodline         = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.whse             = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.tiedorder        = row.IsNull("tiedorder") ? string.Empty : row.Field <string>("tiedorder");
            entity.tiedorderenabled = row.Field <bool>("tiedorderenabled");
            entity.redisplaylinefl  = row.Field <bool>("redisplaylinefl");
            return(entity);
        }
Exemple #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWtrrarlineextend(ref DataRow row, Wtrrarlineextend entity)
 {
     row.SetField("rowid-wteral", entity.rowidWteral.ToByteArray());
     row.SetField("descrip", entity.descrip);
     row.SetField("descrip2", entity.descrip2);
     row.SetField("descripenabled", entity.descripenabled);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("stkqtyord", entity.stkqtyord);
     row.SetField("weight", entity.weight);
     row.SetField("cubes", entity.cubes);
     row.SetField("totweight", entity.totweight);
     row.SetField("totcubes", entity.totcubes);
     row.SetField("duedt", entity.duedt);
     row.SetField("bofl", entity.bofl);
     row.SetField("usagefl", entity.usagefl);
     row.SetField("usageflenabled", entity.usageflenabled);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendnovisible", entity.vendnovisible);
     row.SetField("prodline", entity.prodline);
     row.SetField("whse", entity.whse);
     row.SetField("tiedorder", entity.tiedorder);
     row.SetField("tiedorderenabled", entity.tiedorderenabled);
     row.SetField("redisplaylinefl", entity.redisplaylinefl);
 }