示例#1
0
        /// <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();
        }
示例#2
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            #region 审批、取消审批、支付、取消支付
            if (Utils.GetFormValue("requestType") == "ajax_cancel")
            {
                Response.Clear();
                if (SetRegisterStatus())
                {
                    Response.Write("0");
                }
                else
                {
                    Response.Write("-1");
                }
                Response.End();
            }
            #endregion

            if (!IsPostBack)
            {
                //权限判断
                if (!CheckGrant(global::Common.Enum.TravelPermission.财务管理_团款支出_栏目))
                {
                    Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.财务管理_团款支出_栏目, false);
                }
                EyouSoft.Model.TourStructure.TourBaseInfo tourInfo = new EyouSoft.Model.TourStructure.TourBaseInfo();
                EyouSoft.BLL.TourStructure.Tour           bllTour  = new EyouSoft.BLL.TourStructure.Tour();
                tourInfo = bllTour.GetTourInfo(Utils.GetQueryStringValue("tourid"));
                if (tourInfo != null)
                {
                    lt_teamNum.Text    = tourInfo.TourCode;
                    lt_xianluName.Text = tourInfo.RouteName;
                    lt_days.Text       = tourInfo.TourDays.ToString();
                    lt_pepoleNum.Text  = tourInfo.PeopleNumberShiShou.ToString();
                    lt_LevelDate.Text  = tourInfo.LDate.ToString("yyyy-MM-dd");
                    //lt_seller.Text = tourInfo.SellerName;
                    //lt_oprator.Text=tourInfo.OperatorId
                    //EyouSoft.Model.CompanyStructure.ContactPersonInfo modelUser = new EyouSoft.BLL.CompanyStructure.CompanyUser(SiteUserInfo).GetUserBasicInfo(tourInfo.OperatorId);
                    //if (modelUser != null)
                    //{
                    //    lt_oprator.Text = modelUser.ContactName;
                    //}

                    EyouSoft.BLL.TourStructure.TourOrder   orderbll   = new EyouSoft.BLL.TourStructure.TourOrder();
                    EyouSoft.Model.TourStructure.TourOrder ordermodel = new EyouSoft.Model.TourStructure.TourOrder();

                    IList <EyouSoft.Model.StatisticStructure.StatisticOperator> listSeller = orderbll.GetSalerInfo(tourInfo.TourId);
                    IList <string> listOprator = bllTour.GetTourCoordinators(tourInfo.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_oprator.Text = oprator;
                }
                string planId = Utils.GetQueryStringValue("tourid");
                #region 列表绑定
                //收入
                this.rpt_list1.DataSource = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetOrderList(SiteUserInfo.CompanyID, planId);
                this.rpt_list1.DataBind();

                //其它收入
                EyouSoft.Model.FinanceStructure.OtherCostQuery otherCostQueryModel = new EyouSoft.Model.FinanceStructure.OtherCostQuery();
                otherCostQueryModel.TourId = planId;
                this.rpt_list2.DataSource  = new EyouSoft.BLL.FinanceStructure.OtherCost(SiteUserInfo).GetOtherIncomeList(otherCostQueryModel);
                this.rpt_list2.DataBind();

                //其它支出
                this.rpt_list3.DataSource = new EyouSoft.BLL.FinanceStructure.OtherCost(SiteUserInfo).GetOtherOutList(otherCostQueryModel);
                this.rpt_list3.DataBind();

                //利润分配
                this.rpt_list4.DataSource = new EyouSoft.BLL.FinanceStructure.TourProfitSharer(SiteUserInfo).GetTourShareList(planId);
                this.rpt_list4.DataBind();

                //
                rpt_list5.DataSource = new EyouSoft.BLL.FinanceStructure.OutRegister(SiteUserInfo).GetOutRegisterList(new EyouSoft.Model.FinanceStructure.QueryOutRegisterInfo {
                    ReceiveId = Utils.GetQueryStringValue("ReceiveId"), ItemId = planId
                });
                rpt_list5.DataBind();

                rpt_list1.EmptyText = "<tr><td id=\"EmptyData\" colspan='7' bgcolor='#e3f1fc' height='50px' align='center'>暂时没有数据!</td></tr>";
                rpt_list2.EmptyText = "<tr><td id=\"EmptyData\" colspan='6' bgcolor='#e3f1fc' height='50px' align='center'>暂时没有数据!</td></tr>";
                rpt_list3.EmptyText = "<tr><td id=\"EmptyData\" colspan='6' bgcolor='#e3f1fc' height='50px' align='center'>暂时没有数据!</td></tr>";
                rpt_list4.EmptyText = "<tr><td id=\"EmptyData\" colspan='5' bgcolor='#e3f1fc' height='50px' align='center'>暂时没有数据!</td></tr>";

                #endregion
            }
        }