Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApeiinvdetmanpyopninv(ref DataRow row, Apeiinvdetmanpyopninv entity)
 {
     row.SetField("apinvno", entity.apinvno);
     row.SetField("seqno", entity.seqno);
     row.SetField("manckid", entity.manckid);
     row.SetField("amount", entity.amount);
     row.SetField("origdisc", entity.origdisc);
     row.SetField("discamt", entity.discamt);
     row.SetField("duedt", entity.duedt);
     row.SetField("invdt", entity.invdt);
     row.SetField("apet-rowid", entity.apetRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Apeiinvdetmanpyopninv BuildApeiinvdetmanpyopninvFromRow(DataRow row)
        {
            Apeiinvdetmanpyopninv entity = new Apeiinvdetmanpyopninv();

            entity.apinvno   = row.IsNull("apinvno") ? string.Empty : row.Field <string>("apinvno");
            entity.seqno     = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.manckid   = row.IsNull("manckid") ? string.Empty : row.Field <string>("manckid");
            entity.amount    = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.origdisc  = row.IsNull("origdisc") ? decimal.Zero : row.Field <decimal>("origdisc");
            entity.discamt   = row.IsNull("discamt") ? decimal.Zero : row.Field <decimal>("discamt");
            entity.duedt     = row.Field <DateTime?>("duedt");
            entity.invdt     = row.Field <DateTime?>("invdt");
            entity.apetRowid = row.Field <byte[]>("apet-rowid").ToStringEncoded();
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }