protected string GetOtherInfo(object orderId) { string str = ""; if (orderId != null) { string orderID = orderId.ToString(); EyouSoft.Model.CompanyStructure.CustomerInfo model = new EyouSoft.BLL.TourStructure.TourOrder().GetCustomerInfo(orderID); EyouSoft.Model.CompanyStructure.CustomerContactInfo otherSideContactInfo = new EyouSoft.BLL.TourStructure.TourOrder().GetOrderOtherSideContactInfo(orderID); if (model != null && otherSideContactInfo != null) { str = "<td align=\"center\" class=\"td_r_b_border\">" + model.Name + "</td><td align=\"center\" class=\"td_r_b_border\">" + otherSideContactInfo.Name + "</td><td align=\"center\" class=\"td_b_border\">" + otherSideContactInfo.Mobile + "</td>"; } else { str = "<td align=\"center\" class=\"td_r_b_border\"></td><td align=\"center\" class=\"td_r_b_border\"></td><td align=\"center\" class=\"td_b_border\"></td>"; } } else { str = "<td align=\"center\" class=\"td_r_b_border\"></td><td class=\"td_r_b_border\" align=\"center\" ></td><td align=\"center\" class=\"td_b_border\"></td>"; } return(str); }
/// <summary> /// 初始化游客信息列表 /// </summary> protected void InitVisitorListAndRouteInfo() { EyouSoft.BLL.TourStructure.TourOrder order = new EyouSoft.BLL.TourStructure.TourOrder(base.SiteUserInfo); EyouSoft.Model.TourStructure.TourOrder orderModel = order.GetOrderModel(base.SiteUserInfo.CompanyID, orderId); if (orderModel == null) { Response.Clear(); Response.Write("未找到信息"); Response.End(); } EyouSoft.Model.TourStructure.TourBaseInfo infoModel = new EyouSoft.BLL.TourStructure.Tour(base.SiteUserInfo).GetTourInfo(orderModel.TourId); ltrTourNumber.Text = orderModel.TourNo; ltrRouteName.Text = orderModel.RouteName; if (infoModel != null) { ltrDays.Text = infoModel.TourDays.ToString(); } IList <EyouSoft.Model.TourStructure.TourOrderCustomer> list = orderModel.CustomerList.Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList(); rptVisitorList.DataSource = list; rptVisitorList.DataBind(); }
private void InitUnIncomeList() { EyouSoft.BLL.TourStructure.TourOrder TourOrderBLL = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo); PageIndex = Utils.GetInt(Request.QueryString["Page"], 1); LeaveTourStartDate.Value = Utils.GetQueryStringValue("LeaveTourStarDate"); LeaveTourEndDate.Value = Utils.GetQueryStringValue("LeaveTourEndDate"); TourType.Value = Utils.GetQueryStringValue("TourType"); RouteArea.Value = Utils.GetQueryStringValue("RouteArea"); SalserId.Value = Utils.GetQueryStringValue("SalserId"); Company.Value = Utils.GetQueryStringValue("Company"); EyouSoft.Model.TourStructure.SearchInfo SearchModel = new EyouSoft.Model.TourStructure.SearchInfo(); SearchModel = RefSearchInfo(); list = TourOrderBLL.GetOrderList(PageSize, PageIndex, ref RecordCount, SearchModel); if (list != null && list.Count != 0) { this.tbl_ExportPage.Visible = true; this.crp_UnIncomeAreaList.DataSource = list; TourOrderBLL.GetFinanceSumByOrder(SearchModel, ref sumMoneny, ref hasGetMoney); this.crp_UnIncomeAreaList.DataBind(); BindPage(); } else { this.tbl_ExportPage.Visible = false; this.crp_UnIncomeAreaList.EmptyText = "<tr bgcolor=\"#e3f1fc\"><td colspan='9' height='50px' align='center'>暂时没有数据!</td></tr>"; } }
protected void PageInit() { IList <EnumObj> list = EnumObj.GetList(typeof(EyouSoft.Model.EnumType.TourStructure.RefundType)); if (list != null && list.Count > 0) { this.ddl_PayType.DataSource = list; this.ddl_PayType.DataTextField = "Text"; this.ddl_PayType.DataValueField = "Value"; this.ddl_PayType.DataBind(); } orderId = Utils.GetQueryStringValue("id"); if (!string.IsNullOrEmpty(orderId)) { EyouSoft.BLL.TourStructure.TourOrder TourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder(); EyouSoft.Model.TourStructure.TourOrder TourOrderModel = TourOrderBll.GetOrderModel(CurrentUserCompanyID, orderId); if (TourOrderModel != null) { pepoleNum = TourOrderModel.AdultNumber.ToString(); pepoleNum2 = TourOrderModel.ChildNumber.ToString(); hidRouteName.Value = TourOrderModel.RouteName; hidOrderId.Value = TourOrderModel.ID; } EyouSoft.BLL.PlanStruture.PlaneTicket BLL = new EyouSoft.BLL.PlanStruture.PlaneTicket(); EyouSoft.Model.PlanStructure.TicketOutListInfo model = BLL.GetTicketOutInfoByOrderId(orderId); hidIsExtsisTicket.Value = model != null ? "1" : "0"; if (model != null) { piaomianjia = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().Price); shui = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().OilFee); pepoleNum = model.TicketKindInfoList.FirstOrDefault().PeopleCount.ToString(); DaiLiFei = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().AgencyPrice); Percent = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().Discount); OtherMoney = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().OtherPrice); piaokuan = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().TotalMoney); if (model.TicketKindInfoList.Count > 1) { piaomianjia2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].Price); shui2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].OilFee); pepoleNum2 = model.TicketKindInfoList[1].PeopleCount.ToString(); DaiLiFei2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].AgencyPrice); Percent2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].Discount); OtherMoney2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].OtherPrice); piaokuan2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].TotalMoney); } Total = Utils.FilterEndOfTheZeroDecimal(model.Total); PNR = model.PNR; ddl_PayType.SelectedIndex = (int)model.PayType; Remark = model.Remark; Notice = model.Notice; this.hideId.Value = model.TicketOutId; if ((int)model.State >= 2) { lbtn_submit.Visible = false; } } } }
protected void BindList() { EyouSoft.BLL.TourStructure.TourOrder TourOrderBLL = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo); EyouSoft.Model.TourStructure.SearchInfo SearchModel = new EyouSoft.Model.TourStructure.SearchInfo(); SearchModel.BuyCompanyName = Utils.GetQueryStringValue("Company"); SearchModel.TourType = (EyouSoft.Model.EnumType.TourStructure.TourType) int.Parse(Utils.GetQueryStringValue("TourType")); SearchModel.LeaveDateFrom = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("LeaveTourStarDate")); SearchModel.LeaveDateTo = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("LeaveTourEndDate")); SearchModel.ComputeOrderType = new EyouSoft.BLL.CompanyStructure.CompanySetting().GetComputeOrderType(SiteUserInfo.CompanyID); SearchModel.AreaId = null; SearchModel.SalerId = null; if (Utils.GetQueryStringValue("SalserId") != "" && Utils.GetQueryStringValue("SalserId") != "0") { SearchModel.SalerId = int.Parse(Utils.GetQueryStringValue("SalserId")); } if (Utils.GetQueryStringValue("RouteArea") != "" && Utils.GetQueryStringValue("RouteArea") != "0") { SearchModel.AreaId = int.Parse(Utils.GetQueryStringValue("RouteArea")); } int count = 0; //统计查询数据的条数 //取得返回的条数_count TourOrderBLL.GetOrderList(1, 1, ref count, SearchModel); list = TourOrderBLL.GetOrderList(count, 1, ref count, SearchModel); TourOrderBLL.GetFinanceSumByOrder(SearchModel, ref sumMoneny, ref hasGetMoney); this.repList.DataSource = list; this.repList.DataBind(); }
//绑定航段信息的数据 private void BindPlanInfo(string cusID) { EyouSoft.BLL.TourStructure.TourOrder TourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder(); EyouSoft.Model.TourStructure.MCustomerAllFlight fight = TourOrderBll.GetCustomerAllFlight(cusID); //调用取得航段信息集合 IList <EyouSoft.Model.PlanStructure.TicketFlight> list = DisponseFightList(fight); //绑定数据. if (list != null && list.Count > 0) { this.rpTicket.DataSource = list; this.rpTicket.DataBind(); //repeater显示 this.rpTicket.Visible = true; //无数据提示Label隐藏 this.lblMsg.Visible = false; } else { //无数据提示Label显示 this.lblMsg.Visible = true; //赋值 this.lblMsg.Text = "未查找到相应的航段信息"; //隐藏repeater this.rpTicket.Visible = false; //设置label控件的字体颜色 this.lblMsg.ForeColor = Color.BlueViolet; } }
/// <summary> /// init tixing /// </summary> void InitTiXing() { var searchInfo = new EyouSoft.Model.TourStructure.MDingDanTiXingInfo(); PageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1); int recordCount = 0; var items = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetDingDanTiXing(CurrentUserCompanyID, PageSize, PageIndex, ref recordCount, searchInfo); if (items != null && items.Count > 0) { rpt.DataSource = items; rpt.DataBind(); divPaging.Visible = true; divEmpty.Visible = false; paging.PageLinkURL = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?"; paging.UrlParams.Add(Request.QueryString); paging.intPageSize = PageSize; paging.CurrencyPage = PageIndex; paging.intRecordCount = recordCount; } else { divPaging.Visible = false; divEmpty.Visible = true; } }
/// <summary> /// 提交数据库操作 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void LinkButton1_Click(object sender, EventArgs e) { EyouSoft.BLL.TourStructure.TourOrder bll = new EyouSoft.BLL.TourStructure.TourOrder(); IList <EyouSoft.Model.FinanceStructure.ReceiveRefund> list = new List <EyouSoft.Model.FinanceStructure.ReceiveRefund>(); string [] str_chk = Utils.GetFormValues("checkbox"); #region 列表数据 for (int i = 0; i < str_chk.Length; i++) { EyouSoft.Model.FinanceStructure.ReceiveRefund model = new EyouSoft.Model.FinanceStructure.ReceiveRefund(); model.BillAmount = Utils.GetDecimal(Utils.GetFormValues("hd_skMoney")[Utils.GetInt(str_chk[i])]); model.CheckerId = SiteUserInfo.ID; model.CompanyID = CurrentUserCompanyID; model.IsBill = Utils.GetFormValues("ddl_piao")[Utils.GetInt(str_chk[i])] == "1" ? true : false; model.IsCheck = true; model.IsReceive = true; model.IssueTime = Utils.GetDateTime(Utils.GetFormValues("IssueTime")[Utils.GetInt(str_chk[i])]); model.ItemId = Request.QueryString["id"]; model.ItemType = EyouSoft.Model.EnumType.TourStructure.ItemType.订单; model.OperatorID = SiteUserInfo.ID; model.PayCompanyId = Utils.GetInt(Utils.GetFormValues("hd_PayCompanyId")[Utils.GetInt(str_chk[i])]); model.PayCompanyName = Utils.GetFormValues("hd_PayCompanyName")[Utils.GetInt(str_chk[i])]; model.RefundDate = DateTime.Now; model.RefundMoney = Utils.GetDecimal(Utils.GetFormValues("hd_skMoney")[Utils.GetInt(str_chk[i])]); model.RefundType = (EyouSoft.Model.EnumType.TourStructure.RefundType)Utils.GetInt(Utils.GetFormValues("ddl_Type")[Utils.GetInt(str_chk[i])]); model.Remark = Utils.GetFormValues("txt_mark")[Utils.GetInt(str_chk[i])]; model.StaffName = Utils.GetFormValues("txt_user")[Utils.GetInt(str_chk[i])]; model.StaffNo = 0; list.Add(model); } #endregion bll.UpdateReceive(list, Request.QueryString["id"], EyouSoft.Model.EnumType.TourStructure.LogRefundSource.财务管理_团款收入); }
/// <summary> /// 做审核/取消审核操作 /// </summary> /// <param name="dotype">操作类型</param> /// <returns></returns> private string Operater(string dotype) { string msg = string.Empty; string dengjiId = Utils.GetQueryStringValue("dengjiid").Trim(','); string orderId = Utils.GetQueryStringValue("orderid").Trim(','); if (dotype == "check") { if (!CheckGrant(global::Common.Enum.TravelPermission.财务管理_团款收入_收款审核)) { msg = "您没有收款审核的权限"; return(msg); } EyouSoft.BLL.FinanceStructure.BShouRu bll = new EyouSoft.BLL.FinanceStructure.BShouRu(); string[] ArrDengji = dengjiId.Split(','); string[] ArrOrderid = orderId.Split(','); int result = 0; if (ArrDengji.Length != ArrOrderid.Length) { msg = "数据错误,请重试!"; return(msg); } for (int i = 0; i < ArrDengji.Length; i++) { result = bll.ShenHeShouKuan(ArrDengji[i], ArrOrderid[i], this.SiteUserInfo.CompanyID, this.SiteUserInfo.ID); if (result != 1) { msg = "审核失败,请重试!"; return(msg); } } if (string.IsNullOrEmpty(msg)) { msg = "审核成功!"; } } else if (dotype == "cencer") { if (!CheckGrant(global::Common.Enum.TravelPermission.财务管理_团款收入_取消收款审核)) { msg = "您没有取消收款审核的权限"; return(msg); } EyouSoft.BLL.TourStructure.TourOrder bll = new EyouSoft.BLL.TourStructure.TourOrder(); if (bll.CancelIncomeChecked(this.SiteUserInfo.CompanyID, orderId, dengjiId)) { msg = "取消审核成功!"; } else { msg = "取消审核失败,请重试!"; } } else { msg = "操作失败,请重试!"; } return(msg); }
/// <summary> /// 导出Excel /// </summary> public void CreateExcel(ControlLibrary.CustomRepeater ctl) { EyouSoft.BLL.TourStructure.TourOrder TourOrderBLL = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo); EyouSoft.Model.TourStructure.SearchInfo searchInfo = new EyouSoft.Model.TourStructure.SearchInfo(); searchInfo = RefSearchInfo(); int recordCount = 0; //用gerList方法取得总记录的条数 list = TourOrderBLL.GetOrderList(1, 1, ref recordCount, searchInfo); list = TourOrderBLL.GetOrderList(recordCount, 1, ref recordCount, searchInfo); HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=UnInComeArea" + DateTime.Now.ToShortDateString() + ".xls"); HttpContext.Current.Response.Charset = "UTF-8"; HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.Default; HttpContext.Current.Response.ContentType = "application/ms-excel"; string table = "<table width='780' border='1' align='center' cellpadding='0' cellspacing='1' style='margin: 10px;'><tr><td>线路名称</td><td>团号</td><td>出团日期</td><td>客户单位</td><td>联系电话</td><td>人数</td><td>责任销售</td><td>总收入</td><td>已收</td><td>未收</td></tr>"; foreach (EyouSoft.Model.TourStructure.TourOrder info in list) { table += "<tr>"; table += "<td>" + info.RouteName + "</td><td>" + info.TourNo + " </td><td>" + info.LeaveDate + "</td><td>" + info.BuyCompanyName + "</td><td>" + info.ContactTel + "</td><td>" + info.PeopleNumber + "</td><td>" + info.SalerName + "</td><td>" + info.SumPrice + "</td><td>" + (info.SumPrice - info.NotReceived) + "</td><td>" + info.NotReceived + "</td>"; table += "</tr>"; } //未收金额 decimal notRev = sumMoneny - hasGetMoney; table += "<tr><td>总计:</td><td colspan='3'>总收入:" + EyouSoft.Common.Utils.FilterEndOfTheZeroDecimal(sumMoneny) + "</td><td colspan='3'>已收:" + EyouSoft.Common.Utils.FilterEndOfTheZeroDecimal(hasGetMoney) + "</td><td colspan='3'>未收:" + EyouSoft.Common.Utils.FilterEndOfTheZeroDecimal(notRev) + "</td></tr></table>"; HttpContext.Current.Response.Write(table); HttpContext.Current.Response.End(); //if (recordCount > 0) //{ //用上面list取得的记录条数作为每页显示条数的参数来取得相应的数据 // list = TourOrderBLL.GetOrderList(recordCount, 1, ref recordCount, searchInfo); //} //Response.Clear(); //Response.AppendHeader("Content-Disposition", "attachment;filename=" + FileName + ".xls"); //Response.ContentEncoding = System.Text.Encoding.Default; //Response.ContentType = "application/ms-excel"; ////取得数据表各列标题,各标题之间以\t分割,最后一个列标题后加回车符 //StringBuilder sb = new StringBuilder(); //sb.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\n", "线路名称", "团号", "出团日期", "客户单位", "人数", "责任销售", "总收入", "已收", "未收"); //foreach (EyouSoft.Model.TourStructure.TourOrder info in list) //{ // sb.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\n", // info.RouteName, // info.TourNo, // info.LeaveDate, // info.BuyCompanyName, // info.PeopleNumber, // info.SalerName, // info.SumPrice, // info.SumPrice - info.NotReceived, // info.NotReceived); //} //Response.Write(sb.ToString()); //Response.End(); }
/// <summary> /// 绑定 /// </summary> void Bind() { EyouSoft.BLL.TourStructure.TourOrder bll = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo); IList <EyouSoft.Model.FinanceStructure.ReceiveRefund> list = bll.GetReceive(Request.QueryString["id"]); rpt_list.DataSource = list; rpt_list.DataBind(); }
/// <summary> /// 绑定列表 /// </summary> void Bind() { txt_teamName.Value = ""; txt_teamNum.Value = ""; txt_teamStatus.Value = ""; txt_teamTraffic.Value = ""; txt_PaidMoney.Value = ""; string tourId = Utils.GetQueryStringValue("tourId"); EyouSoft.BLL.PlanStruture.TravelAgency bll = new EyouSoft.BLL.PlanStruture.TravelAgency(); EyouSoft.BLL.TourStructure.Tour tour = new EyouSoft.BLL.TourStructure.Tour(); EyouSoft.Model.TourStructure.TourBaseInfo info = tour.GetTourInfo(tourId); txt_teamNum.Value = info.TourCode; txt_teamName.Value = info.RouteName; txt_teamStatus.Value = info.Status.ToString(); txt_teamTraffic.Value = Utils.FilterEndOfTheZeroDecimal(info.TotalExpenses); //txt_PaidMoney .Value=Utils.FilterEndOfTheZeroDecimal(info. //lt_seller.Text = info.SellerName; //lt_actor.Text = info.OperatorId.ToString(); EyouSoft.BLL.TourStructure.TourOrder orderbll = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo); EyouSoft.Model.TourStructure.TourOrder ordermodel = new EyouSoft.Model.TourStructure.TourOrder(); IList <EyouSoft.Model.StatisticStructure.StatisticOperator> listSeller = orderbll.GetSalerInfo(tourId); IList <string> listOprator = tour.GetTourCoordinators(tourId); string sellers = ""; string oprator = ""; foreach (var v in listSeller) { sellers += v.OperatorName + ","; } if (sellers.Length > 0) { sellers = sellers.TrimEnd(','); } foreach (var v in listOprator) { oprator += v + ","; } if (oprator.Length > 0) { oprator = oprator.TrimEnd(','); } lt_seller.Text = sellers; lt_actor.Text = oprator; IList <EyouSoft.Model.PlanStructure.PaymentList> list = bll.GetSettleList(tourId); IList <EyouSoft.Model.PlanStructure.PaymentList> listPiaowu = list.Where(x => x.SupplierType == EyouSoft.Model.EnumType.CompanyStructure.SupplierType.票务).ToList(); IList <EyouSoft.Model.PlanStructure.PaymentList> listDiJie = list.Where(x => x.SupplierType == EyouSoft.Model.EnumType.CompanyStructure.SupplierType.地接).ToList(); rpt_dijie.DataSource = listDiJie; rpt_piaowu.DataSource = listPiaowu; rpt_dijie.DataBind(); rpt_piaowu.DataBind(); }
/// <summary> /// 初始化游客信息列表 /// </summary> protected void InitVisitorList() { EyouSoft.BLL.TourStructure.TourOrder order = new EyouSoft.BLL.TourStructure.TourOrder(base.SiteUserInfo); IList <EyouSoft.Model.TourStructure.TourOrderCustomer> list = order.GetTravellers(tourId); rptVisitorList.DataSource = list.Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList(); rptVisitorList.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_销售分析_帐龄分析栏目)) { Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.客户关系管理_销售分析_帐龄分析栏目, false); } toBLL = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo); if (!IsPostBack) { bind(); } }
protected override void OnPreRender(EventArgs e) { EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); UserInfo userInfo = null; bool _IsLogin = EyouSoft.Security.Membership.UserProvider.IsUserLogin(out userInfo); EyouSoft.BLL.TourStructure.TourOrder orderbll = new EyouSoft.BLL.TourStructure.TourOrder(userInfo); NumConfig = (int)(new EyouSoft.BLL.CompanyStructure.CompanySetting().GetTeamNumberOfPeople(userInfo.CompanyID)); SetDataList(); base.OnPreRender(e); }
//列表初始化 protected void ListBind(DateTime?sDate, DateTime?eDate, int[] orderOperId, string orderLot, string tuanHao, string cusHao, string lineName, int[] operIds, bool?selSettle) { int companyID = SiteUserInfo.CompanyID; EyouSoft.BLL.CompanyStructure.CompanySetting csBll = new EyouSoft.BLL.CompanyStructure.CompanySetting(); EyouSoft.Model.EnumType.CompanyStructure.ComputeOrderType?OrderTypeModel = csBll.GetComputeOrderType(companyID); EyouSoft.Model.TourStructure.OrderCenterSearchInfo queryModel = new EyouSoft.Model.TourStructure.OrderCenterSearchInfo(); //根据条件搜索相关条件 EyouSoft.BLL.TourStructure.TourOrder TourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo); EyouSoft.Model.TourStructure.SalerSearchInfo searchModel = new EyouSoft.Model.TourStructure.SalerSearchInfo(); if (searchModel.ComputeOrderType == OrderTypeModel.Value) { searchModel.ComputeOrderType = EyouSoft.Model.EnumType.CompanyStructure.ComputeOrderType.统计确认成交订单; } searchModel.SDate = sDate; searchModel.EDate = eDate; searchModel.OrderOperatorId = orderOperId; searchModel.CompanyName = cusHao; searchModel.OrderNo = orderLot; searchModel.TourNo = tuanHao; searchModel.RouteName = lineName; searchModel.SalerId = operIds; searchModel.ComputeOrderType = OrderTypeModel; searchModel.IsSettle = selSettle; System.Collections.Generic.IList <EyouSoft.Model.TourStructure.TourOrder> Ilist = TourOrderBll.GetOrderList(pageSize, pageIndex, ref recordCount, CurrentUserCompanyID, searchModel); if (Ilist != null && Ilist.Count > 0) { EyouSoft.Model.TourStructure.MSaleReceivableSummaryInfo Summaryinfo = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetSaleReceivableSummary(SiteUserInfo.CompanyID, searchModel); //合同金额汇总 this.LitFinanceSum.Text = Summaryinfo.TotalAmount.ToString("c2"); //人数统计 this.LitPeopleCount.Text = Summaryinfo.PeopleNumber.ToString(); //已收金额 this.LitHasCheckMoney.Text = Summaryinfo.ReceivedAmount.ToString("c2"); //已收待审核金额 this.LitNotCheckMoney.Text = Summaryinfo.UnauditedAmount.ToString("c2"); //未收金额 this.LitNotReceived.Text = Summaryinfo.NotReceivedAmount.ToString("c2"); repList.DataSource = Ilist; repList.DataBind(); } else { this.ExporPageInfoSelect1.Visible = false; this.repList.EmptyText = "<tr><td height='30px' bgcolor='#e3f1fc' colspan='14' align='center'>暂时没有数据!</td></tr>"; } TourOrderBll = null; searchModel = null; BindPage(); }
void BindCusList() { string tourId = Utils.GetQueryStringValue("tourId"); string orderId = Utils.GetQueryStringValue("orderId"); if (tourId != "") { EyouSoft.BLL.TourStructure.TourOrder orderbll = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo); if (orderId != "") { EyouSoft.Model.TourStructure.TourOrder orderModel = orderbll.GetOrderModel(CurrentUserCompanyID, orderId); if (orderModel != null) { txt_RouteName.Value = orderModel.RouteName; int companyId = orderModel.BuyCompanyID; EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(companyId); if (cusModel != null) { txt_tel.Value = cusModel.Phone; txt_fax.Value = cusModel.Fax; txt_lxr.Value = cusModel.ContactName; txtJbr.Value = cusModel.ContactName; txt_TeamName.Value = cusModel.Name; txt_jiafan.Value = cusModel.Name; } txt_large.Value = EyouSoft.Common.Function.StringValidate.ConvertNumAmtToChinese(orderModel.SumPrice); txt_Price.Value = orderModel.SumPrice.ToString("###,##0.00"); txt_PepoleNum.Value = orderModel.AdultNumber + "/成人数" + "+" + orderModel.ChildNumber + "/儿童数"; IList <EyouSoft.Model.TourStructure.TourOrderCustomer> cusList = orderModel.CustomerList.Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList(); cus_list.DataSource = cusList; cus_list.DataBind(); if (cusList.Count > 0) { txt_first.Value = cusList[0].ContactTel; } } } else { IList <EyouSoft.Model.TourStructure.TourOrderCustomer> cusList = orderbll.GetTravellers(tourId).Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList();; cus_list.DataSource = cusList; cus_list.DataBind(); if (cusList.Count > 0) { txt_first.Value = cusList[0].ContactTel; } } } }
/// <summary> /// 返回退订机票实体 /// </summary> /// <param name="TicketId"></param> /// <returns></returns> public EyouSoft.Model.TourStructure.CustomerRefund GetRefundTicketModel(int TicketId) { string refundId = dal.GetRefundTicketModel(TicketId); if (!string.IsNullOrEmpty(refundId)) { EyouSoft.BLL.TourStructure.TourOrder bll = new EyouSoft.BLL.TourStructure.TourOrder(); EyouSoft.Model.TourStructure.CustomerRefund model = new EyouSoft.Model.TourStructure.CustomerRefund(); model = bll.GetCustomerRefund(refundId); return(model); } else { return(null); } }
protected void rep_List_ItemCommand(object source, RepeaterCommandEventArgs e) { string[] data = e.CommandArgument.ToString().Split(','); EyouSoft.BLL.TourStructure.TourOrder TourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder(); if (e.CommandName == "Del") { if (TourOrderBll.Delete(data[0], SiteUserInfo.CompanyID, Convert.ToInt32(data[1]))) { EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this.Page, "删除成功!", "/GroupEnd/Orders/OrderList.aspx"); } else { EyouSoft.Common.Function.MessageBox.Show(this.Page, "删除失败!"); } } }
/// <summary> /// to xls /// </summary> private void ToXls() { int pageSize = Utils.GetInt(Utils.GetQueryStringValue("recordcount")); if (pageSize < 1) { ResponseToXls(string.Empty); } int recordCount = 0; int keHuId = Utils.GetInt(Utils.GetQueryStringValue("cid")); var chaXun = new EyouSoft.Model.CompanyStructure.KeHuJiaoYiMingXiChaXunInfo(); chaXun.LEDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("ledate")); chaXun.LSDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("lsdate")); //chaXun.TourType = (EyouSoft.Model.EnumType.TourStructure.TourType?)Utils.GetEnumValue(typeof(EyouSoft.Model.EnumType.TourStructure.TourType), Utils.GetQueryStringValue("TourType"), null); string tourtype = Utils.GetQueryStringValue("TourType"); if (tourtype == "0") { chaXun.TourTypes = new EyouSoft.Model.EnumType.TourStructure.TourType[] { EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划 }; } else if (tourtype == "1") { chaXun.TourTypes = new EyouSoft.Model.EnumType.TourStructure.TourType[] { EyouSoft.Model.EnumType.TourStructure.TourType.团队计划 }; } else if (tourtype == "0,1") { chaXun.TourTypes = new EyouSoft.Model.EnumType.TourStructure.TourType[] { EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划, EyouSoft.Model.EnumType.TourStructure.TourType.团队计划 }; } var items = new EyouSoft.BLL.TourStructure.TourOrder().GetKeHuJiaoYiMingXi(pageSize, 1, ref recordCount, CurrentUserCompanyID, keHuId, chaXun); System.Text.StringBuilder s = new System.Text.StringBuilder(); if (items != null && items.Count > 0) { s.AppendFormat("团号\t线路名称\t订单号\t对方操作员\t对方团号\t报团人次\t交易金额\t已收金额\t欠款金额\n"); foreach (var item in items) { s.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\n", item.TourCode, item.RouteName, item.OrderCode, item.BuyerContactName, item.BuyerTourCode, item.RenCi, item.JiaoYiJInE.ToString("C2"), item.YiShouJinE.ToString("C2"), item.WeiShouJinE.ToString("C2")); } } ResponseToXls(s.ToString()); }
/// <summary> /// 绑定游客信息 /// </summary> protected void InitVistorsList(int traffIcID, DateTime dt) { int adultNum = 0; int childrenNum = 0; IList <EyouSoft.Model.TourStructure.SongJiJiHuaBiao> List = new EyouSoft.BLL.TourStructure.TourOrder(this.SiteUserInfo).GetSongJiJiHuaBiao(traffIcID, dt); if (List != null && List.Count > 0) { adultNum = List.Sum(p => p.ChenRenShu); childrenNum = List.Sum(p => p.ErTongShu); this.repVisitorsList.DataSource = List; this.repVisitorsList.DataBind(); } this.litAdultNum.Text = adultNum.ToString(); this.litChildRenNum.Text = childrenNum.ToString(); this.litCountNum.Text = (adultNum + childrenNum).ToString(); }
//游客信息初始化 private void OnInit() { //游客ID string cusID = EyouSoft.Common.Utils.GetQueryStringValue("cusID").Trim(); this.lblTuanHao.Text = EyouSoft.Common.Utils.GetQueryStringValue("tourNo"); if (!string.IsNullOrEmpty(cusID)) { EyouSoft.BLL.TourStructure.TourOrder TourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder(); EyouSoft.Model.TourStructure.CustomerLeague TuiTuanModel = TourOrderBll.GetLeague(cusID); if (TuiTuanModel != null) { this.txtMoney.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroDecimal((TuiTuanModel.RefundAmount)); this.txtReson.Text = TuiTuanModel.RefundReason; TourOrderBll = null; TuiTuanModel = null; } } }
//游客信息初始化 private void OnInit() { //游客ID string cusID = EyouSoft.Common.Utils.GetQueryStringValue("cusID"); //退票编号 string RefundId = EyouSoft.Common.Utils.GetQueryStringValue("RefundId"); if (!string.IsNullOrEmpty(cusID)) { BindPlanInfo(cusID); EyouSoft.BLL.TourStructure.TourOrder TourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder(); EyouSoft.Model.TourStructure.CustomerRefund TuiPiaoModel = TourOrderBll.GetCustomerRefund(RefundId); this.lblOPer.Text = SiteUserInfo.ContactInfo.ContactName; if (TuiPiaoModel != null) { this.txtTuiPiaoMust.Text = TuiPiaoModel.RefundNote; } } }
/// <summary> /// 列表绑定 /// </summary> void Bind() { int BuyCompanyId = 0; BuyCompanyId = Utils.GetInt(hd_comId.Value); int RecordCount = 0; EyouSoft.BLL.TourStructure.TourOrder order = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo); IList <EyouSoft.Model.TourStructure.TourOrder> list = order.GetOrderList(20, EyouSoft.Common.Utils.GetInt(Request.QueryString["page"], 1), ref RecordCount, CurrentUserCompanyID, Utils.GetInt(Request.QueryString["id"]), BuyCompanyId); rpt_list.DataSource = list; rpt_list.DataBind(); #region 分页 ExportPageInfo1.intPageSize = 20; ExportPageInfo1.intRecordCount = RecordCount; ExportPageInfo1.PageLinkURL = Request.Path + "?"; ExportPageInfo1.UrlParams = Request.QueryString; ExportPageInfo1.CurrencyPage = EyouSoft.Common.Utils.GetInt(Request.QueryString["page"], 1); #endregion }
/// <summary> /// 绑定订单信息列表 /// </summary> protected void BindLineInfo(string OrderID, string LineName, DateTime?StarTime, DateTime?EndTime, DateTime?OrderStartDate, DateTime?OrderEndDate, int?xlid) { EyouSoft.Model.TourStructure.TourOrderSearchInfo TourOrderSearchInfo = new EyouSoft.Model.TourStructure.TourOrderSearchInfo(); //当前页数 PageIndex = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetQueryStringValue("Page"), 1); //订单编号 TourOrderSearchInfo.OrderNo = OrderID; //线路名称 TourOrderSearchInfo.RouteName = LineName; //出团开始日期 TourOrderSearchInfo.LeaveDateFrom = StarTime; //出团结束日期 TourOrderSearchInfo.LeaveDateTo = EndTime; //订单开始时间 TourOrderSearchInfo.CreateDateFrom = OrderStartDate; //订单结束时间 TourOrderSearchInfo.CreateDateTo = OrderEndDate; //线路区域ID TourOrderSearchInfo.AreaId = xlid; //订单信息业务逻辑类 EyouSoft.BLL.TourStructure.TourOrder BllTourOrder = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo); //订单信息实体类 IList <EyouSoft.Model.TourStructure.TourOrder> TourOrderlist = new List <EyouSoft.Model.TourStructure.TourOrder>(); //获取组团端订单中心订单信息集合 TourOrderlist = BllTourOrder.GetTourOrderList(PageSize, PageIndex, ref RecordCount, SiteUserInfo.TourCompany.TourCompanyId, TourOrderSearchInfo); if (TourOrderlist != null && TourOrderlist.Count > 0) { this.rep_List.DataSource = TourOrderlist; this.rep_List.DataBind(); } else { this.ExporPageInfoSelect1.Visible = false; this.rep_List.EmptyText = "<tr><td height='30px' bgcolor='#e3f1fc' colspan='11' align='center'>暂时没有数据!</td></tr>"; } TourOrderSearchInfo = null; BllTourOrder = null; TourOrderlist = null; BinPage(); }
//删除退款记录 private void TuiKuanDel() { if (Utils.GetQueryStringValue("act") == "pass") { if (!CheckGrant(global::Common.Enum.TravelPermission.财务管理_团款收入_退款登记)) { RCWE("-1"); } } else { if (!CheckGrant(global::Common.Enum.TravelPermission.销售管理_销售收款_退款登记)) { RCWE("-1"); } } //要删除的退款记录ID string RID = EyouSoft.Common.Utils.GetQueryStringValue("RID"); if (!string.IsNullOrEmpty(RID)) { EyouSoft.BLL.TourStructure.TourOrder TourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo); if (TourOrderBll.DeleteRefund(CurrentUserCompanyID, RID, OrderID, EyouSoft.Model.EnumType.TourStructure.LogRefundSource.销售管理_销售收款)) { //onInit(); TourOrderBll = null; Response.Write("删除成功"); Response.End(); } else { //onInit(); TourOrderBll = null; Response.Write("删除失败"); Response.End(); } } }
/// <summary> /// 列表操作 /// </summary> /// <param name="source"></param> /// <param name="e"></param> protected void rpt_list_ItemCommand(object source, RepeaterCommandEventArgs e) { EyouSoft.BLL.TourStructure.TourOrder bll = new EyouSoft.BLL.TourStructure.TourOrder(); switch (e.CommandName) { case "update": { EyouSoft.Model.FinanceStructure.ReceiveRefund model = new EyouSoft.Model.FinanceStructure.ReceiveRefund(); model.BillAmount = Utils.GetDecimal(Utils.GetFormValues("hd_skMoney")[e.Item.ItemIndex]); model.CheckerId = SiteUserInfo.ID; model.CompanyID = CurrentUserCompanyID; model.IsBill = Utils.GetFormValues("ddl_piao")[e.Item.ItemIndex] == "1"?true:false; model.IsCheck = true; model.IsReceive = true; model.IssueTime = Utils.GetDateTime(Utils.GetFormValues("IssueTime")[e.Item.ItemIndex]); model.ItemId = Request.QueryString["id"]; model.ItemType = EyouSoft.Model.EnumType.TourStructure.ItemType.订单; model.OperatorID = SiteUserInfo.ID; model.PayCompanyId = Utils.GetInt(Utils.GetFormValues("hd_PayCompanyId")[e.Item.ItemIndex]); model.PayCompanyName = Utils.GetFormValues("hd_PayCompanyName")[e.Item.ItemIndex]; model.RefundDate = DateTime.Now; model.RefundMoney = Utils.GetDecimal(Utils.GetFormValues("hd_skMoney")[e.Item.ItemIndex]); model.RefundType = (EyouSoft.Model.EnumType.TourStructure.RefundType)Utils.GetInt(Utils.GetFormValues("ddl_Type")[e.Item.ItemIndex]); model.Remark = Utils.GetFormValues("txt_mark")[e.Item.ItemIndex]; model.StaffName = Utils.GetFormValues("txt_user")[e.Item.ItemIndex]; model.StaffNo = 0; bool b = bll.UpdateReceive(model, Request.QueryString["id"], EyouSoft.Model.EnumType.TourStructure.LogRefundSource.财务管理_团款收入); if (b) { Response.Write("<script>alert('审核成功!');</script>"); } } break; //审核 case "delete": { bll.DeleteReceive(CurrentUserCompanyID, Utils.GetFormValues("hd_id")[e.Item.ItemIndex], Request.QueryString["id"], EyouSoft.Model.EnumType.TourStructure.LogRefundSource.财务管理_团款收入); } break; //删除 } Bind(); }
protected void BindAccountList(string TourNo, string LineName, string OrderOper, string Sales, string State) { EyouSoft.Model.TourStructure.TourFinanceSearchInfo searchModel = new EyouSoft.Model.TourStructure.TourFinanceSearchInfo(); searchModel.TourNo = TourNo; searchModel.RouteName = LineName; searchModel.OperatorName = OrderOper; searchModel.SalerName = Sales; if (State != "-1" && !string.IsNullOrEmpty(State)) { try { if (State == "1") { searchModel.IsSettle = true; } else { searchModel.IsSettle = false; } } catch { } } EyouSoft.BLL.TourStructure.TourOrder TourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder(); System.Collections.Generic.IList <EyouSoft.Model.TourStructure.TourOrder> list = TourOrderBll.GetTourOrderFinanceList(PageSize, PageIndex, ref RecordCount, SiteUserInfo.TourCompany.TourCompanyId, searchModel); if (list != null && list.Count > 0) { this.ctp_AccountList.DataSource = list; this.ctp_AccountList.DataBind(); } else { this.ExporPageInfoSelect1.Visible = false; this.ctp_AccountList.EmptyText = "<tr><td height='30px' bgcolor='#e3f1fc' colspan='11' align='center'>暂时没有数据!</td></tr>"; } BindPage(); }
//删除收款记录 private void ShouKuanDel() { if (Utils.GetQueryStringValue("act") == "pass") { if (!CheckGrant(global::Common.Enum.TravelPermission.财务管理_团款收入_收款登记)) { RCWE("-1"); } } else { if (!CheckGrant(global::Common.Enum.TravelPermission.销售管理_销售收款_收款登记)) { RCWE("-1"); } } string RID = EyouSoft.Common.Utils.GetQueryStringValue("RID"); if (string.IsNullOrEmpty(RID)) { RCWE("删除成功"); } EyouSoft.BLL.TourStructure.TourOrder TourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder(); bool bllRetCode = TourOrderBll.DeleteReceive(this.SiteUserInfo.CompanyID, RID, OrderID, EyouSoft.Model.EnumType.TourStructure.LogRefundSource.销售管理_销售收款); TourOrderBll = null; if (bllRetCode) { RCWE("删除成功"); } else { RCWE("删除失败"); } }
private void GetTotalArrearage() { PageIndex = Utils.GetInt(Request.QueryString["Page"], 1); StartDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("startDate")); EndDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("endDate")); RouteAreaId = Utils.GetQueryStringValue("routeAreaName"); TourType = Utils.GetQueryStringValue("tourType"); SalserId = Utils.GetQueryStringValue("SalerId"); EyouSoft.BLL.TourStructure.TourOrder TourOrderBLL = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo); EyouSoft.Model.TourStructure.SearchInfo SearchModel = new EyouSoft.Model.TourStructure.SearchInfo(); SearchModel.LeaveDateFrom = StartDate; SearchModel.LeaveDateTo = EndDate; if (RouteAreaId != "" && RouteAreaId != "0") { SearchModel.AreaId = int.Parse(RouteAreaId); } SearchModel.SalerId = int.Parse(SalserId); if (TourType != "" && TourType != "-1") { SearchModel.TourType = (EyouSoft.Model.EnumType.TourStructure.TourType) int.Parse(TourType); } //TODO:有问题 list = TourOrderBLL.GetOrderList(PageSize, PageIndex, ref RecordCount, SearchModel); if (list != null && list.Count != 0) { this.crp_GetArrenarageList.DataSource = list; this.crp_GetArrenarageList.DataBind(); this.tbl_ExportPage.Visible = true; BindPage(); } else { this.tbl_ExportPage.Visible = false; this.crp_GetArrenarageList.EmptyText = "<tr bgcolor='#e3f1fc'><td colspan='9' height='50px' align='center'>暂时没有数据!</td></tr>"; } }