Beispiel #1
0
        public void UpdateSetter(entity.Setter setter)
        {
            using (var conn = DbUtil.getConn())//更新Setter
            {
                conn.Execute("update bdl_set set Set_Language=@Set_Language,Set_OrganizationSort=@Set_OrganizationSort,Set_OrganizationName=@Set_OrganizationName,Set_PhotoLocation=@Set_PhotoLocation,Set_OrganizationPhone=@Set_OrganizationPhone,Back_Up=@Back_Up where Pk_Set_Id=@Pk_Set_Id", setter);
            }
            setter = getSetter();
            //插入至上传表
            UploadManagementDAO uploadManagementDao1 = new UploadManagementDAO();

            uploadManagementDao1.Insert(new UploadManagement(setter.Pk_Set_Id, "bdl_set", 1));
        }
Beispiel #2
0
        public void UpdateStatusByUserId(int userId)
        {
            //插入至上传表
            UploadManagementDAO uploadManagementDao = new UploadManagementDAO();

            uploadManagementDao.Insert(new UploadManagement(userId, "bdl_traininfo", 1));
            using (var conn = DbUtil.getConn())
            {
                const string query = "update bdl_traininfo set status = 3 where fk_user_id = @FK_User_Id and status = 0";

                conn.Execute(query, new { FK_User_Id = userId });
            }
        }
Beispiel #3
0
        public void InsertOneMacAdress(entity.Setter setter)
        {
            using (var conn = DbUtil.getConn())
            {
                const string sql = "insert into bdl_set(set_unique_id, set_language,set_photolocation, set_version,back_up) values(@Set_Unique_Id,@Set_Language, @Set_PhotoLocation, @Set_Version,@Back_Up)";
                conn.Execute(sql, setter);
            }
            setter = getSetter();
            //插入至上传表
            UploadManagementDAO uploadManagementDao1 = new UploadManagementDAO();

            uploadManagementDao1.Insert(new UploadManagement(setter.Pk_Set_Id, "bdl_set", 0));
        }
Beispiel #4
0
        /// <summary>
        ///  设置某用户所有的暂存状态的信息为nomal状态
        /// </summary>
        /// <param name="userID"></param>
        public void SetTmpToNomal(int userID)
        {
            //插入至上传表
            UploadManagementDAO uploadManagementDao = new UploadManagementDAO();

            uploadManagementDao.Insert(new UploadManagement(userID, "bdl_traininfo", 1));
            //throw new NotImplementedException();
            using (var conn = DbUtil.getConn())
            {
                const string query = "update bdl_traininfo set status = 0 where fk_user_id = @FK_User_Id and status = 4";

                conn.Execute(query, new { FK_User_Id = userID });
            }
        }