Beispiel #1
0
    public Query_Customer_Result GetResult()
    {
        CreateSSL ssl = new CreateSSL(this.Create_url());
        string    responseFromServer = ssl.GetResponse();


        Query_Customer_Result result = new Query_Customer_Result(responseFromServer);

        return(result);
    }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string requestType = Request.QueryString["type"] != null ? Request.QueryString["type"].ToString().ToLower() : "";

            if (requestType == "save")
            {
                Save();
            }
            // 判断用户是否登录,如果没有登录跳转到登录页面
            if (!IsLogin)
            {
                EyouSoft.Security.Membership.UserProvider.RedirectLogin(Domain.UserBackCenter + "/TicketsCenter/Default.aspx");
                return;
            }

            //判断用户所在公司,在运营后台是否通过了审核
            if (!IsCompanyCheck)//没有通过审核
            {
                Utils.ShowError("对不起,您还没通过审核,不能进入机票供应商后台!", "ticketscenter");
                return;
            }

            //判断用户是否是机票供应商用户
            if (!IsAirTicketSupplyUser)//不是
            {
                Utils.ShowError("对不起,您不是机票供应商用户,不能进入机票供应商后台!", "ticketscenter");
                return;
            }

            //判断用户绑定的支付帐户信息 是否已经成功加入支付圈
            EyouSoft.IBLL.TicketStructure.ITicketCompanyAccount bll =
                EyouSoft.BLL.TicketStructure.TicketCompanyAccount.CreateInstance();

            //当前只能判断支付宝接口和财付通接口的帐户
            IList <EyouSoft.Model.TicketStructure.TicketCompanyAccount> accountList =
                bll.GetTicketCompanyAccountList(SiteUserInfo.CompanyID);

            if (accountList != null && accountList.Count > 0)
            {
                foreach (EyouSoft.Model.TicketStructure.TicketCompanyAccount account in accountList)
                {
                    if (account.InterfaceType == EyouSoft.Model.TicketStructure.TicketAccountType.支付宝)
                    {
                        if (account.IsSign)//已经签约
                        {
                            continue;
                        }
                        //通过 支付宝查询是否签约接口,获取该帐户是否已经签约
                        Query_Customer queryCustomer = new Query_Customer(
                            AlipayParameters.Partner,
                            AlipayParameters.Key,
                            AlipayParameters.SignType,
                            AlipayParameters.Input_Charset,
                            account.AccountNumber);
                        Query_Customer_Result queryCustomerResult = queryCustomer.GetResult();
                        if (queryCustomerResult.IsSuccess_Refund_Charge)//已经签约
                        {
                            //将成功签约的状态保存到数据库中
                            account.IsSign = true;
                            bll.SetIsSign(account.CompanyId, account.InterfaceType, true);
                        }
                    }
                    else if (account.InterfaceType == EyouSoft.Model.TicketStructure.TicketAccountType.财付通)
                    {
                        if (account.IsSign)//已经建立委托退款关系
                        {
                            continue;
                        }
                        //通过 财付通查询是否建立委托退款关系接口,获取该帐户是否已经建立委托关系
                        trustRefundQuerys querys = new trustRefundQuerys(
                            TenpayParameters.Bargainor_ID,
                            account.AccountNumber,
                            TenpayParameters.Key,
                            Context);
                        bool isTrust = querys.IsTrustRefund();
                        if (isTrust == true)//已经建立关系
                        {
                            //将成功建立关系的状态保存到数据库中
                            account.IsSign = true;
                            bll.SetIsSign(account.CompanyId, account.InterfaceType, true);
                        }
                    }
                }
            }

            //初始化订单管理列表
            diclist = EyouSoft.BLL.TicketStructure.TicketOrder.CreateInstance().GetSupplierHandelStats(SiteUserInfo.CompanyID);

            //初始化公司信息
            ltrCompanyName.Text = SiteUserInfo.CompanyName;
            EyouSoft.IBLL.CompanyStructure.ICompanyInfo       CompanyInfo      = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
            EyouSoft.Model.CompanyStructure.CompanyDetailInfo CompanyInfoModel = CompanyInfo.GetModel(SiteUserInfo.CompanyID);
            if (CompanyInfoModel != null)
            {
                if (!String.IsNullOrEmpty(CompanyInfoModel.AttachInfo.CompanyLogo.ImagePath))
                {
                    this.imgLogo.Src = Domain.FileSystem + CompanyInfoModel.AttachInfo.CompanyLogo.ImagePath;
                }
                else
                {
                    this.imgLogo.Src = ImageServerUrl + "/images/logo.gif";
                }
            }
            ltrUserName.Text = SiteUserInfo.UserName;

            //初始化  现有运价数 ,平台用户数
            int gongYingUserCount = 0;

            EyouSoft.Model.SystemStructure.SummaryCount scount =
                EyouSoft.BLL.SystemStructure.SummaryCount.CreateInstance().GetSummary();
            if (scount != null)
            {
                gongYingUserCount = scount.TicketCompanyVirtual;
            }
            ltrGongYingCompanyCount.Text = gongYingUserCount.ToString();

            //初始化用户资料
            EyouSoft.IBLL.TicketStructure.ITicketSupplierInfo isupplierInfoBll =
                EyouSoft.BLL.TicketStructure.TicketSupplierInfo.CreateInstance();
            EyouSoft.Model.TicketStructure.TicketWholesalersAllInfo allInfo =
                isupplierInfoBll.GetSupplierInfo(SiteUserInfo.CompanyID);
            if (allInfo != null)
            {
                Default_ContactPeople.Value = allInfo.ContactName;                              //联系人
                Default_Phone.Value         = allInfo.ContactTel;                               //联系电话
                ltrUserLevel.Text           = allInfo.ProxyLev;                                 //代理级别
                ltrTicketSuccess.Text       = (allInfo.SuccessRate * 100).ToString("F1") + "%"; //出票成功率
                Default_ICP.Value           = allInfo.ICPNumber;                                //ICP备案号
                Default_Url.Value           = allInfo.WebSite;                                  //网址

                string licenceImg = allInfo.AttachInfo.BusinessCertif.LicenceImg;               //营业执照
                //判断是否有上传了营业执照
                if (!string.IsNullOrEmpty(licenceImg))                                          //有
                {
                    //显示 查看图片链接
                    ltrFile1.Text = string.Format("<a href='{0}' target='_blank'>查看</a>", Domain.FileSystem + licenceImg);
                }
                else
                {
                    ltrFile1.Text = "暂无营业执照";
                }

                string bronze = allInfo.AttachInfo.Bronze; //铜牌
                //判断是否有上传了铜牌
                if (!string.IsNullOrEmpty(bronze))         //有
                {
                    //显示 查看图片链接
                    ltrFile2.Text = string.Format("<a href='{0}' target='_blank'>查看</a>", Domain.FileSystem + bronze);
                }
                else
                {
                    ltrFile2.Text = "暂无铜牌图片";
                }

                string tradeAward = allInfo.AttachInfo.TradeAward; //行业奖项
                //判断是否有上传了行业奖项
                if (!string.IsNullOrEmpty(tradeAward))             //有
                {
                    //显示 查看图片链接
                    ltrFile3.Text = string.Format("<a href='{0}' target='_blank'>查看</a>", Domain.FileSystem + tradeAward);
                }
                else
                {
                    ltrFile3.Text = "暂无行业奖项图片";
                }

                Default_Remark.Value = allInfo.CompanyRemark;//备注
            }
        }