Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string conn = "server=192.168.104.117;uid=wftsa;password=jd7nTF#wM;database=k2Sln";

            //object dt = db.ExecScalarInt(" select top 22 * from k2sln.dbo.TB_SNDA_Common_VirtualRole ");
            //Response.Write(dt);

            DbMap map = new DbMapSqlServer(conn);
            //    string sql = "select top 1 * from k2sln.dbo.TB_SNDA_Common_VirtualRole  where idx=27617";

            // IDataReader dr = map.db.GetReader(sql);
            // VirtualRole1 role = map.Get<VirtualRole1>(sql);
            // Response.Write(role.Proccode);

            //insert :
            //VirtualRole1 vr = new VirtualRole1()
            //{
            //    Proccode = "njhtext",
            //    RoleGroupCode = "njhtest",
            //    RoleGroupName = "njhtest",
            //    SpecialPersonid = "snda\\niejunhua",
            //};
            ////int rs = map.Insert<VirtualRole1>(vr);

            //// Response.Write(rs);
            //vr = new VirtualRole1();
            //vr = map.Get<VirtualRole1>(sql);
            //vr.Proccode = "njhprocvcode";
            //int idd = map.Update<VirtualRole1>(vr);
            //Response.Write(idd);

            SqlServerModeCreate core = new SqlServerModeCreate(conn);

            core.CreateAll("", "K2SLN");
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            // TestgeneratePagingSql.d();

            //    BaseModeCreate create = new MySqlModeCreate("server=localhost;User Id=root;password=niejunhua;Database=nq_article;charset=utf8 ");
            //    create.CreateAll("CommonClass", "nq_article", "");

            BaseModeCreate create = new SqlServerModeCreate("server=192.168.104.117;uid=wftsa;password=jd7nTF#wM;database=k2Sln");

            create.CreateAll("TestSql", "k2Sln", "", "");


            //TestSqlServer.getList();

            //Console.ReadLine();

            //string sss = "njhloveyangjing";

            //string rs = Helper.Security.SecurityHelper.Encrypt62(sss);
            //Console.WriteLine(rs);

            //begin query

            /*     DbMap map = new DbMapSqlServer("server=192.168.104.117;uid=wftsa;password=jd7nTF#wM;database=K2Sln");
             *   int i = 0;
             *   while (i <= 100)
             *   {
             *       Stopwatch sw = new Stopwatch();
             *       sw.Start();
             *       string sql = "SELECT  top 100000 * FROM [K2Log].[dbo].[_ProcInstDataAudit]";
             *       List<_ProcInstDataAudit> list = map.GetList<_ProcInstDataAudit>(sql);
             *       //List<_ProcInstDataAudit> list = new List<_ProcInstDataAudit>();
             *       //System.Data.IDataReader reader = map.DbContext.GetReader(sql);
             *       //while (reader.Read())
             *       //{
             *       //    _ProcInstDataAudit m = new _ProcInstDataAudit();
             *       //    m.Date = DateTime.Parse(reader["date"].ToString());
             *       //    m.Location = reader["location"].ToString();
             *       //    m.Name = reader["name"].ToString();
             *       //    m.ProcInstID = int.Parse(reader["ProcInstID"].ToString());
             *       //    m.User = reader["user"].ToString();
             *       //    m.Value = reader["value"].ToString();
             *       //    list.Add(m);
             *       //}
             *       sw.Stop();
             *       Console.WriteLine(sw.Elapsed);
             *       i++;*/
        }
Beispiel #3
0
        public void InsertTest()
        {
            //DbMap map = new DbMapAccess(@"E:\快盘\project\CaiDown\CaiDown\down.mdb");

            BaseModeCreate create = new SqlServerModeCreate("server=192.168.104.117;uid=wftsa;password=jd7nTF#wM;database=snda_data");

            create.CreateAll("TestProject1", "snda_data", "", "");

            //string s = Helper.Str.StringHelper.SubStrContain("11111@ebasdasdas@ee19851022", "@eb", "@ee");
            //Console.WriteLine(s);

            //begin query

            //DbMap map = new DbMapSqlServer("server=192.168.104.117;uid=wftsa;password=jd7nTF#wM;database=K2Sln");
            //Stopwatch sw = new Stopwatch();
            //sw.Start();
            //string sql = "SELECT  top 100000 * FROM [K2Log].[dbo].[_ProcInstDataAudit]";
            ////List<_ProcInstDataAudit> list = map.GetList<_ProcInstDataAudit>(sql);
            //List<_ProcInstDataAudit> list = new List<_ProcInstDataAudit>();
            //System.Data.IDataReader reader = map.DbContext.GetReader(sql);

            //while (reader.Read())
            //{
            //    _ProcInstDataAudit m = new _ProcInstDataAudit();
            //    m.Date = DateTime.Parse(reader["date"].ToString());
            //    m.Location = reader["location"].ToString();
            //    m.Name = reader["name"].ToString();
            //    m.ProcInstID = int.Parse(reader["ProcInstID"].ToString());
            //    m.User = reader["user"].ToString();
            //    m.Value = reader["value"].ToString();
            //    list.Add(m);
            //}
            //sw.Stop();
            //Console.WriteLine(sw.Elapsed);

            ////endquery
        }