protected void btnsave_Click(object sender, EventArgs e) { bool boolPowder = false; bool boolPayment = false; EyouSoft.IBLL.NewTourStructure.ITourOrder orderBll = EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance(); if (Utils.GetFormValues("radbtnPowder").Length > 0) { boolPowder = orderBll.SetOrderStatus(orderId, (PowderOrderStatus)Enum.Parse(typeof(PowderOrderStatus), Utils.GetFormValues("radbtnPowder")[0]), DateTime.Now); } if (Utils.GetFormValues("radbtn").Length > 0) { boolPayment = orderBll.SetPaymentStatus(orderId, (PaymentStatus)Enum.Parse(typeof(PaymentStatus), Utils.GetFormValues("radbtn")[0])); } if (boolPowder && boolPayment) { Getmodelorder(); MessageBox.ShowAndRedirect(Page, "修改成功", "FitList.aspx"); } else { MessageBox.Show(Page, "修改失败");//, "FitOrderDetail.aspx?OrderId=" + orderId Getmodelorder(); } }
private void DataInit() { EyouSoft.IBLL.NewTourStructure.ITourOrder bll = EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance(); EyouSoft.Model.NewTourStructure.MOrderHandleLogSearch searchModel = new EyouSoft.Model.NewTourStructure.MOrderHandleLogSearch(); //searchModel.CompanyId = SiteUserInfo.CompanyID; searchModel.OrderId = Utils.GetQueryStringValue("orderID"); IList <EyouSoft.Model.NewTourStructure.MOrderHandleLog> list = bll.GetOrderHandleLogLst(searchModel); if (list != null) { this.rptList.DataSource = list; this.rptList.DataBind(); } }
private string UpdateOrderState(string orderID, string state) { //声明操作BLL EyouSoft.IBLL.NewTourStructure.ITourOrder orderBll = EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance(); bool result = false; switch (state) { //定金收取 case "1": result = orderBll.SetPaymentStatus(orderID, EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付定金); break; //全款收取 case "2": result = orderBll.SetPaymentStatus(orderID, EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付全款); break; //专线已退款 case "3": result = orderBll.SetPaymentStatus(orderID, EyouSoft.Model.NewTourStructure.PaymentStatus.已退款); break; //订单取消 case "4": //组团取消订单时,如果订单支付状态为专线定金已收或全收,那么支付状态设为申请退款 EyouSoft.Model.NewTourStructure.MTourOrder orderModel = orderBll.GetModel(orderID); if (orderModel != null) { if (orderModel.PaymentStatus == EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付定金 || orderModel.PaymentStatus == EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付全款) { orderBll.SetPaymentStatus(orderID, EyouSoft.Model.NewTourStructure.PaymentStatus.申请退款); } } result = orderBll.SetOrderStatus(orderID, EyouSoft.Model.NewTourStructure.PowderOrderStatus.取消, DateTime.Now); break; } if (result) { return("ok"); } return("服务器忙,请稍后再试!"); }
/// <summary> /// 订单状态和支付状态修改 /// </summary> /// <param name="orderID">订单编号</param> /// <param name="state">状态</param> /// <param name="dateTime">预留日期</param> /// <returns></returns> private string UpdateOrderState(string orderID, string state, string dateTime) { //声明操作BLL EyouSoft.IBLL.NewTourStructure.ITourOrder orderBll = EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance(); bool result = false; switch (state) { //订单预留 case "5": result = orderBll.SetOrderStatus(orderID, EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商预留, Utils.GetDateTimeNullable(dateTime)); break; //订单确定 case "6": result = orderBll.SetOrderStatus(orderID, EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商已确定, DateTime.Now); break; //结单 case "7": result = orderBll.SetOrderStatus(orderID, EyouSoft.Model.NewTourStructure.PowderOrderStatus.结单, DateTime.Now); break; //定金已收 case "8": result = orderBll.SetPaymentStatus(orderID, EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付定金); break; //全款已收 case "9": result = orderBll.SetPaymentStatus(orderID, EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付全款); break; } if (result) { return("ok"); } return("服务器忙,请稍后再试!"); }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourID"></param> /// <param name="adultCount"></param> /// <param name="childCount"></param> /// <param name="contact"></param> /// <param name="tel"></param> private void PageInit(string orderID) { EyouSoft.IBLL.NewTourStructure.ITourOrder orderBll = EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance(); EyouSoft.Model.NewTourStructure.MTourOrder model = orderBll.GetModel(orderID); if (model != null) { EyouSoft.IBLL.NewTourStructure.IPowderList tourBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance(); EyouSoft.Model.NewTourStructure.MPowderList tourModel = tourBll.GetModel(model.TourId); if (tourModel == null) { Utils.Show("error"); return; } this.lblRouteName.Text = "<a href='/PrintPage/LineTourInfo.aspx?RouteID=" + model.RouteId + "' target='_blank'>" + model.RouteName + "</a>"; this.lblLeaveDate.Text = model.LeaveDate.ToString("yyyy-MM-dd"); this.lblCompanyName.Text = " <a target=\"_blank\" href=\"" + Utils.GetCompanyDomain(model.Travel, EyouSoft.Model.CompanyStructure.CompanyType.组团) + "\">" + model.TravelName + "</a>"; #region 获得组团公司信息 EyouSoft.Model.CompanyStructure.CompanyInfo comModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(model.Travel); if (comModel != null && comModel.ContactInfo != null) { this.lblMq.Text = Utils.GetMQ(comModel.ContactInfo.MQ); this.lblQQ.Text = Utils.GetQQ(comModel.ContactInfo.QQ); } #endregion this.lblOrderNo.Text = model.OrderNo; this.lblTourState.Text = tourModel.PowderTourStatus.ToString(); this.lblCount.Text = tourModel.MoreThan.ToString(); this.lblLeaveCity.Text = tourModel.StartCityName; this.lblRemarks.Text = model.BusinessNotes; this.lblCar.Text = tourModel.StartTraffic + " " + tourModel.EndTraffic; this.lblLeaveCon.Text = tourModel.StartDate; this.lblBackCon.Text = tourModel.EndDate; this.lblMsg.Text = tourModel.SetDec; this.lblAllMsg.Text = tourModel.TeamLeaderDec; this.lblContact.Text = model.VisitorContact; this.lblConTactTel.Text = model.VisitorTel; this.lblFzr.Text = model.TravelContact; this.lblFzrTel.Text = model.TravelTel; this.txtAdultCount.Value = model.AdultNum.ToString(); this.txtChildCount.Value = model.ChildrenNum.ToString(); this.txtOtherCount.Value = model.SingleRoomNum.ToString(); this.lblAddDate.Text = model.IssueTime.ToString("yyyy-MM-dd") + " " + model.OperatorName; #region 团队 价格信息 //市场价 this.lblRetailAdultPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.PersonalPrice); this.lblRetailChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.ChildPrice); this.lblMarketPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.MarketPrice); //结算价 this.lblSettlementAudltPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementAudltPrice); this.lblSettlementChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementChildrenPrice); #endregion //处理总金额 //市场价总价 this.lblReailPriceAll.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalSalePrice); //结算总价 this.lblSettlePriceAll.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalSettlementPrice); // this.OrderCustomer1.TourOrderCustomer = model.Customers; #region 处理订单状态和支付状态 this.pnlSave.Visible = false; this.pnlYuLiu.Visible = false; this.pnlQueDing.Visible = false; this.pnlJieDan.Visible = false; switch (model.OrderStatus) { case EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理: case EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社已阅: case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商待处理: this.lblOrderState.Text = "未处理"; this.pnlSave.Visible = true; this.pnlYuLiu.Visible = true; this.pnlQueDing.Visible = true; this.pnlJieDan.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商预留: this.lblOrderState.Text = "专线预留,留位日期:" + Convert.ToDateTime(model.SaveDate).ToString("yyyy-MM-dd"); this.pnlSave.Visible = true; this.pnlQueDing.Visible = true; this.pnlJieDan.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.预留过期: this.lblOrderState.Text = "留位过期"; this.pnlSave.Visible = true; this.pnlQueDing.Visible = true; this.pnlJieDan.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.结单: this.lblOrderState.Text = "已结单"; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.取消: this.lblOrderState.Text = "已取消"; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商已确定: this.lblOrderState.Text = "专线已确定"; this.pnlJieDan.Visible = true; break; } this.pnlLitPay.Visible = false; this.pnlAllPay.Visible = false; switch (model.PaymentStatus) { case EyouSoft.Model.NewTourStructure.PaymentStatus.游客待支付: case EyouSoft.Model.NewTourStructure.PaymentStatus.游客未支付: this.lblPayState.Text = "游客未付款"; this.pnlLitPay.Visible = true; this.pnlAllPay.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付定金: this.lblPayState.Text = "游客已支付定金"; this.pnlLitPay.Visible = true; this.pnlAllPay.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付全款: this.lblPayState.Text = "游客已支付全款"; this.pnlLitPay.Visible = true; this.pnlAllPay.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付定金: this.lblPayState.Text = "已收定金"; this.pnlAllPay.Visible = true; this.pnlSave.Visible = false; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付全款: this.lblPayState.Text = "已收全款"; this.pnlSave.Visible = false; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.结账: this.lblPayState.Text = "该单已结账"; this.pnlSave.Visible = false; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.申请退款: this.lblPayState.Text = "申请退款"; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.已退款: this.lblPayState.Text = "已退款"; break; } #endregion } }
/// <summary> /// 修改订单 /// </summary> /// <returns></returns> private string FormSave() { string orderID = Utils.GetQueryStringValue("orderID"); //声明操作BLL EyouSoft.IBLL.NewTourStructure.ITourOrder orderBll = EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance(); //获得订单实体 EyouSoft.Model.NewTourStructure.MTourOrder orderModel = orderBll.GetModel(orderID); //成人数 int adultCount = Utils.GetInt(Utils.GetFormValue(this.txtAdultCount.UniqueID)); if (adultCount == 0) { return("请输入成人数!"); } //儿童数 int childCount = Utils.GetInt(Utils.GetFormValue(this.txtChildCount.UniqueID)); //单房差 int otherCount = Utils.GetInt(Utils.GetFormValue(this.txtOtherCount.UniqueID)); //增减结算价 decimal addReduction = Utils.GetDecimal(Utils.GetFormValue(this.txtAddPrice.UniqueID)); //专线备注 string routeRemarks = Utils.GetFormValue(this.txtRouteRemarks.UniqueID); #region 处理旅客 string[] txtName = Utils.GetFormValues("txtName"); string[] txtTel = Utils.GetFormValues("txtTel"); string[] txtCard = Utils.GetFormValues("txtCard"); string[] txtCardS = Utils.GetFormValues("txtCardS"); string[] txtCardT = Utils.GetFormValues("txtCardT"); string[] sltSex = Utils.GetFormValues("sltSex"); string[] sltChild = Utils.GetFormValues("sltChild"); string[] txtNumber = Utils.GetFormValues("txtNumber"); string[] txtRemarks = Utils.GetFormValues("txtRemarks"); string[] cbxVisitor = Utils.GetFormValues("cbxVisitor"); IList <EyouSoft.Model.NewTourStructure.MTourOrderCustomer> customerList = new List <EyouSoft.Model.NewTourStructure.MTourOrderCustomer>(); if (txtName.Length > 0) { for (int i = 0; i < txtName.Length; i++) { EyouSoft.Model.NewTourStructure.MTourOrderCustomer model = new EyouSoft.Model.NewTourStructure.MTourOrderCustomer(); model.CertificatesType = EyouSoft.Model.TicketStructure.TicketCardType.身份证; model.CompanyId = "";//SiteUserInfo.CompanyID if (cbxVisitor.Contains((i + 1).ToString())) { model.IsSaveToTicketVistorInfo = true; } model.ContactTel = txtTel[i]; model.CradType = sltChild[i] == "1" ? EyouSoft.Model.TicketStructure.TicketVistorType.成人 : EyouSoft.Model.TicketStructure.TicketVistorType.儿童; model.IdentityCard = txtCard[i]; model.IssueTime = DateTime.Now; model.Notes = txtRemarks[i]; model.OtherCard = txtCardT[i]; model.Passport = txtCardS[i]; model.Sex = sltSex[i] == "0" ? EyouSoft.Model.CompanyStructure.Sex.男 : EyouSoft.Model.CompanyStructure.Sex.女; model.SiteNo = txtNumber[i]; model.VisitorName = txtName[i]; customerList.Add(model); } } #endregion #region 订单实体赋值 orderModel.Reduction = addReduction; orderModel.AdultNum = adultCount; orderModel.ChildrenNum = childCount; orderModel.Customers = customerList; orderModel.IssueTime = DateTime.Now; orderModel.OperatorId = ""; //SiteUserInfo.ID; orderModel.OperatorName = ""; // SiteUserInfo.ContactInfo.ContactName; orderModel.OrderStatus = EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商待处理; orderModel.PaymentStatus = EyouSoft.Model.NewTourStructure.PaymentStatus.游客未支付; orderModel.SaveDate = null; orderModel.SingleRoomNum = otherCount; orderModel.Travel = ""; orderModel.BusinessNotes = routeRemarks; orderModel.TotalSalePrice = adultCount * orderModel.PersonalPrice + childCount * orderModel.ChildPrice + otherCount * orderModel.MarketPrice; //专线计算结算价 需要加减结算价 orderModel.TotalSettlementPrice = adultCount * orderModel.SettlementAudltPrice + childCount * orderModel.SettlementChildrenPrice + addReduction; if (EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance().AddOrUpdTourOrder(orderModel)) { return("ok"); } else { return("服务器忙,请稍后再试!"); } #endregion }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourID"></param> /// <param name="adultCount"></param> /// <param name="childCount"></param> /// <param name="contact"></param> /// <param name="tel"></param> private void PageInit(string orderID) { EyouSoft.IBLL.NewTourStructure.ITourOrder orderBll = EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance(); EyouSoft.Model.NewTourStructure.MTourOrder model = orderBll.GetModel(orderID); if (model != null) { EyouSoft.IBLL.NewTourStructure.IPowderList tourBll = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance(); EyouSoft.Model.NewTourStructure.MPowderList tourModel = tourBll.GetModel(model.TourId); this.lblRouteName.Text = "<a href='/PrintPage/LineTourInfo.aspx?RouteID=" + model.RouteId + "' target='_blank'>" + model.RouteName + "</a>"; this.lblLeaveDate.Text = model.LeaveDate.ToString("yyyy-MM-dd") + "(" + Utils.GetDayOfWeek((int)model.LeaveDate.DayOfWeek) + ") ";//出团日期(周几) this.lblCount.Text = tourModel.MoreThan.ToString(); this.lblTourState.Text = tourModel.PowderTourStatus.ToString(); this.lblCompanyName.Text = " <a target=\"_blank\" href=\"" + Utils.GetShopUrl(tourModel.Publishers) + "\">" + tourModel.PublishersName + "</a>"; #region 获得专线公司信息 EyouSoft.Model.CompanyStructure.CompanyInfo comModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(tourModel.Publishers); if (comModel != null && comModel.ContactInfo != null) { this.lblMq.Text = Utils.GetMQ(comModel.ContactInfo.MQ); this.lblQQ.Text = Utils.GetQQ(comModel.ContactInfo.QQ); } #endregion this.txtAddPrice.Value = model.Add.ToString("0.00"); this.txtReductPrice.Value = model.Reduction.ToString("0.00"); this.lblLeaveCityandTracffic.Text = tourModel.StartTraffic + " " + tourModel.StartCityName; //出发交通和城市 this.lbEndCityandTracffic.Text = tourModel.EndTraffic + " " + tourModel.EndCityName; //返程交通和城市 //this.lbPrice_d.Text = tourModel.AdultPrice.ToString("F0"); this.lbEnddate.Text = tourModel.EndDate; this.lbLeavedate.Text = tourModel.StartDate; this.lblOrder.Text = model.OrderNo; this.lblMsg.Text = tourModel.SetDec; this.lblAllMsg.Text = tourModel.TeamLeaderDec; this.txtContact.Value = model.VisitorContact; this.txtConTactTel.Value = model.VisitorTel; this.txtFzr.Value = model.TravelContact; this.txtFzrTel.Value = model.TravelTel; this.txtAdultCount.Value = model.AdultNum.ToString(); this.txtChildCount.Value = model.ChildrenNum.ToString(); this.txtOtherCount.Value = model.SingleRoomNum.ToString(); this.lblAddDate.Text = model.IssueTime.ToString("yyyy-MM-dd") + " " + model.OperatorName; this.txtRemark.Value = model.TravelNotes; this.lblCusRemark.Text = model.VisitorNotes; #region 团队 价格信息 //市场价 this.lblRetailAdultPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.PersonalPrice); this.lblRetailChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.ChildPrice); this.lblMarketPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.MarketPrice); //结算价 this.lblSettlementAudltPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementAudltPrice); this.lblSettlementChildrenPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SettlementChildrenPrice); #endregion //处理总金额 //市场价总价 this.lblReailPriceAll.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalSalePrice); //结算总价 this.lblSettlePriceAll.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalSettlementPrice); this.OrderCustomer1.TourOrderCustomer = model.Customers; #region 处理订单状态和支付状态 this.pnlSave.Visible = false; this.pnlCanel.Visible = false; switch (model.OrderStatus) { case EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社待处理: case EyouSoft.Model.NewTourStructure.PowderOrderStatus.组团社已阅: case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商待处理: this.lblOrderState.Text = "专线待处理"; this.pnlSave.Visible = true; this.pnlCanel.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商预留: this.lblOrderState.Text = "专线预留,留位日期:" + model.SaveDate == null ? "" : Convert.ToDateTime(model.SaveDate).ToString("yyyy-MM-dd"); this.pnlCanel.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.预留过期: this.lblOrderState.Text = "留位过期"; this.pnlCanel.Visible = true; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.结单: this.lblOrderState.Text = "已结单"; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.取消: this.lblOrderState.Text = "已取消"; break; case EyouSoft.Model.NewTourStructure.PowderOrderStatus.专线商已确定: this.lblOrderState.Text = "专线已确定"; this.pnlCanel.Visible = true; break; } this.pnlLitPay.Visible = false; this.pnlAllPay.Visible = false; this.pnlTuiKuan.Visible = false; switch (model.PaymentStatus) { case EyouSoft.Model.NewTourStructure.PaymentStatus.游客待支付: case EyouSoft.Model.NewTourStructure.PaymentStatus.游客未支付: this.lblPayState.Text = "待支付"; this.pnlLitPay.Visible = true; this.pnlAllPay.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付定金: this.lblPayState.Text = "已支付定金"; this.pnlAllPay.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.游客已支付全款: this.lblPayState.Text = "已支付全款"; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付定金: this.lblPayState.Text = "专线已收定金"; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.组团社已付全款: this.lblPayState.Text = "专线已收全款"; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.结账: this.lblPayState.Text = "已付全款"; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.申请退款: this.lblPayState.Text = "申请退款"; this.pnlTuiKuan.Visible = true; break; case EyouSoft.Model.NewTourStructure.PaymentStatus.已退款: this.lblPayState.Text = "已退款"; break; } #endregion } }