Ejemplo n.º 1
0
        public void tt()
        {
            string TaskConnectString = "Server=localhost;Database=dyd_bs_task;Uid=root;Pwd=123456;";

            using (DbConn PubConn = DbConn.CreateConn(TaskConnectString))
            {
                tb_node_dal dal = new tb_node_dal();
                PubConn.Open();
                int count;
                List <tb_node_model> List = dal.GetList(PubConn, null, null, null, 2, 1, out count);
                Console.WriteLine("list.count" + List.Count);
            }
        }
Ejemplo n.º 2
0
        //
        // GET: /Node/

        public ActionResult Index(string keyword, string CStime, string CEtime, int pagesize = 10, int pageindex = 1)
        {
            return(this.Visit(EnumUserRole.Admin, () =>
            {
                ViewBag.sqldatetimenow = DateTime.Now;
                tb_node_dal dal = new tb_node_dal();
                PagedList <tb_node_model> pageList = null;
                int count = 0;
                using (DbConn PubConn = DbConn.CreateConn(Config.TaskConnectString))
                {
                    PubConn.Open();
                    List <tb_node_model> List = dal.GetList(PubConn, keyword, CStime, CEtime, pagesize, pageindex, out count);
                    pageList = new PagedList <tb_node_model>(List, pageindex, pagesize, count);
                    ViewBag.sqldatetimenow = PubConn.GetServerDate();
                }
                return View(pageList);
            }));
        }