Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdspcustprodcopyresults(ref DataRow row, Pdspcustprodcopyresults entity)
 {
     row.SetField("levelcd", entity.levelcd);
     row.SetField("custno", entity.custno);
     row.SetField("custtype", entity.custtype);
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("units", entity.units);
     row.SetField("startdt", entity.startdt);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Pdspcustprodcopyresults BuildPdspcustprodcopyresultsFromRow(DataRow row)
        {
            Pdspcustprodcopyresults entity = new Pdspcustprodcopyresults();

            entity.levelcd   = row.IsNull("levelcd") ? 0 : row.Field <int>("levelcd");
            entity.custno    = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custtype  = row.IsNull("custtype") ? string.Empty : row.Field <string>("custtype");
            entity.prod      = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.units     = row.IsNull("units") ? string.Empty : row.Field <string>("units");
            entity.startdt   = row.Field <DateTime?>("startdt");
            entity.rowid     = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }