コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApemtcriteria(ref DataRow row, Apemtcriteria entity)
 {
     row.SetField("vendno", entity.vendno);
     row.SetField("type", entity.type);
     row.SetField("apinvno", entity.apinvno);
     row.SetField("seqno", entity.seqno);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Apemtcriteria BuildApemtcriteriaFromRow(DataRow row)
        {
            Apemtcriteria entity = new Apemtcriteria();

            entity.vendno    = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.type      = row.IsNull("type") ? 0 : row.Field <int>("type");
            entity.apinvno   = row.IsNull("apinvno") ? string.Empty : row.Field <string>("apinvno");
            entity.seqno     = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }