예제 #1
0
        /// <summary>
        /// 获取一个订单
        /// </summary>
        /// <param name="OrderID">订单号</param>
        /// <returns></returns>
        public Eyousoft_yhq.Model.MJiPiaoBaoCun GetModelByCode(string OrderCode)
        {
            Eyousoft_yhq.Model.MJiPiaoBaoCun model = null;

            string    StrSql = "select  *  from tbl_PlanTicket where OrderCode=@OrderCode";
            DbCommand dc     = this._db.GetSqlStringCommand(StrSql);

            this._db.AddInParameter(dc, "OrderCode", DbType.AnsiStringFixedLength, OrderCode);
            using (IDataReader dr = DbHelper.ExecuteReader(dc, this._db))
            {
                if (dr.Read())
                {
                    model = new Eyousoft_yhq.Model.MJiPiaoBaoCun();

                    model.OrderID     = dr.GetString(dr.GetOrdinal("OrderID"));
                    model.OrderCode   = dr.GetString(dr.GetOrdinal("OrderCode"));
                    model.OpeatorID   = dr.GetString(dr.GetOrdinal("OpeatorID"));
                    model.OpeatorName = dr.GetString(dr.GetOrdinal("OpeatorName"));
                    model.IssueTime   = dr.GetDateTime(dr.GetOrdinal("IssueTime"));
                    model.payState    = (TickOrderPayState)dr.GetByte(dr.GetOrdinal("payState"));
                    model.ModifyTag   = dr.IsDBNull(dr.GetOrdinal("ModifyTag")) ? "" : dr.GetString(dr.GetOrdinal("ModifyTag"));
                    model.JpAdress    = dr.IsDBNull(dr.GetOrdinal("JpAdress")) ? "" : dr.GetString(dr.GetOrdinal("JpAdress"));
                    model.OrderPrice  = dr.GetDecimal(dr.GetOrdinal("OrderPrice"));
                    model.InsPrice    = dr.GetDecimal(dr.GetOrdinal("InsPrice"));
                }
            }


            return(model);
        }
예제 #2
0
 /// <summary>
 /// 添加发送信息
 /// </summary>
 /// <param name="model">发送信息实体</param>
 /// <returns></returns>
 public bool Add(Eyousoft_yhq.Model.MJiPiaoBaoCun model)
 {
     if (model.IssueTime == DateTime.MinValue)
     {
         return(false);
     }
     model.OrderID = Guid.NewGuid().ToString();
     return(dal.Add(model));
 }
예제 #3
0
 /// <summary>
 ///保存操作
 /// </summary>
 protected void pageSave()
 {
     Eyousoft_yhq.Model.MJiPiaoBaoCun model = new Eyousoft_yhq.Model.MJiPiaoBaoCun();
     Eyousoft_yhq.BLL.BJiPiaoBaoCun bll = new Eyousoft_yhq.BLL.BJiPiaoBaoCun();
     model.OrderID = Utils.GetQueryStringValue("id");
     model.payState = (Eyousoft_yhq.Model.TickOrderPayState)Utils.GetInt(Utils.GetFormValue(this.ddl_orderState.UniqueID));
     if (bll.setState(model))
     {
         Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "修改成功!"));
     }
     else
     {
         Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "修改失败!"));
     }
 }
예제 #4
0
 /// <summary>
 ///保存操作
 /// </summary>
 protected void pageSave()
 {
     Eyousoft_yhq.Model.MJiPiaoBaoCun model = new Eyousoft_yhq.Model.MJiPiaoBaoCun();
     Eyousoft_yhq.BLL.BJiPiaoBaoCun   bll   = new Eyousoft_yhq.BLL.BJiPiaoBaoCun();
     model.OrderID  = Utils.GetQueryStringValue("id");
     model.payState = (Eyousoft_yhq.Model.TickOrderPayState)Utils.GetInt(Utils.GetFormValue(this.ddl_orderState.UniqueID));
     if (bll.setState(model))
     {
         Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "修改成功!"));
     }
     else
     {
         Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "修改失败!"));
     }
 }
예제 #5
0
        /// <summary>
        /// 添加发送信息
        /// </summary>
        /// <param name="model">发送信息实体</param>
        /// <returns></returns>
        public bool Add(Eyousoft_yhq.Model.MJiPiaoBaoCun model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("INSERT INTO tbl_PlanTicket (OrderID ,OrderCode ,OpeatorID ,OpeatorName ,IssueTime,ModifyTag,JpAdress,OrderPrice,InsPrice,WeiDianId) VALUES (@OrderID ,@OrderCode ,@OpeatorID ,@OpeatorName ,@IssueTime,@ModifyTag,@JpAdress,@OrderPrice,@InsPrice,@WeiDianId)");
            DbCommand cmd = this._db.GetSqlStringCommand(strSql.ToString());

            this._db.AddInParameter(cmd, "OrderID", System.Data.DbType.String, model.OrderID);
            this._db.AddInParameter(cmd, "OrderCode", System.Data.DbType.String, model.OrderCode);
            this._db.AddInParameter(cmd, "OpeatorID", System.Data.DbType.String, model.OpeatorID);
            this._db.AddInParameter(cmd, "OpeatorName", System.Data.DbType.String, model.OpeatorName);
            this._db.AddInParameter(cmd, "IssueTime", System.Data.DbType.DateTime, model.IssueTime);
            this._db.AddInParameter(cmd, "ModifyTag", System.Data.DbType.String, model.ModifyTag);
            this._db.AddInParameter(cmd, "JpAdress", System.Data.DbType.String, model.JpAdress);
            this._db.AddInParameter(cmd, "OrderPrice", System.Data.DbType.Decimal, model.OrderPrice);
            this._db.AddInParameter(cmd, "InsPrice", System.Data.DbType.Decimal, model.InsPrice);
            _db.AddInParameter(cmd, "WeiDianId", System.Data.DbType.AnsiStringFixedLength, model.WeiDianId);

            return(DbHelper.ExecuteSql(cmd, this._db) > 0 ? true : false);
        }
예제 #6
0
        /// <summary>
        /// 获取一个订单
        /// </summary>
        /// <param name="serModel">订单编号</param>
        /// <returns></returns>
        public IList <Eyousoft_yhq.Model.MJiPiaoBaoCun> GetList(Eyousoft_yhq.Model.MJiPiaoBaoCunSer serModel)
        {
            IList <Eyousoft_yhq.Model.MJiPiaoBaoCun> list = new List <MJiPiaoBaoCun>();
            StringBuilder StrSql = new StringBuilder();

            StrSql.Append("select  *  from tbl_PlanTicket where  1=1 ");
            if (serModel != null)
            {
                if (!string.IsNullOrEmpty(serModel.OpeatorID))
                {
                    StrSql.AppendFormat(" and  OpeatorID = '{0}' ", serModel.OpeatorID);
                }
                if (serModel.payState.HasValue && serModel.payState == TickOrderPayState.未支付)
                {
                    StrSql.AppendFormat(" and  payState = '{0}' ", (int)serModel.payState.Value);
                }
            }
            StrSql.Append("  order by IssueTime  DESC  ");
            DbCommand dc = this._db.GetSqlStringCommand(StrSql.ToString());

            using (IDataReader dr = DbHelper.ExecuteReader(dc, this._db))
            {
                while (dr.Read())
                {
                    Eyousoft_yhq.Model.MJiPiaoBaoCun model = new Eyousoft_yhq.Model.MJiPiaoBaoCun();

                    model.OrderID     = dr.GetString(dr.GetOrdinal("OrderID"));
                    model.OrderCode   = dr.GetString(dr.GetOrdinal("OrderCode"));
                    model.OpeatorID   = dr.GetString(dr.GetOrdinal("OpeatorID"));
                    model.OpeatorName = dr.GetString(dr.GetOrdinal("OpeatorName"));
                    model.IssueTime   = dr.GetDateTime(dr.GetOrdinal("IssueTime"));
                    model.JpAdress    = dr.IsDBNull(dr.GetOrdinal("JpAdress")) ? "" : dr.GetString(dr.GetOrdinal("JpAdress"));
                    model.ModifyTag   = dr.IsDBNull(dr.GetOrdinal("ModifyTag")) ? "" : dr.GetString(dr.GetOrdinal("ModifyTag"));
                    model.payState    = (TickOrderPayState)dr.GetByte(dr.GetOrdinal("payState"));
                    model.InsPrice    = dr.GetDecimal(dr.GetOrdinal("InsPrice"));
                    list.Add(model);
                }
            }
            return(list);
        }
예제 #7
0
        public IList <Eyousoft_yhq.Model.MJiPiaoBaoCun> GetModelList(int PageSize, int PageIndex, ref int RecordCount, string userid)
        {
            IList <Eyousoft_yhq.Model.MJiPiaoBaoCun> list = new List <Eyousoft_yhq.Model.MJiPiaoBaoCun>();

            Eyousoft_yhq.Model.MJiPiaoBaoCun model = null;

            string tableName     = "tbl_PlanTicket";
            string fileds        = " OrderID,OrderCode, OpeatorID ,OpeatorName ,IssueTime, payState ,ModifyTag ,JpAdress,InsPrice";
            string orderByString = "IssueTime desc ";

            StringBuilder query = new StringBuilder();

            query.AppendFormat(" 1=1  and  OpeatorID = '{0}' ", userid);

            //if (serModel != null)
            //{

            //}


            using (IDataReader dr = DbHelper.ExecuteReader1(this._db, PageSize, PageIndex, ref RecordCount, tableName, fileds, query.ToString(), orderByString, null))
            {
                while (dr.Read())
                {
                    model             = new Eyousoft_yhq.Model.MJiPiaoBaoCun();
                    model.OrderID     = dr.GetString(dr.GetOrdinal("OrderID"));
                    model.OrderCode   = dr.GetString(dr.GetOrdinal("OrderCode"));
                    model.OpeatorID   = dr.GetString(dr.GetOrdinal("OpeatorID"));
                    model.OpeatorName = dr.GetString(dr.GetOrdinal("OpeatorName"));
                    model.IssueTime   = dr.GetDateTime(dr.GetOrdinal("IssueTime"));
                    model.payState    = (TickOrderPayState)dr.GetByte(dr.GetOrdinal("payState"));
                    model.ModifyTag   = dr.IsDBNull(dr.GetOrdinal("ModifyTag")) ? "" : dr.GetString(dr.GetOrdinal("ModifyTag"));
                    model.JpAdress    = dr.IsDBNull(dr.GetOrdinal("JpAdress")) ? "" : dr.GetString(dr.GetOrdinal("JpAdress"));
                    model.InsPrice    = dr.GetDecimal(dr.GetOrdinal("InsPrice"));
                    list.Add(model);
                }
            }
            return(list);
        }
예제 #8
0
파일: BJiPiaoBaoCun.cs 프로젝트: uwitec/O2O
 /// <summary>
 /// 设置支付状态
 /// </summary>
 /// <param name="OrderID"></param>
 /// <returns></returns>
 public bool setState(MJiPiaoBaoCun model)
 {
     if (string.IsNullOrEmpty(model.OrderID)) return false;
     bool result = dal.setState(model);
     if (result && model.payState == TickOrderPayState.出票失败)
     {
         var order = new Eyousoft_yhq.BLL.BJiPiaoBaoCun().GetModel(model.OrderID);
         if (order != null) new Eyousoft_yhq.BLL.Member().HuiYuangZzByID(order.OpeatorID, order.OrderPrice);
     }
     return result;
 }
예제 #9
0
파일: BJiPiaoBaoCun.cs 프로젝트: uwitec/O2O
 /// <summary>
 /// 设置支付状态
 /// </summary>
 /// <param name="OrderID"></param>
 /// <returns></returns>
 public int ZhiFu(MJiPiaoBaoCun model)
 {
     if (string.IsNullOrEmpty(model.OpeatorID)
         || string.IsNullOrEmpty(model.OrderID)
         || model.OrderPrice <= 0) return 0;
     return dal.ZhiFu(model);
 }
예제 #10
0
파일: BJiPiaoBaoCun.cs 프로젝트: uwitec/O2O
 /// <summary>
 /// 设置支付状态
 /// </summary>
 /// <param name="OrderID"></param>
 /// <returns></returns>
 public bool setStateAndCodeByOrderID(MJiPiaoBaoCun model)
 {
     if (string.IsNullOrEmpty(model.OrderCode)) return dal.setState(model);
     return dal.setStateAndCodeByOrderID(model);
 }
예제 #11
0
파일: DJiPiaoBaoCun.cs 프로젝트: uwitec/O2O
        /// <summary>
        /// 获取一个订单
        /// </summary>
        /// <param name="serModel">订单编号</param>
        /// <returns></returns>
        public IList<Eyousoft_yhq.Model.MJiPiaoBaoCun> GetList(Eyousoft_yhq.Model.MJiPiaoBaoCunSer serModel)
        {
            IList<Eyousoft_yhq.Model.MJiPiaoBaoCun> list = new List<MJiPiaoBaoCun>();
            StringBuilder StrSql = new StringBuilder();
            StrSql.Append("select  *  from tbl_PlanTicket where  1=1 ");
            if (serModel != null)
            {
                if (!string.IsNullOrEmpty(serModel.OpeatorID))
                {
                    StrSql.AppendFormat(" and  OpeatorID = '{0}' ", serModel.OpeatorID);
                }
                if (serModel.payState.HasValue && serModel.payState == TickOrderPayState.未支付)
                {
                    StrSql.AppendFormat(" and  payState = '{0}' ", (int)serModel.payState.Value);
                }
            }
            StrSql.Append("  order by IssueTime  DESC  ");
            DbCommand dc = this._db.GetSqlStringCommand(StrSql.ToString());
            using (IDataReader dr = DbHelper.ExecuteReader(dc, this._db))
            {
                while (dr.Read())
                {
                    Eyousoft_yhq.Model.MJiPiaoBaoCun model = new Eyousoft_yhq.Model.MJiPiaoBaoCun();

                    model.OrderID = dr.GetString(dr.GetOrdinal("OrderID"));
                    model.OrderCode = dr.GetString(dr.GetOrdinal("OrderCode"));
                    model.OpeatorID = dr.GetString(dr.GetOrdinal("OpeatorID"));
                    model.OpeatorName = dr.GetString(dr.GetOrdinal("OpeatorName"));
                    model.IssueTime = dr.GetDateTime(dr.GetOrdinal("IssueTime"));
                    model.JpAdress = dr.IsDBNull(dr.GetOrdinal("JpAdress")) ? "" : dr.GetString(dr.GetOrdinal("JpAdress"));
                    model.ModifyTag = dr.IsDBNull(dr.GetOrdinal("ModifyTag")) ? "" : dr.GetString(dr.GetOrdinal("ModifyTag"));
                    model.payState = (TickOrderPayState)dr.GetByte(dr.GetOrdinal("payState"));
                    model.InsPrice = dr.GetDecimal(dr.GetOrdinal("InsPrice"));
                    list.Add(model);
                }
            }
            return list;
        }
예제 #12
0
파일: DJiPiaoBaoCun.cs 프로젝트: uwitec/O2O
        /// <summary>
        /// 设置支付状态
        /// </summary>
        /// <param name="OrderID"></param>
        /// <returns></returns>
        public int ZhiFu(MJiPiaoBaoCun model)
        {
            DbCommand cmd = _db.GetStoredProcCommand("proc_zhifu");
            this._db.AddInParameter(cmd, "memnberId", DbType.AnsiStringFixedLength, model.OpeatorID);
            this._db.AddInParameter(cmd, "orderid", DbType.AnsiStringFixedLength, model.OrderID);
            this._db.AddInParameter(cmd, "price", DbType.Decimal, model.OrderPrice);

            this._db.AddOutParameter(cmd, "Result", DbType.Int32, 4);

            DbHelper.RunProcedureWithResult(cmd, this._db);
            return Convert.ToInt32(this._db.GetParameterValue(cmd, "Result"));
        }
예제 #13
0
파일: DJiPiaoBaoCun.cs 프로젝트: uwitec/O2O
        /// <summary>
        /// 设置支付状态
        /// </summary>
        /// <param name="OrderID"></param>
        /// <returns></returns>
        public bool setStateByOrderCode(MJiPiaoBaoCun model)
        {
            DbCommand cmd = _db.GetSqlStringCommand("UPDATE tbl_PlanTicket   SET payState = @payState  WHERE OrderCode = @OrderCode ");
            this._db.AddInParameter(cmd, "payState", DbType.Byte, model.payState);
            this._db.AddInParameter(cmd, "OrderCode", DbType.AnsiStringFixedLength, model.OrderCode);

            return DbHelper.ExecuteSql(cmd, this._db) > 0 ? true : false;
        }
예제 #14
0
파일: DJiPiaoBaoCun.cs 프로젝트: uwitec/O2O
        public IList<Eyousoft_yhq.Model.MJiPiaoBaoCun> GetModelList(int PageSize, int PageIndex, ref int RecordCount, string userid)
        {
            IList<Eyousoft_yhq.Model.MJiPiaoBaoCun> list = new List<Eyousoft_yhq.Model.MJiPiaoBaoCun>();
            Eyousoft_yhq.Model.MJiPiaoBaoCun model = null;

            string tableName = "tbl_PlanTicket";
            string fileds = " OrderID,OrderCode, OpeatorID ,OpeatorName ,IssueTime, payState ,ModifyTag ,JpAdress,InsPrice";
            string orderByString = "IssueTime desc ";

            StringBuilder query = new StringBuilder();
            query.AppendFormat(" 1=1  and  OpeatorID = '{0}' ", userid);

            //if (serModel != null)
            //{

            //}

            using (IDataReader dr = DbHelper.ExecuteReader1(this._db, PageSize, PageIndex, ref RecordCount, tableName, fileds, query.ToString(), orderByString, null))
            {
                while (dr.Read())
                {
                    model = new Eyousoft_yhq.Model.MJiPiaoBaoCun();
                    model.OrderID = dr.GetString(dr.GetOrdinal("OrderID"));
                    model.OrderCode = dr.GetString(dr.GetOrdinal("OrderCode"));
                    model.OpeatorID = dr.GetString(dr.GetOrdinal("OpeatorID"));
                    model.OpeatorName = dr.GetString(dr.GetOrdinal("OpeatorName"));
                    model.IssueTime = dr.GetDateTime(dr.GetOrdinal("IssueTime"));
                    model.payState = (TickOrderPayState)dr.GetByte(dr.GetOrdinal("payState"));
                    model.ModifyTag = dr.IsDBNull(dr.GetOrdinal("ModifyTag")) ? "" : dr.GetString(dr.GetOrdinal("ModifyTag"));
                    model.JpAdress = dr.IsDBNull(dr.GetOrdinal("JpAdress")) ? "" : dr.GetString(dr.GetOrdinal("JpAdress"));
                    model.InsPrice = dr.GetDecimal(dr.GetOrdinal("InsPrice"));
                    list.Add(model);
                }
            }
            return list;
        }
예제 #15
0
파일: DJiPiaoBaoCun.cs 프로젝트: uwitec/O2O
        /// <summary>
        /// 获取一个订单
        /// </summary>
        /// <param name="OrderID">订单号</param>
        /// <returns></returns>
        public Eyousoft_yhq.Model.MJiPiaoBaoCun GetModelByCode(string OrderCode)
        {
            Eyousoft_yhq.Model.MJiPiaoBaoCun model = null;

            string StrSql = "select  *  from tbl_PlanTicket where OrderCode=@OrderCode";
            DbCommand dc = this._db.GetSqlStringCommand(StrSql);
            this._db.AddInParameter(dc, "OrderCode", DbType.AnsiStringFixedLength, OrderCode);
            using (IDataReader dr = DbHelper.ExecuteReader(dc, this._db))
            {
                if (dr.Read())
                {
                    model = new Eyousoft_yhq.Model.MJiPiaoBaoCun();

                    model.OrderID = dr.GetString(dr.GetOrdinal("OrderID"));
                    model.OrderCode = dr.GetString(dr.GetOrdinal("OrderCode"));
                    model.OpeatorID = dr.GetString(dr.GetOrdinal("OpeatorID"));
                    model.OpeatorName = dr.GetString(dr.GetOrdinal("OpeatorName"));
                    model.IssueTime = dr.GetDateTime(dr.GetOrdinal("IssueTime"));
                    model.payState = (TickOrderPayState)dr.GetByte(dr.GetOrdinal("payState"));
                    model.ModifyTag = dr.IsDBNull(dr.GetOrdinal("ModifyTag")) ? "" : dr.GetString(dr.GetOrdinal("ModifyTag"));
                    model.JpAdress = dr.IsDBNull(dr.GetOrdinal("JpAdress")) ? "" : dr.GetString(dr.GetOrdinal("JpAdress"));
                    model.OrderPrice = dr.GetDecimal(dr.GetOrdinal("OrderPrice"));
                    model.InsPrice = dr.GetDecimal(dr.GetOrdinal("InsPrice"));
                }
            }

            return model;
        }
예제 #16
0
        /// <summary>
        /// 订单保存
        /// </summary>
        void SaveOrder()
        {
            string[] insArr = new string[] { };//提交订单成功后需要提交的保险XML

            queryJpModel = Session["HBModel"] != null ? (HBModel)Session["HBModel"] : queryJpModel;
            StringBuilder orderXML = new StringBuilder();
            decimal cPrice = Utils.GetDecimal(Utils.GetFormValue("pPrice"));
            string classcode = Utils.GetFormValue("classcode");
            decimal Jpmoney = Convert.ToDecimal( Utils.GetQueryStringValue("jpmoney"));
            orderXML.Append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
            orderXML.Append("<OrderFlight_1_6>");
            orderXML.Append("<Flights><Flight>");

            orderXML.AppendFormat("<ID>{0}</ID>", "");
            orderXML.AppendFormat("<Type>{0}</Type>", "");
            orderXML.AppendFormat("<TypeCode>{0}</TypeCode>", "");

            orderXML.AppendFormat("<ActionCode>{0}</ActionCode>", "");
            orderXML.AppendFormat("<Farebasis>{0}</Farebasis>", "");
            orderXML.AppendFormat("<Carrier>{0}</Carrier>", queryJpModel.Carrier);
            orderXML.AppendFormat("<FlightNo>{0}</FlightNo>", queryJpModel.FlightNo);
            orderXML.AppendFormat("<ShareCarrier>{0}</ShareCarrier>", "");
            orderXML.AppendFormat("<ShareFlight>{0}</ShareFlight>", "");
            orderXML.AppendFormat("<FromCity>{0}</FromCity>", queryJpModel.BoardPoint);
            orderXML.AppendFormat("<ArriveCity>{0}</ArriveCity>", queryJpModel.OffPoint);
            //orderXML.AppendFormat("<Mileage>{0}</Mileage>", 1178);//测试定义
            orderXML.AppendFormat("<Mileage>{0}</Mileage>", queryJpModel.Mileage);
            //orderXML.AppendFormat("<ClassCode>{0}</ClassCode>", "Y");//测试定义
            orderXML.AppendFormat("<ClassCode>{0}</ClassCode>", classcode);
            orderXML.AppendFormat("<YPrice>{0}</YPrice>", queryJpModel.YPrice);
            //orderXML.AppendFormat("<ClassPrice>{0}</ClassPrice>", 1130);//测试定义
            orderXML.AppendFormat("<ClassPrice>{0}</ClassPrice>", cPrice);
            orderXML.AppendFormat("<BasePrice>{0}</BasePrice>", "");
            orderXML.AppendFormat("<FuelSurTax>{0}</FuelSurTax>", queryJpModel.FuelSurTax);
            orderXML.AppendFormat("<AirportTax>{0}</AirportTax>", queryJpModel.AirportTax);
            orderXML.AppendFormat("<DepartureDate>{0}</DepartureDate>", queryJpModel.DepartureDate.ToString("yyyy-MM-dd"));
            orderXML.AppendFormat("<DepartureTime>{0}</DepartureTime>", queryJpModel.DepartureTime.ToString("HH:mm"));
            orderXML.AppendFormat("<ArrivalDate>{0}</ArrivalDate>", queryJpModel.ArrivalDate.ToString("yyyy-MM-dd"));
            orderXML.AppendFormat("<ArrivalTime>{0}</ArrivalTime>", queryJpModel.ArrivalTime.ToString("HH:mm"));
            orderXML.AppendFormat("<Aircraft>{0}</Aircraft>", queryJpModel.Aircraft);
            orderXML.AppendFormat("<OverstepPriceReason>{0}</OverstepPriceReason>", "");
            orderXML.AppendFormat("<BoardPointAT>{0}</BoardPointAT>", "");
            orderXML.AppendFormat("<OffPointAT>{0}</OffPointAT>", "");
            orderXML.AppendFormat("<MinPrice>{0}</MinPrice>", "");
            orderXML.Append("</Flight>");
            orderXML.Append("</Flights>");

            //获取订单信息
            string[] strNames = Utils.GetFormValues("ckName");
            string[] strYKLXs = Utils.GetFormValues("ckYKLX");
            string[] strZJLXs = Utils.GetFormValues("ckZJLX");
            string[] strCards = Utils.GetFormValues("ckCard");
            string[] strMobiles = Utils.GetFormValues("ckMobile");
            string[] strBaoXians = Utils.GetFormValues("ckBaoXian");
            string jpAdress = Utils.GetFormValue("jpadress");

            #region 游客信息拼接
            if (strNames != null && strNames.Length > 0)
            {

                orderXML.Append("<Passengers>");
                for (int i = 0; i < strNames.Length; i++)
                {
                    orderXML.Append("<Passenger>");
                    orderXML.AppendFormat("<PsgID>{0}</PsgID>", i + 1);
                    orderXML.AppendFormat("<Name>{0}</Name>", strNames[i]);
                    //orderXML.AppendFormat("<Type>{0}</Type>", 0);
                    orderXML.AppendFormat("<PsgType>{0}</PsgType>", strYKLXs[i]);
                    orderXML.AppendFormat("<IdentityType>{0}</IdentityType>", strZJLXs[i]);
                    orderXML.AppendFormat("<CardType>{0}</CardType>", strZJLXs[i]);
                    orderXML.AppendFormat("<CardNo>{0}</CardNo>", strCards[i]);
                    if (strYKLXs[i] == "ADT")
                    {
                        orderXML.AppendFormat("<BirthDay>{0}</BirthDay>", "2001-10-10");
                    }
                    else if (strYKLXs[i] == "CHD")
                    {
                        orderXML.AppendFormat("<BirthDay>{0}</BirthDay>", "2003-10-10");
                    }
                    else
                    {
                        orderXML.AppendFormat("<BirthDay>{0}</BirthDay>", "2013-10-10");
                    }

                    orderXML.AppendFormat("<CarrierPsgID>{0}</CarrierPsgID>", "");
                    orderXML.AppendFormat("<Country>{0}</Country>", "中国");
                    orderXML.AppendFormat("<MobilePhone>{0}</MobilePhone>", strMobiles[i]);
                    if (strBaoXians.Length <= 0)
                    {
                        orderXML.AppendFormat("<InsueSum>{0}</InsueSum>", 0);
                    }
                    else
                    {
                        //orderXML.AppendFormat("<InsueSum>{0}</InsueSum>", Utils.GetInt(strBaoXians[i]));
                        orderXML.AppendFormat("<InsueSum>{0}</InsueSum>", 1);
                    }

                    orderXML.AppendFormat("<CarrierCard>{0}</CarrierCard>", "");
                    orderXML.AppendFormat("<CardVaildDate>{0}</CardVaildDate>", "");
                    orderXML.Append("</Passenger>");

                }
                orderXML.Append("</Passengers>");

            }
            #endregion

            #region 价格信息拼接
            var hats = ViewState["hats"] as Dictionary<string, object>;
            List<string> test = new List<string>(hats.Keys);
            if (strNames != null && strNames.Length > 0)
            {
                orderXML.Append("<Prices>");
                for (int i = 0; i < strNames.Length; i++)
                {
                    orderXML.Append("<Price>");
                    orderXML.AppendFormat("<PriceID>{0}</PriceID>", i + 1);
                    orderXML.AppendFormat("<TktOffice>{0}</TktOffice>", "TYN202");
                    orderXML.AppendFormat("<PsgType>{0}</PsgType>", test[i].ToString());
                    orderXML.AppendFormat("<PsgID>{0}</PsgID>", "");
                    orderXML.AppendFormat("<YPrice>{0}</YPrice>", queryJpModel.YPrice);
                    orderXML.AppendFormat("<Fare>{0}</Fare>", hats[test[i]]);
                    orderXML.AppendFormat("<TaxAmount>{0}</TaxAmount>", hats["TaxAmount"]);
                    orderXML.AppendFormat("<FuelSurTax>{0}</FuelSurTax>", hats["FuelSurTax"]);
                    orderXML.AppendFormat("<AirportTax>{0}</AirportTax>", hats["AirportTax"]);
                    orderXML.AppendFormat("<SalePrice>{0}</SalePrice>", hats["SalePrice"]);
                    orderXML.Append("</Price>");
                }
                orderXML.Append("</Prices>");

            }
            #endregion

            orderXML.Append("<OrderInfo>");//订单描述
            orderXML.AppendFormat("<Linker>{0}</Linker>", userInfo.ContactName);
            orderXML.AppendFormat("<Address>{0}</Address>", jpAdress);
            orderXML.AppendFormat("<Telephone>{0}</Telephone>", userInfo.UserName);
            orderXML.AppendFormat("<IsDomc>{0}</IsDomc>", "D");
            orderXML.AppendFormat("<TicketLimitDate>{0}</TicketLimitDate>", DateTime.Now.AddDays(5).ToString("yyyy-MM-dd"));
            orderXML.AppendFormat("<TicketLimitTime>{0}</TicketLimitTime>", DateTime.Now.AddDays(5).ToString("HH:mm"));
            orderXML.AppendFormat("<PayPlatform>{0}</PayPlatform>", 0);
            orderXML.AppendFormat("<BankCode>{0}</BankCode>", 0);
            orderXML.AppendFormat("<NotifyURL>{0}</NotifyURL>", 0);
            orderXML.AppendFormat("<NotifyType>{0}</NotifyType>", 0);
            orderXML.AppendFormat("<Remark>{0}</Remark>", "惠旅游微信端");
            orderXML.AppendFormat("<BalanceMoney>{0}</BalanceMoney>", 1000);
            orderXML.AppendFormat("<TripDays>{0}</TripDays>", 0);
            orderXML.AppendFormat("<CustomerOrderNo>{0}</CustomerOrderNo>", 0);
            orderXML.AppendFormat("<CustomerSettlementDepID>{0}</CustomerSettlementDepID>", 0);
            orderXML.AppendFormat("<CustomerNo>{0}</CustomerNo>", "");
            orderXML.Append("</OrderInfo>");

            orderXML.Append("<LinkerInfo>");//联系信息
            orderXML.AppendFormat("<IsETiket>{0}</IsETiket>", "Y");
            orderXML.AppendFormat("<PayType>{0}</PayType>", "WZ");
            orderXML.AppendFormat("<Address>{0}</Address>", 0);
            orderXML.AppendFormat("<LinkerName>{0}</LinkerName>", userInfo.ContactName);
            orderXML.AppendFormat("<Zip>{0}</Zip>", "410000");
            orderXML.AppendFormat("<Telphone>{0}</Telphone>", userInfo.UserName);
            orderXML.AppendFormat("<MobilePhone>{0}</MobilePhone>", userInfo.UserName);
            orderXML.AppendFormat("<SendTime>{0}</SendTime>", DateTime.Now.AddDays(10));
            orderXML.AppendFormat("<NeedInvoices>{0}</NeedInvoices>", "Y");
            orderXML.AppendFormat("<InvoicesSendType>{0}</InvoicesSendType>", "A");
            orderXML.AppendFormat("<SendTktsTypeCode>{0}</SendTktsTypeCode>", "ZQ");
            orderXML.AppendFormat("<IsPrintSerial>{0}</IsPrintSerial>", "");
            orderXML.AppendFormat("<SendTktDepID>{0}</SendTktDepID>", "");
            orderXML.AppendFormat("<SendTktDepName>{0}</SendTktDepName>", "");
            orderXML.AppendFormat("<LinkerEmail>{0}</LinkerEmail>", "*****@*****.**");

            orderXML.Append("</LinkerInfo>");

            orderXML.Append("<InsuranceInfo>");//保险信息
            orderXML.AppendFormat("<InsuranceId>{0}</InsuranceId>", "CESHI");
            orderXML.AppendFormat("<ShouldGath>{0}</ShouldGath>", 100);
            orderXML.AppendFormat("<ShouldPay>{0}</ShouldPay>", 10);
            orderXML.AppendFormat("<RetMoney>{0}</RetMoney>", 10);
            orderXML.AppendFormat("<Gain>{0}</Gain>", 10);
            orderXML.AppendFormat("<InsuranceCount>{0}</InsuranceCount>", 10);
            orderXML.AppendFormat("<InsuranceSummary>{0}</InsuranceSummary>", 10);
            orderXML.Append("</InsuranceInfo>");

            orderXML.Append("</OrderFlight_1_6>");

            var list = new com._8222666.fxb2b.Service().XmlSubmit(getIdentityXMLString(), orderXML.ToString(), "");

            XmlDocument dom = new XmlDocument();
            dom.LoadXml(list);
            if (dom.SelectSingleNode("ErrorInfo_1_0") != null && !string.IsNullOrEmpty(dom.SelectSingleNode("ErrorInfo_1_0").InnerText))
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "下单失败"));
                return;
            }

            Eyousoft_yhq.BLL.BJiPiaoBaoCun BaoSevice = new Eyousoft_yhq.BLL.BJiPiaoBaoCun();
            XmlNodeList nodes = dom.SelectNodes("OrderFlight_1_6");

            for (int i = 0; i < nodes.Count; i++)
            {
                MJiPiaoBaoCun jOrder = new MJiPiaoBaoCun();
                jOrder.OpeatorName = userInfo.ContactName;
                jOrder.OpeatorID = userInfo.UserID;
                jOrder.OrderCode = nodes[i].SelectSingleNode("SubsOrderNo").InnerText;
                jOrder.ModifyTag = nodes[i].SelectSingleNode("ModifyTag").InnerText;
                DateTime Jtime;
                bool bt = DateTime.TryParse(nodes[i].SelectSingleNode("TicketLimitDt").InnerText + " " + nodes[i].SelectSingleNode("TicketLimitDt").InnerText, out Jtime);
                jOrder.IssueTime = bt ? Jtime : DateTime.Now;
                jOrder.JpAdress = jpAdress;
                //jOrder.OrderPrice = Convert.ToDecimal(nodes[i].SelectSingleNode("BalanceMoney").InnerText);
                jOrder.OrderPrice = Jpmoney;
                jOrder.WeiDianId = WeiDianId;
                // jOrder.ModifyTag=
                if (BaoSevice.Add(jOrder))
                {
                    //保存订单联系人信息
                    List<OrderPassenger> plist = new List<OrderPassenger>();
                    Eyousoft_yhq.BLL.Bpersner bll = new Eyousoft_yhq.BLL.Bpersner();

                    if (strNames != null && strNames.Length > 0)
                    {
                        //string ordercode = nodes[j].SelectSingleNode("SubsOrderNo").InnerText;
                        try
                        {
                            for (int j = 0; j < strNames.Length; j++)
                            {
                                //FormValues("ckName");
                                //string[] strYKLXs = Utils.GetFormValues("ckYKLX");
                                //string[] strZJLXs = Utils.GetFormValues("ckZJLX");
                                //string[] strCards = Utils.GetFormValues("ckCard");
                                //string[] strMobiles = Utils.GetFormValues("ckMobile");
                                //string[] strBaoXians = Utils.GetFormValues("ckBaoXian");

                                var pasner = new OrderPassenger();
                                pasner.PsrName = strNames[j];
                                pasner.IdentityType = (Eyousoft_yhq.Model.CartType)getXBySF(strZJLXs[j]);
                                pasner.IdentityCard = strCards[j];
                                pasner.PsrType = (Eyousoft_yhq.Model.PerType)getXBySF(strYKLXs[j]);
                                pasner.Mobile = strMobiles[j];
                                pasner.OrderCode = nodes[i].SelectSingleNode("SubsOrderNo").InnerText;
                                bll.Add(pasner);

                            }
                        }
                        catch (Exception)
                        {

                        }

                    }

                    Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "下单成功"));

                }
                else
                {
                    Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "下单失败"));

                }

            }
        }