Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromKitcrossrefcriteria(ref DataRow row, Kitcrossrefcriteria entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("type", entity.type);
     row.SetField("qty", entity.qty);
     row.SetField("unit", entity.unit);
     row.SetField("fabwhse", entity.fabwhse);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Kitcrossrefcriteria BuildKitcrossrefcriteriaFromRow(DataRow row)
        {
            Kitcrossrefcriteria entity = new Kitcrossrefcriteria();

            entity.prod      = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.type      = row.IsNull("type") ? string.Empty : row.Field <string>("type");
            entity.qty       = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty");
            entity.unit      = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.fabwhse   = row.IsNull("fabwhse") ? string.Empty : row.Field <string>("fabwhse");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }