Ejemplo n.º 1
0
        public static ICallType GetCallType(int callTypeId, char isActiveOnly)
        {
            string    strExecution = "[common].[uspGetCallType]";
            ICallType callType     = null;

            using (DbQuery oDq = new DbQuery(strExecution))
            {
                oDq.AddIntegerParam("@CallTypeId", callTypeId);
                oDq.AddCharParam("@IsActiveOnly", 1, isActiveOnly);
                DataTableReader reader = oDq.GetTableReader();

                while (reader.Read())
                {
                    callType = new CallTypeEntity(reader);
                }

                reader.Close();
            }

            return(callType);
        }
Ejemplo n.º 2
0
        public static List <ICallType> GetCallType(char isActiveOnly)
        {
            string           strExecution = "[common].[uspGetCallType]";
            List <ICallType> lstCallType  = new List <ICallType>();

            using (DbQuery oDq = new DbQuery(strExecution))
            {
                oDq.AddCharParam("@IsActiveOnly", 1, isActiveOnly);
                DataTableReader reader = oDq.GetTableReader();

                while (reader.Read())
                {
                    ICallType callType = new CallTypeEntity(reader);
                    lstCallType.Add(callType);
                }

                reader.Close();
            }

            return(lstCallType);
        }