Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadaltvendttresults(ref DataRow row, Loadaltvendttresults entity)
 {
     row.SetField("keyno", entity.keyno);
     row.SetField("vendnotes", entity.vendnotes);
     row.SetField("altprod", entity.altprod);
     row.SetField("price", entity.price);
     row.SetField("unitbuy", entity.unitbuy);
     row.SetField("unitstnd", entity.unitstnd);
     row.SetField("leadtm", entity.leadtm);
     row.SetField("lastchgdt", entity.lastchgdt);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Loadaltvendttresults BuildLoadaltvendttresultsFromRow(DataRow row)
        {
            Loadaltvendttresults entity = new Loadaltvendttresults();

            entity.keyno     = row.IsNull("keyno") ? decimal.Zero : row.Field <decimal>("keyno");
            entity.vendnotes = row.IsNull("vendnotes") ? string.Empty : row.Field <string>("vendnotes");
            entity.altprod   = row.IsNull("altprod") ? string.Empty : row.Field <string>("altprod");
            entity.price     = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price");
            entity.unitbuy   = row.IsNull("unitbuy") ? string.Empty : row.Field <string>("unitbuy");
            entity.unitstnd  = row.IsNull("unitstnd") ? string.Empty : row.Field <string>("unitstnd");
            entity.leadtm    = row.IsNull("leadtm") ? 0 : row.Field <int>("leadtm");
            entity.lastchgdt = row.Field <DateTime?>("lastchgdt");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }