Пример #1
0
        public DataTable ExecSelSP <@type>(string SProc, ref @type paramObj)
        {
            SqlParameter[] Params = SearchRec.ToSqlParams(paramObj);
            DataSet        ds     = ExecSelSPDS(SProc, Params);

            foreach (var para in Params)
            {
                if (para.Direction == ParameterDirection.Output)
                {
                    paramObj.SetFieldValue(para.ParameterName.Replace("@", ""), para.Value);
                }
            }
            return((ds.Tables.Count > 0) ? ds.Tables[0] : null);
        }
Пример #2
0
 public DataTable ExecQuery(string Query, string tableName, SearchRec search)
 {
     return(ExecQuery(Query, tableName, search.ToSqlParams()));
 }
Пример #3
0
 public List <@type> GetEntities <@type>(string getSp, object parameters) where @type : class
 {
     return(ExecReaderSelSP(getSp, SearchRec.ToSqlParams(parameters)).ToList <@type>());
 }
Пример #4
0
 public DataSet ExecSelSPDS(string SProc, SearchRec search)
 {
     return(ExecSelSPDS(SProc, search.ToSqlParams()));
 }
Пример #5
0
 public object ExecEscalar(string Query, SearchRec search)
 {
     return(ExecEscalar(Query, search.ToSqlParams()));
 }
Пример #6
0
 public int ExecNonQuery(string Query, SearchRec search)
 {
     return(ExecNonQuery(Query, search.ToSqlParams()));
 }