Beispiel #1
0
        public static Oereturnparams BuildOereturnparamsFromRow(DataRow row)
        {
            Oereturnparams entity = new Oereturnparams();

            entity.orderno     = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf    = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.prod        = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.specnstype  = row.IsNull("specnstype") ? string.Empty : row.Field <string>("specnstype");
            entity.unit        = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.unitconv    = row.IsNull("unitconv") ? decimal.Zero : row.Field <decimal>("unitconv");
            entity.qtyord      = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.kitfl       = row.Field <bool>("kitfl");
            entity.tallyfl     = row.Field <bool>("tallyfl");
            entity.serlottype  = row.IsNull("serlottype") ? string.Empty : row.Field <string>("serlottype");
            entity.corertnty   = row.IsNull("corertnty") ? string.Empty : row.Field <string>("corertnty");
            entity.crreasonty  = row.IsNull("crreasonty") ? string.Empty : row.Field <string>("crreasonty");
            entity.retorderno  = row.IsNull("retorderno") ? 0 : row.Field <int>("retorderno");
            entity.retordersuf = row.IsNull("retordersuf") ? 0 : row.Field <int>("retordersuf");
            entity.retlineno   = row.IsNull("retlineno") ? 0 : row.Field <int>("retlineno");
            entity.qtyunavail  = row.IsNull("qtyunavail") ? decimal.Zero : row.Field <decimal>("qtyunavail");
            entity.qtyreturn   = row.IsNull("qtyreturn") ? decimal.Zero : row.Field <decimal>("qtyreturn");
            entity.warrstagecd = row.IsNull("warrstagecd") ? 0 : row.Field <int>("warrstagecd");
            entity.createpofl  = row.Field <bool>("createpofl");
            entity.qtyship     = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Beispiel #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOereturnparams(ref DataRow row, Oereturnparams entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("prod", entity.prod);
     row.SetField("specnstype", entity.specnstype);
     row.SetField("unit", entity.unit);
     row.SetField("unitconv", entity.unitconv);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("kitfl", entity.kitfl);
     row.SetField("tallyfl", entity.tallyfl);
     row.SetField("serlottype", entity.serlottype);
     row.SetField("corertnty", entity.corertnty);
     row.SetField("crreasonty", entity.crreasonty);
     row.SetField("retorderno", entity.retorderno);
     row.SetField("retordersuf", entity.retordersuf);
     row.SetField("retlineno", entity.retlineno);
     row.SetField("qtyunavail", entity.qtyunavail);
     row.SetField("qtyreturn", entity.qtyreturn);
     row.SetField("warrstagecd", entity.warrstagecd);
     row.SetField("createpofl", entity.createpofl);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("userfield", entity.userfield);
 }