Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadwlcartonsresults(ref DataRow row, Loadwlcartonsresults entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("vaordseq", entity.vaordseq);
     row.SetField("lineno", entity.lineno);
     row.SetField("lineseq", entity.lineseq);
     row.SetField("lineuom", entity.lineuom);
     row.SetField("cartonid", entity.cartonid);
     row.SetField("cartonqty", entity.cartonqty);
 }
Exemplo n.º 2
0
        public static Loadwlcartonsresults BuildLoadwlcartonsresultsFromRow(DataRow row)
        {
            Loadwlcartonsresults entity = new Loadwlcartonsresults();

            entity.orderno   = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf  = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.vaordseq  = row.IsNull("vaordseq") ? 0 : row.Field <int>("vaordseq");
            entity.lineno    = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.lineseq   = row.IsNull("lineseq") ? 0 : row.Field <int>("lineseq");
            entity.lineuom   = row.IsNull("lineuom") ? string.Empty : row.Field <string>("lineuom");
            entity.cartonid  = row.IsNull("cartonid") ? string.Empty : row.Field <string>("cartonid");
            entity.cartonqty = row.IsNull("cartonqty") ? decimal.Zero : row.Field <decimal>("cartonqty");
            return(entity);
        }