Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeersdetaillineoeers(ref DataRow row, Oeersdetaillineoeers entity)
 {
     row.SetField("botype", entity.botype);
     row.SetField("commentfl", entity.commentfl);
     row.SetField("dofl", entity.dofl);
     row.SetField("lineno", entity.lineno);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("proddesc2", entity.proddesc2);
     row.SetField("returnfl", entity.returnfl);
     row.SetField("qtyavail", entity.qtyavail);
     row.SetField("qtybo", entity.qtybo);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("serlottype", entity.serlottype);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("specnstype", entity.specnstype);
     row.SetField("unit", entity.unit);
     row.SetField("serlotdisp", entity.serlotdisp);
     row.SetField("qtyshipdisp", entity.qtyshipdisp);
     row.SetField("enableline", entity.enableline);
     row.SetField("msdsfl", entity.msdsfl);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Oeersdetaillineoeers BuildOeersdetaillineoeersFromRow(DataRow row)
        {
            Oeersdetaillineoeers entity = new Oeersdetaillineoeers();

            entity.botype      = row.IsNull("botype") ? string.Empty : row.Field <string>("botype");
            entity.commentfl   = row.IsNull("commentfl") ? string.Empty : row.Field <string>("commentfl");
            entity.dofl        = row.IsNull("dofl") ? string.Empty : row.Field <string>("dofl");
            entity.lineno      = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.orderno     = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf    = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.ordertype   = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.proddesc    = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.proddesc2   = row.IsNull("proddesc2") ? string.Empty : row.Field <string>("proddesc2");
            entity.returnfl    = row.Field <bool>("returnfl");
            entity.qtyavail    = row.IsNull("qtyavail") ? decimal.Zero : row.Field <decimal>("qtyavail");
            entity.qtybo       = row.IsNull("qtybo") ? decimal.Zero : row.Field <decimal>("qtybo");
            entity.qtyord      = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.qtyship     = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.serlottype  = row.IsNull("serlottype") ? string.Empty : row.Field <string>("serlottype");
            entity.shipprod    = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.specnstype  = row.IsNull("specnstype") ? string.Empty : row.Field <string>("specnstype");
            entity.unit        = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.serlotdisp  = row.IsNull("serlotdisp") ? string.Empty : row.Field <string>("serlotdisp");
            entity.qtyshipdisp = row.IsNull("qtyshipdisp") ? decimal.Zero : row.Field <decimal>("qtyshipdisp");
            entity.enableline  = row.Field <bool>("enableline");
            entity.msdsfl      = row.Field <bool>("msdsfl");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }