Exemple #1
0
        public static Ibprintsingle BuildIbprintsingleFromRow(DataRow row)
        {
            Ibprintsingle entity = new Ibprintsingle();

            entity.orders           = row.IsNull("orders") ? string.Empty : row.Field <string>("orders");
            entity.pono             = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf            = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.ponoDispl        = row.IsNull("pono-displ") ? 0 : row.Field <int>("pono-displ");
            entity.posufDispl       = row.IsNull("posuf-displ") ? 0 : row.Field <int>("posuf-displ");
            entity.orderno          = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf         = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.ordernoDispl     = row.IsNull("orderno-displ") ? 0 : row.Field <int>("orderno-displ");
            entity.ordersufDispl    = row.IsNull("ordersuf-displ") ? 0 : row.Field <int>("ordersuf-displ");
            entity.lineno           = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.jrnlno           = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.labeltype        = row.IsNull("labeltype") ? string.Empty : row.Field <string>("labeltype");
            entity.nmbrlbls         = row.IsNull("nmbrlbls") ? 0 : row.Field <int>("nmbrlbls");
            entity.qtyctn           = row.IsNull("qtyctn") ? 0 : row.Field <int>("qtyctn");
            entity.mixedctn         = row.Field <bool>("mixedctn");
            entity.cartonno         = row.IsNull("cartonno") ? string.Empty : row.Field <string>("cartonno");
            entity.name             = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.fiOrdersVisible  = row.Field <bool>("fiOrders-visible");
            entity.fiPONOVisible    = row.Field <bool>("fiPONO-visible");
            entity.fiOrderNoVisible = row.Field <bool>("fiOrderNo-visible");
            return(entity);
        }
Exemple #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIbprintsingle(ref DataRow row, Ibprintsingle entity)
 {
     row.SetField("orders", entity.orders);
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("pono-displ", entity.ponoDispl);
     row.SetField("posuf-displ", entity.posufDispl);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("orderno-displ", entity.ordernoDispl);
     row.SetField("ordersuf-displ", entity.ordersufDispl);
     row.SetField("lineno", entity.lineno);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("labeltype", entity.labeltype);
     row.SetField("nmbrlbls", entity.nmbrlbls);
     row.SetField("qtyctn", entity.qtyctn);
     row.SetField("mixedctn", entity.mixedctn);
     row.SetField("cartonno", entity.cartonno);
     row.SetField("name", entity.name);
     row.SetField("fiOrders-visible", entity.fiOrdersVisible);
     row.SetField("fiPONO-visible", entity.fiPONOVisible);
     row.SetField("fiOrderNo-visible", entity.fiOrderNoVisible);
 }