Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOelineicspccriteria(ref DataRow row, Oelineicspccriteria entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("whse", entity.whse);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("unitconv", entity.unitconv);
     row.SetField("custreserverowpointer", entity.custreserverowpointer);
     row.SetField("custreserveovrfl", entity.custreserveovrfl);
     row.SetField("custreserveovrpointer", entity.custreserveovrpointer);
     row.SetField("stkqtyship", entity.stkqtyship);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("netavail", entity.netavail);
     row.SetField("recordlimit", entity.recordlimit);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Oelineicspccriteria BuildOelineicspccriteriaFromRow(DataRow row)
        {
            Oelineicspccriteria entity = new Oelineicspccriteria();

            entity.cono     = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.orderno  = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.lineno   = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.whse     = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.qtyord   = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.unitconv = row.IsNull("unitconv") ? decimal.Zero : row.Field <decimal>("unitconv");
            entity.custreserverowpointer = row.IsNull("custreserverowpointer") ? string.Empty : row.Field <string>("custreserverowpointer");
            entity.custreserveovrfl      = row.Field <bool>("custreserveovrfl");
            entity.custreserveovrpointer = row.IsNull("custreserveovrpointer") ? string.Empty : row.Field <string>("custreserveovrpointer");
            entity.stkqtyship            = row.IsNull("stkqtyship") ? decimal.Zero : row.Field <decimal>("stkqtyship");
            entity.qtyship     = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.netavail    = row.IsNull("netavail") ? decimal.Zero : row.Field <decimal>("netavail");
            entity.recordlimit = row.IsNull("recordlimit") ? 0 : row.Field <int>("recordlimit");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }