示例#1
0
        public List <N> GetList(string getWhere, int top)
        {
            DataTable dt    = new DataTable();
            List <N>  nList = NFactory.FillModel <N>(base.GetTable(getWhere, top));

            return(nList);
        }
示例#2
0
 public bool Edit(long ID, N editObj)
 {
     return(base.Edit(ID, NFactory.FillDataTable <N>(new List <N>()
     {
         editObj
     })));
 }
示例#3
0
 public long Add(List <N> addObj)
 {
     if (base.Add(NFactory.FillDataTable <N>(addObj)))
     {
         return(1);
     }
     ;
     return(0);
 }
示例#4
0
        public N GetModel(string getWhere)
        {
            List <N> nList = NFactory.FillModel <N>(base.GetTable(getWhere, 1));

            if (nList != null && nList.Count > 0)
            {
                return(nList[0]);
            }
            return(default(N));
        }
示例#5
0
 public bool Add(N addObj)
 {
     if (base.Add(NFactory.FillDataTable <N>(new List <N>()
     {
         addObj
     })))
     {
         return(true);
     }
     ;
     return(false);
 }
        public INFactory CreateNFactory()
        {
            INFactory factory = null;

            try
            {
                factory = new NFactory();
            }
            catch (Exception exception)
            {
                this.Log.Error(
                    exception.Message,
                    exception);
            }

            return(factory);
        }
示例#7
0
        public List <N> GetList(List <long> listID)
        {
            List <N> nList = NFactory.FillModel <N>(base.GetTable(listID));

            return(nList);
        }
示例#8
0
        public List <N> GetList(string getWhere)
        {
            List <N> nList = NFactory.FillModel <N>(base.GetTable(getWhere));

            return(nList);
        }
示例#9
0
 public long Edit(List <long> longID, List <N> editObj)
 {
     return(base.Edit(longID, NFactory.FillDataTable <N>(editObj)));
 }
示例#10
0
 public bool Edit(string where, List <N> editObj)
 {
     return(base.Edit(where, NFactory.FillDataTable <N>(editObj)));
 }
示例#11
0
 public List <N> GetList(string getWhere, string orders, int top)
 {
     return(NFactory.FillModel <N>(base.GetTable(getWhere, top, orders)));
 }
示例#12
0
 public void SetUp()
 {
     _nF = NFactory.Create();
 }