Ejemplo n.º 1
0
        public static Wmprimaryreplenishment BuildWmprimaryreplenishmentFromRow(DataRow row)
        {
            Wmprimaryreplenishment entity = new Wmprimaryreplenishment();

            entity.whse          = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.binloc        = row.IsNull("binloc") ? string.Empty : row.Field <string>("binloc");
            entity.prod          = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.descrip       = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.lstoredt      = row.Field <DateTime?>("lstoredt");
            entity.fstoredt      = row.Field <DateTime?>("fstoredt");
            entity.tmstored      = row.IsNull("tmstored") ? 0 : row.Field <int>("tmstored");
            entity.lpickdt       = row.Field <DateTime?>("lpickdt");
            entity.tmpicked      = row.IsNull("tmpicked") ? 0 : row.Field <int>("tmpicked");
            entity.qtyavail      = row.IsNull("qtyavail") ? decimal.Zero : row.Field <decimal>("qtyavail");
            entity.qtyonhand     = row.IsNull("qtyonhand") ? decimal.Zero : row.Field <decimal>("qtyonhand");
            entity.qtycommitted  = row.IsNull("qtycommitted") ? decimal.Zero : row.Field <decimal>("qtycommitted");
            entity.qtyreceived   = row.IsNull("qtyreceived") ? decimal.Zero : row.Field <decimal>("qtyreceived");
            entity.minqty        = row.IsNull("minqty") ? decimal.Zero : row.Field <decimal>("minqty");
            entity.maxqty        = row.IsNull("maxqty") ? decimal.Zero : row.Field <decimal>("maxqty");
            entity.icspnotesfl   = row.IsNull("icspnotesfl") ? string.Empty : row.Field <string>("icspnotesfl");
            entity.icspunitstock = row.IsNull("icspunitstock") ? string.Empty : row.Field <string>("icspunitstock");
            entity.msdsfl        = row.Field <bool>("msdsfl");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            entity.userfield2    = row.IsNull("userfield2") ? string.Empty : row.Field <string>("userfield2");
            return(entity);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWmprimaryreplenishment(ref DataRow row, Wmprimaryreplenishment entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("binloc", entity.binloc);
     row.SetField("prod", entity.prod);
     row.SetField("descrip", entity.descrip);
     row.SetField("lstoredt", entity.lstoredt);
     row.SetField("fstoredt", entity.fstoredt);
     row.SetField("tmstored", entity.tmstored);
     row.SetField("lpickdt", entity.lpickdt);
     row.SetField("tmpicked", entity.tmpicked);
     row.SetField("qtyavail", entity.qtyavail);
     row.SetField("qtyonhand", entity.qtyonhand);
     row.SetField("qtycommitted", entity.qtycommitted);
     row.SetField("qtyreceived", entity.qtyreceived);
     row.SetField("minqty", entity.minqty);
     row.SetField("maxqty", entity.maxqty);
     row.SetField("icspnotesfl", entity.icspnotesfl);
     row.SetField("icspunitstock", entity.icspunitstock);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("userfield", entity.userfield);
     row.SetField("userfield2", entity.userfield2);
 }