Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOelinesuperavailresults(ref DataRow row, Oelinesuperavailresults entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("descrip", entity.descrip);
     row.SetField("whse", entity.whse);
     row.SetField("qtyavail", entity.qtyavail);
     row.SetField("surplus", entity.surplus);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("region", entity.region);
     row.SetField("dnrwttieallow", entity.dnrwttieallow);
     row.SetField("unitstock", entity.unitstock);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("sellfirsttype", entity.sellfirsttype);
     row.SetField("qtyordenabled", entity.qtyordenabled);
     row.SetField("qtyordhidden", entity.qtyordhidden);
     row.SetField("ordertypeenabled", entity.ordertypeenabled);
     row.SetField("ordertypehidden", entity.ordertypehidden);
 }
Exemplo n.º 2
0
        public static Oelinesuperavailresults BuildOelinesuperavailresultsFromRow(DataRow row)
        {
            Oelinesuperavailresults entity = new Oelinesuperavailresults();

            entity.prod             = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.descrip          = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.whse             = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.qtyavail         = row.IsNull("qtyavail") ? decimal.Zero : row.Field <decimal>("qtyavail");
            entity.surplus          = row.IsNull("surplus") ? decimal.Zero : row.Field <decimal>("surplus");
            entity.qtyord           = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.ordertype        = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.region           = row.IsNull("region") ? string.Empty : row.Field <string>("region");
            entity.dnrwttieallow    = row.Field <bool>("dnrwttieallow");
            entity.unitstock        = row.IsNull("unitstock") ? string.Empty : row.Field <string>("unitstock");
            entity.orderno          = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf         = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.sellfirsttype    = row.IsNull("sellfirsttype") ? string.Empty : row.Field <string>("sellfirsttype");
            entity.qtyordenabled    = row.Field <bool>("qtyordenabled");
            entity.qtyordhidden     = row.Field <bool>("qtyordhidden");
            entity.ordertypeenabled = row.Field <bool>("ordertypeenabled");
            entity.ordertypehidden  = row.Field <bool>("ordertypehidden");
            return(entity);
        }