Ejemplo n.º 1
0
        /// <summary>
        /// 移出群組
        /// </summary>
        /// <param name="list"></param>
        public void moveUserRelative(TbUserAuthRelativeData model)
        {
            string sql          = getDeleteSql("TbUserAuthRelativeDataSqlProvider", "deleteTableUserAuth");
            object parameterObj = new
            {
                USER_ID          = model.USER_ID,
                RELATIVE_USER_ID = model.RELATIVE_USER_ID,
            };

            ExecuteTableBySql(sql, parameterObj);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 移入群組
        /// </summary>
        /// <param name="model"></param>
        public void addUserRelative(TbUserAuthRelativeData model)
        {
            string sql          = getInsertSql("TbUserAuthRelativeDataSqlProvider", "insertTableUserAuth");
            object parameterObj = new
            {
                USER_ID          = model.USER_ID,
                RELATIVE_USER_ID = model.RELATIVE_USER_ID,
                NODE             = model.NODE,
                CR_IP            = model.CR_IP,
                CR_USER          = model.CR_USER,
                UP_IP            = model.CR_IP
            };

            ExecuteTableBySql(sql, parameterObj);
        }
Ejemplo n.º 3
0
 public void addUserRelative(TbUserAuthRelativeData model)
 {
     using (SqlConnection dbConn = new SqlConnection(DbConnection.connString)){
         dbConn.Open();
         SqlTransaction dbConnTxn = dbConn.BeginTransaction();
         try
         {
             dao.dbConn    = dbConn;
             dao.dbConnTxn = dbConnTxn;
             dao.addUserRelative(model);
             dbConnTxn.Commit();
         }
         catch (Exception e)
         {
             dbConnTxn.Rollback();
             logger.Error(e, e.Message);
         }
     }
 }