示例#1
0
        /// <summary>
        /// 储存过程上个
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        public T GetPrevModel(long?id, string where = "1=1")
        {
            string execSql = string.Format("Exec  {0}_GetPrevModel @ID={1},@Where=N'{2}' ", ETblName, id, where);

            List <T> Tmodel = base.GetList(execSql);

            if (NTool.IsLtNULL <T>(Tmodel))
            {
                return(Tmodel[0]);
            }
            return(default(T));
        }
示例#2
0
        /// <summary>
        /// 储存过程
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        public T GetNameModel(string name)
        {
            string execSql = string.Format("Exec  {0}_GetNameModel @Name=N'{1}' ", ETblName, name);

            List <T> Tmodel = base.GetList(execSql);

            if (NTool.IsLtNULL <T>(Tmodel))
            {
                return(Tmodel[0]);
            }
            return(default(T));
        }
示例#3
0
        /// <summary>
        /// 储存过程
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        public T GetModel(long?id)
        {
            string execSql = string.Format("Exec  {0}_GetModel @ID={1} ", ETblName, id);

            List <T> Tmodel = base.GetList(execSql);

            if (NTool.IsLtNULL <T>(Tmodel))
            {
                return(Tmodel[0]);
            }
            return(default(T));
        }
示例#4
0
        public NModel.DB_Image GetModelByBelongsID(long?id)
        {
            string execSql = string.Format("Exec  {0}_ GetModelByBelongsID @ID={1} ", ETblName, id);

            List <NModel.DB_Image> Tmodel = base.GetList(execSql);

            if (NTool.IsLtNULL <NModel.DB_Image>(Tmodel))
            {
                return((NModel.DB_Image)Tmodel[0]);
            }
            return(null);
        }