//Copyright (c) Telerik.  All rights reserved.

using System;
using System.Collections.Generic;
using Telerik.OpenAccess;

namespace Model
{
    /// <summary>
    /// This class holds static methods defined to invoke user defined stored procedures
    /// </summary>
    /// <remarks>
    /// <para>
    /// It is generated by the Reverse Engineering wizard. 
    /// </para>
    /// </remarks>
   
   public static class StoredProcedure
   {
        public static IQueryResult spOaUpdContactGroup(IObjectScope scope,short voaversion,string contactgroupname,int contactgroupid,short oLDvoaversion)
        {
            IQuery query = scope.GetSqlQuery("sp_oa_upd_contact_group ?,?,?,?",null,"SMALLINT voa_version,VARCHAR contact_group_name,INTEGER contact_group_id,SMALLINT OLD_voa_version");
            
            IQueryResult res = query.Execute(new object[] {voaversion,contactgroupname,contactgroupid,oLDvoaversion});
            int a = res.Count;//Actually executes the query
            
            return res;
        }
        public static IQueryResult spOaInsContactGroup(IObjectScope scope,short voaversion,string contactgroupname,int contactgroupid)
        {
            IQuery query = scope.GetSqlQuery("sp_oa_ins_contact_group ?,?,?",null,"SMALLINT voa_version,VARCHAR contact_group_name,INTEGER contact_group_id");
            
            IQueryResult res = query.Execute(new object[] {voaversion,contactgroupname,contactgroupid});
            int a = res.Count;//Actually executes the query
            
            return res;
        }
        public static IQueryResult spOaDelContactGroup(IObjectScope scope,int contactgroupid)
        {
            IQuery query = scope.GetSqlQuery("sp_oa_del_contact_group ?",null,"INTEGER contact_group_id");
            
            IQueryResult res = query.Execute(new object[] {contactgroupid});
            int a = res.Count;//Actually executes the query
            
            return res;
        }

   }
 }




