예제 #1
0
        public void Active(HttpContext context, long class_id)
        {
            var result = new AccountClassBLL().Active(class_id, LoginUserId);

            if (result == DTO.ERROR_CODE.SUCCESS)
            {
                context.Response.Write("激活成功!");
            }
            else if (result == DTO.ERROR_CODE.ACTIVATION)
            {
                context.Response.Write("已经激活,无需此操作!");
            }
            else
            {
                context.Response.Write("激活失败!");
            }
        }
예제 #2
0
        public void Delete(HttpContext context, long class_id)
        {
            //此处写复制逻辑
            var result = new AccountClassBLL().Delete(class_id, LoginUserId);

            if (result == DTO.ERROR_CODE.SUCCESS)
            {
                context.Response.Write("success");
            }
            else if (result == DTO.ERROR_CODE.SYSTEM)
            {
                context.Response.Write("system");
            }
            else
            {
                context.Response.Write("error");
            }
        }
예제 #3
0
        /// <summary>
        /// 删除前进行数据校验
        /// </summary>
        /// <param name="context"></param>
        /// <param name="class_id"></param>
        public void Delete_Validate(HttpContext context, long class_id)
        {
            //此处写复制逻辑

            int n;//记录受影响的客户个数
            var result = new AccountClassBLL().Delete_Validate(class_id, LoginUserId, out n);

            if (result == DTO.ERROR_CODE.SUCCESS)
            {
                Delete(context, class_id);
            }
            else if (result == DTO.ERROR_CODE.SYSTEM)
            {
                context.Response.Write("system");
            }
            else if (result == DTO.ERROR_CODE.ACCOUNT_TYPE_USED)
            {
                context.Response.Write(n);
            }
            else
            {
                context.Response.Write("other");
            }
        }