示例#1
0
        protected IList <T> CallFunctionWithList <T>(int functionID, string inputValue, ref COutputValue output) where T : new()
        {
            try
            {
                DataSet ds = CallFunction(functionID, inputValue);
                //List<T> list = new List<T>();
                if (ds == null)
                {
                    return(null);
                }
                if (ds.Tables.Count == 0)
                {
                    return(null);
                }

                IList <T> list = CDb.MapList <T>(ds.Tables[0]);
                if (ds.Tables.Count > 1)
                {
                    output = CDb.Map <COutputValue>(ds.Tables[1]);
                }

                return(list);
            }
            catch (Exception ex)
            {
                output = new COutputValue()
                {
                    Code = "SYSTEM_ERROR", Name = "Error", Description = ex.Message
                };
            }
            return(null);
        }
示例#2
0
 protected IList <T> CallFunctionWithList <T>(int functionID, string inputValue) where T : new()
 {
     try
     {
         DataSet ds = CallFunction(functionID, inputValue);
         //List<T> list = new List<T>();
         if (ds == null)
         {
             return(null);
         }
         if (ds.Tables.Count == 0)
         {
             return(null);
         }
         return(CDb.MapList <T>(ds.Tables[0]));
     }
     catch (Exception ex)
     {
     }
     return(null);
 }
示例#3
0
 protected IList <T> CallFunctionWithList <T>(int functionID, string inputValue) where T : new()
 {
     try
     {
         DataSet ds = CallFunction(functionID, inputValue);
         if (ds == null)
         {
             return(null);
         }
         if (ds.Tables.Count == 0)
         {
             return(null);
         }
         return(CDb.MapList <T>(ds.Tables[0]));
     }
     catch (Exception ex)
     {
         string stack = GetStackTrace(new StackTrace());
         CLogManager.WriteDAL("CallFunctionWithList:IList(1,2)", stack + "::::" + ex.Message);
     }
     return(null);
 }