Ejemplo n.º 1
0
        public int Insert(ScoreRequirementItem item)
        {
            string        query = "Insert into ScoreRequirement(accountId,cutline) VALUES(@AccountId, @Cutline)";
            IDbParameters param = CreateDbParameters();

            param.AddWithValue("AccountId", item.AccountId).DbType = DbType.Int32;
            param.AddWithValue("Cutline", item.Cutline).DbType     = DbType.Int32;
            return(AdoTemplate.ExecuteNonQuery(CommandType.Text, query, param));
        }
Ejemplo n.º 2
0
        public int Update(ScoreRequirementItem item)
        {
            string        query = "UPDATE ScoreRequirement SET accountId = @AccountId, cutline=@Cutline where id = @Id";
            IDbParameters param = CreateDbParameters();

            param.AddWithValue("Id", item.Id).DbType = DbType.Int32;
            param.AddWithValue("AccountId", item.AccountId).DbType = DbType.Int32;
            param.AddWithValue("Cutline", item.Cutline).DbType     = DbType.Int32;
            return(AdoTemplate.ExecuteNonQuery(CommandType.Text, query, param));
        }