예제 #1
0
    /// <summary>
    /// 保存
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void lbtnOK_Click(object sender, EventArgs e)
    {
        //接口账号集合
        string sql       = "";
        string setvalues = txtJKact517.Text + "^" + txtJKpwd517.Text + "^" + txtJKkey517.Text + "^" + txtyckack517.Text + "^" + txtyckpwd517.Text + "|" +
                           txtJKact51book.Text + "^" + txtJKpwd51book.Text + "^" + txtJKkey51book.Text + "^" + txtNoticeURL51book.Text + "|" +
                           txtJKactBT.Text + "^" + txtJKpwdBT.Text + "^" + txtJKkeyBT.Text + "|" +
                           txtJKactPM.Text + "^" + txtJKpwdPM.Text + "^" + txtJKkeyPM.Text + "|" +
                           txtJKactJR.Text + "^" + txtJKpwdJR.Text + "|" +
                           txtJKact8000yi.Text + "^" + txtJKpwd8000yi.Text + "^" + txtJKDKZFB8000yi.Text + "|" + txtyixing.Text + "^" + txtyixinggy.Text;

        sql = GetParameterUpSql(setvalues, mCompany.UninCode, PbProject.Model.definitionParam.paramsName.jieKouZhangHao);
        string msg = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base().ExecuteNonQuerySQLInfo(sql) == true ? "设置成功" : "设置失败";

        if (msg == "设置成功")
        {
            //日志
            Log_Operation logoper = new Log_Operation();
            logoper.ModuleName  = "接口账号设置";
            logoper.LoginName   = mUser.LoginName;
            logoper.UserName    = mUser.UserName;
            logoper.CreateTime  = Convert.ToDateTime(DateTime.Now);
            logoper.CpyNo       = mCompany.UninCode;
            logoper.OperateType = "接口账号设置";
            logoper.OptContent  = "修改前:" + BaseParams.getParams(baseParametersList).JieKouZhangHao + "//////////修改后:" + setvalues;
            new PbProject.Logic.Log.Log_OperationBLL().InsertLog_Operation(logoper);
        }

        ScriptManager.RegisterStartupScript(this, GetType(), "", "showdialog('" + msg + "');", true);
    }
예제 #2
0
    //生成短信充值订单
    /// <summary>
    /// 生成短信充值订单
    /// </summary>
    private void CreateOrder()
    {
        if (hidPayWay.Value != null && hidPayWay.Value != "")
        {
            MRatesSet = (Tb_Sms_RateSet)ViewState["MRatesSet"];
            //短信充值记录--充值订单
            Tb_Sms_ReCharge MRecharge = new Tb_Sms_ReCharge();
            //短信参数信息
            if (MRatesSet != null && MRatesSet.RatesMoney > 0)
            {
                //生成订单号
                string orderid = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base().GetNewOrderId("2");
                if (orderid != "")
                {
                    IHashObject parameter = new HashObject();
                    Random      Rdm       = new Random();
                    MRecharge.OrderId       = orderid;
                    MRecharge.CpyNo         = mCompany.UninCode;
                    MRecharge.InPayNo       = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().GetIndexId(); //DateTime.Now.ToString("yyMMddHHmmss") + Rdm.Next(100, 999).ToString();
                    MRecharge.PayNo         = "";                                                          //DateTime.Now.ToString("yyMMddHHmmss");
                    MRecharge.ReChargeMoney = MRatesSet.RatesMoney;
                    MRecharge.ReChargeCount = MRatesSet.RatesCount;
                    MRecharge.ReChargeDate  = DateTime.Now;
                    MRecharge.ReChargeState = 0;
                    MRecharge.PayType       = int.Parse(hidPayWay.Value);
                    //生成订单
                    bool rsorder = (bool)baseDataManage.CallMethod("Tb_Sms_ReCharge", "Insert", null, new object[] { MRecharge });
                    List <Tb_Sms_User> listsmsUser = baseDataManage.CallMethod("Tb_Sms_User", "GetList", null, new Object[] { " CpyNo= '" + mCompany.UninCode + "'" }) as List <Tb_Sms_User>;
                    if (listsmsUser.Count < 1)
                    {
                        Tb_Sms_User Msmsuser = new Tb_Sms_User();
                        Msmsuser.CpyNo          = mCompany.UninCode;
                        Msmsuser.SmsCount       = 0;
                        Msmsuser.SmsRemainCount = 0;
                        Msmsuser.SmsDate        = Convert.ToDateTime(DateTime.Now);
                        Msmsuser.SmsUserType    = mCompany.RoleType;
                        bool rssmsuser = (bool)baseDataManage.CallMethod("Tb_Sms_User", "Insert", null, new object[] { Msmsuser });
                    }
                    if (rsorder == true)
                    {
                        Session["SmsRecharge"] = MRecharge;

                        ////跳转支付页面
                        Page.ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.Ticks.ToString(), "openUrl('" + orderid + "');", true);
                    }
                    else
                    {
                        Page.ClientScript.RegisterStartupScript(GetType(), Guid.NewGuid().ToString(), "showdialogOne('支付失败');", true);
                    }
                }
            }
        }
        else
        {
            Page.ClientScript.RegisterStartupScript(GetType(), Guid.NewGuid().ToString(), "showdialogOne('请选择支付方式');", true);
            return;
        }
    }
예제 #3
0
    /// <summary>
    /// 开关预存款
    /// </summary>
    /// <param name="source"></param>
    /// <param name="e"></param>
    protected void repPosList_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        string msg = "";

        try
        {
            if (e.CommandName.ToString() == "Clear")
            {
                msg = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base().ExecuteNonQuerySQLInfo("update User_Company set AccountPwd='' where unincode='" + e.CommandArgument + "'") == true ? "操作成功" : "操作失败";
            }
            else
            {
                //listParameters = ViewState["listParameters"] as List<Bd_Base_Parameters>;
                listParameters = baseDataManage.CallMethod("Bd_Base_Parameters", "GetList", null, new Object[] { "CpyNo='" + e.CommandArgument + "' and SetName='gongYingKongZhiFenXiao'" }) as List <Bd_Base_Parameters>;
                IHashObject parameter = new HashObject();
                parameter.Add("CpyNo", e.CommandArgument);
                parameter.Add("SetName", "gongYingKongZhiFenXiao");

                parameter.Add("SetDescription", "供应控制分销");
                parameter.Add("StartDate", "2012-12-05 00:00:00.000");
                parameter.Add("EndDate", "2112-12-05 00:00:00.000");
                parameter.Add("Remark", "供应控制分销");
                string types = e.CommandName.ToString();

                if (types == "开启预存款")
                {
                    parameter.Add("SetValue", "|76|");
                    if (listParameters == null || listParameters.Count <= 0)
                    {
                        msg = (bool)baseDataManage.CallMethod("Bd_Base_Parameters", "Insert", null, new Object[] { parameter }) == true ? "操作成功" : "操作失败";
                    }
                    else
                    {
                        msg = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base().ExecuteNonQuerySQLInfo("update Bd_Base_Parameters set SetValue=SetValue+'|76|' where CpyNo='" + e.CommandArgument + "' and SetName='gongYingKongZhiFenXiao'") == true ? "操作成功" : "操作失败";
                    }
                }
                else if (types == "关闭预存款")
                {
                    parameter.Add("SetValue", "");
                    if (listParameters == null || listParameters.Count <= 0)
                    {
                        msg = (bool)baseDataManage.CallMethod("Bd_Base_Parameters", "Insert", null, new Object[] { parameter }) == true ? "操作成功" : "操作失败";
                    }
                    else
                    {
                        msg = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base().ExecuteNonQuerySQLInfo("update Bd_Base_Parameters set SetValue='' where CpyNo='" + e.CommandArgument + "' and SetName='gongYingKongZhiFenXiao'") == true ? "操作成功" : "操作失败";
                    }
                }
            }
            Query();
            BindV_User_Company_List();
        }
        catch (Exception)
        {
            msg = "操作异常";
        }
        ScriptManager.RegisterStartupScript(this, GetType(), "", "showdialog('" + msg + "');", true);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string sret = string.Empty;
        string sql  = string.Empty;

        try
        {
            if (Request["cpyno"] != null)
            {
                DataTable dt = new DataTable();
                try
                {
                    dt = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base().GetViewInfoByStrWhere("V_LowerFillInfo", "UninCode='" + Context.Server.UrlDecode(Request["cpyno"]) + "'");
                }
                catch (Exception ex)
                {
                    //ds = Maticsoft.DBUtility._51cbc.Query(conn, sql);
                    sret = "无信息";
                }

                sret  = "<table cellpadding='5' cellspacing='1' border='1' bordercolor='#000000' style='border-collapse:collapse'><tbody>";
                sret += "<tr style='height:30px;'><td style='width:40%;'>客户名称:</td>";
                sret += "<td style='width:60%;'>" + dt.Rows[0]["UninAllName"] + "</td></tr>";
                sret += "<tr style='height:30px;'><td>公司名称:</td>";
                sret += "<td>" + dt.Rows[0]["UninAllName"] + "</td></tr>";
                sret += "<tr style='height:30px;'><td>公司电话:</td>";
                sret += "<td>" + dt.Rows[0]["Tel"].ToString() + "</td></tr></tr>";

                sret += "<tr style='height:30px;'><td>联系人:</td>";
                sret += "<td>" + dt.Rows[0]["ContactUser"].ToString() + "</td></tr>";
                sret += "<tr style='height:30px;'><td>联系人电话:</td>";
                sret += "<td>" + dt.Rows[0]["ContactTel"].ToString() + "</td></tr>";


                sret += "<tr style='height:30px;'><td>客户账号:</td>";
                sret += "<td>" + dt.Rows[0]["LoginName"].ToString() + "</td></tr>";
                sret += "<tr style='height:30px;'><td>所属业务员:</td>";
                sret += "<td>" + dt.Rows[0]["ywy"].ToString() + "</td></tr>";
                sret += "<tr style='height:30px;'><td>POS机号:</td>";
                sret += "<td>" + dt.Rows[0]["posno"] + "</td></tr>";
                sret += "<tr style='height:30px;'><td>费率:</td>";
                sret += "<td>" + dt.Rows[0]["posrate"] + "</td></tr>";
                sret += "</tbody></table>";
            }
            else
            {
                sret = "无信息";
            }
        }
        catch (Exception ex)
        {
            sret = ex.Message;
        }

        //回传数据
        Response.Write(sret);
        Response.End();
    }
    /// <summary>
    /// 导出政策
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btndc_Click(object sender, EventArgs e)
    {
        //IHashObject parameter = new HashObject();
        //GridView1.DataSource = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base().GetPolicyExcelByStrWhere("公司编号='" + mCompany.UninCode + "'");
        //GridView1.DataBind();
        //Response.Clear();
        //DownloadExcelFlag = true;
        //Export("政策表_" + DateTime.Now.ToString("yyyy_MM_dd_hh_mm_ss"));
        DataTable dt = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base().GetPolicyExcelByStrWhere("公司编号='" + mCompany.UninCode + "'");

        ExcelRender.RenderToExcel(dt, Context, "政策表_" + DateTime.Now.ToString("yyyy_MM_dd_hh_mm_ss") + ".xls");
    }
 /// <summary>
 /// 绑定扣点组详情信息
 /// </summary>
 public void BindDiscountList()
 {
     try
     {
         DataTable dt = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base().GetViewInfoByStrWhere("V_StrategyGroup", Con + " order by OperTime desc");
         AspNetPager1.RecordCount    = dt.Rows.Count;
         AspNetPager1.CustomInfoHTML = "&nbsp;&nbsp;&nbsp;  页码 : <font color=\"red\" size='2px'>" + Curr + "</font> / " + AspNetPager1.PageCount;
         repList.DataSource          = dt;
         repList.DataBind();
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #7
0
 /// <summary>
 /// 还原订单状态,改为手动出票
 /// </summary>
 /// <param name="order"></param>
 private void RollBackTicketOrderState(PbProject.Model.Tb_Ticket_Order order, string msg)
 {
     try
     {
         string SQL = " update Tb_Ticket_Order set A1=2,AutoPrintFlag=0 where OrderId='" + order.OrderId + "'";
         FailedLogToDb(order, msg);
         PbProject.Logic.SQLEXBLL.SQLEXBLL_Base ss = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base();
         ss.ExecuteNonQuerySQLInfo(SQL);
         //LogInfo(string.Format("{0},已改为手动方式,订单号:{1}", msg, order.OrderId), false);
     }
     catch (Exception e)
     {
         LogInfo("出票失败,改为手动方式失败.原因:" + e.Message, false);
     }
 }
예제 #8
0
    /// <summary>
    /// 短信剩余条数和短信发送条数
    /// </summary>
    private void BindSmsCountandSmsSendCounts()
    {
        List <Tb_Sms_User> listSmsUser = baseDataManage.CallMethod("Tb_Sms_User", "GetList", null, new Object[] { "CpyNo='" + mCompany.UninCode + "'" }) as List <Tb_Sms_User>;
        //List<Tb_Sms_SendInfo> listSmsSendInfo = baseDataManage.CallMethod("Tb_Sms_SendInfo", "GetList", null, new Object[] { "CpyNo='" + mCompany.UninCode + "'" }) as List<Tb_Sms_SendInfo>;
        DataTable dt = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base().ExecuteStrSQL("select sum(SmsUserCount) sendcount from Tb_Sms_SendInfo where CpyNo = '" + mCompany.UninCode + "'");

        if (listSmsUser != null && listSmsUser.Count > 0)
        {
            lbsmsCount.Text = listSmsUser[0].SmsRemainCount.ToString();
        }
        if (dt != null && dt.Rows.Count > 0)
        {
            lbsmsSendCount.Text = dt.Rows[0]["sendcount"].ToString();
        }
    }
    /// <summary>
    /// 将选择的用户加入分组
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnAddGroupUser_Click(object sender, EventArgs e)
    {
        string msg = "";

        try
        {
            int    count = this.repList.Items.Count;
            string ids   = "";
            for (var i = 0; i < count; i++)
            {
                if (((System.Web.UI.HtmlControls.HtmlInputCheckBox) this.repList.Items[i].FindControl("cbItem")).Checked)
                {
                    string id = ((System.Web.UI.HtmlControls.HtmlInputCheckBox) this.repList.Items[i].FindControl("cbItem")).Value;
                    if (id.Length != 0)
                    {
                        ids += "'" + id + "',";
                    }
                }
            }
            ids = ids.TrimEnd(',');
            if (ids.Length > 0)
            {
                string sql     = "";
                string groupid = ddlGroup.SelectedValue.ToString();
                if (groupid != "" && groupid != "-1")
                {
                    sql = "Update User_Company set GroupId='" + ddlGroup.SelectedValue + "' where id in (" + ids + ")";
                }
                else
                {
                    sql = "Update User_Company set GroupId=NULL where id in (" + ids + ")";
                }
                msg = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base().ExecuteNonQuerySQLInfo(sql) == true ? "操作成功" : "操作失败";
                BindUser();
            }
            else
            {
                msg = "请选择要划分的用户";
            }
        }
        catch (Exception)
        {
            msg = "操作异常";
        }
        ScriptManager.RegisterStartupScript(this, GetType(), "", "showdialog('" + msg + "');", true);
    }
예제 #10
0
    public void Login(PbProject.Model.Tb_Ticket_Order order)
    {
        OnErrorNew("开始Login", false);
        string sql = "select LoginName,LoginPassWord from User_Employees where CpyNo='" + order.OwnerCpyNo.Substring(0, 12) + "' and IsAdmin=0";

        PbProject.Logic.SQLEXBLL.SQLEXBLL_Base sq = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base();
        OnErrorNew("开始查询", false);
        DataTable tb = sq.ExecuteStrSQL(sql);

        OnErrorNew("结束查询", false);
        string msg = "";

        PbProject.Logic.Login LoginManage = new PbProject.Logic.Login();
        DataTable[]           tableArr    = null;
        bool IsSuc = LoginManage.GetByName(tb.Rows[0][0].ToString(), tb.Rows[0][1].ToString(), false, Page.Request.UserHostAddress, out tableArr, out msg, 1);

        OnErrorNew("结束Login", false);
    }
 /// <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();
    }
    protected void repPosList_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        string msg = "";

        try
        {
            string id = e.CommandArgument.ToString();
            if (e.CommandName == "Del")
            {
                bool rs1 = (bool)baseDataManage.CallMethod("Tb_Ticket_StrategyGroup", "DeleteById", null, new Object[] { id });
                bool rs2 = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base().ExecuteNonQuerySQLInfo("delete from Tb_Ticket_TakeOffDetail where GroupId ='" + id + "'");
                msg = rs1 == true & rs1 == true ? "删除成功" : "删除失败";
            }

            BindStrategyGroupInfo();
        }
        catch (Exception)
        {
            msg = "操作异常";
            throw;
        }
        ScriptManager.RegisterStartupScript(this, GetType(), "", "showdialog('" + msg + "');", true);
    }
    /// <summary>
    /// updateCarrier
    /// </summary>
    public void updateCarrier()
    {
        //格式:CA:xxx//xxx^^^CZ:xxx//xxx^^^MU:xxx//xxx
        string SetValue = "";

        if (txtCAaount.Text.Trim() != "" && txtCApwd.Text.Trim() != "")
        {
            SetValue += "^^^CA:" + txtCAaount.Text.Trim() + "//" + txtCApwd.Text.Trim() + "";
        }

        if (txtMUaount.Text.Trim() != "" && txtMUpwd.Text.Trim() != "")
        {
            SetValue += "^^^MU:" + txtMUaount.Text.Trim() + "//" + txtMUpwd.Text.Trim() + "";
        }

        if (txtHUaount.Text.Trim() != "" && txtHUpwd.Text.Trim() != "")
        {
            SetValue += "^^^HU:" + txtHUaount.Text.Trim() + "//" + txtHUpwd.Text.Trim() + "";
        }

        if (txtZHaount.Text.Trim() != "" && txtZHpwd.Text.Trim() != "")
        {
            SetValue += "^^^ZH:" + txtZHaount.Text.Trim() + "//" + txtZHpwd.Text.Trim() + "";
        }

        if (txtKNaount.Text.Trim() != "" && txtKNpwd.Text.Trim() != "")
        {
            SetValue += "^^^KN:" + txtKNaount.Text.Trim() + "//" + txtKNpwd.Text.Trim() + "";
        }

        if (txtSCaount.Text.Trim() != "" && txtSCpwd.Text.Trim() != "")
        {
            SetValue += "^^^SC:" + txtSCaount.Text.Trim() + "//" + txtSCpwd.Text.Trim() + "";
        }

        if (txt3Uaount.Text.Trim() != "" && txt3Upwd.Text.Trim() != "")
        {
            SetValue += "^^^3U:" + txt3Uaount.Text.Trim() + "//" + txt3Upwd.Text.Trim() + "";
        }

        if (txtCZaount.Text.Trim() != "" && txtCZpwd.Text.Trim() != "")
        {
            SetValue += "^^^CZ:" + txtCZaount.Text.Trim() + "//" + txtCZpwd.Text.Trim() + "";
        }

        if (txtMFaount.Text.Trim() != "" && txtMFpwd.Text.Trim() != "")
        {
            SetValue += "^^^MF:" + txtMFaount.Text.Trim() + "//" + txtMFpwd.Text.Trim() + "";
        }

        if (txtFMaount.Text.Trim() != "" && txtFMpwd.Text.Trim() != "")
        {
            SetValue += "^^^FM:" + txtFMaount.Text.Trim() + "//" + txtFMpwd.Text.Trim() + "";
        }

        if (txtHOaount.Text.Trim() != "" && txtHOpwd.Text.Trim() != "")
        {
            SetValue += "^^^HO:" + txtHOaount.Text.Trim() + "//" + txtHOpwd.Text.Trim() + "";
        }

        if (txtKYaount.Text.Trim() != "" && txtKYpwd.Text.Trim() != "")
        {
            SetValue += "^^^KY:" + txtKYaount.Text.Trim() + "//" + txtKYpwd.Text.Trim() + "";
        }

        if (txtJRaount.Text.Trim() != "" && txtJRpwd.Text.Trim() != "")
        {
            SetValue += "^^^JR:" + txtJRaount.Text.Trim() + "//" + txtJRpwd.Text.Trim() + "";
        }

        if (txtEUaount.Text.Trim() != "" && txtEUpwd.Text.Trim() != "")
        {
            SetValue += "^^^EU:" + txtEUaount.Text.Trim() + "//" + txtEUpwd.Text.Trim() + "";
        }

        if (txtTVaount.Text.Trim() != "" && txtTVpwd.Text.Trim() != "")
        {
            SetValue += "^^^TV:" + txtTVaount.Text.Trim() + "//" + txtTVpwd.Text.Trim() + "";
        }

        if (txtGSaount.Text.Trim() != "" && txtGSpwd.Text.Trim() != "")
        {
            SetValue += "^^^GS:" + txtGSaount.Text.Trim() + "//" + txtGSpwd.Text.Trim() + "";
        }
        if (txtJDaount.Text.Trim() != "" && txtJDpwd.Text.Trim() != "")
        {
            SetValue += "^^^JD:" + txtJDaount.Text.Trim() + "//" + txtJDpwd.Text.Trim() + "";
        }
        if (txtPNaount.Text.Trim() != "" && txtPNpwd.Text.Trim() != "")
        {
            SetValue += "^^^PN:" + txtPNaount.Text.Trim() + "//" + txtPNpwd.Text.Trim() + "";
        }
        if (txt8Laount.Text.Trim() != "" && txt8Lpwd.Text.Trim() != "")
        {
            SetValue += "^^^8L:" + txt8Laount.Text.Trim() + "//" + txt8Lpwd.Text.Trim() + "";
        }

        string Bd_Base_Parameters_insertSQL = "update Bd_Base_Parameters set SetValue =" +
                                              " '" + SetValue + "'" +
                                              " where " +
                                              " CpyNo = " + " '" + mCompany.UninCode + "' and " +
                                              " SetName = " + " '" + PbProject.Model.definitionParam.paramsName.autoAccount + "' ";//自动支付参数

        PbProject.Logic.SQLEXBLL.SQLEXBLL_Base sqlbase = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base();
        bool   sss = sqlbase.ExecuteNonQuerySQLInfo(Bd_Base_Parameters_insertSQL);
        string msg = sss ? "修改成功!" : "修改失败!";

        Page.ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.Ticks.ToString(), "showdialog('" + msg + "');", true);
    }
예제 #15
0
    private void GetData()
    {
        string ticketnoinfo = "";

        for (int i = 0; i < Request.Form.Count; i++)
        {
            ticketnoinfo = ticketnoinfo + Request.Form.Keys[i].ToString() + ":" + Request.Form[i].ToString() + "|";
        }
        OnErrorNew("ticketnoinfo内容:" + ticketnoinfo, false);
        string NotifyType      = Request.Form["NotifyType"].ToString();      //通知类型(出票通知;待出票通知)
        string OrderId         = Request.Form["OrderId"].ToString();         //订单Id
        string DrawABillFlag   = Request.Form["DrawABillFlag"].ToString();   //出票状态(0表示出票,1表示取消出票)
        string DrawABillRemark = Request.Form["DrawABillRemark"].ToString(); //取消出票理由
        string TicketNos       = Request.Form["TicketNos"].ToString();       //票号信息(结算码|票号|证件类型|证件号|乘机人姓名)
        string Sign            = Request.Form["Sign"].ToString();            //Sign
        string Pnr             = Request.Form["Pnr"].ToString();             //Pnr
        string NewPnr          = "";

        if (Request.Form["NewPnr"] != null)
        {
            NewPnr = Request.Form["NewPnr"].ToString(); //NewPnr
        }

        //Kevin 2013-05-28 Edit
        //判断当前订单状态,如果不是 已经支付等待出票,则退出
        List <PbProject.Model.Tb_Ticket_Order> OrderUpdateList2 = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().GetListBySqlWhere(" OutOrderId='" + OrderId + "'");

        //Login(OrderUpdateList);
        if (OrderUpdateList2[0].OrderStatusCode != 3) //等待出票状态
        {
            OnErrorNew("外部订单号:" + OrderId + "对应订单状态不为等待出票状态,不做自动复核!", false);
            return;
        }


        PbProject.Logic.SQLEXBLL.SQLEXBLL_Base sqlbase = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base();
        StringBuilder sb = new StringBuilder();

        sb.AppendFormat("\r\n\r\n\r\n\r\n\r\n");
        sb.AppendFormat("517出票通知日志记录" + "\r\n");
        sb.AppendFormat("访问IP" + ":" + Page.Request.UserHostAddress + "\r\n");
        sb.AppendFormat("通知类型:" + NotifyType.ToString() + "\r\n");
        sb.AppendFormat("517订单编号:" + OrderId.ToString() + "\r\n");
        if (DrawABillFlag == "0")
        {
            sb.AppendFormat("出票状态:已经出票\r\n");
            string JSMA          = "";
            string TicketNumber  = "";
            string PidType       = "";
            string Pid           = "";
            string PassengerName = "";
            for (int i = 0; i < TicketNos.Split(',').Length; i++)
            {
                JSMA          = JSMA + "," + TicketNos.Split(',')[i].Split('|')[0].ToString();
                JSMA          = JSMA.TrimStart(',').TrimEnd(',');
                TicketNumber  = TicketNumber + "," + TicketNos.Split(',')[i].Split('|')[0].ToString() + "-" + TicketNos.Split(',')[i].Split('|')[1].ToString();
                TicketNumber  = TicketNumber.TrimStart(',').TrimEnd(',');
                PidType       = PidType + "," + TicketNos.Split(',')[i].Split('|')[2].ToString();
                PidType       = PidType.TrimStart(',').TrimEnd(',');
                Pid           = Pid + "," + TicketNos.Split(',')[i].Split('|')[3].ToString();
                Pid           = Pid.TrimStart(',').TrimEnd(',');
                PassengerName = PassengerName + "," + TicketNos.Split(',')[i].Split('|')[4].ToString();
                PassengerName = PassengerName.TrimStart(',').TrimEnd(',');
            }
            if (JSMA != "")
            {
                sb.AppendFormat("结算码:" + JSMA + "\r\n");
                sb.AppendFormat("票号:" + TicketNumber + "\r\n");
                sb.AppendFormat("证件类型:" + PidType + "\r\n");
                sb.AppendFormat("证件号:" + Pid + "\r\n");
                sb.AppendFormat("乘机人姓名:" + PassengerName + "\r\n");
            }
            else
            {
                sb.AppendFormat("票号信息:" + TicketNos.ToString() + "\r\n");
            }
            sb.AppendFormat("效验码:" + Sign + "\r\n");
            #region 更新数据库订单信息

            List <PbProject.Model.Tb_Ticket_Order> OrderUpdateList = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().GetListBySqlWhere(" OutOrderId='" + OrderId + "'");
            //Login(OrderUpdateList);

            if (NewPnr != null && NewPnr != "")
            {
                OrderUpdateList[0].ChangePNR = NewPnr;
            }

            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(OrderUpdateList[0].OrderId);
            for (int j = 0; j < PassengerList.Count; j++)
            {
                int number = -1;
                for (int k = 0; k < PassengerName.Split(',').Length; k++)
                {
                    if (PassengerName.Split(',')[k].ToString().Replace("CHD", "") == PassengerList[j].PassengerName.Replace("CHD", ""))
                    {
                        number = k;
                        break;
                    }
                }
                if (number != -1)
                {
                    PassengerList[j].TicketNumber = TicketNumber.Split(',')[number];
                    PassengerList[j].TicketStatus = 2;
                    tcount++;
                }
            }

            //如果乘机人和票号数量一致,则更改订单状态
            if (tcount == PassengerList.Count)
            {
                OrderUpdateList[0].OrderStatusCode = 4; //出票状态
            }
            else
            {
                #region 记录操作日志
                //添加操作订单的内容
                PbProject.Model.Log_Tb_AirOrder OrderLog = new PbProject.Model.Log_Tb_AirOrder();

                OrderLog.id          = Guid.NewGuid();
                OrderLog.OrderId     = OrderUpdateList[0].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
            }

            List <PbProject.Model.User_Company> mCompany = new PbProject.Logic.ControlBase.BaseDataManage().
                                                           CallMethod("User_Company", "GetList", null, new Object[] { "UninCode='" + OrderUpdateList[0].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='" + OrderUpdateList[0].CPCpyNo + "'" }) as List <PbProject.Model.User_Employees>;
            bool reuslt = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().OperOrderCP(OrderUpdateList[0], PassengerList, mUser[0], mCompany[0], "");
            if (reuslt)
            {
                sb.AppendFormat("更新数据库,订单号:" + OrderUpdateList[0].OrderId + "信息,更新成功!\r\n");
                #region  票宝开放服务接口异步通知出票

                if (OrderUpdateList[0].OrderSourceType == 5)
                {
                    PbProject.Logic.PTInterface.PbInterfaceNotify pbInterfaceCmd = new PbProject.Logic.PTInterface.PbInterfaceNotify();
                    if (pbInterfaceCmd != null)
                    {
                        bool pbNotifyResult = pbInterfaceCmd.NotifyTicketNo(OrderUpdateList[0]);
                    }
                }
                #endregion
            }
            else
            {
                sb.AppendFormat("更新数据库,订单号:" + OrderUpdateList[0].OrderId + "信息,更新失败!\r\n");
            }
        }
        else
        {
            sb.AppendFormat("出票状态:取消出票\r\n");
            sb.AppendFormat("取消出票理由:" + DrawABillRemark.ToString() + "\r\n");
        }
        #endregion
        OnErrorNew("记录:" + sb.ToString(), false);
    }
    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);
        }
    }
    private void GetData()
    {
        if (Request.QueryString["passengerNames"].ToString() != "")
        {
            string ticketnoinfo = "";
            for (int i = 0; i < Request.QueryString.Count; i++)
            {
                ticketnoinfo = ticketnoinfo + Request.QueryString.Keys[i].ToString() + ":" + Request.QueryString[i].ToString() + "|";
            }
            OnErrorNew("ticketnoinfo内容:" + ticketnoinfo, false);
            string[] passengerNames = Request.QueryString["passengerNames"].ToString().TrimStart(',').TrimEnd(',').Split(',');
            string[] ticketNos      = Request.QueryString["ticketNos"].ToString().TrimStart(',').TrimEnd(',').Split(',');
            string   sequenceNo     = Request.QueryString["sequenceNo"].ToString();
            string   pnrNo          = Request.QueryString["pnrNo"].ToString();
            string   oldPnrNo       = "";
            if (Request.QueryString["oldPnrNo"] != null)
            {
                oldPnrNo = Request.QueryString["oldPnrNo"].ToString(); //oldPnrNo
            }
            StringBuilder sb = new StringBuilder();
            List <PbProject.Model.Tb_Ticket_Order> OrderUpdateList = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().GetListBySqlWhere(" OutOrderId='" + sequenceNo + "'");
            //Login(OrderUpdateList);
            if (OrderUpdateList[0].OrderStatusCode == 3)
            {
                if (oldPnrNo != null && oldPnrNo != "")
                {
                    OrderUpdateList[0].ChangePNR = oldPnrNo;
                }

                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(OrderUpdateList[0].OrderId);
                for (int j = 0; j < PassengerList.Count; j++)
                {
                    for (int i = 0; i < passengerNames.Length; i++)
                    {
                        if (PassengerList[j].PassengerName.Trim().Replace("CHD", "") == passengerNames[i].ToString().Trim().Replace("CHD", ""))
                        {
                            tcount++;
                            PassengerList[j].TicketNumber = ticketNos[i].ToString().Trim();
                            PassengerList[j].TicketStatus = 2;
                        }
                    }
                }

                if (tcount == PassengerList.Count)
                {
                    OrderUpdateList[0].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     = OrderUpdateList[0].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
                }

                List <PbProject.Model.User_Company> mCompany = new PbProject.Logic.ControlBase.BaseDataManage().
                                                               CallMethod("User_Company", "GetList", null, new Object[] { "UninCode='" + OrderUpdateList[0].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='" + OrderUpdateList[0].CPCpyNo + "'" }) as List <PbProject.Model.User_Employees>;
                bool reuslt = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().OperOrderCP(OrderUpdateList[0], PassengerList, mUser[0], mCompany[0], "");
                if (reuslt)
                {
                    sb.AppendFormat("更新数据库,订单号:" + OrderUpdateList[0].OrderId + "信息,更新成功!\r\n");
                    #region  票宝开放服务接口异步通知出票

                    if (OrderUpdateList[0].OrderSourceType == 5)
                    {
                        PbProject.Logic.PTInterface.PbInterfaceNotify pbInterfaceCmd = new PbProject.Logic.PTInterface.PbInterfaceNotify();
                        if (pbInterfaceCmd != null)
                        {
                            bool pbNotifyResult = pbInterfaceCmd.NotifyTicketNo(OrderUpdateList[0]);
                        }
                    }
                    #endregion
                }
                else
                {
                    sb.AppendFormat("更新数据库,订单号:" + OrderUpdateList[0].OrderId + "信息,更新失败!\r\n");
                }
            }
            OnErrorNew("记录:" + sb.ToString(), false);
        }
        else if (Request.QueryString["venderRefundTime"].ToString() != "")//退废票通知
        {
            //PiaoBao.BLLLogic.Order.Tb_Ticket_OrderManager OrderMan = PiaoBao.BLLLogic.Factory_Air.CreateITb_Ticket_OrderManager();
            //PiaoBao.Models.Tb_Ticket_Order Order = OrderMan.SelectOrderByOutOrderId(Request.QueryString["sequenceNo"].ToString())[0];
            //if (Request.QueryString["type"].ToString() == "1")//平台已经退废票
            //{
            //    PiaoBao.Models.User_Company mCompany = PiaoBao.BLLLogic.Factory_System.CreateCompanyManager().SelectUser_CompanyByRoleType()[0];
            //    string strWhere = " pid='" + mCompany.PId + "' and keyno='" + mCompany.KeyNo + "'";
            //    StringBuilder strSql = new StringBuilder();
            //    strSql.Append("select A1 ");
            //    strSql.Append(" FROM Tb_User_Supplier ");
            //    DataSet ds = Maticsoft.DBUtility.DbHelperSQL.Query(strSql.ToString() + "where " + strWhere);
            //    if (ds.Tables[0].Rows[0]["A1"].ToString().Contains("|71|"))//自动退废票开关开启
            //    {
            //        PiaoBao.BLLLogic.Order.Tb_Ticket_PassengerManager PassengerMan = PiaoBao.BLLLogic.Factory_Air.CreateITb_Ticket_PassengerManager();
            //        IList<PiaoBao.Models.Tb_Ticket_Passenger> PassengerList = PassengerMan.SelectTb_Ticket_PassengerByOrderId(Order.OrderId);
            //        PiaoBao.BLLLogic.Order.Tb_Ticket_SkyWayManager SkyWayManager = PiaoBao.BLLLogic.Factory_Air.CreateITb_Ticket_SkyWayManager();
            //        IList<PiaoBao.Models.Tb_Ticket_SkyWay> SkyWayList = SkyWayManager.SelectTb_Ticket_SkyWayByOrderId(Order.OrderId);
            //        PiaoBao.BLLLogic.Order.OrderTGQ orderTGQ = new PiaoBao.BLLLogic.Order.OrderTGQ();
            //        string ProcessMsg = "";
            //        string TFsxFee = Request.QueryString["refundFee"].ToString();

            //        bool reuslt = orderTGQ.Process(out ProcessMsg, 1, GetTGQFee(PassengerList, TFsxFee), 0, Order.OrderType.ToString(), "", IsProcess(PassengerList), Order, PassengerList, SkyWayList);
            //        Order.A40 = "3";
            //        OrderMan.UpdateTb_Ticket_Order(Order);
            //        string Contents = "";
            //        if (reuslt)
            //        {
            //            OnErrorNew("系统自动退废票成功" + Order.OrderId, false);
            //            Contents = "于 " + DateTime.Now + " 51book平台供应已退票,系统自动退废票成功!";
            //        }
            //        else
            //        {
            //            OnErrorNew("系统自动退废票失败" + Order.OrderId, false);
            //            Contents = "于 " + DateTime.Now + " 51book平台供应已退票,系统自动退废票失败:" + ProcessMsg + "!";
            //        }
            //        #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 = Contents;
            //        OrderLog.OperateId = "adminys";
            //        OrderLog.OperateName = "管理员";
            //        OrderLog.OperateCorporationId = 1;
            //        OrderLog.A1 = 1;
            //        int Number = OrderLogManager.InsertLog_Tb_AirOrder(OrderLog);
            //        #endregion
            //    }
            //    else
            //    {
            //        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 + " 51book平台供应已退票";
            //        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//平台退废票失败
            //{
            //    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 + " 51book平台供应已拒绝退废票,请联系平台手动处理 拒绝原因:" + Request.QueryString["venderRemark"].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);
            //}
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //string result = "<?xml version=\"1.0\" encoding=\"gb2312\" ?><orderinfo><pnr>HF5N1R</pnr><code>1</code><message /><orderno></orderno><orderstatus>1</orderstatus><paystatus>1</paystatus><pnrsrcid>0101912051714341204</pnrsrcid ><payprice>543.6</ payprice><tradeno>2012051773929436</tradeno><tickets><ticket><passenger>张平</passenger><tktno>876-2037972475</tktno></ticket></tickets></orderinfo>";
        //System.Threading.Thread.Sleep(50000);
        OnErrorNew("进入 Pay_AutoPayByAlipayNotifyUrl_Load()", true);

        try
        {
            if (Request.Form["ticketnoinfo"] != null && Request.Form["ticketnoinfo"].ToString() != "")
            {
                string ticketnoinfo = Request.Form["ticketnoinfo"].ToString();
                ticketnoinfo = HttpUtility.UrlDecode(ticketnoinfo, Encoding.GetEncoding("gb2312"));

                OnErrorNew("ticketnoinfo内容:" + ticketnoinfo, false);
                XmlDocument doc = new XmlDocument();
                doc.LoadXml(ticketnoinfo);
                DataSet      ds  = new DataSet();
                StringReader rea = new StringReader(doc.InnerXml);

                XmlTextReader xmlReader = new XmlTextReader(rea);

                ds.ReadXml(xmlReader);
                PbProject.Model.Tb_Ticket_Order Order = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().GetTicketOrderByOrderId(ds.Tables[0].Rows[0]["pnrsrcid"].ToString());
                //Login(Order);
                if (ticketnoinfo.IndexOf("支付成功后,取票号失败,请您手工操作") > -1)
                {
                    #region 记录操作日志
                    //添加操作订单的内容
                    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 = "于 " + DateTime.Now + " 航空公司已出票,自动取票号失败,请您手工出票!";
                    OrderLog.WatchType   = 2;
                    string tempSql = PbProject.Dal.Mapping.MappingHelper <PbProject.Model.Log_Tb_AirOrder> .CreateInsertModelSql(OrderLog);

                    #endregion
                    OnErrorNew("支付成功后,取票号失败,请您手工操作!", false);
                    return;
                }
                if (Order.OrderStatusCode == 4)
                {
                    OnErrorNew("该票号已经出票", false);
                    return;
                }

                int tcount = 0;
                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    PbProject.Logic.Order.Tb_Ticket_PassengerBLL psb     = new PbProject.Logic.Order.Tb_Ticket_PassengerBLL();
                    List <PbProject.Model.Tb_Ticket_Passenger>   psmList = psb.GetPasListByOrderID(ds.Tables[0].Rows[0]["pnrsrcid"].ToString());
                    OnErrorNew("开始修改票号", false);
                    for (int i = 0; i < psmList.Count; i++)
                    {
                        for (int j = 0; j < ds.Tables[2].Rows.Count; j++)
                        {
                            if (ds.Tables[2].Rows[j]["tktno"].ToString() != "")
                            {
                                if (psmList[i].PassengerName.ToUpper() == ds.Tables[2].Rows[j]["passenger"].ToString().ToUpper() || psmList[i].PassengerName.ToUpper() == HttpUtility.UrlDecode(ds.Tables[2].Rows[j]["passenger"].ToString().ToUpper(), Encoding.Default) || psmList[i].PassengerName.ToUpper() == HttpUtility.UrlDecode(ds.Tables[2].Rows[j]["passenger"].ToString().ToUpper()))
                                {
                                    psmList[i].TicketStatus = 2;
                                    psmList[i].TicketNumber = ds.Tables[2].Rows[j]["tktno"].ToString().Trim();
                                    tcount++;
                                }
                            }
                        }
                    }

                    if (tcount != psmList.Count)
                    {
                        #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
                    }

                    decimal payprice = 0;

                    try
                    {
                        if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0 &&
                            !string.IsNullOrEmpty(ds.Tables[0].Rows[0]["payprice"].ToString()) &&
                            !ds.Tables[0].Rows[0]["payprice"].ToString().Contains("-"))
                        {
                            payprice = payprice = Convert.ToDecimal(ds.Tables[0].Rows[0]["payprice"].ToString());
                        }
                    }
                    catch (Exception)
                    {
                    }

                    if (payprice != 0)
                    {
                        Order.AirPoint = 1 - (payprice - Order.ABFee - Order.FuelFee) / Order.PMFee;
                        Order.AirPoint = Math.Round(Order.AirPoint, 3);
                    }
                    //是否更改订单状态
                    //默认更改状态
                    bool IsUpdateOrderStatus = true;
                    try
                    {
                        foreach (PbProject.Model.Tb_Ticket_Passenger item in psmList)
                        {
                            //婴儿没有回帖票号 不修改状态
                            if (item.PassengerType == 3 && string.IsNullOrEmpty(item.TicketNumber.Trim()))
                            {
                                IsUpdateOrderStatus = false;
                                break;
                            }
                        }
                        if ((IsUpdateOrderStatus) && (tcount == psmList.Count))
                        {
                            Order.OrderStatusCode = 4;
                        }
                    }
                    catch (Exception)
                    {
                    }
                    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>;

                    bool reuslt = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().OperOrderCP(Order, psmList, mUser[0], mCompany[0], (IsUpdateOrderStatus ? "B2B自动出票" : "B2B自动出票【婴儿票请手动处理】"));
                    if (reuslt)
                    {
                        //零时改回状态
                        BaseDataManage manage = new BaseDataManage();
                        manage.ExecuteNonQuerySQLInfo("update Tb_Ticket_Order set OrderStatusCode=" + Order.OrderStatusCode + " where OrderId='" + Order.OrderId + "'");

                        #region  票宝开放服务接口异步通知出票

                        if (Order.OrderSourceType == 5)
                        {
                            PbProject.Logic.PTInterface.PbInterfaceNotify pbInterfaceCmd = new PbProject.Logic.PTInterface.PbInterfaceNotify();
                            if (pbInterfaceCmd != null)
                            {
                                bool pbNotifyResult = pbInterfaceCmd.NotifyTicketNo(Order);
                            }
                        }
                        #endregion
                        OnErrorNew(string.Format("出票成功.订单号:{0},PNR:{1}", Order.OrderId, Order.PNR), false);
                    }
                    else
                    {
                        OnErrorNew(string.Format("出票失败.订单号:{0},PNR:{1}", Order.OrderId, Order.PNR), false);
                    }
                }
            }
        }
        catch (Exception ex)
        {
            #region 记录数据日志
            try
            {
                OnErrorNew("报错:" + ex.Message, false);
            }
            catch { }
            #endregion
        }
    }
예제 #19
0
    private void GetData()
    {
        StringBuilder sb         = new StringBuilder();
        string        platform   = Request.Form["platform"].ToString();
        string        type       = Request.Form["type"].ToString();
        string        orderguid  = Request.Form["orderguid"].ToString();
        string        orderstate = Request.Form["orderstate"].ToString();
        string        notifymsg  = Request.Form["notifymsg"].ToString();
        string        key        = Request.Form["key"].ToString();
        string        localKey   = string.Empty;

        if (type == "2")
        {
            localKey = string.Format("$%^{0}{1}|8000YI$8000yi$", orderguid, notifymsg);
        }
        else
        {
            localKey = string.Format("$%^{0}{1}8000YI$8000yi$", orderguid, notifymsg);
        }
        localKey = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(localKey, "MD5");
        if (!key.Equals(localKey))
        {
            OnErrorNew("key错误", false);
        }
        else
        {
            string[] notifyMsgSort = notifymsg.Split('^');
            string   PassengerName = string.Empty, TicketNumber = string.Empty;
            if (type == "2")
            {
                PassengerName = notifyMsgSort[1];
                TicketNumber  = notifyMsgSort[2];

                #region 更新数据库订单信息
                List <PbProject.Model.Tb_Ticket_Order> OrderUpdateList = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().GetListBySqlWhere(" OutOrderId='" + orderguid + "'");

                //Kevin 2013-05-28 判断当前订单状态
                if (OrderUpdateList[0].OrderStatusCode != 3)
                {
                    OnErrorNew("外部订单号:" + orderguid + "对应订单状态不是等待出票状态,不做自动复核!", false);
                    return;
                }

                //Login(OrderUpdateList);
                //OrderUpdateList[0].OrderStatusCode = 4; //出票状态

                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(OrderUpdateList[0].OrderId);
                for (int j = 0; j < PassengerList.Count; j++)
                {
                    int number = -1;
                    for (int k = 0; k < PassengerName.Split('|').Length; k++)
                    {
                        if (PassengerName.Split('|')[k].ToString().Replace("CHD", "") == PassengerList[j].PassengerName.Replace("CHD", ""))
                        {
                            number = k;
                            break;
                        }
                    }
                    if (number != -1)
                    {
                        tcount++;
                        PassengerList[j].TicketNumber = TicketNumber.Split('|')[number];
                        PassengerList[j].TicketStatus = 2;
                    }
                }

                if (tcount == PassengerList.Count)
                {
                    OrderUpdateList[0].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     = OrderUpdateList[0].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
                }

                List <PbProject.Model.User_Company> mCompany = new PbProject.Logic.ControlBase.BaseDataManage().
                                                               CallMethod("User_Company", "GetList", null, new Object[] { "UninCode='" + OrderUpdateList[0].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='" + OrderUpdateList[0].CPCpyNo + "'" }) as List <PbProject.Model.User_Employees>;

                bool reuslt = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().OperOrderCP(OrderUpdateList[0], PassengerList, mUser[0], mCompany[0], "");
                if (reuslt)
                {
                    sb.AppendFormat("更新数据库,订单号:" + OrderUpdateList[0].OrderId + "信息,更新成功!\r\n");
                    #region  票宝开放服务接口异步通知出票

                    if (OrderUpdateList[0].OrderSourceType == 5)
                    {
                        PbProject.Logic.PTInterface.PbInterfaceNotify pbInterfaceCmd = new PbProject.Logic.PTInterface.PbInterfaceNotify();
                        if (pbInterfaceCmd != null)
                        {
                            bool pbNotifyResult = pbInterfaceCmd.NotifyTicketNo(OrderUpdateList[0]);
                        }
                    }
                    #endregion
                }
                else
                {
                    sb.AppendFormat("更新数据库,订单号:" + OrderUpdateList[0].OrderId + "信息,更新失败!\r\n");
                }
                OnErrorNew("记录:" + sb.ToString(), false);
                #endregion
            }
            else if (type == "3" || type == "4")
            {
                //PiaoBao.BLLLogic.Order.Tb_Ticket_OrderManager OrderMan = PiaoBao.BLLLogic.Factory_Air.CreateITb_Ticket_OrderManager();
                //PiaoBao.Models.Tb_Ticket_Order Order = OrderMan.SelectOrderByOutOrderId(orderguid)[0];
                //if (Request.Form["orderstate"].ToString().Contains("已经退票") || Request.Form["orderstate"].ToString().Contains("已经废票"))
                //{
                //    OnErrorNew("8000yi平台退废票成功" + 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 + " 8000yi平台供应已退票";
                //    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
                //{
                //    OnErrorNew("8000yi平台退废票失败" + 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 + " 8000yi平台供应已拒绝退废票,请联系平台手动处理 ";
                //    OrderLog.OperateId = "adminys";
                //    OrderLog.OperateName = "管理员";
                //    OrderLog.OperateCorporationId = 1;
                //    OrderLog.A1 = 1;
                //    int Number = OrderLogManager.InsertLog_Tb_AirOrder(OrderLog);
                //    #endregion
                //    OrderMan.UpdateTb_Ticket_Order(Order);
                //}
            }
            OnErrorNew("记录:" + sb.ToString(), false);
        }
    }
예제 #20
0
    private void GetData()
    {
        string tmpstr = "";

        string[] sl = HttpContext.Current.Request.Form.AllKeys;//Request.QueryString.AllKeys;
        for (int i = 0; i < sl.Length; i++)
        {
            tmpstr += sl[i] + "=" + HttpContext.Current.Request.Form.Get(i) + "&";//HttpContext.Current.Request.Form.Keys[i] + "&";
        }

        OnErrorNew(HttpUtility.UrlDecode(tmpstr), false);

        //string ticketnoinfo = "";
        //for (int i = 0; i < Request.Form.Count; i++)
        //{
        //    ticketnoinfo = ticketnoinfo + Request.Form.Keys[i].ToString() + ":" + Request.Form[i].ToString() + "|";
        //}
        //ticketnoinfo = HttpUtility.UrlDecode(ticketnoinfo, Encoding.GetEncoding("gb2312"));
        //OnErrorNew("ticketnoinfo内容:" + ticketnoinfo, false);

        string NewPnr = "";

        string airId = HttpContext.Current.Request.Form.Get("airId");//Request.QueryString["airId"].ToString().Trim();

        OnErrorNew("判断是否有票号信息,airId=" + airId, false);

        if (HttpContext.Current.Request.Form.Get("airId").Trim() != "")
        {
            OnErrorNew("进入 Request.QueryString['status'].ToString().Trim() != ''", false);
            if (HttpContext.Current.Request.Form.Get("Type").Trim() == "1")//出票完成
            {
                bool reuslt = false;
                OnErrorNew("进入出票 Request.QueryString['status'].ToString().Trim() == 'T'", false);
                StringBuilder sb = new StringBuilder();
                List <PbProject.Model.Tb_Ticket_Order> OrderUpdateList = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().GetListBySqlWhere(" OutOrderId='" + HttpContext.Current.Request.Form.Get("orderid").Trim() + "'");

                if (OrderUpdateList.Count == 0)
                {
                    OnErrorNew("根据外部订单号未查找到对应订单,外部订单号:" + HttpContext.Current.Request.Form.Get("orderid").Trim(), false);
                }

                if (OrderUpdateList[0].OrderStatusCode != 3)
                {
                    OnErrorNew("订单状态不是待出票状态...", false);
                }

                //Login(OrderUpdateList);
                if (OrderUpdateList[0].OrderStatusCode == 3)
                {
                    //OrderUpdateList.OrderStatusCode = 4; //出票状态
                    if (HttpContext.Current.Request.Form.Get("NewPnr") != null && HttpContext.Current.Request.Form.Get("NewPnr") != "")
                    {
                        OrderUpdateList[0].ChangePNR = HttpContext.Current.Request.Form.Get("NewPnr");
                    }

                    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(OrderUpdateList[0].OrderId);
                    for (int j = 0; j < PassengerList.Count; j++)
                    {
                        string sss = HttpUtility.UrlDecode(HttpContext.Current.Request.Form.Get("passengerName"));

                        OnErrorNew("乘机人列表:" + sss, false);

                        string[] Name = sss.Split('^');
                        for (int i = 0; i < Name.Length; i++)
                        {
                            if (PassengerList[j].PassengerName.Trim().Replace("CHD", "").Trim().Replace(" ", "") == Name[i].Replace("CHD", "").Trim().Replace(" ", ""))
                            {
                                PassengerList[j].TicketNumber = HttpContext.Current.Request.Form.Get("airId").Split('^')[i].ToString();
                                tcount++;
                            }
                        }
                    }

                    if (tcount == PassengerList.Count)
                    {
                        OrderUpdateList[0].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     = OrderUpdateList[0].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
                    }

                    List <PbProject.Model.User_Company> mCompany = new PbProject.Logic.ControlBase.BaseDataManage().
                                                                   CallMethod("User_Company", "GetList", null, new Object[] { "UninCode='" + OrderUpdateList[0].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='" + OrderUpdateList[0].CPCpyNo + "'" }) as List <PbProject.Model.User_Employees>;
                    reuslt = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().OperOrderCP(OrderUpdateList[0], PassengerList, mUser[0], mCompany[0], "");
                    if (reuslt)
                    {
                        sb.AppendFormat("更新数据库,订单号:" + OrderUpdateList[0].OrderId + "信息,更新成功!\r\n");
                        #region  票宝开放服务接口异步通知出票

                        if (OrderUpdateList[0].OrderSourceType == 5)
                        {
                            PbProject.Logic.PTInterface.PbInterfaceNotify pbInterfaceCmd = new PbProject.Logic.PTInterface.PbInterfaceNotify();
                            if (pbInterfaceCmd != null)
                            {
                                bool pbNotifyResult = pbInterfaceCmd.NotifyTicketNo(OrderUpdateList[0]);
                            }
                        }
                        #endregion
                    }
                    else
                    {
                        sb.AppendFormat("更新数据库,订单号:" + OrderUpdateList[0].OrderId + "信息,更新失败!\r\n");
                    }
                    OnErrorNew("易行记录:" + sb.ToString(), false);
                }
            }
        }
    }
    /// <summary>
    /// 导入政策
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btn_Click(object sender, EventArgs e)
    {
        string msg = "请选择Excel文件";

        //string savename = DateTime.Now.ToString("yyyyMMddHHmmss") + Path.GetExtension(this.FileUpload.FileName).ToLower();
        //string UpFilePath = Server.MapPath("../upload/" + savename);
        try
        {
            if (FileUpload.FileName != "")
            {
                string fex = Path.GetExtension(FileUpload.FileName).ToLower();
                if (fex != ".xls" && fex != ".xlsx")
                {
                    msg = "文件必须是excel";
                }
                else
                {
                    IHashObject parameter = new HashObject();
                    byte[]      fileBytes = FileUpload.FileBytes;
                    if (!ExcelRender.HasData(new MemoryStream(fileBytes)))
                    {
                        msg = "导入数据为空";
                    }
                    else
                    {
                        DataTable dt   = ExcelRender.RenderFromExcel(new MemoryStream(fileBytes));
                        int       num  = 0;
                        ArrayList list = new ArrayList();
                        for (int i = 0; i < dt.Rows.Count; i++)
                        {
                            if (dt.Rows[i]["公司编号"].ToString().Length == 0)
                            {
                                list.Add("第" + (i + 1) + "行,公司编号不能为空</br>");
                            }
                            if (dt.Rows[i]["政策种类(1普通,2特价)"].ToString() != "0" && dt.Rows[i]["政策种类(1普通,2特价)"].ToString() != "1" && dt.Rows[i]["政策种类(1普通,2特价)"].ToString() != "2")
                            {
                                list.Add("第" + (i + 1) + "行,政策种类请输入1或2</br>");
                            }
                            if (dt.Rows[i]["票价生成方式(1正常价格,2动态特价,3固定特价)"].ToString() != "1" && dt.Rows[i]["票价生成方式(1正常价格,2动态特价,3固定特价)"].ToString() != "2" && dt.Rows[i]["票价生成方式(1正常价格,2动态特价,3固定特价)"].ToString() != "3")
                            {
                                list.Add("第" + (i + 1) + "行,票价生成方式请输入1或2,3</br>");
                            }
                            if (dt.Rows[i]["发布类型(1出港,2入港,3全国)"].ToString() != "1" && dt.Rows[i]["发布类型(1出港,2入港,3全国)"].ToString() != "2" && dt.Rows[i]["发布类型(1出港,2入港,3全国)"].ToString() != "3")
                            {
                                list.Add("第" + (i + 1) + "行,发布类型请输入1或2,3</br>");
                            }
                            if (dt.Rows[i]["航空公司返点"].ToString().Length > 0)
                            {
                                if (int.TryParse(dt.Rows[i]["航空公司返点"].ToString(), out num))
                                {
                                    if (Convert.ToInt32(dt.Rows[i]["航空公司返点"].ToString()) < 0 || Convert.ToInt32(dt.Rows[i]["航空公司返点"].ToString()) >= 100)
                                    {
                                        list.Add("第" + (i + 1) + "行,航空公司返点请输入1到100之间的数字</br>");
                                    }
                                }
                            }
                            else
                            {
                                list.Add("第" + i + 1 + "行,航空公司返点请输入1到100之间的数字</br>");
                            }

                            if (list.Count < 1)
                            {
                                parameter.Add(i.ToString(), "insert into Tb_Ticket_Policy(CpyNo,CpyName,PolicyKind,GenerationType,ReleaseType," +
                                              "CarryCode,TravelType,PolicyType,TeamFlag,Office," +
                                              "StartCityNameCode,StartCityNameSame,MiddleCityNameCode,MiddleCityNameSame,TargetCityNameCode," +
                                              "TargetCityNameSame,ApplianceFlightType,ApplianceFlight,UnApplianceFlight,ScheduleConstraints," +
                                              "ShippingSpace,SpacePrice,AdvanceDay,DownPoint,LaterPoint," +
                                              "SharePoint,AirReBate,FlightStartDate,FlightEndDate,PrintStartDate," +
                                              "PrintEndDate,AuditDate,AuditType,AuditLoginName,AuditName," +
                                              "CreateDate,CreateLoginName,CreateName,Remark,IsApplyToShareFlight," +
                                              "ShareAirCode,IsLowerOpen,HighPolicyFlag,AutoPrintFlag,A2) " +
                                              "values('" + dt.Rows[i]["公司编号"].ToString() + "','" + dt.Rows[i]["供应商名字"].ToString() + "'," + dt.Rows[i]["政策种类(1普通,2特价)"].ToString() + "," + dt.Rows[i]["票价生成方式(1正常价格,2动态特价,3固定特价)"].ToString() + "," + dt.Rows[i]["发布类型(1出港,2入港,3全国)"].ToString() + "," +
                                              "'" + dt.Rows[i]["承运人"].ToString() + "','" + dt.Rows[i]["行程类型(1单程,2往返/单程,3往返,4中转联程)"].ToString() + "','" + dt.Rows[i]["政策类型(1=B2B,2=BSP,3=B2B/BSP)"].ToString() + "','" + dt.Rows[i]["团队标志(0普通,1团队)"].ToString() + "','" + dt.Rows[i]["出票Office号"].ToString() + "'," +
                                              "'" + dt.Rows[i]["出发城市三字码"].ToString() + "','" + dt.Rows[i]["出发城市同城机场共享政策(1是,2否)"].ToString() + "','" + dt.Rows[i]["中转城市三字码"].ToString() + "','" + dt.Rows[i]["中转城市同城机场共享政策(1是,2否)"].ToString() + "','" + dt.Rows[i]["到达城市三字码"].ToString() + "'," +
                                              "'" + dt.Rows[i]["到达城市同城机场共享政策(1是,2否)"].ToString() + "','" + dt.Rows[i]["适用航班号类型(1全部2适用3不适用)"].ToString() + "','" + dt.Rows[i]["适用航班"].ToString() + "','" + dt.Rows[i]["不适用航班"].ToString() + "','" + dt.Rows[i]["班期限制"].ToString() + "'," +
                                              "'" + dt.Rows[i]["舱位"].ToString() + "','" + dt.Rows[i]["舱位价格"].ToString() + "','" + dt.Rows[i]["提前天数"].ToString() + "','" + dt.Rows[i]["下级分销返点"].ToString() + "','" + dt.Rows[i]["下级分销后返"].ToString() + "'," +
                                              "'" + dt.Rows[i]["共享政策返点"].ToString() + "','" + dt.Rows[i]["航空公司返点"].ToString() + "','" + dt.Rows[i]["乘机生效日期"].ToString() + "','" + dt.Rows[i]["乘机失效日期"].ToString() + "','" + dt.Rows[i]["出票生效日期"].ToString() + "'," +
                                              "'" + dt.Rows[i]["出票失效日期"].ToString() + "','" + dt.Rows[i]["审核时间"].ToString() + "','" + dt.Rows[i]["审核状态(1已审,2未审)"].ToString() + "','" + dt.Rows[i]["审核人帐户"].ToString() + "','" + dt.Rows[i]["审核人姓名"].ToString() + "'," +
                                              "'" + DateTime.Now.ToString() + "','" + mUser.LoginName + "','" + mUser.UserName + "','" + dt.Rows[i]["备注"].ToString() + "','" + dt.Rows[i]["是否适用于共享航班(1适用,0不适用)"].ToString() + "'," +
                                              "'" + dt.Rows[i]["适用共享航空公司二字码(如:CA/CZ/ZH/HU)"].ToString() + "'," + dt.Rows[i]["是否往返低开(0不低开,1低开)"].ToString() + "," + dt.Rows[i]["是否高返政策(1是,其它不是)"].ToString() + "," + dt.Rows[i]["自动出票方式(手动(0或者null空),半自动1,自动2)"].ToString() + ",1)");
                            }
                        }
                        if (list.Count >= 1)
                        {
                            msg = "";
                            for (int j = 0; j < list.Count; j++)
                            {
                                msg += list[j].ToString();
                            }
                        }
                        else
                        {
                            msg = new PbProject.Logic.SQLEXBLL.SQLEXBLL_Base().ImportPolicy(parameter) == true ? "导入成功(" + parameter.Count + " 条数据)" : "导入失败";
                        }
                    }
                }
            }
        }
        catch (Exception ex)
        {
            msg = ex.ToString();
            throw ex;
        }
        //File.Delete(UpFilePath);
        ScriptManager.RegisterStartupScript(this, GetType(), "", "showdialog('" + msg + "');", true);
    }
예제 #22
0
    private void GetData()
    {
        string ticketnoinfo = "";

        for (int i = 0; i < Request.Form.Count; i++)
        {
            ticketnoinfo = ticketnoinfo + Request.Form.Keys[i].ToString() + ":" + Request.Form[i].ToString() + "|";
        }
        ticketnoinfo = HttpUtility.UrlDecode(ticketnoinfo, Encoding.GetEncoding("gb2312"));
        OnErrorNew("ticketnoinfo内容:" + ticketnoinfo, false);
        if (GetValue("ticket_no").ToString().Trim() != "")
        {
            OnErrorNew("进入 Request.Form['status'].ToString().Trim() != ''", false);
            if (GetValue("status").ToString().Trim() == "T" && GetValue("service").ToString().Trim() == "order_issue_notify")//出票完成
            {
                bool reuslt = false;
                OnErrorNew("进入出票 Request.Form['status'].ToString().Trim() == 'T'", false);
                StringBuilder sb = new StringBuilder();
                PbProject.Model.Tb_Ticket_Order OrderUpdateList = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().GetTicketOrderByOrderId(GetValue("order_no").ToString());
                //Login(OrderUpdateList);
                if (OrderUpdateList.OrderStatusCode == 3)
                {
                    int tcount = 0;
                    //OrderUpdateList.OrderStatusCode = 4; //出票状态

                    PbProject.Logic.Order.Tb_Ticket_PassengerBLL PassengerManager = new PbProject.Logic.Order.Tb_Ticket_PassengerBLL();
                    List <PbProject.Model.Tb_Ticket_Passenger>   PassengerList    = PassengerManager.GetPasListByOrderID(OrderUpdateList.OrderId);
                    for (int j = 0; j < PassengerList.Count; j++)
                    {
                        string   sss  = HttpUtility.UrlDecode(GetValue("passenger").ToString(), Encoding.GetEncoding("gb2312"));
                        string[] Name = sss.Split('^');
                        for (int i = 0; i < Name.Length; i++)
                        {
                            if (PassengerList[j].PassengerName.Trim().Replace("CHD", "").Trim().Replace(" ", "") == Name[i].Replace("CHD", "").Trim().Replace(" ", ""))
                            {
                                PassengerList[j].TicketNumber = GetValue("ticket_no").ToString().Split('^')[i].ToString();
                                tcount++;
                            }
                        }
                    }

                    if (tcount == PassengerList.Count)
                    {
                        OrderUpdateList.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     = OrderUpdateList.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
                    }

                    List <PbProject.Model.User_Company> mCompany = new PbProject.Logic.ControlBase.BaseDataManage().
                                                                   CallMethod("User_Company", "GetList", null, new Object[] { "UninCode='" + OrderUpdateList.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='" + OrderUpdateList.CPCpyNo + "'" }) as List <PbProject.Model.User_Employees>;
                    reuslt = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().OperOrderCP(OrderUpdateList, PassengerList, mUser[0], mCompany[0], "");
                    if (reuslt)
                    {
                        sb.AppendFormat("更新数据库,订单号:" + OrderUpdateList.OrderId + "信息,更新成功!\r\n");
                        #region  票宝开放服务接口异步通知出票

                        if (OrderUpdateList.OrderSourceType == 5)
                        {
                            PbProject.Logic.PTInterface.PbInterfaceNotify pbInterfaceCmd = new PbProject.Logic.PTInterface.PbInterfaceNotify();
                            if (pbInterfaceCmd != null)
                            {
                                bool pbNotifyResult = pbInterfaceCmd.NotifyTicketNo(OrderUpdateList);
                            }
                        }
                        #endregion
                    }
                    else
                    {
                        sb.AppendFormat("更新数据库,订单号:" + OrderUpdateList.OrderId + "信息,更新失败!\r\n");
                    }
                    OnErrorNew("今日记录:" + sb.ToString(), false);
                }
            }
            else if (GetValue("status").ToString().Trim() == "1" && GetValue("service").ToString().Trim() == "order_refund_notify")
            {
                PbProject.Model.Tb_Ticket_Order Order = new PbProject.Logic.Order.Tb_Ticket_OrderBLL().GetTicketOrderByOrderId(GetValue("order_no").ToString());
                OnErrorNew("今日退废票成功" + Order.OrderId, false);
                //Order.A40 = "3";
                //#region 记录日志
                //PbProject.Model.Log_Tb_AirOrder OrderLog = new PbProject.Model.Log_Tb_AirOrder();
                //PbProject.Logic.Log.Log_ErrorBLL 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);
            }
            else if (GetValue("status").ToString().Trim() == "2" && GetValue("service").ToString().Trim() == "order_refund_notify")
            {
                //PiaoBao.BLLLogic.Order.Tb_Ticket_OrderManager OrderMan = PiaoBao.BLLLogic.Factory_Air.CreateITb_Ticket_OrderManager();
                //PiaoBao.Models.Tb_Ticket_Order Order = OrderMan.SelectOrderByOutOrderId(GetValue("order_no").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 + " 今日平台供应已拒绝退废票,请联系平台手动处理 拒绝原因:" + GetValue("remark").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);
            }
        }
    }