Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromInvdiscbuildcountcriteria(ref DataRow row, Invdiscbuildcountcriteria entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("inventory_disc", entity.inventoryDisc);
     row.SetField("user_id", entity.userId);
     row.SetField("dLowDate", entity.dLowDate);
     row.SetField("tgDelete", entity.tgDelete);
     row.SetField("start_date", entity.startDate);
     row.SetField("end_date", entity.endDate);
     row.SetField("trans_type", entity.transType);
     row.SetField("rsCountItemorLoc", entity.rsCountItemorLoc);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Invdiscbuildcountcriteria BuildInvdiscbuildcountcriteriaFromRow(DataRow row)
        {
            Invdiscbuildcountcriteria entity = new Invdiscbuildcountcriteria();

            entity.coNum            = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num");
            entity.whNum            = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num");
            entity.inventoryDisc    = row.Field <bool>("inventory_disc");
            entity.userId           = row.IsNull("user_id") ? string.Empty : row.Field <string>("user_id");
            entity.dLowDate         = row.Field <DateTime?>("dLowDate");
            entity.tgDelete         = row.Field <bool>("tgDelete");
            entity.startDate        = row.Field <DateTime?>("start_date");
            entity.endDate          = row.Field <DateTime?>("end_date");
            entity.transType        = row.IsNull("trans_type") ? string.Empty : row.Field <string>("trans_type");
            entity.rsCountItemorLoc = row.IsNull("rsCountItemorLoc") ? 0 : row.Field <int>("rsCountItemorLoc");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }