Beispiel #1
0
        public WxOfficialOutputDto GetForm(string keyValue)
        {
            var id = Convert.ToInt64(keyValue);
            WxOfficialOutputDto wxOfficialOutputDto = new WxOfficialOutputDto();
            WxOfficial          wxOfficial          = wxOfficialRepository.Get(id);

            AutoMapper.Mapper.Map <WxOfficial, WxOfficialOutputDto>(wxOfficial, wxOfficialOutputDto);
            return(wxOfficialOutputDto);
        }
Beispiel #2
0
        public ActionResult Index(string keyValue)
        {
            WxOfficialOutputDto wxOfficialOutputDto = wxOfficialService.GetForm(keyValue);
            WxOperatorModel     wxOperatorModel     = new WxOperatorModel();

            wxOperatorModel.AppId     = wxOfficialOutputDto.AppId;
            wxOperatorModel.Name      = wxOfficialOutputDto.Name;
            wxOperatorModel.AppSecret = wxOfficialOutputDto.AppSecret;
            wxOperatorModel.AppType   = wxOfficialOutputDto.AppType;
            WxOperatorProvider.Provider.AddCurrent(wxOperatorModel);
            var aaa = WxOperatorProvider.Provider.GetCurrent();

            AccessTokenContainer.Register(wxOfficialOutputDto.AppId, wxOfficialOutputDto.AppSecret);

            ViewData["AppName"] = wxOfficialOutputDto.Name;
            return(View());
        }