예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVasprulelookupresults(ref DataRow row, Vasprulelookupresults entity)
 {
     row.SetField("shipprod", entity.shipprod);
     row.SetField("whse", entity.whse);
     row.SetField("verno", entity.verno);
     row.SetField("segment", entity.segment);
     row.SetField("sequence", entity.sequence);
     row.SetField("ruleerrormsg", entity.ruleerrormsg);
     row.SetField("rulevaliddata", entity.rulevaliddata);
     row.SetField("rowid-vaspsasr", entity.rowidVaspsasr.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Vasprulelookupresults BuildVasprulelookupresultsFromRow(DataRow row)
        {
            Vasprulelookupresults entity = new Vasprulelookupresults();

            entity.shipprod      = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.whse          = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.verno         = row.IsNull("verno") ? 0 : row.Field <int>("verno");
            entity.segment       = row.IsNull("segment") ? 0 : row.Field <int>("segment");
            entity.sequence      = row.IsNull("sequence") ? 0 : row.Field <int>("sequence");
            entity.ruleerrormsg  = row.IsNull("ruleerrormsg") ? string.Empty : row.Field <string>("ruleerrormsg");
            entity.rulevaliddata = row.IsNull("rulevaliddata") ? string.Empty : row.Field <string>("rulevaliddata");
            entity.rowidVaspsasr = row.Field <byte[]>("rowid-vaspsasr").ToStringEncoded();
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }