Example #1
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            BComSetting comSettingBll = new BComSetting();

            YKQRDPrintUri = comSettingBll.GetPrintUri(CurrentUserCompanyID, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.车辆预控确认单);
            #region 分页参数
            int pageSize    = 20;
            int pageIndex   = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);
            int recordCount = 0;
            #endregion
            //车辆预控查询实体
            MSourceSueCarSearch queryModel = new MSourceSueCarSearch();
            queryModel.CompanyId = CurrentUserCompanyID;
            //车型
            queryModel.CarType = Utils.InputText(Utils.GetQueryStringValue("txt_carType"));
            //车队名称
            queryModel.SourceName = Utils.InputText(Utils.GetQueryStringValue("txt_carName"));
            //天数
            queryModel.DaysNum = Utils.GetIntNull(Utils.GetQueryStringValue("txt_day"));
            IList <MSourceSueCar> ls = new BSourceControl().GetListSueCar(pageIndex, pageSize, ref recordCount, queryModel);
            if (ls != null && ls.Count > 0)
            {
                pan_Msg.Visible     = false;
                rpt_list.DataSource = ls;
                rpt_list.DataBind();
                BindPage(pageSize, pageIndex, recordCount);
            }
            ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize;
        }
Example #2
0
        protected void InitPage(string sueId)
        {
            IList <MSueUse> ls          = null;
            IList <MSueUse> newls       = null;
            int             recordCount = 0;

            ls = new BSourceControl().GetOtherUseList(this.SiteUserInfo.CompanyId, sueId, 1, 1, ref recordCount);
            if (recordCount > 0)
            {
                newls = new BSourceControl().GetOtherUseList(this.SiteUserInfo.CompanyId, sueId, 1, recordCount, ref recordCount);
            }
            if (newls != null && newls.Count > 0)
            {
                this.rpt_tuandui.DataSource = newls;
                this.rpt_tuandui.DataBind();
            }
            else
            {
                this.ph_tuandui.Visible = false;
            }
            var carModel = new EyouSoft.BLL.SourceStructure.BSourceControl().GetModelByOtherId(sueId, this.SiteUserInfo.CompanyId);

            if (carModel != null)
            {
                this.lbCarName.Text = carModel.SourceName;
                this.lbCarType.Text = carModel.TypeName;
                this.lbCarNum.Text  = carModel.ControlNum.ToString();
                this.lbPreDate.Text = (carModel.SueStartTime.HasValue ? carModel.SueStartTime.Value.ToString("yyyy-MM-dd") : "") + "-" +
                                      (carModel.SueEndTime.HasValue ? carModel.SueEndTime.Value.ToString("yyyy-MM-dd") : "");
                this.lbLastDate.Text   = carModel.LastTime.HasValue ? carModel.LastTime.Value.ToString("yyyy-MM-dd") : "";
                this.lbCarPrice.Text   = UtilsCommons.GetMoneyString(carModel.UnitPrice, ProviderToMoney);
                this.lbTotalPrice.Text = UtilsCommons.GetMoneyString(carModel.TotalPrice, ProviderToMoney);
                this.lbRemark.Text     = EyouSoft.Common.Function.StringValidate.TextToHtml(carModel.Remark);
            }
        }
        protected void InitPage(string sueId)
        {
            IList <MSueUse> ls          = null;
            IList <MSueUse> newls       = null;
            int             recordCount = 0;

            ls = new BSourceControl().GetShipUseList(this.SiteUserInfo.CompanyId, sueId, 1, 1, ref recordCount);
            if (recordCount > 0)
            {
                newls = new BSourceControl().GetShipUseList(this.SiteUserInfo.CompanyId, sueId, 1, recordCount, ref recordCount);
            }
            if (newls != null && newls.Count > 0)
            {
                this.rpt_tuandui.DataSource = newls;
                this.rpt_tuandui.DataBind();
            }
            else
            {
                this.ph_tuandui.Visible = false;
            }
            MSourceSueShip shipModel = new EyouSoft.BLL.SourceStructure.BSourceControl().GetModelByShipId(sueId, this.SiteUserInfo.CompanyId);

            if (shipModel != null)
            {
                this.lbBoatCompany.Text = shipModel.ShipCompany;
                this.lbBoatName.Text    = shipModel.ShipName;
                this.lbBoatNum.Text     = shipModel.ControlNum.ToString();
                this.lbPreDate.Text     = shipModel.GoShipTime.HasValue ? shipModel.GoShipTime.Value.ToString("yyyy-MM-dd") : "";
                this.lbLastDate.Text    = shipModel.LastTime.HasValue ? shipModel.LastTime.Value.ToString("yyyy-MM-dd") : "";
                this.lbBoatPrice.Text   = UtilsCommons.GetMoneyString(shipModel.UnitPrice, ProviderToMoney);
                this.lbTotalPrice.Text  = UtilsCommons.GetMoneyString(shipModel.TotalPrice, ProviderToMoney);
                this.lbRemark.Text      = EyouSoft.Common.Function.StringValidate.TextToHtml(shipModel.Remark);
            }
        }
        protected void InitPage(string sueId)
        {
            IList <MSueUse> ls          = null;
            IList <MSueUse> newls       = null;
            int             recordCount = 0;

            ls = new BSourceControl().GetHotelUseList(sueId, this.SiteUserInfo.CompanyId, 1, 1, ref recordCount);
            if (recordCount > 0)
            {
                newls = new BSourceControl().GetHotelUseList(sueId, this.SiteUserInfo.CompanyId, 1, recordCount, ref recordCount);
            }
            if (newls != null && newls.Count > 0)
            {
                this.rpt_tuandui.DataSource = newls;
                this.rpt_tuandui.DataBind();
            }
            else
            {
                this.ph_tuandui.Visible = false;
            }
            MSourceSueHotel hotelModel = new EyouSoft.BLL.SourceStructure.BSourceControl().GetModelByHotelId(sueId, this.SiteUserInfo.CompanyId);

            if (hotelModel != null)
            {
                this.lbHotelName.Text  = hotelModel.SourceName;
                this.lbRoomType.Text   = hotelModel.RoomType;
                this.lbRoomNum.Text    = hotelModel.ControlNum.ToString();
                this.lbDate.Text       = hotelModel.PeriodStartTime.ToString("yyyy-MM-dd");
                this.lbLastDate.Text   = hotelModel.LastTime.ToString("yyyy-MM-dd");
                this.lbRoomPrice.Text  = UtilsCommons.GetMoneyString(hotelModel.UnitPrice, ProviderToMoney);
                this.lbTotalPrcie.Text = UtilsCommons.GetMoneyString(hotelModel.TotalPrice, ProviderToMoney);
                this.lbPreMoney.Text   = UtilsCommons.GetMoneyString(hotelModel.Advance, ProviderToMoney);
                this.lbRemark.Text     = hotelModel.Remark;
            }
        }
Example #5
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            BComSetting comSettingBll = new BComSetting();

            YKQRDPrintUri = comSettingBll.GetPrintUri(CurrentUserCompanyID, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.酒店预控确认单);
            #region 分页参数
            int pageSize    = 20;
            int pageIndex   = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);
            int recordCount = 0;
            #endregion
            #region 查询实体
            MSourceSueHotelSearch queryModel = new MSourceSueHotelSearch();
            queryModel.CompanyId = CurrentUserCompanyID;
            //房型
            queryModel.RoomType = Utils.GetQueryStringValue("rType");
            //酒店名称
            queryModel.SourceName = Utils.GetQueryStringValue("tavName");
            //有效时间--始
            queryModel.PeriodStartTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("dateTimeS"));
            //有效时间--终
            queryModel.PeriodEndTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("dateTimeE"));
            #endregion
            IList <MSourceSueHotel> ls = new BSourceControl().GetListSueHotel(pageIndex, pageSize, ref recordCount, queryModel);
            if (ls != null && ls.Count > 0)
            {
                pan_Msg.Visible     = false;
                rpt_list.DataSource = ls;
                rpt_list.DataBind();
                BindPage(pageSize, pageIndex, recordCount);
            }
            ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize;
        }
Example #6
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            BComSetting comSettingBll = new BComSetting();

            YKQRDPrintUri = comSettingBll.GetPrintUri(CurrentUserCompanyID, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.游轮预控确认单);
            #region 分页参数
            int pageSize    = 20;
            int pageIndex   = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);
            int recordCount = 0;
            #endregion
            #region 查询实体
            MSourceSueShipSearch queryModel = new MSourceSueShipSearch();
            queryModel.CompanyId = CurrentUserCompanyID;
            //游船公司
            queryModel.ShipCompany = Utils.InputText(Utils.GetQueryStringValue("loosePulleyCor"));
            //游轮名称
            queryModel.SourceName = Utils.InputText(Utils.GetQueryStringValue("loosePulleyName"));
            queryModel.StartTime  = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("periodStartTime"));
            queryModel.EndTime    = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("periodEndTime"));
            #endregion

            //预控BLL
            IList <MSourceSueShip> ls = new BSourceControl().GetListSueShip(pageIndex, pageSize, ref recordCount, queryModel);
            if (ls != null && ls.Count > 0)
            {
                pan_Msg.Visible     = false;
                rpt_list.DataSource = ls;
                rpt_list.DataBind();
                BindPage(pageSize, pageIndex, recordCount);
            }
            ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize;
        }
        /// <summary>
        /// 列表数据初始化
        /// </summary>
        /// <param name="searchModel"></param>
        private void ListDataInit(string provice, string city, string name, string tourid)
        {
            EyouSoft.Model.SourceStructure.MSourceSueShip Model   = new MSourceSueShip();
            EyouSoft.BLL.SourceStructure.BSourceControl   bsource = new BSourceControl();

            pageIndex = Utils.GetInt(Request.QueryString["Page"], 1);
            MSourceSueShipSearch mSourceShip = new MSourceSueShipSearch();

            mSourceShip.SourceName = name;
            mSourceShip.CompanyId  = this.SiteUserInfo.CompanyId;
            mSourceShip.ProvinceId = Utils.GetInt(provice);
            mSourceShip.CityId     = Utils.GetInt(city);
            IList <MSourceSueShip> list = bsource.GetListSueShip(pageIndex, pageSize, ref pageCount, tourid, this.SiteUserInfo.UserId, mSourceShip);

            if (list != null)
            {
                if (list.Count > 0)
                {
                    this.RepList.DataSource = list;
                    this.RepList.DataBind();
                    BindPage();
                }
                else
                {
                    //提示没有查询到数据
                    this.RepList.Controls.Add(new Label()
                    {
                        Text = "<tr><td colspan='6' align='center'>未找到相关游轮,建议您修改相关查询条件后再查询!</td></tr>"
                    });
                    ExporPageInfoSelect1.Visible = false;
                }
            }
            else
            {
                //提示没有查询到数据
                this.RepList.Controls.Add(new Label()
                {
                    Text = "<tr><td colspan='6' align='center'>未找到相关游轮,建议您修改相关查询条件后再查询!</td></tr>"
                });
                ExporPageInfoSelect1.Visible = false;
            }
        }
Example #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region 分页参数
            int pageSize    = 5;
            int pageIndex   = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);
            int recordCount = 0;
            #endregion
            IList <MSueUse>       ls = null;
            SourceControlCategory sourceControlCategory = (SourceControlCategory)Utils.GetInt(Utils.GetQueryStringValue("sourceControlCategory"));
            string sueid = Utils.GetQueryStringValue("sueId");
            switch (sourceControlCategory)
            {
            case SourceControlCategory.车辆:
                ls = new BSourceControl().GetCarUseList(CurrentUserCompanyID, sueid, pageIndex, pageSize, ref recordCount);
                break;

            case SourceControlCategory.酒店:
                ls = new BSourceControl().GetHotelUseList(sueid, CurrentUserCompanyID, pageIndex, pageSize, ref recordCount);
                break;

            case SourceControlCategory.游轮:
                ls = new BSourceControl().GetShipUseList(CurrentUserCompanyID, sueid, pageIndex, pageSize, ref recordCount);
                break;

            case SourceControlCategory.景点:
                ls = new BSourceControl().GetSightUseList(CurrentUserCompanyID, sueid, pageIndex, pageSize, ref recordCount);
                break;

            case SourceControlCategory.其他:
                ls = new BSourceControl().GetOtherUseList(CurrentUserCompanyID, sueid, pageIndex, pageSize, ref recordCount);
                break;
            }
            if (ls != null && ls.Count > 0)
            {
                pan_Msg.Visible     = false;
                rpt_list.DataSource = ls;
                rpt_list.DataBind();
                BindPage(pageSize, pageIndex, recordCount);
            }
            ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize;
        }
        /// <summary>
        /// 列表数据初始化
        /// </summary>
        /// <param name="searchModel"></param>
        private void ListDataInit(string provice, string city, string name, string tourid)
        {
            EyouSoft.BLL.SourceStructure.BSourceControl bsource = new BSourceControl();
            pageIndex = Utils.GetInt(Request.QueryString["Page"], 1);
            var ms = new MSourceSueSightSearch();

            ms.CompanyId  = this.SiteUserInfo.CompanyId;
            ms.OperatorId = this.SiteUserInfo.UserId;
            ms.SourceName = name;
            ms.ProvinceId = Utils.GetInt(provice);
            ms.CityId     = Utils.GetInt(city);
            ms.DistrictId = Utils.GetInt(Utils.GetQueryStringValue("area"));
            var list = bsource.GetListSueSight(pageIndex, this.pageSize, ref pageCount, tourid, this.SiteUserInfo.UserId, ms);

            if (list != null)
            {
                if (list.Count > 0)
                {
                    recordCount             = list.Count;
                    this.RepList.DataSource = list;
                    this.RepList.DataBind();
                    BindPage();
                }
                else
                {
                    this.RepList.Controls.Add(new Label()
                    {
                        Text = "<tr><td colspan='9' align='center'>未找到相关景点预控,建议您修改相关查询条件后再查询!</td></tr>"
                    });
                    ExporPageInfoSelect1.Visible = false;
                }
            }
            else
            {
                this.RepList.Controls.Add(new Label()
                {
                    Text = "<tr><td colspan='9' align='center'>未找到相关景点预控,建议您修改相关查询条件后再查询!</td></tr>"
                });
                ExporPageInfoSelect1.Visible = false;
            }
        }
Example #10
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit(int type, string id)
        {
            //获取分页参数并强转
            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);
            //实例化预控业务层
            BSourceControl bllBSourceControl = new BSourceControl();
            //实例化预控列表
            IList <MSueUse> list = null;
            MSueUse         a    = new MSueUse();

            #region 根据预控类型获取相应的预控使用列表
            switch ((SourceControlCategory)type)
            {
            case SourceControlCategory.车辆:
                list = bllBSourceControl.GetCarUseList(SiteUserInfo.CompanyId, id, pageIndex, pageSize, ref recordCount);
                if (list != null && list.Count > 0)
                {
                    if (list.Count <= pageSize)
                    {
                        this.ExporPageInfoSelect1.Visible = false;
                    }
                    this.rptList.DataSource = list;
                    this.rptList.DataBind();
                }
                else
                {
                    lblMsg.Text = "暂无数据";
                    this.ExporPageInfoSelect1.Visible = false;
                }
                list = null;
                break;

            case SourceControlCategory.酒店:
                list = bllBSourceControl.GetHotelUseList(id, SiteUserInfo.CompanyId, pageIndex, pageSize, ref recordCount);
                if (list != null && list.Count > 0)
                {
                    if (list.Count <= pageSize)
                    {
                        this.ExporPageInfoSelect1.Visible = false;
                    }
                    this.rptList.DataSource = list;
                    this.rptList.DataBind();
                }
                else
                {
                    lblMsg.Text = "暂无数据";
                    this.ExporPageInfoSelect1.Visible = false;
                }
                list = null;
                break;

            case SourceControlCategory.游轮:
                list = bllBSourceControl.GetShipUseList(SiteUserInfo.CompanyId, id, pageIndex, pageSize, ref recordCount);
                if (list != null && list.Count > 0)
                {
                    if (list.Count <= pageSize)
                    {
                        this.ExporPageInfoSelect1.Visible = false;
                    }
                    this.rptListShip.DataSource = list;
                    this.rptListShip.DataBind();
                }
                else
                {
                    lblMsg.Text = "暂无数据";
                    this.ExporPageInfoSelect1.Visible = false;
                }
                list = null;
                break;

            case SourceControlCategory.景点:
                list = bllBSourceControl.GetSightUseList(SiteUserInfo.CompanyId, id, pageIndex, pageSize, ref recordCount);
                if (list != null && list.Count > 0)
                {
                    if (list.Count <= pageSize)
                    {
                        this.ExporPageInfoSelect1.Visible = false;
                    }
                    this.rptList.DataSource = list;
                    this.rptList.DataBind();
                }
                else
                {
                    lblMsg.Text = "暂无数据";
                    this.ExporPageInfoSelect1.Visible = false;
                }
                list = null;
                break;

            case SourceControlCategory.其他:
                list = bllBSourceControl.GetOtherUseList(SiteUserInfo.CompanyId, id, pageIndex, pageSize, ref recordCount);
                if (list != null && list.Count > 0)
                {
                    if (list.Count <= pageSize)
                    {
                        this.ExporPageInfoSelect1.Visible = false;
                    }
                    this.rptList.DataSource = list;
                    this.rptList.DataBind();
                }
                else
                {
                    lblMsg.Text = "暂无数据";
                    this.ExporPageInfoSelect1.Visible = false;
                }
                list = null;
                break;

            default:
                break;
            }
            #endregion

            BindPage();
        }
Example #11
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        /// <param name="id">操作ID</param>
        protected void PageInit(SourceControlCategory sourceControlCategory)
        {
            string sourceId = Utils.GetQueryStringValue("sourceId");

            if (sourceId.Length > 0)
            {
                BSourceControl bll = new BSourceControl();
                switch (sourceControlCategory)
                {
                case SourceControlCategory.酒店:
                    //预控Model
                    MSourceSueHotel hotelModel = bll.GetModelByHotelId(sourceId, CurrentUserCompanyID);
                    if (hotelModel != null)
                    {
                        SetVal(
                            hotelModel.SourceName,                                     //酒店名称
                            hotelModel.RoomType,                                       //房型
                            hotelModel.ControlNum.ToString(),                          //预控数量
                            hotelModel.AlreadyNum.ToString(),                          //已使用数量
                            (hotelModel.ControlNum - hotelModel.AlreadyNum).ToString() //剩余数量
                            );
                    }
                    break;

                case SourceControlCategory.车辆:
                    //预控Model
                    MSourceSueCar carModel = bll.GetModelByCarId(sourceId, CurrentUserCompanyID);
                    if (carModel != null)
                    {
                        SetVal(
                            carModel.SourceName,                                   //车队名称
                            carModel.TypeName,                                     //车型
                            carModel.ControlNum.ToString(),                        //预控数量
                            carModel.AlreadyNum.ToString(),                        //已使用数量
                            (carModel.ControlNum - carModel.AlreadyNum).ToString() //剩余数量
                            );
                    }
                    break;

                case SourceControlCategory.游轮:
                    //预控Model
                    MSourceSueShip shipModel = bll.GetModelByShipId(sourceId, CurrentUserCompanyID);
                    if (shipModel != null)
                    {
                        SetVal(
                            shipModel.ShipCompany,                                   //游船公司名称
                            shipModel.ShipName,                                      //游船名称
                            shipModel.ControlNum.ToString(),                         //预控数量
                            shipModel.AlreadyNum.ToString(),                         //已使用数量
                            (shipModel.ControlNum - shipModel.AlreadyNum).ToString() //剩余数量
                            );
                    }
                    break;

                case SourceControlCategory.景点:
                    //预控Model
                    var sightModel = bll.GetModelBySightId(sourceId, CurrentUserCompanyID);
                    if (sightModel != null)
                    {
                        SetVal(
                            sightModel.SourceName,                                     //景点公司名称
                            sightModel.SpotName,                                       //景点名称
                            sightModel.ControlNum.ToString(),                          //预控数量
                            sightModel.AlreadyNum.ToString(),                          //已使用数量
                            (sightModel.ControlNum - sightModel.AlreadyNum).ToString() //剩余数量
                            );
                    }
                    break;

                case SourceControlCategory.其他:
                    //预控Model
                    var otherModel = bll.GetModelByOtherId(sourceId, CurrentUserCompanyID);
                    if (otherModel != null)
                    {
                        SetVal(
                            otherModel.SourceName,                                     //其他公司名称
                            otherModel.TypeName,                                       //支出项目名称
                            otherModel.ControlNum.ToString(),                          //预控数量
                            otherModel.AlreadyNum.ToString(),                          //已使用数量
                            (otherModel.ControlNum - otherModel.AlreadyNum).ToString() //剩余数量
                            );
                    }
                    break;
                }

                //预控变更记录
                IList <MSourceSueHotelChange> ls = bll.GetSourceSueChangeList(sourceId, sourceControlCategory);
                if (ls != null && ls.Count > 0)
                {
                    rpt_list.DataSource = ls;
                    rpt_list.DataBind();
                }
                else
                {
                    this.phdFr.Visible = false;
                }
            }
        }