Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSllinecdlookupresults(ref DataRow row, Sllinecdlookupresults entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("imptype", entity.imptype);
     row.SetField("vendcd", entity.vendcd);
     row.SetField("lookupnm", entity.lookupnm);
     row.SetField("linecd", entity.linecd);
     row.SetField("slsnrowid", entity.slsnrowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Sllinecdlookupresults BuildSllinecdlookupresultsFromRow(DataRow row)
        {
            Sllinecdlookupresults entity = new Sllinecdlookupresults();

            entity.cono      = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.imptype   = row.IsNull("imptype") ? string.Empty : row.Field <string>("imptype");
            entity.vendcd    = row.IsNull("vendcd") ? string.Empty : row.Field <string>("vendcd");
            entity.lookupnm  = row.IsNull("lookupnm") ? string.Empty : row.Field <string>("lookupnm");
            entity.linecd    = row.IsNull("linecd") ? string.Empty : row.Field <string>("linecd");
            entity.slsnrowid = row.Field <byte[]>("slsnrowid").ToStringEncoded();
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }