示例#1
0
        /// <summary>
        ///根据id修改一条数据(返)修改结果)
        /// </summary>
        public bool Update(Models.NAVS Models)
        {
            string sqlStr = " update [MS_NAVS] set CREATE_GUID=@CREATE_GUID,TITLE=@TITLE,URL=@URL,POWER=@POWER,CLASS_ID=@CLASS_ID,TYPE=@TYPE,STATE=@STATE,LAST_CHANGE_TIME=@LAST_CHANGE_TIME,LAST_CHANGE_IP=@LAST_CHANGE_IP,LAST_CHANGE_GUID=@LAST_CHANGE_GUID where id = @id";

            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr, Models) > 0);
            }
        }
示例#2
0
        /// <summary>
        ///根据id修改一条数据(返)修改结果)
        /// </summary>
        public bool Update(Models.DynamicPicture Models)
        {
            string sqlStr = " update [MS_DynamicPicture] set CREATE_GUID=@CREATE_GUID,STATE=@STATE,LAST_CHANGE_TIME=@LAST_CHANGE_TIME,LAST_CHANGE_IP=@LAST_CHANGE_IP,LAST_CHANGE_GUID=@LAST_CHANGE_GUID where id = @id";

            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr, Models) > 0);
            }
        }
示例#3
0
        /// <summary>
        ///根据id修改一条数据(返)修改结果)
        /// </summary>
        public bool Update(Models.ArticeList Models)
        {
            string sqlStr = " update [MS_ArticeList] set CREATE_GUID=@CREATE_GUID,ARTICE_ID=@ARTICE_ID,SORT=@SORT,CLASS_ID=@CLASS_ID,LABEL_ID=@LABEL_ID,STATE=@STATE,LAST_CHANGE_TIME=@LAST_CHANGE_TIME,LAST_CHANGE_IP=@LAST_CHANGE_IP,LAST_CHANGE_GUID=@LAST_CHANGE_GUID where id = @id";

            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr, Models) > 0);
            }
        }
示例#4
0
        /// <summary>
        ///根据id修改一条数据(返)修改结果)
        /// </summary>
        public bool Update(Models.VisitLog Models)
        {
            string sqlStr = " update [MS_VisitLog] set ENTRY_URL=@ENTRY_URL,VISIT_IP=@VISIT_IP,VISIT_CITY=@VISIT_CITY,SESSION_GUID=@SESSION_GUID,STATE=@STATE where id = @id";

            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr, Models) > 0);
            }
        }
示例#5
0
        /// <summary>
        ///根据id修改一条数据(返)修改结果)
        /// </summary>
        public bool Update(Models.BigClass Models)
        {
            string sqlStr = " update [MS_BigClass] set CREATE_GUID=@CREATE_GUID,CLASS_NAME=@CLASS_NAME,CLASS_CODE=@CLASS_CODE,SORT=@SORT,LAST_CHANGE_TIME=@LAST_CHANGE_TIME,LAST_CHANGE_IP=@LAST_CHANGE_IP,LAST_CHANGE_GUID=@LAST_CHANGE_GUID,STATE=@STATE where id = @id";

            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr, Models) > 0);
            }
        }
示例#6
0
文件: NAVDAL.cs 项目: linchh/MainBlog
        /// <summary>
        ///根据id删除一条数据(返)修改结果)
        /// </summary>
        public bool Delete(int id)
        {
            string sqlStr = " delete [MS_NAV] where id = @id";

            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr, new{ id = id }) > 0);
            }
        }
示例#7
0
        /// <summary>
        ///根据id修改一条数据(返)修改结果)
        /// </summary>
        public bool Update(Models.ProjectDetail Models)
        {
            string sqlStr = " update [MS_ProjectDetail] set CREATE_GUID=@CREATE_GUID,TITLE=@TITLE,CONTENT=@CONTENT,PROJECT_URL=@PROJECT_URL,DEMO_URL=@DEMO_URL,STATE=@STATE,LAST_CHANGE_TIME=@LAST_CHANGE_TIME,LAST_CHANGE_IP=@LAST_CHANGE_IP,LAST_CHANGE_GUID=@LAST_CHANGE_GUID where id = @id";

            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr, Models) > 0);
            }
        }
示例#8
0
        /// <summary>
        ///根据id修改一条数据(返)修改结果)
        /// </summary>
        public bool Update(Models.ClassEntity Models)
        {
            string sqlStr = " update [MS_ClassEntity] set CREATE_GUID=@CREATE_GUID,CLASS_NAME=@CLASS_NAME,CLASS_IDENTITY=@CLASS_IDENTITY,LAST_CHANGE_TIME=@LAST_CHANGE_TIME,LAST_CHANGE_IP=@LAST_CHANGE_IP,LAST_CHANGE_GUID=@LAST_CHANGE_GUID,STATE=@STATE where id = @id";

            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr, Models) > 0);
            }
        }
示例#9
0
        /// <summary>
        ///根据id修改一条数据(返)修改结果)
        /// </summary>
        public bool Update(Models.HeadPortrait Models)
        {
            string sqlStr = " update [MS_HeadPortrait] set TITLE=@TITLE,FILE_URL=@FILE_URL,STATE=@STATE,LAST_CHANGE_TIME=@LAST_CHANGE_TIME,LAST_CHANGE_IP=@LAST_CHANGE_IP,LAST_CHANGE_GUID=@LAST_CHANGE_GUID where id = @id";

            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr, Models) > 0);
            }
        }
示例#10
0
文件: NAVDAL.cs 项目: linchh/MainBlog
        /// <summary>
        ///根据id修改一条数据(返)修改结果)
        /// </summary>
        public bool Update(Models.NAV Models)
        {
            string sqlStr = " update [MS_NAV] set TITLE=@TITLE,URL=@URL,POWER=@POWER,CLASS=@CLASS,TYPE=@TYPE,STATE=@STATE,BACKUP1=@BACKUP1 where id = @id";

            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr, Models) > 0);
            }
        }
示例#11
0
        /// <summary>
        ///根据id修改一条数据(返)修改结果)
        /// </summary>
        public bool Update(Models.SelfSign Models)
        {
            string sqlStr = " update [MS_SelfSign] set CREATE_GUID=@CREATE_GUID,CONTENT=@CONTENT,CLASS_ID=@CLASS_ID,STATE=@STATE,LAST_CHANGE_TIME=@LAST_CHANGE_TIME,LAST_CHANGE_IP=@LAST_CHANGE_IP,LAST_CHANGE_GUID=@LAST_CHANGE_GUID where id = @id";

            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr, Models) > 0);
            }
        }
示例#12
0
        /// <summary>
        ///根据id修改一条数据(返)修改结果)
        /// </summary>
        public bool Update(Models.ProjectList Models)
        {
            string sqlStr = " update [MS_ProjectList] set CREATE_GUID=@CREATE_GUID,PROJECT_ID=@PROJECT_ID,SYNOPSIS=@SYNOPSIS,EXPLAIN=@EXPLAIN,SORT=@SORT,CLASS_ID=@CLASS_ID,STATE=@STATE,LAST_CHANGE_TIME=@LAST_CHANGE_TIME,LAST_CHANGE_IP=@LAST_CHANGE_IP,LAST_CHANGE_GUID=@LAST_CHANGE_GUID where id = @id";

            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr, Models) > 0);
            }
        }
示例#13
0
        /// <summary>
        ///根据id修改一条数据(返)修改结果)
        /// </summary>
        public bool Update(Models.ReaderLog Models)
        {
            string sqlStr = " update [MS_ReaderLog] set ENTRY_URL=@ENTRY_URL,ARTICE_ID=@ARTICE_ID,PROJECT_ID=@PROJECT_ID,VISIT_IP=@VISIT_IP,VISIT_CITY=@VISIT_CITY,SESSION_GUID=@SESSION_GUID,STATE=@STATE,OUT_TIME=@OUT_TIME where id = @id";

            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr, Models) > 0);
            }
        }
示例#14
0
        /// <summary>
        ///根据id修改一条数据(返)修改结果)
        /// </summary>
        public bool Update(Models.LoginLog Models)
        {
            string sqlStr = " update [MS_LoginLog] set LOGIN_ID=@LOGIN_ID,LOGIN_PWD=@LOGIN_PWD,GUID=@GUID,IP_ADDRESS=@IP_ADDRESS,CITY=@CITY,SUCCESS=@SUCCESS,STATE=@STATE where id = @id";

            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr, Models) > 0);
            }
        }
示例#15
0
        /// <summary>
        ///根据id修改一条数据(返)修改结果)
        /// </summary>
        public bool Update(Models.OperationLog Models)
        {
            string sqlStr = " update [MS_OperationLog] set GUID=@GUID,IP_ADDRESS=@IP_ADDRESS,CITY=@CITY,OPERATION_URL=@OPERATION_URL,PARAM_STRING=@PARAM_STRING,RESULT_STRING=@RESULT_STRING,STATE=@STATE where id = @id";

            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr, Models) > 0);
            }
        }
示例#16
0
        /// <summary>
        ///根据id修改一条数据(返)修改结果)
        /// </summary>
        public bool Update(Models.TouchMsg Models)
        {
            string sqlStr = " update [MS_TouchMsg] set USER_EMAIL=@USER_EMAIL,MSG=@MSG,STATE=@STATE,LAST_CHANGE_TIME=@LAST_CHANGE_TIME,LAST_CHANGE_IP=@LAST_CHANGE_IP where id = @id";

            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr, Models) > 0);
            }
        }
示例#17
0
文件: NAVDAL.cs 项目: linchh/MainBlog
        /// <summary>
        ///根据条件删除数据(返)受影响的行数)
        /// </summary>
        public int Delete(string cond)
        {
            string sqlStr = " delete [MS_NAV] where (1=2) ";

            if (!string.IsNullOrEmpty(cond))
            {
                sqlStr += " or " + cond;
            }
            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr));
            }
        }
示例#18
0
文件: NAVDAL.cs 项目: linchh/MainBlog
        /// <summary>
        ///根据条件修改数据(返)受影响的行数)
        /// </summary>
        public int Update(string field, string cond)
        {
            string sqlStr = " update [MS_NAV] set " + field + " where (1=2) ";

            if (!string.IsNullOrEmpty(cond))
            {
                sqlStr += " or " + cond;
            }
            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr));
            }
        }
示例#19
0
文件: NAVDAL.cs 项目: linchh/MainBlog
        /// <summary>
        ///一次添加多条数据(返)插入的行数)
        /// </summary>
        public int Adds(List <Models.NAV> Models)
        {
            string sqlStr = " insert into [MS_NAV](TITLE,URL,POWER,CLASS,TYPE,STATE,BACKUP1) ";

            for (int i = 0; i < Models.Count; i++)
            {
                sqlStr += " select ";
                foreach (var a in Models[i].GetType().GetProperties())
                {
                    sqlStr += " '" + a + "',";
                }
                sqlStr = sqlStr.Substring(0, sqlStr.Length - 1);
                if (i < Models.Count - 1)
                {
                    sqlStr += " union all ";
                }
            }
            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr));
            }
        }
示例#20
0
        /// <summary>
        ///一次添加多条数据(返)插入的行数)
        /// </summary>
        public int Adds(List <Models.SelfSign> Models)
        {
            string sqlStr = " insert into [MS_SelfSign](CREATE_GUID,CONTENT,CLASS_ID,STATE,LAST_CHANGE_TIME,LAST_CHANGE_IP,LAST_CHANGE_GUID) ";

            for (int i = 0; i < Models.Count; i++)
            {
                sqlStr += " select ";
                foreach (var a in Models[i].GetType().GetProperties())
                {
                    sqlStr += " '" + a + "',";
                }
                sqlStr = sqlStr.Substring(0, sqlStr.Length - 1);
                if (i < Models.Count - 1)
                {
                    sqlStr += " union all ";
                }
            }
            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr));
            }
        }
示例#21
0
        /// <summary>
        ///一次添加多条数据(返)插入的行数)
        /// </summary>
        public int Adds(List <Models.ReaderLog> Models)
        {
            string sqlStr = " insert into [MS_ReaderLog](ENTRY_URL,ARTICE_ID,PROJECT_ID,VISIT_IP,VISIT_CITY,SESSION_GUID,STATE,OUT_TIME) ";

            for (int i = 0; i < Models.Count; i++)
            {
                sqlStr += " select ";
                foreach (var a in Models[i].GetType().GetProperties())
                {
                    sqlStr += " '" + a + "',";
                }
                sqlStr = sqlStr.Substring(0, sqlStr.Length - 1);
                if (i < Models.Count - 1)
                {
                    sqlStr += " union all ";
                }
            }
            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr));
            }
        }
示例#22
0
        /// <summary>
        ///一次添加多条数据(返)插入的行数)
        /// </summary>
        public int Adds(List <Models.HeadPortrait> Models)
        {
            string sqlStr = " insert into [MS_HeadPortrait](TITLE,FILE_URL,STATE,LAST_CHANGE_TIME,LAST_CHANGE_IP,LAST_CHANGE_GUID) ";

            for (int i = 0; i < Models.Count; i++)
            {
                sqlStr += " select ";
                foreach (var a in Models[i].GetType().GetProperties())
                {
                    sqlStr += " '" + a + "',";
                }
                sqlStr = sqlStr.Substring(0, sqlStr.Length - 1);
                if (i < Models.Count - 1)
                {
                    sqlStr += " union all ";
                }
            }
            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr));
            }
        }
示例#23
0
        /// <summary>
        ///一次添加多条数据(返)插入的行数)
        /// </summary>
        public int Adds(List <Models.TouchMsg> Models)
        {
            string sqlStr = " insert into [MS_TouchMsg](USER_EMAIL,MSG,STATE,LAST_CHANGE_TIME,LAST_CHANGE_IP) ";

            for (int i = 0; i < Models.Count; i++)
            {
                sqlStr += " select ";
                foreach (var a in Models[i].GetType().GetProperties())
                {
                    sqlStr += " '" + a + "',";
                }
                sqlStr = sqlStr.Substring(0, sqlStr.Length - 1);
                if (i < Models.Count - 1)
                {
                    sqlStr += " union all ";
                }
            }
            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr));
            }
        }
示例#24
0
        /// <summary>
        ///一次添加多条数据(返)插入的行数)
        /// </summary>
        public int Adds(List <Models.OperationLog> Models)
        {
            string sqlStr = " insert into [MS_OperationLog](GUID,IP_ADDRESS,CITY,OPERATION_URL,PARAM_STRING,RESULT_STRING,STATE) ";

            for (int i = 0; i < Models.Count; i++)
            {
                sqlStr += " select ";
                foreach (var a in Models[i].GetType().GetProperties())
                {
                    sqlStr += " '" + a + "',";
                }
                sqlStr = sqlStr.Substring(0, sqlStr.Length - 1);
                if (i < Models.Count - 1)
                {
                    sqlStr += " union all ";
                }
            }
            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr));
            }
        }
示例#25
0
        /// <summary>
        ///一次添加多条数据(返)插入的行数)
        /// </summary>
        public int Adds(List <Models.LoginLog> Models)
        {
            string sqlStr = " insert into [MS_LoginLog](LOGIN_ID,LOGIN_PWD,GUID,IP_ADDRESS,CITY,SUCCESS,STATE) ";

            for (int i = 0; i < Models.Count; i++)
            {
                sqlStr += " select ";
                foreach (var a in Models[i].GetType().GetProperties())
                {
                    sqlStr += " '" + a + "',";
                }
                sqlStr = sqlStr.Substring(0, sqlStr.Length - 1);
                if (i < Models.Count - 1)
                {
                    sqlStr += " union all ";
                }
            }
            using (var connection = new ConnectionCode().GetConnection())
            {
                return(connection.Execute(sqlStr));
            }
        }