/// <summary> /// 团队订单状态更改 /// </summary> /// <param name="Status">更改的状态</param> /// <param name="TourId"></param> /// <returns></returns> public bool TourOrderStatusChange(TourOrderStatus Status, string TourId) { string sql = "update tbl_NewTourList set OrderStatus=@OrderStatus where TourId=@TourId"; DbCommand cmd = this._db.GetSqlStringCommand(sql.ToString()); this._db.AddInParameter(cmd, "OrderStatus", DbType.Byte, (int)Status); this._db.AddInParameter(cmd, "TourId", DbType.AnsiStringFixedLength, TourId); return(DbHelper.ExecuteSql(cmd, this._db) == 1 ? true : false); }
protected void btnsanve_Click(object sender, EventArgs e) { if (Utils.GetFormValues("radbtn").Length > 0) { TourOrderStatus stu = (TourOrderStatus)Enum.Parse(typeof(TourOrderStatus), Utils.GetFormValues("radbtn")[0]); if (EyouSoft.BLL.NewTourStructure.BTourList.CreateInstance().TourOrderStatusChange(stu, TourId)) { MessageBox.ShowAndRedirect(Page, "修改成功", "/LineManage/TeamorderManage.aspx?TourId=" + TourId); } else { MessageBox.ShowAndRedirect(Page, "修改失败", "/LineManage/TeamorderDetail.aspx?TourId=" + TourId); } } else { MessageBox.ShowAndRedirect(Page, "没有修改状态", "/LineManage/TeamorderDetail.aspx?TourId=" + TourId); } }
/// <summary> /// 页面初始化 /// </summary> private void InitPage() { routeId = Utils.GetQueryStringValue("routeId"); tourId = Utils.GetQueryStringValue("tourId"); IntRouteSource = Utils.GetInt(Utils.GetQueryStringValue("intRouteSource"), 0); if (IntRouteSource >= 0) { if (IntRouteSource == 2) { title = "地接社"; } else { title = "专线社"; } } else { title = "组团社"; } //判断是否为组团 isZT = Utils.GetQueryStringValue("isZT").Length > 0; if (routeId.Length > 0) { if (!SiteUserInfo.CompanyRole.HasRole(CompanyType.组团)) { Response.Clear(); Response.Write("<script>javascript: window.location.href='/default.aspx';</script>"); Response.End(); return; } #region 单团预定初始化 MRoute model = BRoute.CreateInstance().GetModel(routeId); if (model != null) { advanceDayRegistration = model.AdvanceDayRegistration.ToString(); companyID = model.Publishers; //lbl_MQ.Text = SiteUserInfo.ContactInfo.MQ; //lbl_QQ.Text = SiteUserInfo.ContactInfo.QQ; //线路名称 lbl_routeName.Text = model.RouteName; //发布人名称 lbl_operatorName.Text = model.OperatorName; CompanyDetailInfo cdModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(model.Publishers); MQ = cdModel.ContactInfo.MQ; QQ = cdModel.ContactInfo.QQ; a_gowd.HRef = Utils.GetShopUrl(model.Publishers); lbl_operatorName.Text = cdModel.CompanyName; lbl_sTraffic.Text = model.StartTraffic + " " + model.StartCityName; lbl_eTraffic.Text += model.EndTraffic + " " + model.EndCityName; isGJ = model.RouteType == AreaType.国际线; //团队参考价 lbl_groupNum.Text = (model.IndependentGroupPrice == 0 ? "一团一议" : Utils.FilterEndOfTheZeroDecimal(model.IndependentGroupPrice) + " 元") + ", 最小成团人数 " + model.GroupNum + " 人"; //定金 if (isGJ) { string strPrice = "成人:"; //成人定金 if (model.AdultPrice <= 0) { strPrice += (model.AdultPrice == -1 ? "电询" : "无需定金"); } else { strPrice += (model.AdultPrice.ToString("F0") + "元"); } strPrice += " 儿童:"; //儿童定金 if (model.ChildrenPrice <= 0) { strPrice += (model.ChildrenPrice == -1 ? "电询" : "无需定金"); } else { strPrice += (model.ChildrenPrice.ToString("F0") + "元"); } lbl_Price.Text = strPrice; } //组团社联系人姓名 txt_travelContact.Value = Request.QueryString["contact"] ?? SiteUserInfo.ContactInfo.ContactName; //组团社联系人电话 txt_travelTel.Value = Request.QueryString["tel"] ?? SiteUserInfo.ContactInfo.Tel; //成人数未传值默认为1人 string adult = Request.QueryString["adult"] ?? "1"; //儿童数未传值默认为0人 string child = Request.QueryString["child"] ?? "0"; //预定人数=成人数+儿童数 txt_adultPrice.Value = (Utils.GetInt(adult) + Utils.GetInt(child)).ToString(); //参考金额=预定人数*参考金额 //参考总金额 lbl_tourPrice.Text = model.IndependentGroupPrice == 0 ? "一团一议" : Utils.FilterEndOfTheZeroDecimal((Utils.GetInt(adult) + Utils.GetInt(child)) * model.IndependentGroupPrice) + " 元"; IndependentGroupPrice = model.IndependentGroupPrice == 0 ? "一团一议" : model.IndependentGroupPrice.ToString(); } #endregion } else if (tourId.Length > 0) { #region 团队订单管理查看初始化 MTourList model = BTourList.CreateInstance().GetModel(tourId); if (model != null) { orderStatus = model.OrderStatus; //出团时间 lbl_leaveDate.Text = model.StartDate.ToString("yyyy-MM-dd"); //线路名称(定团旅行社) lbl_routeName.Text = model.RouteName; lbl_sTraffic.Text = model.StartTraffic + " " + model.StartCityName; lbl_eTraffic.Text += model.EndTraffic + " " + model.EndCityName; if (isZT) { MQ = model.BusinessMQ; QQ = model.BusinessQQ; lbl_operatorName.Text = model.BusinessName; a_gowd.HRef = Utils.GetShopUrl(model.Business); lbl_OrderNo.Text = model.OrderNo; //组团社联系人 txt_travelContact.Value = model.TravelContact; //组团社联系人电话 txt_travelTel.Value = model.TravelTel; //游客联系人 txt_visitorContact.Value = model.VisitorContact; //游客联系人电话 txt_visitorTel.Value = model.VisitorTel; } else { MQ = model.TravelMQ; QQ = model.TravelQQ; lbl_operatorName.Text = model.TravelName; a_gowd.HRef = Utils.GetShopUrl(model.Travel); //组团社联系人 lbl_travel.Text = model.TravelContact + " 联系电话:" + model.TravelTel; //游客联系人 lbl_visitor.Text = model.VisitorContact + " 联系电话:" + model.VisitorTel; } if (model.RouteId.Length > 0) { routeId = model.RouteId; MRoute routeModel = BRoute.CreateInstance().GetModel(model.RouteId); if (routeModel != null) { isGJ = routeModel.RouteType == AreaType.国际线; #region 团队参考价 //团队参考价 lbl_groupNum.Text = "最小成团人数: " + routeModel.GroupNum + " 人," + (routeModel.IndependentGroupPrice == 0 ? "一团一议" : "参考价: " + Utils.FilterEndOfTheZeroDecimal(routeModel.IndependentGroupPrice) + " 元"); if (isZT) { lbl_groupNum.Text += "</br>同业销售须知:</br>"; lbl_groupNum.Text += model.VendorsNotes; lbl_businessNotes.Text = model.BusinessNotes; txt_travelNotes.Value = model.TravelNotes; } else { lbl_travelNotes.Text = model.TravelNotes; txt_businessNotes.Value = model.BusinessNotes; } #endregion #region 定金 //定金 if (isGJ) { lbl_Price.Text = "成人定金:" + (model.AdultPrice < 0 ? "电询" : Utils.FilterEndOfTheZeroDecimal(model.AdultPrice)) + " 儿童定金:" + (model.ChildrenPrice < 0 ? "电询" : Utils.FilterEndOfTheZeroDecimal(model.ChildrenPrice)); } #endregion #region 参考总金额 //参考总金额 lbl_tourPrice.Text = routeModel.IndependentGroupPrice == 0 ? "一团一议" : Utils.FilterEndOfTheZeroDecimal(model.ScheduleNum * routeModel.IndependentGroupPrice) + " 元"; IndependentGroupPrice = routeModel.IndependentGroupPrice == 0 ? "一团一议" : Utils.FilterEndOfTheZeroDecimal(routeModel.IndependentGroupPrice) + " 元"; #endregion } } //预定人数 txt_adultPrice.Value = model.ScheduleNum.ToString(); //下单时间 lbl_issueTime.Text = model.IssueTime.ToString("yyyy-MM-dd HH:mm") + " " + model.OperatorName; } #endregion } }