Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSlvendcdlookupresults(ref DataRow row, Slvendcdlookupresults 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);
 }
Exemplo n.º 2
0
        public static Slvendcdlookupresults BuildSlvendcdlookupresultsFromRow(DataRow row)
        {
            Slvendcdlookupresults entity = new Slvendcdlookupresults();

            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);
        }