Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWmreplenishment(ref DataRow row, Wmreplenishment entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("binloc", entity.binloc);
     row.SetField("accepttype", entity.accepttype);
     row.SetField("prod", entity.prod);
     row.SetField("seqno", entity.seqno);
     row.SetField("qtyactual", entity.qtyactual);
     row.SetField("icspnotesfl", entity.icspnotesfl);
     row.SetField("icsplookupnm", entity.icsplookupnm);
     row.SetField("icspunitstock", entity.icspunitstock);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("pickinit", entity.pickinit);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Wmreplenishment BuildWmreplenishmentFromRow(DataRow row)
        {
            Wmreplenishment entity = new Wmreplenishment();

            entity.whse          = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.binloc        = row.IsNull("binloc") ? string.Empty : row.Field <string>("binloc");
            entity.accepttype    = row.IsNull("accepttype") ? string.Empty : row.Field <string>("accepttype");
            entity.prod          = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.seqno         = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.qtyactual     = row.IsNull("qtyactual") ? decimal.Zero : row.Field <decimal>("qtyactual");
            entity.icspnotesfl   = row.IsNull("icspnotesfl") ? string.Empty : row.Field <string>("icspnotesfl");
            entity.icsplookupnm  = row.IsNull("icsplookupnm") ? string.Empty : row.Field <string>("icsplookupnm");
            entity.icspunitstock = row.IsNull("icspunitstock") ? string.Empty : row.Field <string>("icspunitstock");
            entity.msdsfl        = row.Field <bool>("msdsfl");
            entity.pickinit      = row.IsNull("pickinit") ? string.Empty : row.Field <string>("pickinit");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }