예제 #1
0
    /// <summary>
    /// 八千翼签约
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void lk8000yiZFBSigning_Click(object sender, EventArgs e)
    {
        try
        {
            w_8000YService.W8000YService WSvc8000Y        = new w_8000YService.W8000YService();
            PbProject.Model.definitionParam.BaseSwitch BS = PbProject.WebCommon.Utility.BaseParams.getParams(baseParametersList);
            string Accout8000yi = BS.JieKouZhangHao.Split('|')[5].Split('^')[0];

            string Password8000yi = BS.JieKouZhangHao.Split('|')[5].Split('^')[1];
            if (txtJKDKZFB8000yi.Text != "")
            {
                string url = WSvc8000Y.PaySignOn(Accout8000yi, Password8000yi, txtJKDKZFB8000yi.Text);
                lk8000yiZFBSigning.Visible = false;
                Response.Write("<script> window.open('" + url + "'); </script>");
            }
            else
            {
                lk8000yiZFBSigning.Visible = true;
                Page.ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.Ticks.ToString(), "showdialog('请输入账号!');", true);
            }
        }
        catch (Exception ex)
        {
            ScriptManager.RegisterStartupScript(this, GetType(), "", "showdialog('签约失败:" + ex.ToString() + "');", true);
        }
    }
예제 #2
0
 /// <summary>
 /// 加载
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         //this.loading.Style.Value = "display: none;background: url(../images/" + mCompany.UninAllName + "/mainbg.gif) no-repeat;";
         if (!IsPostBack)
         {
             //隐藏政策
             hidePolicy.Value  = mUser.UserPower.Contains("|2|").ToString();
             hidRoleType.Value = mCompany.RoleType.ToString();
             hidTime.Value     = DateTime.Now.ToString("yyyy-MM-dd");
             PbProject.Model.definitionParam.BaseSwitch baseParams = PbProject.WebCommon.Utility.BaseParams.getParams(supBaseParametersList);
             Hid_GroupId.Value = mCompany.GroupId;          //获取扣点组ID
             if (baseParams.KongZhiXiTong.Contains("|74|")) //开启共享航班开关
             {
                 this.divIsShowShare.Style["display"] = "block";
             }
             cbIsShowShare.Checked = true;//默认不显示共享
         }
     }
     catch (Exception ex)
     {
         //OnErrorNew(0, ex.ToString(), "Air_Buy_List_Page_Load");
     }
 }
 /// <summary>
 /// 汇付天下
 /// </summary>
 private void SaveChinapnr(List <Bd_Base_Parameters> Bd_Base_ParametersList)
 {
     try
     {
         string msg     = "";
         string account = this.txtChinanprAccount.Text;
         string pwd     = this.txtChinapnrPwd.Text;
         if (string.IsNullOrEmpty(account) || string.IsNullOrEmpty(pwd))
         {
             ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.Ticks.ToString(), "showdialog('汇付天下账号密码不能为空');", true);
             return;
         }
         if (!this.rbXinyong.Checked && !this.rbFukuan.Checked)
         {
             ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.Ticks.ToString(), "showdialog('必须选择支付方式');", true);
             return;
         }
         string payType = "1";
         if (this.rbFukuan.Checked)
         {
             payType = "2";
         }
         PbProject.Model.definitionParam.BaseSwitch BS = new PbProject.Model.definitionParam.BaseSwitch();
         BS = PbProject.WebCommon.Utility.BaseParams.getParams(Bd_Base_ParametersList);
         //自动出票方式(1,支付宝本票通;2,汇付天下出票窗)^帐号|是否签约(1,已签约;2,未签)^帐号|密码|支付方式(1,信用账户;2,付款账户)
         string Bd_Base_Parameters_insertSQL = "update Bd_Base_Parameters set SetValue =" +
                                               " '2^" + txtfailcount.Text.Trim() + "^无^" + account + "|" + pwd + "|" + payType + "'" +
                                               " where " +
                                               " CpyNo = " + " '" + mCompany.UninCode + "' and " +
                                               " SetName = " + " '" + PbProject.Model.definitionParam.paramsName.autoPayAccount + "' ";//自动支付参数
         PbProject.Logic.SQLEXBLL.SQLEXBLL_Base sqlbase = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base();
         bool sss = sqlbase.ExecuteNonQuerySQLInfo(Bd_Base_Parameters_insertSQL);
         msg = sss ? "修改成功!" : "修改失败!";
         //if (BS.KongZhiXiTong.Contains("|22|"))
         //{
         updateCarrier();
         //}
         Page.ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.Ticks.ToString(), "showdialog('" + msg + "');", true);
     }
     catch (Exception)
     {
         throw;
     }
 }
    /// <summary>
    /// 支付宝
    /// </summary>
    private void SaveAlipay(List <Bd_Base_Parameters> Bd_Base_ParametersList)
    {
        //Page.ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.Ticks.ToString(), "showdialog('请保证要保存的支付宝已经签约第三方代扣和和航空公司 B2B 地址绑定,否则自动出票失败!');", true);
        try
        {
            string msg         = "";
            string alipayAount = txtAutoCPAlipay.Text.Trim();

            if (Bd_Base_ParametersList == null)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.Ticks.ToString(), "showdialog('未获取到参数,请重新尝试或联系管理员');", true);
                return;
            }
            PbProject.Model.definitionParam.BaseSwitch BS = new PbProject.Model.definitionParam.BaseSwitch();
            BS = PbProject.WebCommon.Utility.BaseParams.getParams(Bd_Base_ParametersList);

            if (alipayAount == "")
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.Ticks.ToString(), "showdialog('支付宝不能为空');", true);
                return;
            }
            //自动出票方式(1,支付宝本票通;2,汇付天下出票窗)^帐号|是否签约(1,已签约;2,未签)^帐号|密码|支付方式(1,信用账户;2,付款账户)
            string Bd_Base_Parameters_insertSQL = "update Bd_Base_Parameters set SetValue =" +
                                                  " '1^" + txtfailcount.Text.Trim() + "^" + alipayAount + "|1^无'" +
                                                  " where " +
                                                  " CpyNo = " + " '" + mCompany.UninCode + "' and " +
                                                  " SetName = " + " '" + PbProject.Model.definitionParam.paramsName.autoPayAccount + "' ";//自动支付参数
            PbProject.Logic.SQLEXBLL.SQLEXBLL_Base sqlbase = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base();
            bool sss = sqlbase.ExecuteNonQuerySQLInfo(Bd_Base_Parameters_insertSQL);
            msg = sss ? "修改成功!" : "修改失败!";
            //if (BS.KongZhiXiTong.Contains("|22|"))
            //{
            updateCarrier();
            //}
            Page.ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.Ticks.ToString(), "showdialog('" + msg + "');", true);
        }
        catch (Exception)
        {
            throw;
        }

        //GetData();
    }
예제 #5
0
    /// <summary>
    /// 获取当前登录公司参数信息(运营)
    /// </summary>
    protected void BindInterFaceInfo()
    {
        //接口账号
        List <Bd_Base_Parameters> listParameters = baseDataManage.CallMethod("Bd_Base_Parameters", "GetList", null, new Object[] { "CpyNo='" + mUser.CpyNo + "'" }) as List <Bd_Base_Parameters>;

        PbProject.Model.definitionParam.BaseSwitch pmdb = PbProject.WebCommon.Utility.BaseParams.getParams(listParameters);
        string[] strs6 = pmdb.JieKouZhangHao.Split('|');
        txtJKact517.Text  = strs6[0].Split('^')[0];
        txtJKpwd517.Text  = strs6[0].Split('^')[1];
        txtJKkey517.Text  = strs6[0].Split('^')[2];
        txtyckack517.Text = strs6[0].Split('^')[3];
        txtyckpwd517.Text = strs6[0].Split('^')[4];

        txtJKact51book.Text     = strs6[1].Split('^')[0];
        txtJKpwd51book.Text     = strs6[1].Split('^')[1];
        txtJKkey51book.Text     = strs6[1].Split('^')[2];
        txtNoticeURL51book.Text = strs6[1].Split('^')[3];

        txtJKactBT.Text = strs6[2].Split('^')[0];
        txtJKpwdBT.Text = strs6[2].Split('^')[1];
        txtJKkeyBT.Text = strs6[2].Split('^')[2];

        txtJKactPM.Text = strs6[3].Split('^')[0];
        txtJKpwdPM.Text = strs6[3].Split('^')[1];
        txtJKkeyPM.Text = strs6[3].Split('^')[2];

        txtJKactJR.Text = strs6[4].Split('^')[0];
        txtJKpwdJR.Text = strs6[4].Split('^')[1];


        txtJKact8000yi.Text   = strs6[5].Split('^')[0];
        txtJKpwd8000yi.Text   = strs6[5].Split('^')[1];
        txtJKDKZFB8000yi.Text = strs6[5].Split('^')[2];

        txtyixing.Text   = strs6[6].Split('^')[0];
        txtyixinggy.Text = strs6[6].Split('^')[1];
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        OnErrorNew("进入 ReturnBaiTuoPay.aspx_Load()", false);

        string tmpstr = "";

        string[] sl = Request.QueryString.AllKeys;
        for (int i = 0; i < sl.Length; i++)
        {
            tmpstr += sl[i] + "=" + Request.QueryString[sl[i]].ToString() + "&";
        }

        OnErrorNew(tmpstr, false);


        PbProject.Model.Tb_Ticket_Order            Order = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().GetTicketOrderByOrderId(Request.QueryString["portorderid"].ToString());
        PbProject.Model.definitionParam.BaseSwitch BS    = new PbProject.Model.definitionParam.BaseSwitch();
        List <PbProject.Model.Bd_Base_Parameters>  mBP   = new PbProject.Logic.ControlBase.BaseDataManage().
                                                           CallMethod("Bd_Base_Parameters", "GetList", null, new Object[] { "CpyNo='" + Order.OwnerCpyNo.Substring(0, 12) + "'" }) as List <PbProject.Model.Bd_Base_Parameters>;

        BS = PbProject.WebCommon.Utility.BaseParams.getParams(mBP);
        //Login(Order);
        PbProject.Logic.PTInterface.PTBybaituo OrderBaiTuoInterface = new PbProject.Logic.PTInterface.PTBybaituo(Order, BS);
        w_BTWebService.BaiTuoWeb BaiTuoWebService = new w_BTWebService.BaiTuoWeb();
        //BaiTuoWebService.BaiTuoWeb BaiTuoWebService = new BaiTuoWebService.BaiTuoWeb();
        //System.Threading.Thread.Sleep(50000);

        if (Request.QueryString["forderformid"] != null && Request.QueryString["messageType"].ToString() == "2")
        {
            #region 出票
            #region 参数接收
            string forderformid = Request.QueryString["forderformid"].ToString();
            string produceType  = Request.QueryString["produceType"].ToString();
            string messageType  = Request.QueryString["messageType"].ToString();
            OnErrorNew("ticketnoinfo内容:" + "messageType:" + messageType + "/forderformid:" + forderformid + "/produceType:" + produceType, false);
            #endregion
            XmlElement xmlElement = OrderBaiTuoInterface.BaiTuoCpSend(forderformid);

            XmlNode xml = BaiTuoWebService.getOrderInfoXml(xmlElement);

            OnErrorNew("取订单XML内容:" + xml.InnerXml, false);
            DataSet      ds  = new DataSet();
            StringReader rea = new StringReader("<ORDER_INFO_RS>" + xml.InnerXml + "</ORDER_INFO_RS>");
            #region 测试数据
            //string sss = "";
            //sss += "<ORDERINFO OrderID=\"f1020\" IssuedDate=\"2008-12-24 10:07:31\" Status=\"4\" Flag=\"1\" Shouldpaid=\"8180.00\" Money=\"8000.00\">";
            //sss += "<TICKETINFO PNR=\"RE566\" personName=\"wangchun2\" DepartCity=\"PEK\" ArrivalCity=\"SHA\" InsuranceNumber=\"D000028127\" Price=\"450\" AgentPrice=\"440\" InsurancePolicyNO=\"\" EhomeBillno=\"\" >999-789456120</TICKETINFO>";
            //sss += "<TICKETINFO PNR=\"RE567\" personName=\"wangchun3\" DepartCity=\"PEK\" ArrivalCity=\"SHA\" InsuranceNumber=\"\" Price=\"450\" AgentPrice=\"440\" InsurancePolicyNO=\"\" EhomeBillno=\"\">999-789456121</TICKETINFO>";
            //sss += "<TICKETINFO PNR=\"RE568\" personName=\"wangchun4\" DepartCity=\"PEK\" ArrivalCity=\"SHA\" InsuranceNumber=\"D000028127\" Price=\"450\" AgentPrice=\"440\" InsurancePolicyNO=\"\" EhomeBillno=\"\">999-789456122</TICKETINFO>";
            //sss += "</ORDERINFO>";
            //sss += "<Error Code=\"611001\">出错原因</Error>";
            //StringReader rea = new StringReader("<ORDER_INFO_RS>" + sss + "</ORDER_INFO_RS>");
            #endregion
            XmlTextReader xmlReader = new XmlTextReader(rea);

            ds.ReadXml(xmlReader);
            if (ds.Tables.Count > 1)
            {
                OnErrorNew("订单状态:" + ds.Tables[0].Rows[0]["Status"].ToString(), false);
                if (ds.Tables[0].Rows[0]["Status"].ToString() == "4")
                {
                    if (Order != null)
                    {
                        if (Order.OrderStatusCode == 4)
                        {
                            OnErrorNew("该票号已经出票", false);
                            return;
                        }
                        if (Order.OrderStatusCode == 3)
                        {
                            int tcount = 0;
                            PbProject.Logic.Order.Tb_Ticket_PassengerBLL PassengerManager = new PbProject.Logic.Order.Tb_Ticket_PassengerBLL();
                            List <PbProject.Model.Tb_Ticket_Passenger>   PassengerList    = PassengerManager.GetPasListByOrderID(Order.OrderId);
                            OnErrorNew("开始修改订单状态", false);
                            for (int i = 0; i < PassengerList.Count; i++)
                            {
                                for (int j = 0; j < ds.Tables[1].Rows.Count; j++)
                                {
                                    if (PassengerList[i].PassengerName.Replace("CHD", "") == ds.Tables[1].Rows[j]["personName"].ToString().Replace("CHD", ""))
                                    {
                                        OnErrorNew(PassengerList[i].PassengerName + ":" + ds.Tables[1].Rows[j]["TICKETINFO_TEXT"].ToString(), false);
                                        PassengerList[i].TicketNumber = ds.Tables[1].Rows[j]["TICKETINFO_TEXT"].ToString();
                                        PassengerList[i].TicketStatus = 2;
                                        tcount++;
                                    }
                                }
                            }

                            if (tcount == PassengerList.Count)
                            {
                                Order.OrderStatusCode = 4; //出票状态
                            }
                            else
                            {
                                #region 记录操作日志
                                //添加操作订单的内容
                                PbProject.Logic.SQLEXBLL.SQLEXBLL_Base sqlbase  = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base();
                                PbProject.Model.Log_Tb_AirOrder        OrderLog = new PbProject.Model.Log_Tb_AirOrder();

                                OrderLog.id          = Guid.NewGuid();
                                OrderLog.OrderId     = Order.OrderId;
                                OrderLog.OperType    = "修改";
                                OrderLog.OperTime    = DateTime.Now;
                                OrderLog.OperContent = "自动回填票号失败:乘机人与票号不符,需要手动操作!";
                                OrderLog.WatchType   = 2;
                                string tempSql = PbProject.Dal.Mapping.MappingHelper <PbProject.Model.Log_Tb_AirOrder> .CreateInsertModelSql(OrderLog);

                                sqlbase.ExecuteNonQuerySQLInfo(tempSql);
                                #endregion
                            }


                            bool reuslt = false;
                            List <PbProject.Model.User_Company> mCompany = new PbProject.Logic.ControlBase.BaseDataManage().
                                                                           CallMethod("User_Company", "GetList", null, new Object[] { "UninCode='" + Order.CPCpyNo + "'" }) as List <PbProject.Model.User_Company>;

                            List <PbProject.Model.User_Employees> mUser = new PbProject.Logic.ControlBase.BaseDataManage().
                                                                          CallMethod("User_Employees", "GetList", null, new Object[] { " IsAdmin=0 and CpyNo='" + Order.CPCpyNo + "'" }) as List <PbProject.Model.User_Employees>;
                            reuslt = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().OperOrderCP(Order, PassengerList, mUser[0], mCompany[0], "");
                            if (reuslt)
                            {
                                OnErrorNew("修改订单完成", false);
                                #region  票宝开放服务接口异步通知出票

                                if (Order.OrderSourceType == 5)
                                {
                                    PbProject.Logic.PTInterface.PbInterfaceNotify pbInterfaceCmd = new PbProject.Logic.PTInterface.PbInterfaceNotify();
                                    if (pbInterfaceCmd != null)
                                    {
                                        bool pbNotifyResult = pbInterfaceCmd.NotifyTicketNo(Order);
                                    }
                                }
                                #endregion
                            }
                            else
                            {
                                OnErrorNew("修改订单失败", false);
                            }
                        }
                    }
                }
            }
            #endregion
        }
        else if (Request.QueryString["orderID"] != null && Request.QueryString["messageType"].ToString() == "12")//拒绝退/废票的消息
        {
            //PiaoBao.BLLLogic.Order.Tb_Ticket_OrderManager OrderMan = PiaoBao.BLLLogic.Factory_Air.CreateITb_Ticket_OrderManager();
            //Tb_Ticket_Order Order = OrderMan.SelectOrderByOutOrderId(Request.QueryString["orderID"].ToString())[0];
            //OnErrorNew("百拓退废票失败" + Order.OrderId, false);
            //Order.A40 = "4";
            //#region 记录日志
            //PiaoBao.Models.Log_Tb_AirOrder OrderLog = new PiaoBao.Models.Log_Tb_AirOrder();
            //PiaoBao.BLLLogic.Order.Log_Tb_AirOrderManager OrderLogManager = PiaoBao.BLLLogic.Factory_Air.CreateILog_Tb_AirOrderManager();
            //OrderLog.PNR = Order.PNR;
            //OrderLog.OrderId = Order.OrderId;
            //if (Order.OrderType == 3)
            //{
            //    OrderLog.OperateType = 14;
            //}
            //else if (Order.OrderType == 4)
            //{
            //    OrderLog.OperateType = 17;
            //}
            //OrderLog.OperateTime = DateTime.Now;
            //OrderLog.Content = "于 " + DateTime.Now + " 百拓平台供应已拒绝退废票,请联系平台手动处理 拒绝原因:" + Request.QueryString["memo"].ToString();
            //OrderLog.OperateId = "adminys";
            //OrderLog.OperateName = "管理员";
            //OrderLog.OperateCorporationId = 1;
            //OrderLog.A1 = 1;
            //int Number = OrderLogManager.InsertLog_Tb_AirOrder(OrderLog);
            //#endregion
            //OrderMan.UpdateTb_Ticket_Order(Order);
        }
        else if (Request.QueryString["orderID"] != null && (Request.QueryString["messageType"].ToString() == "13" || Request.QueryString["messageType"].ToString() == "14"))//退废票办理完成,等待供应商退款的消息
        {
            //PiaoBao.BLLLogic.Order.Tb_Ticket_OrderManager OrderMan = PiaoBao.BLLLogic.Factory_Air.CreateITb_Ticket_OrderManager();
            //Tb_Ticket_Order Order = OrderMan.SelectOrderByOutOrderId(Request.QueryString["orderID"].ToString())[0];
            //OnErrorNew("百拓退废票成功" + Order.OrderId, false);
            //Order.A40 = "3";
            //#region 记录日志
            //PiaoBao.Models.Log_Tb_AirOrder OrderLog = new PiaoBao.Models.Log_Tb_AirOrder();
            //PiaoBao.BLLLogic.Order.Log_Tb_AirOrderManager OrderLogManager = PiaoBao.BLLLogic.Factory_Air.CreateILog_Tb_AirOrderManager();
            //OrderLog.PNR = Order.PNR;
            //OrderLog.OrderId = Order.OrderId;
            //if (Order.OrderType == 3)
            //{
            //    OrderLog.OperateType = 14;
            //}
            //else if (Order.OrderType == 4)
            //{
            //    OrderLog.OperateType = 17;
            //}
            //OrderLog.OperateTime = DateTime.Now;
            //OrderLog.Content = "于 " + DateTime.Now + " 百拓平台供应已退票";
            //OrderLog.OperateId = "adminys";
            //OrderLog.OperateName = "管理员";
            //OrderLog.OperateCorporationId = 1;
            //OrderLog.A1 = 1;
            //int Number = OrderLogManager.InsertLog_Tb_AirOrder(OrderLog);
            //#endregion
            //OrderMan.UpdateTb_Ticket_Order(Order);
        }
    }
    /// <summary>
    /// CarrierBind
    /// </summary>
    public void CarrierBind(PbProject.Model.definitionParam.BaseSwitch BS)
    {
        try
        {
            string[] CarrList = BS.AutoAccount.Split(new string[] { "^^^" }, StringSplitOptions.RemoveEmptyEntries);// Regex.Split(BS.AutoAccount, "^^^", RegexOptions.IgnoreCase);
            for (int i = 0; i < CarrList.Length; i++)
            {
                if (CarrList[i] != "")
                {
                    if (CarrList[i].Split(':')[0].ToString() == "CA")
                    {
                        txtCAaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtCApwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "MU")
                    {
                        txtMUaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtMUpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "HU")
                    {
                        txtHUaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtHUpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "ZH")
                    {
                        txtZHaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtZHpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "KN")
                    {
                        txtKNaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtKNpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "SC")
                    {
                        txtSCaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtSCpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "3U")
                    {
                        txt3Uaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txt3Upwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "CZ")
                    {
                        txtCZaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtCZpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "MF")
                    {
                        txtMFaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtMFpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "FM")
                    {
                        txtFMaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtFMpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "HO")
                    {
                        txtHOaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtHOpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "KY")
                    {
                        txtKYaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtKYpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "JR")
                    {
                        txtJRaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtJRpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "EU")
                    {
                        txtEUaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtEUpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "TV")
                    {
                        txtTVaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtTVpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }

                    else if (CarrList[i].Split(':')[0].ToString() == "GS")
                    {
                        txtGSaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtGSpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "JD")
                    {
                        txtJDaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtJDpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "PN")
                    {
                        txtPNaount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txtPNpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                    else if (CarrList[i].Split(':')[0].ToString() == "8L")
                    {
                        txt8Laount.Text = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[0];
                        txt8Lpwd.Text   = Regex.Split(CarrList[i].Split(':')[1], "//", RegexOptions.IgnoreCase)[1];
                    }
                }
            }
        }
        catch (Exception)
        {
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string sqlParams = " CpyNo = '" + mCompany.UninCode + "'";
            List <Bd_Base_Parameters> Bd_Base_ParametersList = baseDataManage.CallMethod("Bd_Base_Parameters", "GetList", null, new object[] { sqlParams }) as List <Bd_Base_Parameters>;
            if (Bd_Base_ParametersList == null)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.Ticks.ToString(), "showdialog('未获取到参数,请重新尝试或联系管理员');", true);
                return;
            }
            PbProject.Model.definitionParam.BaseSwitch BS = new PbProject.Model.definitionParam.BaseSwitch();
            BS = PbProject.WebCommon.Utility.BaseParams.getParams(Bd_Base_ParametersList);
            //if (!BS.KongZhiXiTong.Contains("|22|"))//自动出票开关关闭自动出票参数设置隐藏
            //{

            //    AutoCpSet.Style.Add("display", "none");
            //}
            //else
            //{
            CarrierBind(BS);
            AutoCpSet.Style.Add("display", "");
            //}


            if (BS.AutoPayAccount != "")
            {
                txtAutoCPAlipay.Text = BS.AutoPayAccount.Split('^')[2].Split('|')[0];//文本框赋值

                if (txtAutoCPAlipay.Text != "")
                {
                    txtAutoCPAlipay.ReadOnly = true;
                }

                if (BS.AutoPayAccount.Split('^')[3] != "无")
                {
                    txtChinanprAccount.Text = BS.AutoPayAccount.Split('^')[3].Split('|')[0];
                }
                if (BS.AutoPayAccount.Split('^')[3] != "无")
                {
                    txtChinapnrPwd.Text = BS.AutoPayAccount.Split('^')[3].Split('|')[1];
                    if (BS.AutoPayAccount.Split('^')[3].Split('|')[2] == "1")//信用支付
                    {
                        rbXinyong.Checked = true;
                    }
                    else
                    {
                        rbFukuan.Checked = true;
                    }
                }
                rbXinyong.Enabled = false;
                rbFukuan.Enabled  = false;

                if (txtChinanprAccount.Text != "")
                {
                    txtChinanprAccount.ReadOnly = true;
                    txtChinapnrPwd.ReadOnly     = true;
                }
            }
            txtfailcount.Text = BS.AutoPayAccount.Split('^')[1].ToString();
            if (BS.AutoPayAccount.Split('^')[0] == "1") //支付宝
            {
                rbAlipay.Checked = true;
            }
            else
            {
                rbChinapnr.Checked = true;
            }
        }
    }
예제 #9
0
    /// <summary>
    /// 绑定公司,参数信息
    /// </summary>
    public void bind(string cpyno)
    {
        try
        {
            User_Company mcpy = (baseDataManage.CallMethod("User_Company", "GetList", null, new Object[] { "UninCode='" + cpyno + "'" }) as List <User_Company>)[0];
            List <Bd_Base_Parameters> listParameters        = baseDataManage.CallMethod("Bd_Base_Parameters", "GetList", null, new Object[] { "CpyNo='" + cpyno + "'" }) as List <Bd_Base_Parameters>;
            PbProject.Model.definitionParam.BaseSwitch pmdb = PbProject.WebCommon.Utility.BaseParams.getParams(listParameters);
            if (mcpy != null)
            {
                txtUnitName.Text   = mcpy.UninAllName;
                txtLXR.Text        = mcpy.ContactUser;
                txtLXTel.Text      = mcpy.ContactTel;
                txtFax.Text        = mcpy.Fax;
                txtUnitAddr.Text   = mcpy.UninAddress;
                txtEmail.Text      = mcpy.Email;
                txtBanGongTel.Text = mcpy.Tel;
                txtWebSite.Text    = mcpy.WebSite;
                //订单提醒设置
                ddlPromptTime.SelectedValue = mcpy.PromptTime.ToString();
                cbkPrompt.Checked           = mcpy.IsPrompt == 1 ? true : false;
                cbkEmpPrompt.Checked        = mcpy.IsEmpPrompt == 1 ? true : false;

                List <User_Company> listcpy = baseDataManage.CallMethod("User_Company", "GetList", null, new Object[] { "UninCode='" + cpyno + "'" }) as List <User_Company>;
                if (listcpy != null && listcpy.Count > 0)
                {
                    ViewState["cpyid"] = listcpy[0].id;
                    if (listcpy[0].WorkTime != null && listcpy[0].WorkTime != "")
                    {
                        ddlworkHtime.SelectedValue      = listcpy[0].WorkTime.Split('-')[0].Split(':')[0];
                        ddlworkMtime.SelectedValue      = listcpy[0].WorkTime.Split('-')[0].Split(':')[1];
                        ddlafterworkHtime.SelectedValue = listcpy[0].WorkTime.Split('-')[1].Split(':')[0];
                        ddlafterworkMtime.SelectedValue = listcpy[0].WorkTime.Split('-')[1].Split(':')[1];
                    }
                    if (listcpy[0].BusinessTime != null && listcpy[0].BusinessTime != "")
                    {
                        ddlBusinessHstartTime.SelectedValue = listcpy[0].BusinessTime.Split('-')[0].Split(':')[0];
                        ddlBusinessMstartTime.SelectedValue = listcpy[0].BusinessTime.Split('-')[0].Split(':')[1];
                        ddlBusinessHendTime.SelectedValue   = listcpy[0].BusinessTime.Split('-')[1].Split(':')[0];
                        ddlBusinessMendTime.SelectedValue   = listcpy[0].BusinessTime.Split('-')[1].Split(':')[1];
                    }
                }
            }

            cksetdlfx.Checked = pmdb.IsDuLiFenXiao == "1" ? true : false;
            if (!string.IsNullOrEmpty(Request["cpyno"]))//平台进入
            {
                trdlfx.Visible    = true;
                cksetdlfx.Visible = true;
            }
            else
            {
                if (pmdb.IsDuLiFenXiao == "1")//独立分销(是否显示自己独立信息)
                {
                    trdlfx.Visible       = true;
                    ckshowdlinfo.Visible = true;
                    ckshowdlinfo.Checked = pmdb.IsShowDuLiInfo == "1" ? true : false;
                }
                if (!string.IsNullOrEmpty(mcpy.WebSite))//网址不为空时不能修改
                {
                    txtWebSite.Enabled = false;
                }
            }
            Hid_KefuValue.Value = pmdb.cssQQ;
            string s = "initxiugai('" + mcpy.Provice + "','" + mcpy.City + "');";
            ClientScript.RegisterStartupScript(this.GetType(), System.DateTime.Now.Ticks.ToString(), s, true);
        }
        catch (Exception)
        {
            throw;
        }
    }