Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdspvendcopycriteria(ref DataRow row, Pdspvendcopycriteria entity)
 {
     row.SetField("clevelcd", entity.clevelcd);
     row.SetField("prod", entity.prod);
     row.SetField("vendno", entity.vendno);
     row.SetField("startdt", entity.startdt);
     row.SetField("pd_rowid", entity.pdRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Pdspvendcopycriteria BuildPdspvendcopycriteriaFromRow(DataRow row)
        {
            Pdspvendcopycriteria entity = new Pdspvendcopycriteria();

            entity.clevelcd  = row.IsNull("clevelcd") ? string.Empty : row.Field <string>("clevelcd");
            entity.prod      = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.vendno    = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.startdt   = row.Field <DateTime?>("startdt");
            entity.pdRowid   = row.Field <byte[]>("pd_rowid").ToStringEncoded();
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }