Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApemacredits(ref DataRow row, Apemacredits entity)
 {
     row.SetField("lselected", entity.lselected);
     row.SetField("capinvno", entity.capinvno);
     row.SetField("ctranscd", entity.ctranscd);
     row.SetField("iseqno", entity.iseqno);
     row.SetField("idivno", entity.idivno);
     row.SetField("damount", entity.damount);
     row.SetField("dinvdt", entity.dinvdt);
     row.SetField("crefer", entity.crefer);
     row.SetField("rRecid", entity.rRecid);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Apemacredits BuildApemacreditsFromRow(DataRow row)
        {
            Apemacredits entity = new Apemacredits();

            entity.lselected = row.Field <bool>("lselected");
            entity.capinvno  = row.IsNull("capinvno") ? string.Empty : row.Field <string>("capinvno");
            entity.ctranscd  = row.IsNull("ctranscd") ? string.Empty : row.Field <string>("ctranscd");
            entity.iseqno    = row.IsNull("iseqno") ? 0 : row.Field <int>("iseqno");
            entity.idivno    = row.IsNull("idivno") ? 0 : row.Field <int>("idivno");
            entity.damount   = row.IsNull("damount") ? decimal.Zero : row.Field <decimal>("damount");
            entity.dinvdt    = row.Field <DateTime?>("dinvdt");
            entity.crefer    = row.IsNull("crefer") ? string.Empty : row.Field <string>("crefer");
            entity.rRecid    = row.IsNull("rRecid") ? 0 : row.Field <long>("rRecid");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }