Exemple #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.Title = "租车预订_" + Master.webinfo.WebName;
     if (!this.IsPostBack)
     {
         if (Request.QueryString["cid"] != null)
         {
             cid      = Convert.ToInt32(Request.QueryString["cid"]);
             CarModel = CarBll.GetModel(cid);
         }
         if (Request.QueryString["pcid"] != null)
         {
             pid           = Convert.ToInt32(Request.QueryString["pcid"]);
             CarPriceModel = CarPriceBll.GetModel(pid);
         }
         if (Request.QueryString["oid"] != null)
         {
             order = OrderBll.GetModel(Convert.ToInt32(Request.QueryString["oid"]));
         }
         if (CarModel == null || CarPriceModel == null || order == null)
         {
             Response.Redirect("/Opr.aspx?msg=no");
         }
     }
 }
Exemple #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.Title = "填写游客信息-" + Master.webinfo.WebName;
     int.TryParse(Request.QueryString["oid"], out oid);
     if (!this.IsPostBack)
     {
         if (oid > 0)
         {
             order = LineOrderBll.GetModel(oid);
             if (order != null)
             {
                 Line = LineBll.GetModel(order.lineId);
             }
             else
             {
                 Response.Redirect("/Opr.aspx?t=error&msg=opr", false);
             }
         }
         else
         {
             Response.Redirect("/Opr.aspx?t=error&msg=opr", false);
         }
         //提交游客信息
         if (Request["txtHiddenUList"] != null)
         {
             //TravelAgent.Model.LineOrderTourist tourist = null;
             string[] arryUlist = Request["txtHiddenUList"].Split('$');
             string   strsql    = "";
             string[] strdetail = null;
             for (int i = 0; i < arryUlist.Length; i++)
             {
                 strdetail = arryUlist[i].Split('^');
                 strsql   += "insert into LineOrderTourist(orderId,touristName,touristSex,mobile,papersType,papersNo,birthDate,touristType) values";
                 strsql   += "('" + order.Id + "','" + strdetail[0] + "','" + strdetail[3] + "','" + strdetail[5] + "','" + strdetail[1] + "','" + strdetail[2] + "','" + strdetail[4] + "','" + strdetail[8] + "');";
             }
             if (!strsql.Equals(""))
             {
                 //Access
                 //if (TravelAgent.Tool.DbHelperOleDb.ExecuteSql(strsql) > 0)
                 if (TravelAgent.Tool.DbHelperSQL.ExecuteSql(strsql) > 0)
                 {
                     //urlrewrite
                     Response.Redirect("/lineorder/3/" + oid + ".html", false);
                 }
                 else
                 {
                     Response.Redirect("/Opr.aspx?t=error&msg=opr", false);
                 }
             }
         }
     }
     if (order == null)
     {
         Response.Redirect("/Opr.aspx?t=error&msg=opr", false); order = new Model.Order();
     }
     if (Line == null)
     {
         Response.Redirect("/Opr.aspx?t=error&msg=opr", false); Line = new Model.Line();
     }
 }
Exemple #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["id"] != null)
            {
                orderid = Convert.ToInt32(Request.QueryString["id"]);
            }
            if (!this.IsPostBack)
            {
                DataBindState();
                DataBindPay();
                if (orderid > 0)
                {
                    TravelAgent.Model.Order order = LineOrderBll.GetModel(orderid);
                    if (order != null)
                    {
                        TravelAgent.Model.Line line = LineBll.GetModel(order.lineId);
                        if (line != null)
                        {
                            this.hddonate.Value = line.DonatePoints.ToString();
                        }
                        this.hdordercode.Value   = order.ordercode;
                        this.lblLineName.Text    = order.proName;
                        this.lblOrderCode.Text   = order.ordercode;
                        this.lblPeopleNum.Text   = order.peopleNumber + "(" + order.adultNumber + "/" + order.childNumber + ")";
                        this.lblOrderDate.Text   = order.orderDate.ToString();
                        this.lblTravelDate.Text  = order.TravelDate;
                        this.lblOrderRemark.Text = order.orderRemark;
                        this.IDcard.Text         = order.IDcard;
                        this.lbltuijianren.Text  = order.tuijianren;
                        this.lblLinkName.Text    = order.contactName;
                        this.lblTel.Text         = order.contactMobile;
                        this.lblEmail.Text       = order.contactEmail;
                        this.hdclubid.Value      = order.clubid.ToString();
                        TravelAgent.Model.Club club = ClubBll.GetModel(order.clubid);
                        if (club != null)
                        {
                            this.lblClubInfo.Text = club.clubName + " / " + club.clubMobile + " / " + club.clubEmail;
                        }

                        this.lblOrderTotalPrice.Text = order.orderPrice.ToString();
                        this.lblIsBaoxian.Text       = order.attachPrice == 0 ? "否" : "是";
                        this.lblBaoxianCost.Text     = order.attachPrice.ToString();
                        this.txtuserPoints.Value     = order.usePoints.ToString();
                        this.lblPayCost.Text         = (order.orderPrice + order.attachPrice - order.usePoints + order.subPrice).ToString();
                        this.ddlState.SelectedValue  = order.orderState.ToString();
                        this.txtRemark.Value         = order.operRemark;

                        if (order.orderState == Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderState.已付款))
                        {
                            this.lblPayState.Text = "已付款";
                        }
                        else
                        {
                            this.lblPayState.Text = "未付款";
                        }
                        this.ddlPayType.SelectedValue = order.payType.ToString();
                    }
                }
            }
        }
Exemple #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.Title = "订单结果" + Master.webinfo.WebName;
     int.TryParse(Request.QueryString["oid"], out oid);
     if (Request.QueryString["pay"] != null)
     {
         strTip = "付款成功";
         strSubTip = "如果付款成功,订单的状态仍是‘待付款’,请联系客服工作人员核实修改!";
     }
     if (!this.IsPostBack)
     {
         if (oid > 0)
         {
             order = LineOrderBll.GetModel(oid);
             if (order != null)
             {
                 Line = LineBll.GetModel(order.lineId);
                 if (Line.DealType == Convert.ToInt32(TravelAgent.Tool.EnumSummary.DealType.人工处理))
                 {
                     this.divPay.Style["display"] = "none";
                 }
                 else
                 {
                     this.divPay.Style["display"] = "";
                 }
             }
         }
     }
     if (order == null) { Response.Redirect("/Opr.aspx?t=error&msg=opr", false); order = new Model.Order(); }
     if (Line == null) { Response.Redirect("/Opr.aspx?t=error&msg=opr", false); Line = new Model.Line(); }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["id"]))
            {
                orderid = Convert.ToInt32(Request.QueryString["id"]);
            }
            if (!this.IsPostBack)
            {
                DataBindState();
                DataBindPay();
                if (orderid > 0)
                {
                    TravelAgent.Model.Order order = OrderBll.GetModel(orderid);
                    if (order != null)
                    {
                        TravelAgent.Model.CarList car = CarBll.GetModel(order.lineId);
                        if (car != null)
                        {
                            this.hdordercode.Value = order.ordercode;
                            this.lblCarName.Text   = car.CarName;
                            this.lblOrderCode.Text = order.ordercode;
                            this.lblUseCount.Text  = order.account.ToString();
                            this.lblOrderDate.Text = order.orderDate.ToString();
                            TravelAgent.Model.CarPrice price = PriceBll.GetModel(order.peopleNumber);
                            if (price != null)
                            {
                                this.lblCarType.Text = price.CarTypeID == 0 ? "旅游租车" : "自驾租车";
                            }
                            this.lblUseDate.Text  = order.usedate + " " + order.timedot + "点";
                            this.lblHuanDate.Text = order.huandate;
                        }

                        TravelAgent.Model.Club club = ClubBll.GetModel(order.clubid);
                        if (club != null)
                        {
                            this.lblClubInfo.Text = club.clubName + " / " + club.clubMobile + " / " + club.clubEmail;
                        }
                        this.lblLinkName.Text         = order.contactName;
                        this.lblEmail.Text            = order.contactEmail;
                        this.lblTel.Text              = order.contactMobile;
                        this.lblSex.Text              = !order.contactSex.Equals("") ? TravelAgent.Tool.EnumHelper.GetMemberName <TravelAgent.Tool.EnumSummary.TouristSex>(order.contactSex) : "";
                        this.lblOrderTotalPrice.Text  = order.orderPrice.ToString();
                        this.txtJiaJian.Value         = order.subPrice.ToString();
                        this.txtuserPoints.Value      = order.usePoints.ToString();
                        this.lblPayCost.Text          = (order.orderPrice - order.usePoints + order.subPrice).ToString();
                        this.ddlPayType.SelectedValue = order.payType.ToString();
                        this.ddlState.SelectedValue   = order.orderState.ToString();
                        this.txtRemark.Value          = order.operRemark;
                        if (order.orderState == Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderState.已付款))
                        {
                            this.lblPayState.Text = "已付款";
                        }
                        else
                        {
                            this.lblPayState.Text = "未付款";
                        }
                    }
                }
            }
        }
Exemple #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["o"]))
            {
                orderno = Request.QueryString["o"];
                order   = OrderBll.GetModelByCode(orderno);
                if (order != null)
                {
                    this.ltproname.Text    = order.proName;
                    this.ltdate.Text       = order.TravelDate;
                    this.ltadult.Text      = order.adultNumber.ToString();
                    this.ltchild.Text      = order.childNumber.ToString();
                    this.ltorderprice.Text = (order.orderPrice + order.attachPrice - order.usePoints + order.subPrice).ToString();

                    if (order.dealType == 0)
                    {
                        this.lnkConfirm.Visible = false;
                    }
                }
                else
                {
                    Response.Redirect("../MOrderMsg.aspx?msg=系统错误&class=error", false);
                }
            }
            if (!this.IsPostBack)
            {
                string redirect_uri = webinfo.WebDomain + "/mTravel/weipay/ordertip.aspx?o=" + orderno;
                this.GetUserOpenId(redirect_uri);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                if (Request["lineid"] != null)
                {
                    TravelAgent.Model.Order order = new TravelAgent.Model.Order();
                    order.lineId           = Convert.ToInt32(Request["lineid"]);
                    ordercode              = "O" + DateTime.Now.ToString("yyyyMMddHHmmssfff");
                    order.ordercode        = ordercode;
                    order.peopleNumber     = Convert.ToInt32(Request["renshu1"]) + Convert.ToInt32(Request["renshu2"]);
                    order.adultNumber      = Convert.ToInt32(Request["renshu1"]);
                    order.childNumber      = Convert.ToInt32(Request["renshu2"]);
                    order.orderDate        = DateTime.Now;
                    order.TravelDate       = Request["shijian1"];
                    order.orderPrice       = Convert.ToInt32(Request["adult_price"]) * Convert.ToInt32(Request["renshu1"]) + Convert.ToInt32(Request["child_price"]) * Convert.ToInt32(Request["renshu2"]);
                    order.attachPrice      = Convert.ToInt32(Request["bx_price"]) * Convert.ToInt32(Request["renshu3"]);
                    order.usePoints        = 0;
                    order.donatePoints     = 0;
                    order.contactName      = Request["xingming"];
                    order.contactMobile    = Request["dianhua"];
                    order.contactEmail     = "";
                    order.contactTelephone = "";
                    order.orderRemark      = "";
                    order.operRemark       = "";
                    order.orderState       = Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderState.处理中);
                    order.clubid           = 0;
                    order.adultPrice       = 0;
                    order.childPrice       = 0;
                    order.payType          = 0;
                    order.subPrice         = 0;
                    order.IDcard           = Request["IDcard"];
                    order.tuijianren       = Request["tuijianren"];
                    order.orderType        = Convert.ToInt32(Request["order_type"]);
                    order.contactSex       = "";
                    order.sourceType       = Convert.ToInt32(TravelAgent.Tool.EnumSummary.SourceType.移动WAP);
                    try
                    {
                        int orderid = OrderBll.Add(order);

                        if (orderid > 0)
                        {
                            Response.Redirect("../weipay/ordertip.aspx?o=" + ordercode, false);
                        }
                        else
                        {
                            Response.Redirect("../MOrderMsg.aspx?msg=订单提交失败&class=error", false);
                        }
                    }
                    catch (Exception ex)
                    {
                        Response.Redirect("../MOrderMsg.aspx?msg=订单提交失败&class=error", false);
                    }
                }
            }
        }
Exemple #8
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(TravelAgent.Model.Order model)
        {
            int lineid = 0;

            if (dal.Add(model) > 0)
            {
                lineid = dal.GetMaxID("Id");
            }
            return(lineid);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["id"] != null)
     {
         orderid = Convert.ToInt32(Request.QueryString["id"]);
     }
     if (!this.IsPostBack)
     {
         DataBindState();
         DataBindPay();
         if (orderid > 0)
         {
             TravelAgent.Model.Order order = VisaOrderBll.GetModel(orderid);
             if (order != null)
             {
                 TravelAgent.Model.VisaList visa = VisaBll.GetModel(order.lineId);
                 if (visa != null)
                 {
                     this.hddonate.Value = visa.donatePoints.ToString();
                 }
                 this.hdordercode.Value   = order.ordercode;
                 this.lblVisaName.Text    = order.proName;
                 this.lblOrderCode.Text   = order.ordercode;
                 this.lblOrderDate.Text   = order.orderDate.ToString();
                 this.lblTravelDate.Text  = order.TravelDate;
                 this.lblOrderRemark.Text = order.orderRemark;
                 TravelAgent.Model.Club club = ClubBll.GetModel(order.clubid);
                 if (club != null)
                 {
                     this.lblClubInfo.Text = club.clubName + " / " + club.clubMobile + " / " + club.clubEmail;
                 }
                 this.lblLinkName.Text         = order.contactName;
                 this.lblEmail.Text            = order.contactEmail;
                 this.lblTel.Text              = order.contactMobile;
                 this.lblSex.Text              = !order.contactSex.Equals("")?TravelAgent.Tool.EnumHelper.GetMemberName <TravelAgent.Tool.EnumSummary.TouristSex>(order.contactSex):"";
                 this.lblOrderTotalPrice.Text  = order.orderPrice.ToString();
                 this.txtJiaJian.Value         = order.subPrice.ToString();
                 this.txtuserPoints.Value      = order.usePoints.ToString();
                 this.lblPayCost.Text          = (order.orderPrice - order.usePoints + order.subPrice).ToString();
                 this.ddlPayType.SelectedValue = order.payType.ToString();
                 this.ddlState.SelectedValue   = order.orderState.ToString();
                 this.txtRemark.Value          = order.operRemark;
                 this.lblPeopleNum.Text        = order.peopleNumber.ToString();
                 if (order.orderState == Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderState.已付款))
                 {
                     this.lblPayState.Text = "已付款";
                 }
                 else
                 {
                     this.lblPayState.Text = "未付款";
                 }
             }
         }
     }
 }
Exemple #10
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            if (context.Request["line_id"] != null)
            {
                TravelAgent.Model.Order order = new TravelAgent.Model.Order();
                order.lineId           = Convert.ToInt32(context.Request["line_id"]);
                order.ordercode        = "O" + DateTime.Now.ToString("yyyyMMddHHmmssfff");
                order.peopleNumber     = Convert.ToInt32(context.Request["line_ren"]);
                order.adultNumber      = 0;
                order.childNumber      = 0;
                order.orderDate        = DateTime.Now;
                order.TravelDate       = "";
                order.orderPrice       = 0;
                order.attachPrice      = 0;
                order.usePoints        = 0;
                order.donatePoints     = 0;
                order.contactName      = context.Request["line_name"];
                order.contactMobile    = context.Request["line_phone"];
                order.contactEmail     = "";
                order.contactTelephone = "";
                order.orderRemark      = "";
                order.operRemark       = "";
                order.orderState       = Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderState.处理中);
                order.clubid           = 0;
                order.adultPrice       = 0;
                order.childPrice       = 0;
                order.payType          = 0;
                order.subPrice         = 0;

                order.orderType  = Convert.ToInt32(context.Request["order_type"]);
                order.contactSex = "";
                order.sourceType = Convert.ToInt32(TravelAgent.Tool.EnumSummary.SourceType.移动WAP);
                try
                {
                    int orderid = LineOrderBll.Add(order);

                    if (orderid > 0)
                    {
                        context.Response.Write("true");
                    }
                    else
                    {
                        context.Response.Write("false");
                    }
                }
                catch (Exception ex)
                {
                    context.Response.Write("false");
                }
            }
        }
Exemple #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                TravelAgent.Model.WebInfo webinfo = new TravelAgent.BLL.WebInfo().loadConfig(Server.MapPath(ConfigurationManager.AppSettings["WebInfoConfig"].ToString()));
                if (webinfo != null)
                {
                    appid      = webinfo.AppID;
                    mch_id     = webinfo.Mchid;
                    key        = webinfo.Key;
                    notify_url = webinfo.WebDomain + "/wxpay/notify_url.aspx";
                }
                //Utils.WriteTxt(appid+"-"+mch_id+"-"+key+"-"+notify_url);
                var  nr    = new NativeReceive();
                var  ns    = new NativeSend();
                bool valid = nr.ValidSign(nr, key);
                //Utils.WriteTxt("验证"+valid.ToString());
                if (valid)
                {
                    TravelAgent.Model.Order order = orderBll.GetModelByCode(nr.product_id);
                    if (order == null)
                    {
                        return;
                    }

                    //object r = TravelAgent.WxPay.AccessDbHelper.GetOScalar("select [order_price] from   [wx_order]   where [order_no]='" + nr.product_id + "'");

                    //if (r == null)
                    //{
                    //   // Response.Write("用户名或密码错误");
                    //  //  Response.End();
                    //    return;
                    //}
                    float order_price;
                    order_price = wxpay.Utils.StrToFloat(((order.orderPrice + order.attachPrice + order.subPrice - order.usePoints)).ToString(), 0) * 100;//积分1分兑换1元

                    UnifyEntities ue = new UnifyEntities
                    {
                        appid            = appid,
                        body             = getOrderName(order.lineId, order.orderType),
                        mch_id           = mch_id,
                        nonce_str        = TravelAgent.WxPay.Utils.GetRandom(),
                        notify_url       = notify_url,
                        out_trade_no     = nr.product_id,
                        product_id       = nr.product_id,
                        spbill_create_ip = JKRequest.GetIP(),
                        trade_type       = "NATIVE",
                        total_fee        = order_price.ToString()
                    };
                    string url, sign;
                    string xml = TravelAgent.WxPay.Utils.GetUnifyUrlXml <UnifyEntities>(ue, key, out url, out sign);

                    //Utils.WriteTxt(xml);

                    string       data         = Utils.HttpPost("https://api.mch.weixin.qq.com/pay/unifiedorder", xml);
                    UnifyReceive unifyReceive = new UnifyReceive(data);


                    NativeSend nc = new NativeSend()
                    {
                        appid       = appid,
                        mch_id      = mch_id,
                        nonce_str   = TravelAgent.WxPay.Utils.GetRandom(),
                        prepay_id   = unifyReceive.prepay_id,
                        result_code = "SUCCESS",
                        return_code = "SUCCESS",
                    };
                    string url1, sign1;
                    string xml1 = TravelAgent.WxPay.Utils.GetUnifyUrlXml <NativeSend>(nc, key, out url1, out sign1);
                    Utils.WriteTxt(xml1);
                    Response.Write(xml1);
                }
                else
                {
                    Utils.WriteTxt("签名验证失败");
                    NativeSend nc = new NativeSend()
                    {
                        return_code = "FAIL",
                        return_msg  = "签名验证失败"
                    };
                }
            }
            catch (Exception ee)
            {
                Utils.WriteTxt(ee.ToString());
            }
        }
Exemple #12
0
        /// <summary>
        /// 得到线路一个对象实体
        /// </summary>
        public TravelAgent.Model.Order GetModel2(int Id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 *,(select visaName from VisaList where Id=lineId) as proName from [Order] ");
            strSql.Append(" where Id=@Id ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@Id", SqlDbType.Int, 4)
            };
            parameters[0].Value = Id;

            TravelAgent.Model.Order model = new TravelAgent.Model.Order();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["Id"].ToString() != "")
                {
                    model.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString());
                }
                model.lineId       = int.Parse(ds.Tables[0].Rows[0]["lineId"].ToString());
                model.ordercode    = ds.Tables[0].Rows[0]["ordercode"].ToString();
                model.peopleNumber = int.Parse(ds.Tables[0].Rows[0]["peopleNumber"].ToString());
                model.adultNumber  = int.Parse(ds.Tables[0].Rows[0]["adultNumber"].ToString());
                model.childNumber  = int.Parse(ds.Tables[0].Rows[0]["childNumber"].ToString());
                model.orderDate    = Convert.ToDateTime(ds.Tables[0].Rows[0]["orderDate"].ToString());

                model.TravelDate  = ds.Tables[0].Rows[0]["TravelDate"].ToString();
                model.orderPrice  = int.Parse(ds.Tables[0].Rows[0]["orderPrice"].ToString());
                model.attachPrice = int.Parse(ds.Tables[0].Rows[0]["attachPrice"].ToString());
                model.usePoints   = int.Parse(ds.Tables[0].Rows[0]["usePoints"].ToString());

                model.donatePoints     = int.Parse(ds.Tables[0].Rows[0]["donatePoints"].ToString());
                model.contactName      = ds.Tables[0].Rows[0]["contactName"].ToString();
                model.contactMobile    = ds.Tables[0].Rows[0]["contactMobile"].ToString();
                model.contactEmail     = ds.Tables[0].Rows[0]["contactEmail"].ToString();
                model.contactTelephone = ds.Tables[0].Rows[0]["contactTelephone"].ToString();

                model.orderRemark = ds.Tables[0].Rows[0]["orderRemark"].ToString();

                model.operRemark = ds.Tables[0].Rows[0]["operRemark"].ToString();

                model.orderState = int.Parse(ds.Tables[0].Rows[0]["orderState"].ToString());

                model.clubid = int.Parse(ds.Tables[0].Rows[0]["clubid"].ToString());

                model.adultPrice = int.Parse(ds.Tables[0].Rows[0]["adultPrice"].ToString());
                model.childPrice = int.Parse(ds.Tables[0].Rows[0]["childPrice"].ToString());
                if (ds.Tables[0].Rows[0]["payType"].ToString() != "")
                {
                    model.payType = int.Parse(ds.Tables[0].Rows[0]["payType"].ToString());
                }
                model.subPrice   = int.Parse(ds.Tables[0].Rows[0]["subPrice"].ToString());
                model.orderType  = int.Parse(ds.Tables[0].Rows[0]["orderType"].ToString());
                model.contactSex = ds.Tables[0].Rows[0]["contactSex"].ToString();
                model.sourceType = int.Parse(ds.Tables[0].Rows[0]["sourceType"].ToString());

                model.usedate  = ds.Tables[0].Rows[0]["usedate"].ToString();
                model.timedot  = int.Parse(ds.Tables[0].Rows[0]["timedot"].ToString());
                model.huandate = ds.Tables[0].Rows[0]["huandate"].ToString();
                model.account  = int.Parse(ds.Tables[0].Rows[0]["account"].ToString());

                model.proName    = ds.Tables[0].Rows[0]["proName"].ToString();
                model.tuijianren = ds.Tables[0].Rows[0]["tuijianren"].ToString();
                model.IDcard     = ds.Tables[0].Rows[0]["IDcard"].ToString();
                return(model);
            }
            else
            {
                return(null);
            }
        }
Exemple #13
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(TravelAgent.Model.Order model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into [Order] (");
            strSql.Append("lineId,ordercode,peopleNumber,adultNumber,childNumber,orderDate,TravelDate,orderPrice,attachPrice,usePoints,donatePoints,");
            strSql.Append("contactName,contactMobile,contactEmail,contactTelephone,orderRemark,operRemark,orderState,clubid,adultPrice,childPrice,payType,subPrice,orderType,contactSex,sourceType,usedate,timedot,huandate,account,tuijianren,IDcard)");
            strSql.Append(" values (");
            strSql.Append("@lineId,@ordercode,@peopleNumber,@adultNumber,@childNumber,@orderDate,@TravelDate,@orderPrice,@attachPrice,@usePoints,@donatePoints,");
            strSql.Append("@contactName,@contactMobile,@contactEmail,@contactTelephone,@orderRemark,@operRemark,@orderState,@clubid,@adultPrice,@childPrice,@payType,@subPrice,@orderType,@contactSex,@sourceType,@usedate,@timedot,@huandate,@account,@tuijianren,@IDcard)");
            SqlParameter[] parameters =
            {
                new SqlParameter("@lineId",           SqlDbType.Int),
                new SqlParameter("@ordercode",        SqlDbType.VarChar),
                new SqlParameter("@peopleNumber",     SqlDbType.Int),
                new SqlParameter("@adultNumber",      SqlDbType.Int),
                new SqlParameter("@childNumber",      SqlDbType.Int),
                new SqlParameter("@orderDate",        SqlDbType.DateTime),
                new SqlParameter("@TravelDate",       SqlDbType.VarChar),
                new SqlParameter("@orderPrice",       SqlDbType.Int),
                new SqlParameter("@attachPrice",      SqlDbType.Int),
                new SqlParameter("@usePoints",        SqlDbType.Int),
                new SqlParameter("@donatePoints",     SqlDbType.Int),
                new SqlParameter("@contactName",      SqlDbType.VarChar),
                new SqlParameter("@contactMobile",    SqlDbType.VarChar),
                new SqlParameter("@contactEmail",     SqlDbType.VarChar),
                new SqlParameter("@contactTelephone", SqlDbType.VarChar),
                new SqlParameter("@orderRemark",      SqlDbType.VarChar),
                new SqlParameter("@operRemark",       SqlDbType.VarChar),
                new SqlParameter("@orderState",       SqlDbType.Int),
                new SqlParameter("@clubid",           SqlDbType.Int),
                new SqlParameter("@adultPrice",       SqlDbType.Int),
                new SqlParameter("@childPrice",       SqlDbType.Int),
                new SqlParameter("@payType",          SqlDbType.Int),
                new SqlParameter("@subPrice",         SqlDbType.Int),
                new SqlParameter("@orderType",        SqlDbType.Int),
                new SqlParameter("@contactSex",       SqlDbType.VarChar),
                new SqlParameter("@sourceType",       SqlDbType.Int),
                new SqlParameter("@usedate",          SqlDbType.VarChar),
                new SqlParameter("@timedot",          SqlDbType.Int),
                new SqlParameter("@huandate",         SqlDbType.VarChar),
                new SqlParameter("@account",          SqlDbType.Int),
                new SqlParameter("@tuijianren",       SqlDbType.VarChar),
                new SqlParameter("@IDcard",           SqlDbType.VarChar)
            };
            parameters[0].Value  = model.lineId;
            parameters[1].Value  = model.ordercode;
            parameters[2].Value  = model.peopleNumber;
            parameters[3].Value  = model.adultNumber;
            parameters[4].Value  = model.childNumber;
            parameters[5].Value  = model.orderDate;
            parameters[6].Value  = model.TravelDate;
            parameters[7].Value  = model.orderPrice;
            parameters[8].Value  = model.attachPrice;
            parameters[9].Value  = model.usePoints;
            parameters[10].Value = model.donatePoints;
            parameters[11].Value = model.contactName;
            parameters[12].Value = model.contactMobile;
            parameters[13].Value = model.contactEmail;
            parameters[14].Value = model.contactTelephone;
            parameters[15].Value = model.orderRemark;
            parameters[16].Value = model.operRemark;
            parameters[17].Value = model.orderState;
            parameters[18].Value = model.clubid;
            parameters[19].Value = model.adultPrice;
            parameters[20].Value = model.childPrice;
            parameters[21].Value = model.payType;
            parameters[22].Value = model.subPrice;
            parameters[23].Value = model.orderType;
            parameters[24].Value = model.contactSex;
            parameters[25].Value = model.sourceType;

            parameters[26].Value = model.usedate;
            parameters[27].Value = model.timedot;
            parameters[28].Value = model.huandate;
            parameters[29].Value = model.account;
            parameters[30].Value = model.tuijianren;
            parameters[31].Value = model.IDcard;
            return(DbHelperSQL.ExecuteSql(strSql.ToString(), parameters));
        }
Exemple #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //check if the user login - write by jjh
            CheckLogin();

            this.Title = "填写订单-" + Master.webinfo.WebName;
            int.TryParse(Request.QueryString["adult"], out adult);
            int.TryParse(Request.QueryString["child"], out child);
            int.TryParse(Request.QueryString["id"], out id);
            if (Request.QueryString["ordertime"] != null)
            {
                ordertime = Request.QueryString["ordertime"];
            }
            if (!this.IsPostBack)
            {
                if (id > 0)
                {
                    DateTime orderdate;
                    LineModel = LineBll.GetModel(id);
                    if (LineModel != null && DateTime.TryParseExact(ordertime, "yyyyMMdd", Thread.CurrentThread.CurrentCulture, System.Globalization.DateTimeStyles.None, out orderdate))
                    {
                        ordertime = orderdate.ToString("yyyy-MM-dd");
                        string strspeprice = getSpePrice(id, ordertime);
                        if (strspeprice.Equals(""))
                        {
                            adultprice = Convert.ToInt32(LineModel.PriceContent.Split(',')[2]);
                            childprice = Convert.ToInt32(LineModel.PriceContent.Split(',')[3]);
                        }
                        else
                        {
                            adultprice = Convert.ToInt32(strspeprice.Split(',')[0]);
                            childprice = Convert.ToInt32(strspeprice.Split(',')[1]);
                        }
                        totalprice = adult * adultprice + child * childprice;
                        if (LineModel.InsureId == 0)
                        {
                            strAttach = "-<span style=\"color:#ff6600\">赠送保险</span>";
                            this.divattach.Style["display"] = "none";
                        }
                    }
                }
                int uid = 0;
                if (!string.IsNullOrEmpty(TravelAgent.Tool.CookieHelper.GetCookieValue("uid")) && int.TryParse(TravelAgent.Tool.CookieHelper.GetCookieValue("uid"), out uid))
                {
                    CurClub = ClubBll.GetModel(uid);
                }
                if (CurClub == null)
                {
                    CurClub = new TravelAgent.Model.Club();
                }
                //预订第一步
                if (Request["txtHiddenPId"] != null)
                {
                    TravelAgent.Model.Order order = new TravelAgent.Model.Order();
                    order.lineId    = id;
                    order.ordercode = "O" + DateTime.Now.ToString("yyyyMMddHHmmssfff");
                    int txtHiddenPersonNum;
                    int txtHiddenChildNum;
                    int.TryParse(Request["txtHiddenPersonNum"], out txtHiddenPersonNum);
                    int.TryParse(Request["txtHiddenChildNum"], out txtHiddenChildNum);
                    order.peopleNumber = txtHiddenPersonNum + txtHiddenChildNum;
                    order.adultNumber  = txtHiddenPersonNum;
                    order.childNumber  = txtHiddenChildNum;
                    order.orderDate    = DateTime.Now;
                    order.TravelDate   = ordertime;
                    order.orderPrice   = totalprice;
                    int txtHiddenAttachPrice;
                    int.TryParse(Request["txtHiddenAttachPrice"], out txtHiddenAttachPrice);
                    order.attachPrice      = txtHiddenAttachPrice;
                    order.usePoints        = 0;
                    order.donatePoints     = 0;
                    order.contactName      = Request["txt_name"];
                    order.contactMobile    = Request["txt_mobile"];
                    order.contactEmail     = Request["txt_email"];
                    order.contactTelephone = Request["txt_start_phone"] + "-" + Request["txt_end_phone"];
                    order.orderRemark      = Request["txt_des"];
                    order.operRemark       = "";
                    order.orderState       = Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderState.填写信息);
                    order.clubid           = uid;
                    order.adultPrice       = adultprice;
                    order.childPrice       = childprice;
                    order.payType          = 0;
                    order.subPrice         = 0;
                    order.orderType        = Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderType.线路);
                    order.contactSex       = "";
                    order.sourceType       = Convert.ToInt32(TravelAgent.Tool.EnumSummary.SourceType.PC网页);
                    order.tuijianren       = Request["txtHiddentuijianren"];
                    try
                    {
                        int orderid = LineOrderBll.Add(order);

                        if (orderid > 0 & order.clubid > 0)
                        {
                            //urlrewrite
                            Response.Redirect("/lineorder/2/" + orderid + ".html", false);
                        }
                        else
                        {
                            Response.Redirect("/Opr.aspx?t=error&msg=opr");
                        }
                    }
                    catch (Exception ex)
                    {
                        Response.Redirect("/Opr.aspx?t=error&msg=opr");
                    }
                }
            }
            if (LineModel == null)
            {
                Response.Redirect("/Opr.aspx?t=error&msg=opr");
            }
        }
Exemple #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                int lineid;
                int renshu1;
                int renshu2;
                int renshu3;
                int adult_price;
                int child_price;
                int bx_price;
                int order_type;
                if (int.TryParse(Request["lineid"], out lineid) &&
                    int.TryParse(Request["renshu1"], out renshu1) &&
                    int.TryParse(Request["renshu2"], out renshu2) &&
                    int.TryParse(Request["renshu3"], out renshu3) &&
                    int.TryParse(Request["adult_price"], out adult_price) &&
                    int.TryParse(Request["child_price"], out child_price) &&
                    int.TryParse(Request["bx_price"], out bx_price) &&
                    int.TryParse(Request["order_type"], out order_type))
                {
                    TravelAgent.Model.Order order = new TravelAgent.Model.Order();
                    order.lineId           = lineid;
                    ordercode              = "O" + DateTime.Now.ToString("yyyyMMddHHmmssfff");
                    order.ordercode        = ordercode;
                    order.peopleNumber     = renshu1 + renshu2;
                    order.adultNumber      = renshu1;
                    order.childNumber      = renshu2;
                    order.orderDate        = DateTime.Now;
                    order.TravelDate       = Request["shijian1"];
                    order.orderPrice       = adult_price * renshu1 + child_price * renshu2;
                    order.attachPrice      = bx_price * renshu3;
                    order.usePoints        = 0;
                    order.donatePoints     = 0;
                    order.contactName      = Request["xingming"];
                    order.contactMobile    = Request["dianhua"];
                    order.contactEmail     = "";
                    order.contactTelephone = "";
                    order.orderRemark      = "";
                    order.operRemark       = "";
                    order.orderState       = Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderState.处理中);
                    order.clubid           = 0;
                    order.adultPrice       = 0;
                    order.childPrice       = 0;
                    order.payType          = 0;
                    order.subPrice         = 0;

                    order.orderType  = order_type;
                    order.contactSex = "";
                    order.sourceType = Convert.ToInt32(TravelAgent.Tool.EnumSummary.SourceType.移动WAP);
                    try
                    {
                        int orderid = OrderBll.Add(order);

                        if (orderid < 0)
                        {
                            Response.Redirect("MOrderMsg.aspx?msg=订单提交失败&class=error", false);
                        }
                    }
                    catch (Exception ex)
                    {
                        Response.Redirect("MOrderMsg.aspx?msg=订单提交失败&class=error", false);
                    }
                }
            }
        }
Exemple #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Title = "付款-" + Master.webinfo.WebName;
            int.TryParse(Request.QueryString["oid"], out oid);
            int strUid;

            if (!int.TryParse(TravelAgent.Tool.CookieHelper.GetCookieValue("uid"), out strUid))
            {
                Response.Redirect("/member/Login.aspx");
            }
            else
            {
                club = clubBll.GetModel(strUid);
            }
            if (Request.QueryString["t"] != null)
            {
                strTag = Request.QueryString["t"];
            }
            if (!this.IsPostBack)
            {
                if (!string.IsNullOrEmpty(strTag))
                {
                    if (oid > 0)
                    {
                        TravelAgent.Model.Order order = OrderBll.GetModel(oid);
                        if (order != null)
                        {
                            strOrdercode    = order.ordercode;
                            intPeopleNumber = order.peopleNumber;
                            intTotalPrice   = order.orderPrice + order.attachPrice + order.subPrice;
                            orderdate       = order.orderDate;
                            if (strTag.Equals("line"))//线路
                            {
                                Line = LineBll.GetModel(order.lineId);
                                if (Line != null)
                                {
                                    strOrderName = Line.LineName;
                                    donatePoints = Line.DonatePoints;
                                }
                                else
                                {
                                    Response.Redirect("/Opr.aspx?t=error&msg=opr", false);
                                }
                            }
                            else if (strTag.Equals("visa"))
                            {
                                TravelAgent.Model.VisaList visa = VisaBll.GetModel(order.lineId);
                                if (visa != null)
                                {
                                    strOrderName = visa.visaName;
                                    donatePoints = visa.donatePoints;
                                }
                                else
                                {
                                    Response.Redirect("/Opr.aspx?t=error&msg=opr", false);
                                }
                            }
                            else if (strTag.Equals("car"))
                            {
                                TravelAgent.Model.CarList car = CarBll.GetModel(order.lineId);
                                if (car != null)
                                {
                                    strOrderName = car.CarName;
                                    donatePoints = 0;
                                }
                                else
                                {
                                    Response.Redirect("/Opr.aspx?t=error&msg=opr", false);
                                }
                            }
                        }
                        else
                        {
                            Response.Redirect("/Opr.aspx?t=error&msg=opr", false);
                        }
                    }
                    else
                    {
                        Response.Redirect("/Opr.aspx?t=error&msg=opr", false);
                    }
                }
                else
                {
                    Response.Redirect("/Opr.aspx?t=error&msg=opr", false);
                }
            }
            if (club == null)
            {
                Response.Redirect("/Opr.aspx?t=error&msg=opr", false); club = new Model.Club();
            }
            if (Line == null)
            {
                Response.Redirect("/Opr.aspx?t=error&msg=opr", false); Line = new Model.Line();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Title = "核对订单-" + Master.webinfo.WebName;
            int.TryParse(Request.QueryString["oid"], out oid);
            if (!this.IsPostBack)
            {
                TravelAgent.Model.InfoSetting info = new TravelAgent.Model.InfoSetting();
                info.ds = bll.GetList();

                if (oid > 0)
                {
                    order = LineOrderBll.GetModel(oid);
                    if (order != null)
                    {
                        Line = LineBll.GetModel(order.lineId);
                        if (Line != null)
                        {
                            if (Line.DestId == 1)//出境
                            {
                                strAgreeMent = info.getValue("CJAgreeMent");
                            }
                            else//国内、周边
                            {
                                strAgreeMent = info.getValue("GNAgreeMent");
                            }
                        }
                    }
                    else
                    {
                        Response.Redirect("/Opr.aspx?t=error&msg=opr", false);
                    }
                }
                else
                {
                    Response.Redirect("/Opr.aspx?t=error&msg=opr", false);
                }

                if (Request["txtHiddenOrderId"] != null)
                {
                    string strsql = "";
                    if (Line.DealType == Convert.ToInt32(TravelAgent.Tool.EnumSummary.DealType.自动处理))
                    {
                        strsql = "update [Order] set orderState=" + Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderState.待付款) + " where Id=" + oid;
                    }
                    else
                    {
                        strsql = "update [Order] set orderState=" + Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderState.处理中) + " where Id=" + oid;
                    }
                    if (TravelAgent.Tool.DbHelperSQL.ExecuteSql(strsql) > 0)
                    {
                        //urlrewrite
                        Response.Redirect("/lineorder/5/" + oid + ".html", false);
                    }
                    else
                    {
                        Response.Redirect("/Opr.aspx?t=error&msg=opr", false);
                    }
                }
            }
            if (order == null)
            {
                Response.Redirect("/Opr.aspx?t=error&msg=opr", false); order = new Model.Order();
            }
            if (Line == null)
            {
                Response.Redirect("/Opr.aspx?t=error&msg=opr", false); Line = new Model.Line();
            }
        }
Exemple #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Title = "租车预订_" + Master.webinfo.WebName;
            if (!this.IsPostBack)
            {
                if (Request.QueryString["cid"] != null)
                {
                    cid      = Convert.ToInt32(Request.QueryString["cid"]);
                    CarModel = CarBll.GetModel(cid);
                }
                if (Request.QueryString["pcid"] != null)
                {
                    pid           = Convert.ToInt32(Request.QueryString["pcid"]);
                    CarPriceModel = CarPriceBll.GetModel(pid);

                    if (CarPriceModel.CarTypeID == 1)//旅游租车
                    {
                        this.trHuan.Style["display"] = "none";
                    }
                }
                if (CarModel == null || CarPriceModel == null)
                {
                    Response.Redirect("/Opr.aspx?msg=no");
                }
                if (!string.IsNullOrEmpty(TravelAgent.Tool.CookieHelper.GetCookieValue("uid")))
                {
                    CurClub = ClubBll.GetModel(Convert.ToInt32(TravelAgent.Tool.CookieHelper.GetCookieValue("uid")));
                }
                else
                {
                    CurClub = new TravelAgent.Model.Club();
                }
                strYCDate = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");
                strHCDate = Convert.ToDateTime(strYCDate).AddDays(1).ToString("yyyy-MM-dd");

                if (Request["txtHiddenCId"] != null)
                {
                    TravelAgent.Model.Order order = new TravelAgent.Model.Order();
                    order.lineId           = Convert.ToInt32(Request["txtHiddenCId"]);
                    order.ordercode        = "O" + DateTime.Now.ToString("yyyyMMddHHmmssfff");
                    order.peopleNumber     = Convert.ToInt32(Request["txtHiddenPId"]);
                    order.adultNumber      = 0;
                    order.childNumber      = 0;
                    order.orderDate        = DateTime.Now;
                    order.TravelDate       = "";
                    order.orderPrice       = Convert.ToInt32(Request["txtHiddenOrderPrice"]);
                    order.attachPrice      = 0;
                    order.usePoints        = 0;
                    order.donatePoints     = 0;
                    order.contactName      = Request["txt_name"];
                    order.contactMobile    = Request["txt_mobile"];
                    order.contactEmail     = Request["txt_email"];
                    order.contactTelephone = Request["txt_start_phone"] + "-" + Request["txt_end_phone"];
                    order.orderRemark      = Request["txt_des"];
                    order.operRemark       = "";
                    order.orderState       = Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderState.处理中);
                    if (string.IsNullOrEmpty(TravelAgent.Tool.CookieHelper.GetCookieValue("uid")))
                    {
                        order.clubid = 0;
                    }
                    else
                    {
                        order.clubid = Convert.ToInt32(TravelAgent.Tool.CookieHelper.GetCookieValue("uid"));
                    }
                    order.adultPrice = 0;
                    order.childPrice = 0;
                    order.payType    = 0;
                    order.subPrice   = 0;
                    order.orderType  = Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderType.租车);
                    order.contactSex = "";
                    order.sourceType = Convert.ToInt32(TravelAgent.Tool.EnumSummary.SourceType.PC网页);
                    order.usedate    = Request["txtHiddenYongcheDate"];
                    order.timedot    = Convert.ToInt32(Request["timedot"]);
                    order.huandate   = Request["txtHiddenHuancheDate"];
                    order.account    = Convert.ToInt32(Request["selYongchecount"]);
                    try
                    {
                        int orderid = LineOrderBll.Add(order);

                        if (orderid > 0 & order.clubid > 0)
                        {
                            //urlrewrite
                            Response.Redirect("/car/CarOrder2.aspx?cid=" + cid + "&pcid=" + pid + "&oid=" + orderid + "", false);
                        }
                        else
                        {
                            Response.Redirect("/Opr.aspx?t=error&msg=opr");
                        }
                    }
                    catch (Exception ex)
                    {
                        Response.Redirect("/Opr.aspx?t=error&msg=opr");
                    }
                }
            }
        }
Exemple #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string strUid = TravelAgent.Tool.CookieHelper.GetCookieValue("uid");

            if (string.IsNullOrEmpty(strUid))
            {
                Response.Redirect("/member/Login.aspx");
            }
            else
            {
                if (Request["realname"] != null)
                {
                    TravelAgent.Model.Order order = new TravelAgent.Model.Order();
                    order.lineId           = Convert.ToInt32(Request["visa_id"]);
                    order.TravelDate       = Request["godate"];
                    order.peopleNumber     = Convert.ToInt32(Request["personcount"]);
                    order.adultNumber      = 0;
                    order.childNumber      = 0;
                    order.orderRemark      = Request["remark"];
                    order.contactName      = Request["realname"];
                    order.contactSex       = Request["sex"];
                    order.contactMobile    = Request["mobile"];
                    order.contactEmail     = Request["email"];
                    order.contactTelephone = "";
                    order.orderPrice       = Convert.ToInt32(Request["personcount"]) * Convert.ToInt32(Request["visa_price"]);
                    order.attachPrice      = 0;
                    order.usePoints        = 0;
                    order.donatePoints     = 0;
                    order.adultPrice       = 0;
                    order.childPrice       = 0;
                    order.payType          = 0;
                    order.operRemark       = "";
                    order.orderState       = Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderState.处理中);
                    order.clubid           = Convert.ToInt32(strUid);
                    order.orderDate        = DateTime.Now;
                    order.ordercode        = "O" + DateTime.Now.ToString("yyyyMMddHHmmssfff");
                    order.subPrice         = 0;
                    order.orderType        = Convert.ToInt32(TravelAgent.Tool.EnumSummary.OrderType.签证);
                    order.sourceType       = Convert.ToInt32(TravelAgent.Tool.EnumSummary.SourceType.PC网页);
                    //order.vid = Convert.ToInt32(Request["visa_id"]);
                    //order.travelDate = Request["godate"];
                    //order.travelPeopleNum = Convert.ToInt32(Request["personcount"]);
                    //order.travelRemark = Request["remark"];
                    //order.guestName = Request["realname"];
                    //order.guestSex = Request["sex"];
                    //order.guestMobile = Request["mobile"];
                    //order.guestEmail = Request["email"];
                    //order.orderPrice = Convert.ToInt32(Request["personcount"]) * Convert.ToInt32(Request["visa_price"]);
                    //order.usePoints = 0;
                    //order.operateRemark = "";
                    //order.orderState = Convert.ToInt32(TravelAgent.Tool.EnumSummary.LineOrderState.处理中);
                    //order.clubid = Convert.ToInt32(strUid);
                    //order.adddate = DateTime.Now;
                    //order.ordercode = "V" + DateTime.Now.ToString("yyyyMMddHHmmssfff");
                    if (OrderBll.Add(order) > 0)
                    {
                        Response.Write("success");
                    }
                    else
                    {
                        Response.Write("error");
                    }
                }
            }
        }