QiFeng.ZWY.MagWeb/Controllers/WechatController.cs

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using QiFeng.LMSD.Bll;
using QiFeng.LMSD.Bll.WxInterfaceFunc;
using QiFeng.LMSD.Model;
using QiFeng.LMSD.Model.Wechat;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Mvc;

namespace QiFeng.LMSD.MagWeb.Controllers
{
    [Authorization]
    [Model.Attributes.Skip]
    public class WechatController : BaseController
    {
        //
        // GET: /Wechat/

        public ActionResult List()
        {
            return View();
        }

        public JsonResult Listing(int draw, int start, int length)
        {
            int order;
            int.TryParse(Request["order[0][column]"], out order);
            var direction = Request["order[0][dir]"];
            var orderByColumns = new[] { "Id", "WeChatName", "WechatLogin", "WechatPwd", "AppId", "Secret", "OriginalId", "CreateDate", "AuthorizeUrl", "PayKey", "MchId", "NickName", "Menus", "SignatureToken", "CertPath" };
            var search = Request["search[value]"];
            var pageIndex = start / length + 1;
            var theList = WechatInfoBll.Instance.GetPagingList(draw, pageIndex, length, search, orderByColumns[order] + " " + direction);
            return Json(theList);
        }

        #region 添加
        public ActionResult Create()
        {
            return View();
        }

        [HttpPost]
        public ActionResult Create(FormCollection collection, WechatInfo model)
        {
            if (model == null)
            {
                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            }
            var result = WechatInfoBll.Instance.AddForMag(model);
            if (result <= 0)
            {
                return new HttpStatusCodeResult(HttpStatusCode.InternalServerError);
            }
            return RedirectToAction("List", "Wechat");
        }
        #endregion

        #region 修改
后面还有 136 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。