Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcsrlookupresults(ref DataRow row, Icsrlookupresults entity)
 {
     row.SetField("recordtype", entity.recordtype);
     row.SetField("cono", entity.cono);
     row.SetField("whse", entity.whse);
     row.SetField("vendno", entity.vendno);
     row.SetField("prodline", entity.prodline);
     row.SetField("conoranks", entity.conoranks);
     row.SetField("ranksusedfl", entity.ranksusedfl);
     row.SetField("recranks", entity.recranks);
     row.SetField("basedon", entity.basedon);
     row.SetField("recpcttot", entity.recpcttot);
     row.SetField("icsrrowid", entity.icsrrowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Icsrlookupresults BuildIcsrlookupresultsFromRow(DataRow row)
        {
            Icsrlookupresults entity = new Icsrlookupresults();

            entity.recordtype  = row.IsNull("recordtype") ? string.Empty : row.Field <string>("recordtype");
            entity.cono        = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.vendno      = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.prodline    = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.conoranks   = row.IsNull("conoranks") ? 0 : row.Field <int>("conoranks");
            entity.ranksusedfl = row.Field <bool>("ranksusedfl");
            entity.recranks    = row.IsNull("recranks") ? 0 : row.Field <int>("recranks");
            entity.basedon     = row.IsNull("basedon") ? string.Empty : row.Field <string>("basedon");
            entity.recpcttot   = row.IsNull("recpcttot") ? decimal.Zero : row.Field <decimal>("recpcttot");
            entity.icsrrowid   = row.Field <byte[]>("icsrrowid").ToStringEncoded();
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }