예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSharedcommentcriteria(ref DataRow row, Sharedcommentcriteria entity)
 {
     row.SetField("type", entity.type);
     row.SetField("tablename", entity.tablename);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Sharedcommentcriteria BuildSharedcommentcriteriaFromRow(DataRow row)
        {
            Sharedcommentcriteria entity = new Sharedcommentcriteria();

            entity.type      = row.IsNull("type") ? string.Empty : row.Field <string>("type");
            entity.tablename = row.IsNull("tablename") ? string.Empty : row.Field <string>("tablename");
            entity.orderno   = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf  = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.lineno    = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }