TaoBaoKe.SQLServerDal/HelperCenterCategoryDal.cs

(完整代码) 1KB

using System;
using System.Collections;
using System.Text;
using TaoBaoKe.Model;
using TaoBaoKe.IDal;
using NHibernate;

namespace TaoBaoKe.SQLServerDal
{
    public class HelperCenterCategoryDal:IHelperCenterCategoryDal
    {
        public object GetScalar(string queryString, bool useSql, IDictionary namedParas)
        {
            return control.GetScalar(queryString, useSql, namedParas);
        }

        private EntityControl control;

        public HelperCenterCategoryDal()
        {
            control = EntityControl.CreateEntityControl();
        }
        public bool Add(HelperCenterCategory obj)
        {
            return control.AddEntity(obj);
        }
        public bool Update(HelperCenterCategory obj)
        {
            return control.UpdateEntity(obj);
        }
        public bool Delete(int _id)
        {
            string strHql = string.Format("from HelperCenterCategory where Iid = {0}", _id);
            return control.DeleteEntity(strHql);
        }
        public HelperCenterCategory GetModel(int Iid)
        {
            IDictionary hash = new Hashtable();
            hash.Add("Iid", Iid);
            return (HelperCenterCategory)control.GetEntity("From HelperCenterCategory where Iid=:Iid", hash);
        }
        public IList GetList(string where, string orderBy, IDictionary namedParas)
        {
            return control.GetEntities("HelperCenterCategory", where, orderBy, namedParas);
        }
        public IList GetList(string where, string orderBy, IDictionary namedParas, int pageIndex, int pageSize, out int recordCount)
        {
            return control.GetEntities("HelperCenterCategory", where, orderBy, namedParas, pageIndex, pageSize, out recordCount);
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。