Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGetpocriteria(ref DataRow row, Getpocriteria entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("po_num", entity.poNum);
     row.SetField("po_suffix", entity.poSuffix);
     row.SetField("vendor_id", entity.vendorId);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("getpocriteriauserfield", entity.getpocriteriauserfield);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Getpocriteria BuildGetpocriteriaFromRow(DataRow row)
        {
            Getpocriteria entity = new Getpocriteria();

            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.poNum                  = row.IsNull("po_num") ? string.Empty : row.Field <string>("po_num");
            entity.poSuffix               = row.IsNull("po_suffix") ? string.Empty : row.Field <string>("po_suffix");
            entity.vendorId               = row.IsNull("vendor_id") ? string.Empty : row.Field <string>("vendor_id");
            entity.recordcountlimit       = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.getpocriteriauserfield = row.IsNull("getpocriteriauserfield") ? string.Empty : row.Field <string>("getpocriteriauserfield");
            entity.userfield              = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }