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(); } } } }
protected void Page_Load(object sender, EventArgs e) { this.Title = "积分交易-" + Master.webinfo.WebName; string strUid = TravelAgent.Tool.CookieHelper.GetCookieValue("uid"); if (string.IsNullOrEmpty(strUid)) { Response.Redirect("/member/Login.aspx"); } else { club = clubBll.GetModel(Convert.ToInt32(strUid)); //Access //object getp=TravelAgent.Tool.DbHelperOleDb.GetSingle("select sum(points) from ClubPoints where clubid=" + club.id + " and points>=0"); //SQL object getp = TravelAgent.Tool.DbHelperSQL.GetSingle("select sum(points) from ClubPoints where clubid=" + club.id + " and points>=0"); totalgetPoints = getp != null?Convert.ToInt32(getp) : 0; //Access //object usep = TravelAgent.Tool.DbHelperOleDb.GetSingle("select sum(points) from ClubPoints where clubid=" + club.id + " and points<0"); //SQL object usep = TravelAgent.Tool.DbHelperSQL.GetSingle("select sum(points) from ClubPoints where clubid=" + club.id + " and points<0"); totalusePoints = usep != null?Convert.ToInt32(usep) : 0; } }
protected void Page_Load(object sender, EventArgs e) { this.Title = "会员中心-" + Master.webinfo.WebName; string strUid = TravelAgent.Tool.CookieHelper.GetCookieValue("uid"); if (string.IsNullOrEmpty(strUid)) { Response.Redirect("/member/Login.aspx"); } else { club = clubBll.GetModel(Convert.ToInt32(strUid)); if (club.IsLocked()) { Response.Redirect("/member/Login.aspx"); } if (TravelAgent.Tool.StringPlus.PasswordStrength(club.clubPwd) == TravelAgent.Tool.EnumSummary.Strength.Normal) { strPasswordStrengthcss = "middle"; } else if (TravelAgent.Tool.StringPlus.PasswordStrength(club.clubPwd) == TravelAgent.Tool.EnumSummary.Strength.Strong) { strPasswordStrengthcss = "strong"; } } }
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 { TravelAgent.Model.Club club = ClubBll.GetModel(Convert.ToInt32(strUid)); if (Request["txtOldPassword"] != null) { if (!club.clubPwd.Equals(Request["txtOldPassword"])) { Response.Redirect("/Opr.aspx?t=error&msg=" + Server.UrlEncode("原密码错误!")); } string strnewPassword = Request["txtPassword"]; string strsql = "update Club set clubPwd='" + strnewPassword + "' where Id=" + club.id; //Access //if (TravelAgent.Tool.DbHelperOleDb.ExecuteSql(strsql) > 0) //SQL if (TravelAgent.Tool.DbHelperSQL.ExecuteSql(strsql) > 0) { Response.Redirect("/Opr.aspx?t=success&msg=" + Server.UrlEncode("密码修改成功!")); } else { Response.Redirect("/Opr.aspx?t=error&msg=opr"); } } } }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { DataBindClass(); if (Request.QueryString["id"] != null) { clubid = Convert.ToInt32(Request.QueryString["id"]); TravelAgent.Model.Club model = ClubBll.GetModel(clubid); if (model != null) { this.txtClubName.Text = model.clubName; this.txtMobile.Text = model.clubMobile; this.txtEmail.Text = model.clubEmail; //this.txtPassword.Text = model.clubPwd; this.txtPassword.Attributes.Add("value", model.clubPwd); this.ddlClass.SelectedValue = model.classId.ToString(); this.txtPoints.Text = model.currentPoints.ToString(); this.txtName.Text = model.trueName; this.ddlSex.SelectedValue = model.clubSex; this.txtBirthday.Text = model.clubBirthday; this.ddlLock.SelectedValue = model.isLock.ToString(); } } } }
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 = "未付款"; } } } } }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { int id; int uid; if (int.TryParse(Request.QueryString["id"], out id)) { visa = VisaListBll.GetModel(id); if (visa != null) { this.Title = visa.visaName + "-" + Master.webinfo.WebName; } } if (int.TryParse(TravelAgent.Tool.CookieHelper.GetCookieValue("uid"), out uid)) { club = ClubBll.GetModel(uid); } } if (visa == null) { Response.Redirect("/Opr.aspx?t=error&msg=opr", false); visa = new Model.VisaList(); } if (club == null) { Response.Redirect("/Opr.aspx?t=error&msg=opr", false); club = new Model.Club(); } }
/// <summary> /// 得到一个对象实体 /// </summary> public TravelAgent.Model.Club GetModel(int Id) { StringBuilder strSql = new StringBuilder(); strSql.Append("select top 1 * from Club "); strSql.Append(" where Id=@Id "); SqlParameter[] parameters = { new SqlParameter("@Id", SqlDbType.Int, 4) }; parameters[0].Value = Id; TravelAgent.Model.Club model = new TravelAgent.Model.Club(); 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.clubName = ds.Tables[0].Rows[0]["clubName"].ToString(); model.clubMobile = ds.Tables[0].Rows[0]["clubMobile"].ToString(); model.clubEmail = ds.Tables[0].Rows[0]["clubEmail"].ToString(); model.clubPwd = ds.Tables[0].Rows[0]["clubPwd"].ToString(); model.trueName = ds.Tables[0].Rows[0]["trueName"].ToString(); model.clubSex = ds.Tables[0].Rows[0]["clubSex"].ToString(); model.clubBirthday = ds.Tables[0].Rows[0]["clubBirthday"].ToString(); if (ds.Tables[0].Rows[0]["currentPoints"].ToString() != "") { model.currentPoints = int.Parse(ds.Tables[0].Rows[0]["currentPoints"].ToString()); } if (ds.Tables[0].Rows[0]["isLock"].ToString() != "") { model.isLock = int.Parse(ds.Tables[0].Rows[0]["isLock"].ToString()); } if (ds.Tables[0].Rows[0]["regDate"].ToString() != "") { model.regDate = DateTime.Parse(ds.Tables[0].Rows[0]["regDate"].ToString()); } if (ds.Tables[0].Rows[0]["emailIsValid"].ToString() != "") { model.emailIsValid = int.Parse(ds.Tables[0].Rows[0]["emailIsValid"].ToString()); } if (ds.Tables[0].Rows[0]["mobileIsValid"].ToString() != "") { model.mobileIsValid = int.Parse(ds.Tables[0].Rows[0]["mobileIsValid"].ToString()); } if (ds.Tables[0].Rows[0]["classId"].ToString() != "") { model.classId = int.Parse(ds.Tables[0].Rows[0]["classId"].ToString()); } return(model); } else { return(null); } }
protected void Page_Load(object sender, EventArgs e) { this.Title = "会员注册-" + Master.webinfo.WebName; if (!this.IsPostBack) { TravelAgent.Model.InfoSetting info = new TravelAgent.Model.InfoSetting(); info.ds = bll.GetList(); strMemberAgreement = info.getValue("RegFWTK"); if (Request["type"] != null) { string strTag = Request["type"]; TravelAgent.Model.Club model = new TravelAgent.Model.Club(); if (strTag.Equals("mobile")) { model.clubMobile = Request["mobile"]; model.clubName = "club" + model.clubMobile; } else { model.clubEmail = Request["email"]; model.clubName = "club" + model.clubEmail; } model.clubPwd = Request["password"]; model.isLock = 1; int userid = ClubBll.Add(model); if (userid > 0) { //积分开始 TravelAgent.Model.ClubPoints points = new TravelAgent.Model.ClubPoints(); points.clubid = userid; points.Content = "首次注册"; points.points = Master.webinfo.FristReg; points.remark = ""; points.pType = Convert.ToInt32(TravelAgent.Tool.EnumSummary.PointsType.注册); points.adddate = DateTime.Now; PointsBll.Add(points); string strsql = "update Club set currentPoints=currentPoints+" + Master.webinfo.FristReg + " where Id=" + userid; //Access //TravelAgent.Tool.DbHelperOleDb.ExecuteSql(strsql); //SQL TravelAgent.Tool.DbHelperSQL.ExecuteSql(strsql); //积分结束 TravelAgent.Tool.CookieHelper.SetCookie("uid", userid.ToString()); TravelAgent.Tool.CookieHelper.SetCookie("username", model.clubName); Response.Redirect("/member/Index.aspx"); } else { Response.Redirect("/Opr.aspx?t=error&msg=opr", false); } } } }
/// <summary> /// 增加一条数据 /// </summary> public int Add(TravelAgent.Model.Club model) { int clubid = 0; if (dal.Add(model) > 0) { clubid = dal.GetMaxID("Id"); } return(clubid); }
protected void Page_Load(object sender, EventArgs e) { this.Title = "验证成功-" + Master.webinfo.WebName; string strUid = TravelAgent.Tool.CookieHelper.GetCookieValue("uid"); if (string.IsNullOrEmpty(strUid)) { Response.Redirect("/member/Login.aspx"); } else { club = clubBll.GetModel(Convert.ToInt32(strUid)); } if (!this.IsPostBack) { if (Request["email"] != null) { string strEmail = Server.UrlDecode(Request["email"]); this.ltEmail.Text = strEmail; string strsql = "update Club set clubEmail='" + strEmail + "',emailIsValid=1 where Id=" + club.id + ";"; try { //第一次验证赠送 if (club.emailIsValid == 0) { //积分开始 TravelAgent.Model.ClubPoints points = new TravelAgent.Model.ClubPoints(); points.clubid = club.id; points.Content = "验证邮箱"; points.points = webinfo.EmailValidate; points.remark = ""; points.pType = Convert.ToInt32(TravelAgent.Tool.EnumSummary.PointsType.邮箱验证); points.adddate = DateTime.Now; PointsBll.Add(points); strsql += "update Club set currentPoints=currentPoints+" + webinfo.EmailValidate + " where Id=" + club.id; //TravelAgent.Tool.DbHelperOleDb.ExecuteSql(strsql); //积分结束 } //Access //TravelAgent.Tool.DbHelperOleDb.ExecuteSql(strsql); //SQL TravelAgent.Tool.DbHelperSQL.ExecuteSql(strsql); } catch { Response.Redirect("/Opr.aspx?t=error&msg=opr"); } } else { Response.Redirect("/Opr.aspx?t=error&msg=opr"); } } }
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 = "未付款"; } } } } }
/// <summary> /// 更新一条数据 /// </summary> public int Update(TravelAgent.Model.Club model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update Club set "); strSql.Append("clubName=@clubName,"); strSql.Append("clubMobile=@clubMobile,"); strSql.Append("clubEmail=@clubEmail,"); strSql.Append("clubPwd=@clubPwd,"); strSql.Append("trueName=@trueName,"); strSql.Append("clubSex=@clubSex,"); strSql.Append("clubBirthday=@clubBirthday,"); strSql.Append("currentPoints=@currentPoints,"); strSql.Append("isLock=@isLock,"); strSql.Append("regDate=@regDate,"); strSql.Append("emailIsValid=@emailIsValid,"); strSql.Append("mobileIsValid=@mobileIsValid,"); strSql.Append("classId=@classId"); strSql.Append(" where Id=@Id"); SqlParameter[] parameters = { new SqlParameter("@clubName", SqlDbType.VarChar, 50), new SqlParameter("@clubMobile", SqlDbType.VarChar, 11), new SqlParameter("@clubEmail", SqlDbType.VarChar, 50), new SqlParameter("@clubPwd", SqlDbType.VarChar, 50), new SqlParameter("@trueName", SqlDbType.VarChar, 50), new SqlParameter("@clubSex", SqlDbType.VarChar), new SqlParameter("@clubBirthday", SqlDbType.VarChar), new SqlParameter("@currentPoints", SqlDbType.Int), new SqlParameter("@isLock", SqlDbType.Int), new SqlParameter("@regDate", SqlDbType.DateTime), new SqlParameter("@emailIsValid", SqlDbType.Int), new SqlParameter("@mobileIsValid", SqlDbType.Int), new SqlParameter("@classId", SqlDbType.Int), new SqlParameter("@Id", SqlDbType.Int) }; parameters[0].Value = model.clubName; parameters[1].Value = model.clubMobile; parameters[2].Value = model.clubEmail; parameters[3].Value = model.clubPwd; parameters[4].Value = model.trueName; parameters[5].Value = model.clubSex; parameters[6].Value = model.clubBirthday; parameters[7].Value = model.currentPoints; parameters[8].Value = model.isLock; parameters[9].Value = model.regDate; parameters[10].Value = model.emailIsValid; parameters[11].Value = model.mobileIsValid; parameters[12].Value = model.classId; parameters[13].Value = model.id; return(DbHelperSQL.ExecuteSql(strSql.ToString(), parameters)); }
protected void Page_Load(object sender, EventArgs e) { this.Title = "手机验证-" + Master.webinfo.WebName; string strUid = TravelAgent.Tool.CookieHelper.GetCookieValue("uid"); if (string.IsNullOrEmpty(strUid)) { Response.Redirect("/member/Login.aspx"); } else { club = clubBll.GetModel(Convert.ToInt32(strUid)); } }
/// <summary> /// 增加一条数据 /// </summary> public int Add(TravelAgent.Model.Club model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into Club("); strSql.Append("clubName,clubMobile,clubEmail,clubPwd,trueName,clubSex,clubBirthday,currentPoints,isLock,regDate,emailIsValid,mobileIsValid,classId)"); strSql.Append(" values ("); strSql.Append("@clubName,@clubMobile,@clubEmail,@clubPwd,@trueName,@clubSex,@clubBirthday,@currentPoints,@isLock,@regDate,@emailIsValid,@mobileIsValid,@classId)"); SqlParameter[] parameters = { new SqlParameter("@clubName", SqlDbType.VarChar, 50), new SqlParameter("@clubMobile", SqlDbType.VarChar, 11), new SqlParameter("@clubEmail", SqlDbType.VarChar, 50), new SqlParameter("@clubPwd", SqlDbType.VarChar, 50), new SqlParameter("@trueName", SqlDbType.VarChar, 50), new SqlParameter("@clubSex", SqlDbType.VarChar, 1), new SqlParameter("@clubBirthday", SqlDbType.VarChar, 10), new SqlParameter("@currentPoints", SqlDbType.Int), new SqlParameter("@isLock", SqlDbType.Int), new SqlParameter("@regDate", SqlDbType.DateTime), new SqlParameter("@emailIsValid", SqlDbType.Int), new SqlParameter("@mobileIsValid", SqlDbType.Int), new SqlParameter("@classId", SqlDbType.Int, 4) }; parameters[0].Value = model.clubName; parameters[1].Value = model.clubMobile; parameters[2].Value = model.clubEmail; parameters[3].Value = model.clubPwd; parameters[4].Value = model.trueName; parameters[5].Value = model.clubSex; parameters[6].Value = model.clubBirthday; parameters[7].Value = model.currentPoints; parameters[8].Value = model.isLock; parameters[9].Value = model.regDate; parameters[10].Value = model.emailIsValid; parameters[11].Value = model.mobileIsValid; parameters[12].Value = model.classId; return(Convert.ToInt32(DbHelperSQL.ExecuteSql(strSql.ToString(), parameters))); }
protected void Page_Load(object sender, EventArgs e) { this.Title = "会员登录-" + Master.webinfo.WebName; if (!this.IsPostBack) { if (Request["username"] != null && Request["password"] != null) { string strUserName = StringPlus.FilterStr(Request["username"]); string strPassWord = StringPlus.FilterStr(Request["password"]); TravelAgent.Model.Club model = ClubBll.GetModel(strUserName, strPassWord); if (model != null) { if (model.IsLocked()) { Response.Redirect("/Opr.aspx?t=o&msg=locked"); } double day = 1.0; if (Request["cooktime"] != null) { if (Request["cooktime"] == "1") { day = 7.0; } } TravelAgent.Tool.CookieHelper.SetCookie("uid", model.id.ToString(), DateTime.Now.AddDays(day)); TravelAgent.Tool.CookieHelper.SetCookie("username", model.clubName, DateTime.Now.AddDays(day)); Response.Redirect("/member/Index.aspx"); } else { Response.Redirect("/Opr.aspx?t=error&msg=login"); } } } }
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"); } }
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) { if (Request.QueryString["tel"] != null) { strTel = Request.QueryString["tel"]; } if (!this.IsPostBack) { //if (Request["actionName"] != null) //{ string strTag = Request["actionName"]; //if (strTag.Equals("buySubmit")) //{ //快速预订 if (Request["mobile"] != null) { string strtelephone = Request["mobile"]; if (ClubBll.GetCount("clubMobile='" + strtelephone + "'") > 0) //存在该手机号码 { strError = "exits_" + strtelephone; } else { //签证订单提交 if (strTag.Equals("visaOrderSubmit")) { strBtnContent = "<button type='button' class=\"quicklogin_nextbtn\" id=\"btn_QuitLogin_next\" onclick=\"parent.submit();parent.closeEditor();\">已记住密码,开始预订</button>"; } TravelAgent.Model.Club model = new TravelAgent.Model.Club(); model.clubName = "club" + strtelephone; model.clubMobile = strtelephone; strPwd = TravelAgent.Tool.GetRandom.GenerateRandom(6, TravelAgent.Tool.GetRandom.RandomType.Number); model.clubPwd = strPwd; int clubid = ClubBll.Add(model); if (clubid > 0) { TravelAgent.Tool.CookieHelper.SetCookie("uid", clubid.ToString()); TravelAgent.Tool.CookieHelper.SetCookie("username", model.clubName); this.quicklogin_block.Style["display"] = "none"; this.quicklogin_next.Style["display"] = ""; } else { strError = "regerror_" + strtelephone; } } } if (Request["txtName"] != null) { string strName = TravelAgent.Tool.StringPlus.FilterStr(Request["txtName"]); string strPwd = TravelAgent.Tool.StringPlus.FilterStr(Request["txtPwd"]); TravelAgent.Model.Club club = ClubBll.GetModel(strName, strPwd); if (club != null) { if (club.isLock == 0) //正常 { TravelAgent.Tool.CookieHelper.SetCookie("uid", club.id.ToString()); TravelAgent.Tool.CookieHelper.SetCookie("username", club.clubName); //线路订单 if (strTag.Equals("buySubmit")) { Response.Write("<script>parent.document.getElementById('btn_Next_2').click();</script>"); } else if (strTag.Equals("visaOrderSubmit")) //签证订单 { Response.Write("<script>parent.submit();parent.closeEditor();</script>"); } } } else { strError = "loginerror_" + strName; } } //} // } } }
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"); } } } }
/// <summary> /// 更新一条数据 /// </summary> public int Update(TravelAgent.Model.Club model) { return(dal.Update(model)); }