示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCrecreconcile(ref DataRow row, Crecreconcile entity)
 {
     row.SetField("clearfl", entity.clearfl);
     row.SetField("checkno", entity.checkno);
     row.SetField("amount", entity.amount);
     row.SetField("cSource", entity.cSource);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("refer", entity.refer);
     row.SetField("voidfl", entity.voidfl);
     row.SetField("cleardt", entity.cleardt);
     row.SetField("bacsref", entity.bacsref);
     row.SetField("pospaydttm", entity.pospaydttm);
     row.SetField("cretrowid", entity.cretrowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Crecreconcile BuildCrecreconcileFromRow(DataRow row)
        {
            Crecreconcile entity = new Crecreconcile();

            entity.clearfl    = row.Field <bool>("clearfl");
            entity.checkno    = row.IsNull("checkno") ? decimal.Zero : row.Field <decimal>("checkno");
            entity.amount     = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.cSource    = row.IsNull("cSource") ? string.Empty : row.Field <string>("cSource");
            entity.enterdt    = row.Field <DateTime?>("enterdt");
            entity.refer      = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.voidfl     = row.Field <bool>("voidfl");
            entity.cleardt    = row.Field <DateTime?>("cleardt");
            entity.bacsref    = row.IsNull("bacsref") ? string.Empty : row.Field <string>("bacsref");
            entity.pospaydttm = row.IsNull("pospaydttm") ? string.Empty : row.Field <string>("pospaydttm");
            entity.cretrowid  = row.Field <byte[]>("cretrowid").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }