Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOmordersummary(ref DataRow row, Omordersummary entity)
 {
     row.SetField("open_orders", entity.openOrders);
     row.SetField("in_pick_orders", entity.inPickOrders);
     row.SetField("picked_orders", entity.pickedOrders);
     row.SetField("packed_orders", entity.packedOrders);
     row.SetField("shipped_orders", entity.shippedOrders);
     row.SetField("exception_orders", entity.exceptionOrders);
     row.SetField("total_orders", entity.totalOrders);
     row.SetField("omordersummaryuserfield", entity.omordersummaryuserfield);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Omordersummary BuildOmordersummaryFromRow(DataRow row)
        {
            Omordersummary entity = new Omordersummary();

            entity.openOrders              = row.IsNull("open_orders") ? 0 : row.Field <int>("open_orders");
            entity.inPickOrders            = row.IsNull("in_pick_orders") ? 0 : row.Field <int>("in_pick_orders");
            entity.pickedOrders            = row.IsNull("picked_orders") ? 0 : row.Field <int>("picked_orders");
            entity.packedOrders            = row.IsNull("packed_orders") ? 0 : row.Field <int>("packed_orders");
            entity.shippedOrders           = row.IsNull("shipped_orders") ? 0 : row.Field <int>("shipped_orders");
            entity.exceptionOrders         = row.IsNull("exception_orders") ? 0 : row.Field <int>("exception_orders");
            entity.totalOrders             = row.IsNull("total_orders") ? 0 : row.Field <int>("total_orders");
            entity.omordersummaryuserfield = row.IsNull("omordersummaryuserfield") ? string.Empty : row.Field <string>("omordersummaryuserfield");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }