Ejemplo n.º 1
0
        public static string OperateRecords(string ids, int op)
        {
            string[] array = ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            using (BLLAdminUser bll = new BLLAdminUser())
            {
                foreach (string id in array)
                {
                    switch (op)
                    {
                    case 7:                             //delete
                        if (bll.GetList().Count < 2)
                        {
                            return("最后一个管理员不能删除");
                        }
                        bll.Delete(id);

                        break;
                    }
                }

                if (bll.IsFail)
                {
                    return(ExceptionManager.GetErrorMsg(bll.DevNetException));
                }
            }
            return(string.Empty);
        }