Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVarollcstprcupdate(ref DataRow row, Varollcstprcupdate entity)
 {
     row.SetField("ourproc", entity.ourproc);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("qty", entity.qty);
     row.SetField("unit", entity.unit);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("prcupdatefl", entity.prcupdatefl);
     row.SetField("costupdatefl", entity.costupdatefl);
     row.SetField("price", entity.price);
     row.SetField("cost", entity.cost);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Varollcstprcupdate BuildVarollcstprcupdateFromRow(DataRow row)
        {
            Varollcstprcupdate entity = new Varollcstprcupdate();

            entity.ourproc      = row.IsNull("ourproc") ? string.Empty : row.Field <string>("ourproc");
            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.prod         = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse         = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.qty          = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty");
            entity.unit         = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.custno       = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto       = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.prcupdatefl  = row.Field <bool>("prcupdatefl");
            entity.costupdatefl = row.Field <bool>("costupdatefl");
            entity.price        = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price");
            entity.cost         = row.IsNull("cost") ? decimal.Zero : row.Field <decimal>("cost");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }