コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromKptallymixlookupresults(ref DataRow row, Kptallymixlookupresults entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("comprod", entity.comprod);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("descrip", entity.descrip);
     row.SetField("length", entity.length);
     row.SetField("pomixpct", entity.pomixpct);
     row.SetField("oemixpct", entity.oemixpct);
     row.SetField("rowid-kpsm", entity.rowidKpsm.ToByteArray());
 }
コード例 #2
0
        public static Kptallymixlookupresults BuildKptallymixlookupresultsFromRow(DataRow row)
        {
            Kptallymixlookupresults entity = new Kptallymixlookupresults();

            entity.prod      = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.comprod   = row.IsNull("comprod") ? string.Empty : row.Field <string>("comprod");
            entity.notesfl   = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.descrip   = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.length    = row.IsNull("length") ? 0 : row.Field <int>("length");
            entity.pomixpct  = row.IsNull("pomixpct") ? 0 : row.Field <int>("pomixpct");
            entity.oemixpct  = row.IsNull("oemixpct") ? 0 : row.Field <int>("oemixpct");
            entity.rowidKpsm = row.Field <byte[]>("rowid-kpsm").ToStringEncoded();
            return(entity);
        }