示例#1
0
        /// <summary>
        /// 参数实例
        /// </summary>
        /// <param name="Order"></param>
        /// <param name="mUser">买家帐号</param>
        public PTBy517(PbProject.Model.Tb_Ticket_Order Order, PbProject.Model.User_Employees mUser, PbProject.Model.User_Company mTopcom, PbProject.Model.User_Company mCom)
        {
            _mTopcom = mTopcom;

            _mCom = mCom;

            _order = Order;

            PbProject.Model.definitionParam.BaseSwitch BS = new Model.definitionParam.BaseSwitch();
            _517Service = new w_517WebService._517WebServiceSoapClient();

            PbProject.Logic.ControlBase.Bd_Base_ParametersBLL Bp      = new ControlBase.Bd_Base_ParametersBLL();
            List <PbProject.Model.Bd_Base_Parameters>         ParList = Bp.GetParametersListByCpyNo(_mTopcom.UninCode.ToString());

            BS = WebCommon.Utility.BaseParams.getParams(ParList);

            _517Accout = BS.JieKouZhangHao.Split('|')[0].Split('^')[0];

            _517Password = BS.JieKouZhangHao.Split('|')[0].Split('^')[1];
            _517Ag       = BS.JieKouZhangHao.Split('|')[0].Split('^')[2];

            //_517Accout = "cdqmkjt";

            //_517Password = "******";
            //_517Ag = "4b9e9902f1c34ed08cefd84f2388e7e0";



            _QXValue = BS.KongZhiXiTong;
            //BS.GongYingKongZhiFenXiao
        }
示例#2
0
        /// <summary>
        /// 参数实例
        /// </summary>
        /// <param name="Order"></param>
        /// <param name="mUser">买家帐号</param>
        public PTBy8000yi(PbProject.Model.Tb_Ticket_Order Order, PbProject.Model.User_Employees mUser, PbProject.Model.User_Company mTopcom, PbProject.Model.User_Company mCom)
        {
            _mTopcom = mTopcom;

            _mCom = mCom;

            _order = Order;

            PbProject.Model.definitionParam.BaseSwitch BS = new Model.definitionParam.BaseSwitch();

            PbProject.Logic.ControlBase.Bd_Base_ParametersBLL Bp      = new ControlBase.Bd_Base_ParametersBLL();
            List <PbProject.Model.Bd_Base_Parameters>         ParList = Bp.GetParametersListByCpyNo(_mTopcom.UninCode.ToString());

            BS = WebCommon.Utility.BaseParams.getParams(ParList);

            _8000yiAccout = BS.JieKouZhangHao.Split('|')[5].Split('^')[0];

            _8000yiPassword   = BS.JieKouZhangHao.Split('|')[5].Split('^')[1];
            _8000yiAlipaycode = BS.JieKouZhangHao.Split('|')[5].Split('^')[2];



            _QXValue = BS.KongZhiXiTong;
            //BS.GongYingKongZhiFenXiao
        }
示例#3
0
        /// <summary>
        /// 参数实例
        /// </summary>
        /// <param name="Order"></param>
        /// <param name="mUser">买家帐号</param>
        public PTByYeeXing(PbProject.Model.Tb_Ticket_Order Order, PbProject.Model.User_Employees mUser, PbProject.Model.User_Company mTopcom, PbProject.Model.User_Company mCom)
        {
            _mTopcom = mTopcom;

            _mCom = mCom;

            _mUser = mUser;

            _order = Order;

            PbProject.Model.definitionParam.BaseSwitch BS = new Model.definitionParam.BaseSwitch();

            PbProject.Logic.ControlBase.Bd_Base_ParametersBLL Bp      = new ControlBase.Bd_Base_ParametersBLL();
            List <PbProject.Model.Bd_Base_Parameters>         ParList = Bp.GetParametersListByCpyNo(_mTopcom.UninCode.ToString());

            BS = WebCommon.Utility.BaseParams.getParams(ParList);

            _yeeXingService = new w_YeeXingService.YeeXingSerivceSoapClient();

            _yeeXingAccout = BS.JieKouZhangHao.Split('|')[6].Split('^')[0];

            _yeeXingAccout2 = BS.JieKouZhangHao.Split('|')[6].Split('^')[1];

            _QXValue = BS.KongZhiXiTong;
            //BS.GongYingKongZhiFenXiao
        }
示例#4
0
    /// <summary>
    /// 原先设计用的是Session现在改为Application,但是方法名称未改变,避免过多改动引发系统不稳定.YYY 2013-6-17
    /// </summary>
    public void LoadSession()
    {
        try
        {
            SessionContent sessionContent = new SessionContent();
            string         currentuserid  = System.Web.HttpContext.Current.Request["currentuserid"] ?? string.Empty;

            if (!string.IsNullOrEmpty(currentuserid))
            {
                //if (Session[currentuserid] == null)
                if (Application[currentuserid] == null)
                //if (HttpContext.Current.Application[currentuserid] == null)
                {
                    FormsAuthentication.RedirectToLoginPage();
                }
                else
                {
                    //sessionContent = Session[currentuserid] as SessionContent;
                    //sessionContent = HttpContext.Current.Application[currentuserid] as SessionContent;
                    sessionContent = Application[currentuserid] as SessionContent;
                    mUser          = sessionContent.USER;
                    mCompany       = sessionContent.COMPANY;

                    //mSupCompany = sessionContent.SUPCOMPANY;

                    //如果保存的落地运营商的<公司信息>全局变量为空,则重新读取一次数据库
                    if (Application[sessionContent.parentCpyno + "Company"] == null)
                    {
                        string strwhere = "1=1 and unincode='" + sessionContent.parentCpyno + "'";
                        List <User_Company> listUser_Company = baseDataManage.CallMethod("User_Company", "GetList", null, new Object[] { strwhere }) as List <User_Company>;
                        if (listUser_Company != null && listUser_Company.Count > 0)
                        {
                            Application[sessionContent.parentCpyno + "Company"] = listUser_Company[0];
                        }
                    }
                    mSupCompany        = Application[sessionContent.parentCpyno + "Company"] as User_Company;
                    baseParametersList = sessionContent.BASEPARAMETERS;
                    //如果保存落地运营商的全局变量为空,则重新读取一次数据库
                    if (Application[sessionContent.parentCpyno + "Parameters"] == null)
                    {
                        string strwhere = "1=1 and cpyno='" + sessionContent.parentCpyno + "'";
                        List <Bd_Base_Parameters> listParameters = baseDataManage.CallMethod("Bd_Base_Parameters", "GetList", null, new Object[] { strwhere }) as List <Bd_Base_Parameters>;
                        if (listParameters != null)
                        {
                            Application[sessionContent.parentCpyno + "Parameters"] = listParameters;
                        }
                    }
                    supBaseParametersList = Application[sessionContent.parentCpyno + "Parameters"] as List <Bd_Base_Parameters>;//落地运营商和供应商公司参数信息
                    //supBaseParametersList = sessionContent.SupBASEPARAMETERS;//落地运营商和供应商公司参数信息
                    configparam = Bd_Base_ParametersBLL.GetConfigParam(supBaseParametersList);

                    //configparam = sessionContent.CONFIGPARAM;


                    //当前登录用户权限
                    m_UserPermissions = sessionContent.M_USERPERMISSIONS;
                    // Limits();
                }
            }
            else
            {
                FormsAuthentication.RedirectToLoginPage();
            }

            /*
             * if (Session[sessionContent.USERLOGIN] == null)
             * {
             *  FormsAuthentication.RedirectToLoginPage();
             * }
             * else
             * {
             *  sessionContent = Session[sessionContent.USERLOGIN] as SessionContent;
             *  mUser = sessionContent.USER;
             *  mCompany = sessionContent.COMPANY;
             *  mSupCompany = sessionContent.SUPCOMPANY;
             *  baseParametersList = sessionContent.BASEPARAMETERS;
             *  supBaseParametersList = sessionContent.SupBASEPARAMETERS;//落地运营商和供应商公司参数信息
             *  configparam = sessionContent.CONFIGPARAM;
             *  //当前登录用户权限
             *  m_UserPermissions = sessionContent.M_USERPERMISSIONS;
             *  //权限验证
             *  Limits();
             * }*/
            //}
        }
        catch
        {
            //  跳转登陆页
        }
    }
示例#5
0
    /// <summary>
    /// 1PNR内容导入 0PNR导入 2pnr入库记账
    /// </summary>
    /// <param name="type"></param>
    public void Import(int type)
    {
        bool IsResponse = false;

        try
        {
            string strKongZhiXiTong = "", strGongYingKongZhiFenXiao = "";
            PbProject.Model.ConfigParam    configParam = null;
            PbProject.Model.User_Company   msupCompany = null;
            PbProject.Model.User_Company   mcompany = null;
            PbProject.Model.User_Employees muser = null;
            string strGY = Hid_GY.Value;
            string strKH = Hid_KH.Value;
            if (mCompany.RoleType == 1)
            {
                //平台
                if (!string.IsNullOrEmpty(strGY))
                {
                    //UninCode-LoginName-UninAllName-uid-cid
                    string[] strArr = strGY.Split('@');
                    msupCompany = this.baseDataManage.CallMethod("User_Company", "GetById", null, new object[] { strArr[4] }) as User_Company;
                    if (msupCompany != null)
                    {
                        List <Bd_Base_Parameters> GYParameters = baseDataManage.CallMethod("Bd_Base_Parameters", "GetList", null, new Object[] { "CpyNo='" + msupCompany.UninCode + "'" }) as List <Bd_Base_Parameters>;
                        if (GYParameters != null)
                        {
                            strKongZhiXiTong          = BaseParams.getParams(GYParameters).KongZhiXiTong;
                            strGongYingKongZhiFenXiao = BaseParams.getParams(GYParameters).GongYingKongZhiFenXiao;
                            configParam = Bd_Base_ParametersBLL.GetConfigParam(GYParameters);
                        }
                    }
                }
            }
            else
            {
                //供应
                strKongZhiXiTong          = BaseParams.getParams(supBaseParametersList).KongZhiXiTong;
                strGongYingKongZhiFenXiao = BaseParams.getParams(baseParametersList).GongYingKongZhiFenXiao;
                configParam = this.configparam;
                msupCompany = this.mSupCompany;
            }
            //选择客户
            if (!string.IsNullOrEmpty(strKH))
            {
                //UninCode-LoginName-UninAllName-uid-cid
                string[] strArr = strKH.Split('@');
                if (strArr.Length == 5)
                {
                    muser = this.baseDataManage.CallMethod("User_Employees", "GetById", null, new object[] { strArr[3] }) as User_Employees;
                    List <User_Company> uCompanyList = baseDataManage.CallMethod("User_Company", "GetList", null, new Object[] { "UninCode='" + muser.CpyNo + "'" }) as List <User_Company>;

                    if (uCompanyList != null && uCompanyList.Count > 0)
                    {
                        mcompany = uCompanyList[0];
                    }
                }
            }
            PnrImportParam Param = new PnrImportParam();
            Param.m_UserInfo     = muser;
            Param.m_CurCompany   = mcompany;
            Param.m_SupCompany   = msupCompany;
            Param.m_LoginUser    = mUser;
            Param.m_LoginCompany = mCompany;
            PnrImportManage Mange = new PnrImportManage(muser, mcompany, msupCompany, strKongZhiXiTong, strGongYingKongZhiFenXiao, configParam);
            //是否生成订单 否
            Param.IsCreateOrder = false;
            Param.Source        = 1;//后台
            Param.RoleType      = mCompany.RoleType.ToString();
            Param.OrderId       = Hid_OrderId.Value;
            if (type == 0 || type == 2)
            {
                //是否PNR入库记账
                Param.IsImportJZ = type == 2 ? 1 : 0;
                //Pnr导入 或者PNR入库记账
                Param.Pnr = (type == 2) ? txtH_PNR3.Value.Trim() : txtH_PNR.Value.Trim();
                if (Hid_IsBigCode.Value == "1")
                {
                    Param.ImportTongDao = 3;
                    Param.BigPnr        = txtH_PNR.Value.Trim();
                }
            }
            else if (type == 1)
            {
                //Pnr内容导入
                Param.ImportTongDao = 4;
                //关闭PNR导入合并
                if (KongZhiXiTong != null && KongZhiXiTong.Contains("|59|"))
                {
                    Param.IsMerge = 0;//未合并
                    Param.RTData  = pnrCon.Value.Trim().Replace("'", "");
                    Param.PATData = patCon.Value.Trim().Replace("'", "");
                }
                else
                {
                    Param.IsMerge      = 1;//合并
                    Param.RTAndPatData = txtPNRAndPata.Text.Trim().Replace("'", "");
                }
            }
            bool IsSuc = Mange.GetImportPnrInfo(Param);
            if (!IsSuc)
            {
                #region 出错提示

                Hid_OrderId.Value      = "";
                Param.SecondPM.ErrCode = "0";
                if (Param.IsNextOK == 1)
                {
                    //继续操作
                    Param.SecondPM.OpType = "1";
                }
                else
                {
                    Param.SecondPM.Msg = Param.TipMsg;
                    //提示
                    Param.SecondPM.OpType = "0";
                }
                string result = JsonHelper.ObjToJson <PnrImportParam>(Param);
                ScriptManager.RegisterStartupScript(this, GetType(), Guid.NewGuid().ToString(), "showMsg('" + escape(Param.SecondPM.Msg) + "',{t:2,type:" + type + ",code:\"" + escape(result) + "\"});ShowDiv(false);", true);

                #endregion
            }
            else
            {
                //页面间传递数据对象
                ////成功显示数据
                //ViewState["Param"] = Param;
                //将数据传入到指定页面处理
                this.PageObj = Param;
                //方案一
                //Server.Transfer("HandPnrImport.aspx", true);
                //Response.Redirect("HandPnrImport.aspx", false);
                //方案二
                System.IO.StringWriter sw = new System.IO.StringWriter();
                Server.Execute("HandPnrImport.aspx?currentuserid=" + this.currentuserid.Value, sw);
                IsResponse = true;
                Response.Clear();
                Response.Write(sw.ToString());
                Response.End();
            }
        }
        catch (Exception ex)
        {
            if (!IsResponse)
            {
                ScriptManager.RegisterStartupScript(this, GetType(), Guid.NewGuid().ToString(), "showMsg('页面异常!');ShowDiv(false);", true);
            }
        }
    }