Exemplo n.º 1
0
        /// <summary>
        /// 获得团队报价列表
        /// </summary>
        /// <param name="CompanyId">报价所属公司编号</param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <param name="recordCount"></param>
        /// <param name="info">搜索实体</param>
        /// <param name="ModuleType">模块类型</param>
        /// <returns></returns>
        public IList <EyouSoft.Model.TourStructure.MTourQuoteInfo> GetTourQuoteList(string CompanyId, int pageSize, int pageIndex, ref int recordCount, EyouSoft.Model.TourStructure.MTourQuoteSearch info, EyouSoft.Model.EnumType.TourStructure.ModuleType ModuleType)
        {
            //是否仅查看自己的数据(true:仅查看计划销售员为自己的报价)
            bool isOnlySelf = false;

            //能查看到该菜单下面数据的部门编号,NULL为所有部门
            int[] DepartIds = null;
            switch (ModuleType)
            {
            case EyouSoft.Model.EnumType.TourStructure.ModuleType.组团:
            {
                DepartIds = GetDataPrivs(EyouSoft.Model.EnumType.PrivsStructure.Menu2.组团团队_团队报价, out isOnlySelf);
                break;
            }

            case EyouSoft.Model.EnumType.TourStructure.ModuleType.出境:
            {
                DepartIds = GetDataPrivs(EyouSoft.Model.EnumType.PrivsStructure.Menu2.出境团队_团队报价, out isOnlySelf);
                break;
            }

            case EyouSoft.Model.EnumType.TourStructure.ModuleType.地接:
            {
                DepartIds = GetDataPrivs(EyouSoft.Model.EnumType.PrivsStructure.Menu2.地接团队_团队报价, out isOnlySelf);
                break;
            }
            }
            EyouSoft.Model.ComStructure.MComSetting MComSet = new EyouSoft.BLL.ComStructure.BComSetting().GetModel(CompanyId);
            return(dal.GetTourQuoteList(CompanyId, pageSize, pageIndex, ref recordCount, info, ModuleType, DepartIds, isOnlySelf, this.LoginUserId, MComSet.ShowBeforeMonth, MComSet.ShowAfterMonth));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            #region 获取查询条件

            //状态
            string status = Utils.GetQueryStringValue("sltStatus");

            string[] removeStatus = { ((int)QuoteState.垫付申请审核).ToString(), ((int)QuoteState.审核成功).ToString(), ((int)QuoteState.审核失败).ToString() };

            this.litStatue.Text = UtilsCommons.GetEnumDDL(EyouSoft.Common.EnumObj.GetList(typeof(EyouSoft.Model.EnumType.TourStructure.QuoteState), removeStatus), status.ToString());
            //获取分页参数并强转
            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"));

            //线路区域ID
            int areaID = Utils.GetInt(Utils.GetQueryStringValue("ddlArea"));
            //线路ID、名称
            //string lineId = Utils.GetQueryStringValue("");
            string routeName = Utils.GetQueryStringValue("txtRouteName");
            //询价单位
            string comName = Utils.GetQueryStringValue(this.CustomerUnitSelect1.ClientNameKHMC);
            string comId   = Utils.GetQueryStringValue(this.CustomerUnitSelect1.ClientNameKHBH);
            this.CustomerUnitSelect1.CustomerUnitId   = comId;
            this.CustomerUnitSelect1.CustomerUnitName = comName;


            //销售员
            string sellerId   = Utils.GetQueryStringValue(this.SellsSelect1.ClientID + "_hideSellID");
            string sellerName = Utils.GetQueryStringValue(this.SellsSelect1.ClientID + "_txtSellName");
            this.SellsSelect1.SellsID   = sellerId;
            this.SellsSelect1.SellsName = sellerName;

            //报价员
            string operatorId   = Utils.GetQueryStringValue(this.SellsSelect2.ClientID + "_hideSellID");
            string operatorName = Utils.GetQueryStringValue(this.SellsSelect2.ClientID + "_txtSellName");
            this.SellsSelect2.SellsID   = operatorId;
            this.SellsSelect2.SellsName = operatorName;


            EyouSoft.Model.TourStructure.MTourQuoteSearch searchModel = new EyouSoft.Model.TourStructure.MTourQuoteSearch();
            searchModel.AreaId         = areaID;
            searchModel.BuyCompanyID   = comId;
            searchModel.BuyCompanyName = comName;
            searchModel.OperatorId     = operatorId;
            searchModel.Operator       = operatorName;
            if (status != "")
            {
                searchModel.QuoteState = (EyouSoft.Model.EnumType.TourStructure.QuoteState)Utils.GetInt(status);
            }
            searchModel.RouteName  = routeName;
            searchModel.SellerId   = sellerId;
            searchModel.SellerName = sellerName;
            #endregion

            EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote();
            IList <EyouSoft.Model.TourStructure.MTourQuoteInfo> list = bll.GetTourQuoteList(SiteUserInfo.CompanyId, pageSize, pageIndex, ref recordCount, searchModel, (EyouSoft.Model.EnumType.TourStructure.ModuleType)(type - 1));



            if (list != null && list.Count > 0)
            {
                //绑定分页
                rptList.DataSource = list;
                rptList.DataBind();
                BindPage();
                litMsg.Visible = false;
            }
            else
            {
                this.ExporPageInfoSelect1.Visible = false;
                this.ExporPageInfoSelect2.Visible = false;
                litMsg.Visible = true;
            }
            //释放
            bll  = null;
            list = null;
        }