Пример #1
0
        public ActionResult GetAllWorker()
        {
            BLL.Organize.Worker worker = new BLL.Organize.Worker();

            List <B_WORKER> cot = worker.GetAllWorker();

            return(Json(cot));
        }
Пример #2
0
        //判断登录名是否已经存在
        public ActionResult IsExistName(string name, int workerId)
        {
            BLL.Organize.Worker worker = new BLL.Organize.Worker();

            B_WORKER result = worker.GetAllWorker().FirstOrDefault(t => t.Name == name && t.ID != workerId);

            if (result == null)
            {
                return(Json(new { IsSuccess = false }));
            }
            else
            {
                return(Json(new { IsSuccess = true }));
            }
        }