Ejemplo n.º 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
        }
Ejemplo n.º 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
        }
Ejemplo n.º 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
        }
Ejemplo n.º 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
        {
            //  跳转登陆页
        }
    }
Ejemplo n.º 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);
            }
        }
    }
Ejemplo n.º 6
0
        /// <summary>
        /// 将票盟政策合并到原始政策dt中去
        /// </summary>
        /// <param name="LocalDt">原始dt</param>
        /// <param name="DrPM">票盟dt</param>
        private List <PbProject.Model.Tb_Ticket_Policy> MergerPMDT(DataRow[] DrPM, string FromCityCode, string ToCityCode, string CarrCode, string FlyNo, PbProject.Model.User_Company GYCompany, string
                                                                   StartDate, string SecondDate, bool ChangePnr)
        {
            try
            {
                List <PbProject.Model.Tb_Ticket_Policy> mPolicyList = new List <Tb_Ticket_Policy>();
                for (int i = 0; i < DrPM.Length; i++)
                {
                    if (SecondDate == "")
                    {
                        if (DateTime.Parse(DrPM[i]["fromtime"].ToString()) > DateTime.Parse(StartDate))
                        {
                            continue;
                        }
                    }
                    else
                    {
                        if (DateTime.Parse(DrPM[i]["fromtime"].ToString()) > DateTime.Parse(StartDate) || DateTime.Parse(DrPM[i]["totime"].ToString()) < DateTime.Parse(SecondDate))
                        {
                            continue;
                        }
                    }



                    //如果不允许换编码并且政策是必须换编码出票的,则过滤掉,yyy 2013-6-7update
                    if (!ChangePnr && DrPM[i]["changerecord"].ToString() == "1")
                    {
                        continue;
                    }
                    PbProject.Model.Tb_Ticket_Policy mPolicy = new Tb_Ticket_Policy();
                    mPolicy.CpyNo   = "0" + PbProject.Model.definitionParam.PolicySourceParam.bPiaoMeng.ToString() + _mTopcom.UninCode;
                    mPolicy.CpyName = _mTopcom.UninName;
                    if (DrPM[i]["isspecmark"].ToString() == "0")//是否是特殊政策
                    {
                        mPolicy.PolicyKind     = 0;
                        mPolicy.GenerationType = 1;
                    }
                    else
                    {
                        mPolicy.PolicyKind     = 2;
                        mPolicy.GenerationType = 2;
                    }
                    mPolicy.CarryCode  = CarrCode;
                    mPolicy.TravelType = 1;
                    if (DrPM[i]["policytype"].ToString().ToUpper().Contains("B2P"))
                    {
                        mPolicy.PolicyType = 2;
                    }
                    else
                    {
                        mPolicy.PolicyType = 1;
                    }
                    mPolicy.TeamFlag            = 0;
                    mPolicy.StartCityNameCode   = FromCityCode;
                    mPolicy.StartCityNameSame   = 2;
                    mPolicy.TargetCityNameCode  = ToCityCode;
                    mPolicy.TargetCityNameSame  = 2;
                    mPolicy.ApplianceFlight     = FlyNo;
                    mPolicy.UnApplianceFlight   = "";
                    mPolicy.ApplianceFlightType = 2;

                    mPolicy.ScheduleConstraints = "";
                    mPolicy.ShippingSpace       = DrPM[i]["applyclass"].ToString().Replace(",", "/");

                    mPolicy.FlightStartDate = Convert.ToDateTime(DrPM[i]["fromtime"]);
                    mPolicy.FlightEndDate   = Convert.ToDateTime(DrPM[i]["totime"]);
                    mPolicy.PrintStartDate  = Convert.ToDateTime(DrPM[i]["fromtime"]);
                    mPolicy.PrintEndDate    = Convert.ToDateTime(DrPM[i]["totime"]);
                    mPolicy.AuditDate       = DateTime.Now;
                    mPolicy.AuditType       = 1;
                    string isChangePnr = "";
                    if (DrPM[i]["changerecord"].ToString() == "1")
                    {
                        isChangePnr = "须换编码出票.";
                    }
                    mPolicy.Remark = isChangePnr + " " + DrPM[i]["note"].ToString();
                    mPolicy.IsApplyToShareFlight = 0;
                    mPolicy.ShareAirCode         = "";
                    mPolicy.IsLowerOpen          = 0;
                    mPolicy.DownPoint            = decimal.Parse(DrPM[i]["rate"].ToString());
                    mPolicy.InterPolicyId        = DrPM[i]["id"].ToString();
                    mPolicy._WorkTime            = WorkTimeConvert(TimeTemp(DrPM[i]["worktime"].ToString(), 0), GYCompany.WorkTime);
                    mPolicy._FPGQTime            = TimeTemp(DrPM[i]["worktime"].ToString().Substring(0, 4) + "-" + DrPM[i]["RefundWorkTimeTo"].ToString(), 0);
                    mPolicy.Office = DrPM[i]["officeid"] == DBNull.Value ? "" : DrPM[i]["officeid"].ToString();

                    mPolicyList.Add(mPolicy);



                    //DataRow dr = LocalDt.NewRow();
                    //dr["CarryCode"] = CarrCode;
                    //dr["ApplianceFlight"] = FlyNo;
                    //dr["ScheduleConstraints"] = "1/2/3/4/5/6/7";
                    //dr["Space"] = "/" + DrPM[i]["applyclass"].ToString().Replace(",", "/") + "/";
                    //dr["OldPolicy"] = decimal.Parse(DrPM[i]["rate"].ToString()) / 100;
                    //dr["GYPolicy"] = decimal.Parse(DrPM[i]["rate"].ToString()) / 100;
                    //dr["FXPolicy"] = decimal.Parse(DrPM[i]["rate"].ToString()) / 100;
                    //dr["PolicySource"] = "5";
                    //dr["PolicyId"] = DrPM[i]["id"];
                    //dr["PolicyType"] = DrPM[i]["policytype"].ToString().ToUpper().Contains("B2B") ? "1" : "2";
                    //dr["WorkTime"] = WorkTimeConvert(TimeTemp(DrPM[i]["worktime"].ToString(), 0), GYCompany.WorkTime);
                    ////dr["BusinessTime"] = TimeTemp(DrPM[i]["worktime"].ToString(), -1);
                    //dr["BusinessTime"] = TimeTemp(DrPM[i]["worktime"].ToString().Substring(0, 4) + "-" + DrPM[i]["RefundWorkTimeTo"].ToString(), 0);

                    //dr["SpecialType"] = "0";
                    //dr["IsPause"] = "0";
                    //dr["IsLowerOpen"] = "0";
                    //dr["Remark"] = DrPM[i]["note"].ToString();
                    //dr["PolOffice"] = DrPM[i]["officeid"];
                    //LocalDt.Rows.Add(dr);
                }

                return(mPolicyList);
            }
            finally
            { }
        }