Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdgetpdsrrecordscriteria(ref DataRow row, Pdgetpdsrrecordscriteria entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("contractno", entity.contractno);
     row.SetField("includeproductrebate", entity.includeproductrebate);
     row.SetField("includerebatetyperebate", entity.includerebatetyperebate);
     row.SetField("includepricetyperebate", entity.includepricetyperebate);
     row.SetField("includeprodlinerebate", entity.includeprodlinerebate);
     row.SetField("includeprodcatrebate", entity.includeprodcatrebate);
     row.SetField("includeexpired", entity.includeexpired);
     row.SetField("recordcountlimit", entity.recordcountlimit);
 }
Beispiel #2
0
        public static Pdgetpdsrrecordscriteria BuildPdgetpdsrrecordscriteriaFromRow(DataRow row)
        {
            Pdgetpdsrrecordscriteria entity = new Pdgetpdsrrecordscriteria();

            entity.prod                    = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse                    = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.custno                  = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto                  = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.contractno              = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno");
            entity.includeproductrebate    = row.Field <bool>("includeproductrebate");
            entity.includerebatetyperebate = row.Field <bool>("includerebatetyperebate");
            entity.includepricetyperebate  = row.Field <bool>("includepricetyperebate");
            entity.includeprodlinerebate   = row.Field <bool>("includeprodlinerebate");
            entity.includeprodcatrebate    = row.Field <bool>("includeprodcatrebate");
            entity.includeexpired          = row.Field <bool>("includeexpired");
            entity.recordcountlimit        = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            return(entity);
        }