/*Admin/LockByMonth * 1、获取按月份冻结用户的参数(月份 int or string) * 2、通过UserManager-LockByMonth冻结指定条件的用户 * 3、返回操作结果*/ public ActionResult LockByMonth(string month) { DateTime datetime = new IPManager().GetDateTime(); datetime = datetime.AddMonths(-Convert.ToInt32(month)); string date = datetime.ToString("yyy-MM-dd"); if (new UserManager().LockStudentByMonth(date)) { return(Content("success")); } else { return(Content("fail")); } }