Exemplo n.º 1
0
        /// <summary>
        /// 删除员工(绝对删除)
        /// </summary>
        /// <param name="uid">用户id</param>
        /// <returns>受影响的行数</returns>
        public static int DeleteStaves(int uid)
        {
            ArrayList sql = new ArrayList();

            sql.Add("delete from ipvt_staffmessagetable where StaffID=" + uid + "");
            sql.Add("update ipvt_userregmessagetable set StaffID=null where StaffID=" + uid + "");
            return(CustomMySqlHelper.ExecuteSqlTran(sql));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 删除职位
        /// </summary>
        /// <param name="uid">用户id</param>
        /// <returns>受影响的行数</returns>
        public static int DeletePosition(int id)
        {
            ArrayList al = new ArrayList();

            al.Add("delete from ipvt_positiontable where PositionID=" + id + "");
            al.Add("update ipvt_staffmessagetable set PositionID=null where PositionID=" + id + "");

            //string sql = "delete from ipvt_positiontable where PositionID=?id";
            //var param = new MySqlParameter[1];
            //param[0] = new MySqlParameter("?id", id);


            return(CustomMySqlHelper.ExecuteSqlTran(al));
            //return CustomMySqlHelper.ExecuteNonQuery(sql, param);
        }