Exemplo n.º 1
0
        /// <summary>
        /// init everyday tours
        /// </summary>
        void InitEverydayTours()
        {
            int pageIndex   = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetQueryStringValue("Page"), 1);
            int recordCount = 0;
            int pageSize    = 10;

            var items = new EyouSoft.BLL.TourStructure.TourEveryday().GetTourEverydays(Master.CompanyId, pageSize, pageIndex, ref recordCount, null);

            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;
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            toureveryday = new EyouSoft.Model.TourStructure.TourEverydayInfo();
            blltour      = new EyouSoft.BLL.TourStructure.TourEveryday(SiteUserInfo);

            if (!this.Page.IsPostBack)
            {
                //设置LoadVisitors1控件的CurrentPageIframeId属性
                LoadVisitors1.CurrentPageIframeId = Request.QueryString["iframeId"];

                BindPrices();
                BindCustomers();
                string tourid = EyouSoft.Common.Utils.GetQueryStringValue("tourid");
                if (!string.IsNullOrEmpty(tourid) && tourid != null)
                {
                    toureveryday = blltour.GetTourEverydayInfo(tourid);
                    if (toureveryday != null)
                    {
                        this.lit_RouteName.Text = toureveryday.RouteName;
                        url = getUrl(tourid, (int)toureveryday.ReleaseType) + "?tourId=" + tourid;
                    }
                    EyouSoft.Model.CompanyStructure.Area Area = new EyouSoft.BLL.CompanyStructure.Area().GetModel(toureveryday.AreaId);
                    if (Area != null)
                    {
                        this.lit_AreaName.Text = Area.AreaName;
                    }
                }
            }
        }
Exemplo n.º 3
0
        protected string customlevtypeprice(string tourid)
        {
            if (userModel != null && userModel.ID > 0)
            {
                return(BindPricesList(tourid, userModel.TourCompany.CustomerLevel));
            }
            else
            {
                System.Text.StringBuilder stringPrice = new System.Text.StringBuilder();
                stringPrice.Append("<tr bgcolor=\"#dfedfc\">");
                stringPrice.Append("<td height=\"20\" align=\"center\" width=\"40%\" bgcolor=\"#d0eafb\">报价标准</td>");
                stringPrice.Append("<td style=\"text-align:left\" width=\"60%\" bgcolor=\"#d0eafb\">价格</td>");

                EyouSoft.BLL.TourStructure.TourEveryday       bl    = new EyouSoft.BLL.TourStructure.TourEveryday(userModel);
                EyouSoft.Model.TourStructure.TourEverydayInfo model = new EyouSoft.Model.TourStructure.TourEverydayInfo();
                //散客天天发信息业务实体
                model = bl.GetTourEverydayInfo(tourid);
                //报价等级集合
                IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = model.PriceStandards;
                IList <EyouSoft.Model.CompanyStructure.CustomStand>        list      = new List <EyouSoft.Model.CompanyStructure.CustomStand>();
                EyouSoft.BLL.CompanyStructure.CompanyCustomStand           bll       = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();
                //根据公司编号获取客户等级信息
                if (userModel != null)
                {
                    list = bll.GetCustomStandByCompanyId(userModel.CompanyID);
                }
                else
                {
                    EyouSoft.Model.SysStructure.SystemDomain domain = new EyouSoft.BLL.SysStructure.SystemDomain().GetDomain(Request.Url.Host.ToLower());
                    if (domain != null)
                    {
                        list = bll.GetCustomStandByCompanyId(domain.CompanyId);
                    }
                }

                for (int i = 0; i < listStand.Count; i++)
                {
                    for (int j = 0; j < listStand[i].CustomerLevels.Count; j++)
                    {
                        if (listStand[i].CustomerLevels[j].LevelType == EyouSoft.Model.EnumType.CompanyStructure.CustomLevType.门市)
                        {
                            stringPrice.Append("<tr>");
                            stringPrice.AppendFormat("<td height=\"20\" width=\"50px\" align=\"center\" bgcolor=\"#f6fafd\">{0}&nbsp;&nbsp;</td>", listStand[i].StandardName);
                            stringPrice.Append("<td style=\"text-align:left\" bgcolor=\"#f6fafd\">");
                            stringPrice.AppendFormat("成人价:{0}&nbsp;&nbsp;<br/>", Utils.FilterEndOfTheZeroDecimal(listStand[i].CustomerLevels[j].AdultPrice));
                            stringPrice.AppendFormat("儿童价:{0}", Utils.FilterEndOfTheZeroDecimal(listStand[i].CustomerLevels[j].ChildrenPrice));
                            stringPrice.Append("</td></tr>");
                            break;
                        }
                    }
                }
                stringPrice.Append("</tr>");
                prices = stringPrice.ToString();
                return(prices);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// 绑定信息
        /// </summary>
        void BindInfo()
        {
            EyouSoft.BLL.TourStructure.TourEveryday bl = new EyouSoft.BLL.TourStructure.TourEveryday(SiteUserInfo);
            string tourId  = Utils.GetQueryStringValue("tourid");
            string ApplyId = Utils.GetQueryStringValue("ApplyId");

            EyouSoft.Model.TourStructure.TourEverydayInfo model = bl.GetTourEverydayInfo(tourId);

            #region 价格绑定
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = model.PriceStandards;

            IList <EyouSoft.Model.CompanyStructure.CustomStand> list = new List <EyouSoft.Model.CompanyStructure.CustomStand>();
            EyouSoft.BLL.CompanyStructure.CompanyCustomStand    bll  = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();

            list = bll.GetCustomStandByCompanyId(CurrentUserCompanyID);
            int kkk = list.Count;

            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> plist = model.PriceStandards;
            for (int i = 0; i < listStand.Count; i++)
            {
                for (int j = 0; j < list.Count; j++)
                {
                    //if(listStand[i].CustomerLevels[i].LevelId == list.sel)
                    if (listStand[i].CustomerLevels.Count > j)
                    {
                        var vn = list.Where(x => x.Id == listStand[i].CustomerLevels[j].LevelId).FirstOrDefault();
                        if (vn != null)
                        {
                            listStand[i].CustomerLevels[j].LevelName = vn.CustomStandName;
                        }
                        else
                        {
                            listStand[i].CustomerLevels.RemoveAt(j);
                        }
                    }
                    var xn = listStand[i].CustomerLevels.Where(x => x.LevelId == list[j].Id).FirstOrDefault();
                    if (xn == null)
                    {
                        listStand[i].CustomerLevels.Add(new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo()
                        {
                            LevelId = list[j].Id, LevelType = list[j].LevType, LevelName = list[j].CustomStandName, AdultPrice = 0, ChildrenPrice = 0
                        });
                    }
                }
            }
            sinfo = plist;
            #endregion
            hd_area.Value = model.AreaId.ToString();//线路区域
            EyouSoft.Model.TourStructure.TourEverydayApplyInfo applyModel = new EyouSoft.Model.TourStructure.TourEverydayApplyInfo();
            applyModel     = bl.GetTourEverydayApplyInfo(ApplyId);
            hd_Ldate.Value = applyModel.LDate.ToShortDateString();
            txt_ykrs.Value = applyModel.PeopleNumber.ToString();
            hd_num.Value   = applyModel.PeopleNumber.ToString();
        }
        /// <summary>
        /// 初始化游客信息列表
        /// </summary>
        protected void InitVisitorList()
        {
            EyouSoft.BLL.TourStructure.TourEveryday bl = new EyouSoft.BLL.TourStructure.TourEveryday(SiteUserInfo);
            EyouSoft.Model.TourStructure.TourEverydayApplyTravellerInfo applyModel = new EyouSoft.Model.TourStructure.TourEverydayApplyTravellerInfo();
            string tourId  = Utils.GetQueryStringValue("tourid");
            string ApplyId = Utils.GetQueryStringValue("ApplyId");

            applyModel = bl.GetTourEverydayApplyTravellerInfo(ApplyId);
            IList <EyouSoft.Model.TourStructure.TourOrderCustomer> list = applyModel.Travellers;

            rptVisitorList.DataSource = list.Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList();
            rptVisitorList.DataBind();
        }
Exemplo n.º 6
0
        /// <summary>
        /// 绑定列表
        /// </summary>
        void BindList()
        {
            EyouSoft.BLL.TourStructure.TourEveryday bll = new EyouSoft.BLL.TourStructure.TourEveryday(SiteUserInfo);
            int count = 0;
            IList <EyouSoft.Model.TourStructure.LBTourEverydayHandleInfo> list = bll.GetTourEverydayHandleApplys(CurrentUserCompanyID, Utils.GetQueryStringValue("tourid"), 20, EyouSoft.Common.Utils.GetInt(Request.QueryString["page"], 1), ref count);

            rpt_list.DataSource = list;
            rpt_list.DataBind();
            rpt_list.EmptyText             = "<tr class='even'><td colspan='8' align='center'>暂无记录!</td></tr>";
            ExportPageInfo1.intPageSize    = 20;
            ExportPageInfo1.intRecordCount = count;
            ExportPageInfo1.PageLinkURL    = Request.Path + "?";
            ExportPageInfo1.UrlParams      = Request.QueryString;
            ExportPageInfo1.CurrencyPage   = EyouSoft.Common.Utils.GetInt(Request.QueryString["page"], 1);
        }
        /// <summary>
        /// 初始化线路信息
        /// </summary>
        protected void InitRouteInfo()
        {
            EyouSoft.BLL.TourStructure.TourEveryday bl = new EyouSoft.BLL.TourStructure.TourEveryday(SiteUserInfo);
            string tourId  = Utils.GetQueryStringValue("tourid");
            string ApplyId = Utils.GetQueryStringValue("ApplyId");

            EyouSoft.Model.TourStructure.TourEverydayInfo model = bl.GetTourEverydayInfo(tourId);
            if (model == null)
            {
                Response.Clear();
                Response.Write("未找到信息");
                Response.End();
            }

            ltrRouteName.Text = model.RouteName;
            ltrDays.Text      = model.TourDays.ToString();
        }
Exemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //实例化实体类和业务逻辑类
            TourEverydaybll  = new EyouSoft.BLL.TourStructure.TourEveryday(SiteUserInfo, false);
            TourEverydayinfo = new EyouSoft.Model.TourStructure.TourEverydayInfo();

            if (!this.Page.IsPostBack)
            {
                #region 定义变量接收参数
                //线路名称
                string RouteName = Utils.GetQueryStringValue("RouteName");
                //初始化查询条件
                if (RouteName != null && RouteName != "")
                {
                    this.RouteName.Value = RouteName;
                }
                #endregion
                Bindlist(RouteName);
            }
        }
Exemplo n.º 9
0
        protected void BindPrices()
        {
            EyouSoft.BLL.TourStructure.TourEveryday       bl    = new EyouSoft.BLL.TourStructure.TourEveryday(SiteUserInfo);
            EyouSoft.Model.TourStructure.TourEverydayInfo model = new EyouSoft.Model.TourStructure.TourEverydayInfo();
            model = bl.GetTourEverydayInfo(Request.QueryString["tourid"]);
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = model.PriceStandards;
            IList <EyouSoft.Model.CompanyStructure.CustomStand>        list      = new List <EyouSoft.Model.CompanyStructure.CustomStand>();

            EyouSoft.BLL.CompanyStructure.CompanyCustomStand bll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();
            list = bll.GetCustomStandByCompanyId(SiteUserInfo.CompanyID);
            int kkk = list.Count;
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> plist = model.PriceStandards;

            for (int i = 0; i < listStand.Count; i++)
            {
                for (int j = 0; j < list.Count; j++)
                {
                    if (listStand[i].CustomerLevels.Count > j)
                    {
                        var vn = list.Where(x => x.Id == listStand[i].CustomerLevels[j].LevelId).FirstOrDefault();
                        if (vn != null)
                        {
                            listStand[i].CustomerLevels[j].LevelName = vn.CustomStandName;
                        }
                        else
                        {
                            listStand[i].CustomerLevels.RemoveAt(j);
                        }
                    }
                    var xn = listStand[i].CustomerLevels.Where(x => x.LevelId == list[j].Id).FirstOrDefault();
                    if (xn == null)
                    {
                        listStand[i].CustomerLevels.Add(new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo()
                        {
                            LevelId = list[j].Id, LevelType = list[j].LevType, LevelName = list[j].CustomStandName, AdultPrice = 0, ChildrenPrice = 0
                        });
                    }
                }
            }
            sinfo = plist;
        }
Exemplo n.º 10
0
        protected string BindPricesList(string Tourid, int CustomerLevel)
        {
            System.Text.StringBuilder stringPrice               = new System.Text.StringBuilder();
            EyouSoft.BLL.TourStructure.TourEveryday       bl    = new EyouSoft.BLL.TourStructure.TourEveryday(userModel);
            EyouSoft.Model.TourStructure.TourEverydayInfo model = new EyouSoft.Model.TourStructure.TourEverydayInfo();
            //散客天天发信息业务实体
            model = bl.GetTourEverydayInfo(Tourid);
            //报价等级集合
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = model.PriceStandards;
            IList <EyouSoft.Model.CompanyStructure.CustomStand>        list      = new List <EyouSoft.Model.CompanyStructure.CustomStand>();

            EyouSoft.BLL.CompanyStructure.CompanyCustomStand bll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();
            //根据公司编号获取客户等级信息
            list = bll.GetCustomStandByCompanyId(userModel.CompanyID);
            stringPrice.Append("<tr bgcolor=\"#dfedfc\">");
            stringPrice.Append("<td height=\"20\" align=\"center\" width=\"40%\" bgcolor=\"#d0eafb\">报价标准</td>");
            stringPrice.Append("<td style=\"text-align:left\" width=\"60%\" bgcolor=\"#d0eafb\">价格</td>");
            for (int i = 0; i < listStand.Count; i++)
            {
                for (int j = 0; j < listStand[i].CustomerLevels.Count; j++)
                {
                    if (listStand[i].CustomerLevels[j].LevelId == CustomerLevel)
                    {
                        stringPrice.Append("<tr>");
                        stringPrice.AppendFormat("<td height=\"20\" width=\"50px\" align=\"center\" bgcolor=\"#f6fafd\">{0}&nbsp;&nbsp;</td>", listStand[i].StandardName);
                        stringPrice.Append("<td style=\"text-align:left\" bgcolor=\"#f6fafd\">");
                        stringPrice.AppendFormat("成人价:{0}&nbsp;&nbsp;<br/>", Utils.FilterEndOfTheZeroDecimal(listStand[i].CustomerLevels[j].AdultPrice));
                        stringPrice.AppendFormat("儿童价:{0}", Utils.FilterEndOfTheZeroDecimal(listStand[i].CustomerLevels[j].ChildrenPrice));
                        stringPrice.Append("</td></tr>");
                        break;
                    }
                }
            }
            stringPrice.Append("</tr>");
            prices = stringPrice.ToString();
            return(prices);
        }
Exemplo n.º 11
0
        /// <summary>
        /// 提交数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lbtn_save_Click(object sender, EventArgs e)
        {
            #region 获取基础数据
            EyouSoft.BLL.TourStructure.TourEveryday       bll   = new EyouSoft.BLL.TourStructure.TourEveryday(SiteUserInfo);
            EyouSoft.Model.TourStructure.TourEverydayInfo model = new EyouSoft.Model.TourStructure.TourEverydayInfo();
            model.AreaId     = Utils.GetInt(Utils.GetFormValue(ddl_area.UniqueID));
            model.CompanyId  = CurrentUserCompanyID;
            model.CreateTime = DateTime.Now;
            model.OperatorId = SiteUserInfo.ID;
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> pricelist = new List <EyouSoft.Model.TourStructure.TourPriceStandardInfo>();

            IList <EyouSoft.Model.CompanyStructure.CustomStand> listcus = new List <EyouSoft.Model.CompanyStructure.CustomStand>();
            EyouSoft.BLL.CompanyStructure.CompanyCustomStand    bllCom  = new CompanyCustomStand();
            listcus = bllCom.GetCustomStandByCompanyId(CurrentUserCompanyID);

            int kkk = listcus.Count;
            for (int k = 0; k < Utils.GetFormValues("ddl_price").Length; k++)
            {
                EyouSoft.Model.TourStructure.TourPriceStandardInfo price = new EyouSoft.Model.TourStructure.TourPriceStandardInfo();
                price.StandardId = Utils.GetInt(Utils.GetFormValues("ddl_price")[k].Split('|')[0]);
                if (price.StandardId == 0)
                {
                    continue;
                }
                price.StandardName = Utils.GetFormValues("ddl_price")[k].Split('|')[1];
                IList <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> listLevels = new List <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo>();


                string[] crPrice = Utils.GetFormValues("txt_cr_price");


                for (int i = 0; i < kkk; i++)
                {
                    EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo level = new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo();
                    level.AdultPrice    = Utils.GetDecimal(Utils.GetFormValues("txt_cr_price")[i + kkk * k]);
                    level.ChildrenPrice = Utils.GetDecimal(Utils.GetFormValues("txt_rt_price")[i + kkk * k]);
                    level.LevelType     = EyouSoft.Model.EnumType.CompanyStructure.CustomLevType.其他;
                    level.LevelName     = Utils.GetFormValues("hd_cusStandName")[i];
                    level.LevelId       = Utils.GetInt(Utils.GetFormValues("hd_cusStandId")[i]);
                    if (level.LevelId == 0)
                    {
                        continue;
                    }
                    listLevels.Add(level);
                }
                price.CustomerLevels = listLevels;
                pricelist.Add(price);
            }
            IList <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> levelList = new List <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo>();
            model.PriceStandards = pricelist;

            model.ReleaseType = EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal;
            model.RouteId     = Utils.GetInt(selectXl.Id);
            model.RouteName   = selectXl.Name;
            model.TourDays    = Utils.GetInt(Utils.GetFormValue(txt_Days.UniqueID));
            EyouSoft.Model.TourStructure.TourNormalPrivateInfo privateInfo = new EyouSoft.Model.TourStructure.TourNormalPrivateInfo();
            privateInfo.BuHanXiangMu  = Utils.GetFormValue(txt_noProject.UniqueID);
            privateInfo.ErTongAnPai   = Utils.GetFormValue(txt_child.UniqueID);
            privateInfo.GouWuAnPai    = Utils.GetFormValue(txt_buy.UniqueID);
            privateInfo.NeiBuXingXi   = Utils.GetFormValue(txt_nbinfo.UniqueID);
            privateInfo.Plans         = xingcheng1.GetValues();
            privateInfo.Services      = ConProjectControl1.GetDataList();
            privateInfo.WenXinTiXing  = Utils.GetFormValue(txt_Reminded.UniqueID);
            privateInfo.ZhuYiShiXiang = Utils.GetFormValue(txt_Note.UniqueID);
            privateInfo.ZiFeiXIangMu  = Utils.GetFormValue(txt_owner.UniqueID);
            model.TourNormalInfo      = privateInfo;

            #region 附件

            IList <EyouSoft.Model.TourStructure.TourAttachInfo> listAttachs = new List <EyouSoft.Model.TourStructure.TourAttachInfo>();
            EyouSoft.Model.TourStructure.TourAttachInfo         attInfo     = new EyouSoft.Model.TourStructure.TourAttachInfo();
            string fileAtt    = "";
            string oldfileAtt = "";
            if (EyouSoft.Common.Function.UploadFile.FileUpLoad(FileUpload1.PostedFile, "dayDayPublish", out fileAtt, out oldfileAtt))
            {
                attInfo.FilePath = fileAtt;
            }
            else
            {
                EyouSoft.Common.Function.MessageBox.Show(this.Page, "上传附件失败!");
                return;
            }
            if (attInfo.FilePath.Length < 1)
            {
                attInfo.FilePath = hd_img.Value;
            }
            listAttachs.Add(attInfo);
            model.Attachs = listAttachs;
            #endregion
            #endregion
            #region 数据库修改或添加
            if (Request.QueryString["act"] == "update")
            {
                model.TourId = Utils.GetQueryStringValue("id");
                int i = bll.UpdateTourEverydayInfo(model);
                if (i > 0)
                {
                    EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this.Page, "修改成功!", "DaydayPublish.aspx");
                }
                else
                {
                    EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this.Page, "修改失败!", Request.Url.ToString());
                }
            }
            else
            {
                int i = bll.InsertTourEverydayInfo(model);
                if (i > 0)
                {
                    EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this.Page, "添加成功!", "DaydayPublish.aspx");
                }
                else
                {
                    EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this.Page, "添加失败!", Request.Url.ToString());
                }
            }
            #endregion
        }
Exemplo n.º 12
0
        protected string getPeoPlePrice(string Tourid)
        {
            string Prices = "";

            EyouSoft.BLL.TourStructure.TourEveryday       bl    = new EyouSoft.BLL.TourStructure.TourEveryday(userModel);
            EyouSoft.Model.TourStructure.TourEverydayInfo model = new EyouSoft.Model.TourStructure.TourEverydayInfo();
            //散客天天发信息业务实体
            model = bl.GetTourEverydayInfo(Tourid);
            //报价等级集合
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = model.PriceStandards;
            IList <EyouSoft.Model.CompanyStructure.CustomStand>        list      = new List <EyouSoft.Model.CompanyStructure.CustomStand>();

            EyouSoft.BLL.CompanyStructure.CompanyCustomStand bll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();
            //根据公司编号获取客户等级信息
            if (userModel != null)
            {
                list = bll.GetCustomStandByCompanyId(userModel.CompanyID);
            }
            else
            {
                EyouSoft.Model.SysStructure.SystemDomain domain = new EyouSoft.BLL.SysStructure.SystemDomain().GetDomain(Request.Url.Host.ToLower());
                if (domain != null)
                {
                    list = bll.GetCustomStandByCompanyId(domain.CompanyId);
                }
            }

            #region 登录状态
            if (userModel != null && userModel.ID > 0)
            {
                if (listStand != null && listStand.Count > 0)
                {
                    for (int i = 0; i < listStand.Count; i++)
                    {
                        if (listStand[0].CustomerLevels != null)
                        {
                            for (int j = 0; j < listStand[0].CustomerLevels.Count; j++)
                            {
                                if (listStand[0].CustomerLevels[j].LevelId == userModel.TourCompany.CustomerLevel)
                                {
                                    Prices = Utils.FilterEndOfTheZeroString(listStand[0].CustomerLevels[j].AdultPrice.ToString("0.00")) + "/" + Utils.FilterEndOfTheZeroString(listStand[0].CustomerLevels[j].ChildrenPrice.ToString("0.00"));
                                    break;
                                }
                                else
                                {
                                    Prices = "";
                                }
                            }
                        }
                    }
                }
            }
            #endregion

            #region 未登录
            if (userModel == null)
            {
                for (int i = 0; i < listStand.Count; i++)
                {
                    if (listStand[i].CustomerLevels != null)
                    {
                        for (int j = 0; j < listStand[i].CustomerLevels.Count; j++)
                        {
                            if (listStand[i].CustomerLevels[j].LevelType == EyouSoft.Model.EnumType.CompanyStructure.CustomLevType.门市)
                            {
                                Prices = Utils.FilterEndOfTheZeroString(listStand[i].CustomerLevels[j].AdultPrice.ToString("0.00")) + "/" + Utils.FilterEndOfTheZeroString(listStand[i].CustomerLevels[j].ChildrenPrice.ToString("0.00"));
                            }
                        }
                    }
                }
            }
            #endregion

            return(Prices);
        }
Exemplo n.º 13
0
        /// <summary>
        /// 生成计划
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            EyouSoft.Model.TourStructure.TourInfo   info = new EyouSoft.Model.TourStructure.TourInfo();
            EyouSoft.BLL.TourStructure.TourEveryday bl   = new EyouSoft.BLL.TourStructure.TourEveryday(SiteUserInfo);
            #region 基础数据获取
            string tourId  = Utils.GetQueryStringValue("tourid");
            string ApplyId = Utils.GetQueryStringValue("ApplyId");
            EyouSoft.Model.TourStructure.TourEverydayInfo      model      = bl.GetTourEverydayInfo(tourId);
            EyouSoft.Model.TourStructure.TourEverydayApplyInfo applyModel = new EyouSoft.Model.TourStructure.TourEverydayApplyInfo();
            applyModel   = bl.GetTourEverydayApplyInfo(ApplyId);
            info.AreaId  = model.AreaId;
            info.Attachs = model.Attachs;
            #region 子团
            IList <EyouSoft.Model.TourStructure.TourChildrenInfo> childlist = new
                                                                              List <EyouSoft.Model.TourStructure.TourChildrenInfo>();
            string tourcode = Utils.GetFormValue("txt_tuanhao");
            if (tourcode.Trim().Length == 0)
            {
                EyouSoft.Common.Function.MessageBox.Show(this, "团号不能为空");
                BindInfo();
                return;
            }
            childlist.Add(new EyouSoft.Model.TourStructure.TourChildrenInfo()
            {
                LDate = applyModel.LDate, TourCode = tourcode
            });
            info.Childrens = childlist;
            #endregion
            info.CompanyId   = CurrentUserCompanyID;
            info.Coordinator = new EyouSoft.Model.TourStructure.TourCoordinatorInfo()
            {
                CoordinatorId = Utils.GetInt(Utils.GetFormValue("sel_oprator"))
            };
            info.CreateRule = new EyouSoft.Model.TourStructure.TourCreateRuleInfo()
            {
                Cycle = null, EDate = null, Rule = EyouSoft.Model.EnumType.TourStructure.CreateTourRule.日期, SDate = applyModel.LDate
            };
            info.CreateTime       = DateTime.Now;
            info.Gather           = Utils.GetFormValue("txt_jhfs");
            info.GatheringPlace   = Utils.GetFormValue("txt_jhdd");
            info.GatheringSign    = Utils.GetFormValue("txt_jhbz");
            info.GatheringTime    = Utils.GetFormValue("txt_jhdate");
            info.LDate            = applyModel.LDate;
            info.LTraffic         = Utils.GetFormValue("txt_qcDate");
            info.OperatorId       = SiteUserInfo.ID;
            info.ORouteId         = model.RouteId;
            info.PlanPeopleNumber = Utils.GetInt(Utils.GetFormValue("txt_ykrs"));
            info.PriceStandards   = model.PriceStandards;
            //info.RDate
            info.ReleaseType = EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal;
            info.RouteId     = model.RouteId;
            info.RouteName   = model.RouteName;
            info.RTraffic    = Utils.GetFormValue("txt_hcDate");
            //info.SellerId
            //info.SellerName

            List <EyouSoft.Model.TourStructure.TourSentPeopleInfo> sentpepole = new List <EyouSoft.Model.TourStructure.TourSentPeopleInfo>();
            string[] strOperId = SelectgroupPepole.OperId.Split(',');
            for (int i = 0; i < strOperId.Length; i++)
            {
                EyouSoft.Model.TourStructure.TourSentPeopleInfo sent = new EyouSoft.Model.TourStructure.TourSentPeopleInfo();
                sent.OperatorId   = Utils.GetInt(strOperId[i]);
                sent.OperatorName = SelectgroupPepole.OperName.Split(',')[i];
                sentpepole.Add(sent);
            }
            info.SentPeoples  = sentpepole;
            info.Status       = EyouSoft.Model.EnumType.TourStructure.TourStatus.正在收客;
            info.TicketStatus = EyouSoft.Model.EnumType.PlanStructure.TicketState.None;
            info.TourCode     = Utils.GetFormValue("txt_tuanhao");
            info.TourDays     = model.TourDays;
            //info.TourId
            info.TourNormalInfo = new EyouSoft.Model.TourStructure.TourNormalPrivateInfo()
            {
                BuHanXiangMu = model.TourNormalInfo.BuHanXiangMu, ErTongAnPai = model.TourNormalInfo.ErTongAnPai, GouWuAnPai = model.TourNormalInfo.GouWuAnPai, NeiBuXingXi = model.TourNormalInfo.NeiBuXingXi, Plans = model.TourNormalInfo.Plans, Services = model.TourNormalInfo.Services, WenXinTiXing = model.TourNormalInfo.WenXinTiXing, ZhuYiShiXiang = model.TourNormalInfo.ZhuYiShiXiang, ZiFeiXIangMu = model.TourNormalInfo.ZiFeiXIangMu
            };
            info.TourType            = EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划;
            info.VirtualPeopleNumber = 0;
            #endregion
            int j = bl.BuildTour(info, tourId, ApplyId);
            if (j > 0)
            {
                Response.Write("<script>alert('生成计划成功!');parent.location.href=parent.location.href;</script>");
                BindInfo();
            }
            else
            {
                EyouSoft.Common.Function.MessageBox.Show(this, "生成失败");
                BindInfo();
            }
        }
Exemplo n.º 14
0
        /// <summary>
        /// 提交数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            EyouSoft.BLL.TourStructure.TourEveryday       bll   = new EyouSoft.BLL.TourStructure.TourEveryday(SiteUserInfo);
            EyouSoft.Model.TourStructure.TourEverydayInfo model = new EyouSoft.Model.TourStructure.TourEverydayInfo();
            #region 基础数据
            model.AreaId     = Utils.GetInt(Utils.GetFormValue(ddl_area.UniqueID));
            model.CompanyId  = CurrentUserCompanyID;
            model.CreateTime = DateTime.Now;
            model.OperatorId = SiteUserInfo.ID;
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> pricelist = new List <EyouSoft.Model.TourStructure.TourPriceStandardInfo>();

            IList <EyouSoft.Model.CompanyStructure.CustomStand> listcus = new List <EyouSoft.Model.CompanyStructure.CustomStand>();
            EyouSoft.BLL.CompanyStructure.CompanyCustomStand    bllCom  = new CompanyCustomStand();
            listcus = bllCom.GetCustomStandByCompanyId(CurrentUserCompanyID);

            int      kkk       = listcus.Count;
            string[] ddl_price = Utils.GetFormValues("ddl_price");
            for (int k = 0; k < ddl_price.Length; k++)
            {
                EyouSoft.Model.TourStructure.TourPriceStandardInfo price = new EyouSoft.Model.TourStructure.TourPriceStandardInfo();
                price.StandardId = Utils.GetInt(ddl_price[k].Split('|')[0]);

                if (ddl_price[k] == "" || price.StandardId == 0)
                {
                    continue;
                }
                price.StandardName = Utils.GetFormValues("ddl_price")[k].Split('|')[1];
                IList <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> listLevels = new List <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo>();


                string[] crPrice = Utils.GetFormValues("txt_cr_price");

                for (int i = 0; i < kkk; i++)
                {
                    EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo level = new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo();
                    level.AdultPrice    = Utils.GetDecimal(Utils.GetFormValues("txt_cr_price")[i + kkk * k]);
                    level.ChildrenPrice = Utils.GetDecimal(Utils.GetFormValues("txt_rt_price")[i + kkk * k]);
                    level.LevelType     = EyouSoft.Model.EnumType.CompanyStructure.CustomLevType.其他;
                    level.LevelName     = Utils.GetFormValues("hd_cusStandName")[i];
                    level.LevelId       = Utils.GetInt(Utils.GetFormValues("hd_cusStandId")[i]);
                    if (level.LevelId == 0)
                    {
                        continue;
                    }
                    listLevels.Add(level);
                }
                price.CustomerLevels = listLevels;
                pricelist.Add(price);
            }
            IList <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> levelList = new List <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo>();
            model.PriceStandards = pricelist;

            model.ReleaseType = EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick;
            model.RouteId     = Utils.GetInt(selectXl.Id);
            model.RouteName   = selectXl.Name;
            model.TourDays    = Utils.GetInt(Utils.GetFormValue(txt_Days.UniqueID));
            EyouSoft.Model.TourStructure.TourQuickPrivateInfo privateInfo = new EyouSoft.Model.TourStructure.TourQuickPrivateInfo();
            privateInfo.QuickPlan = Utils.GetFormValue(txt_xinchen.UniqueID);
            privateInfo.Remark    = Utils.GetFormValue(txt_remark.UniqueID);
            privateInfo.Service   = Utils.GetFormValue(txt_fuwu.UniqueID);
            model.TourQuickInfo   = privateInfo;

            #region 附件

            IList <EyouSoft.Model.TourStructure.TourAttachInfo> listAttachs = new List <EyouSoft.Model.TourStructure.TourAttachInfo>();
            EyouSoft.Model.TourStructure.TourAttachInfo         attInfo     = new EyouSoft.Model.TourStructure.TourAttachInfo();
            string fileAtt    = "";
            string oldfileAtt = "";
            if (EyouSoft.Common.Function.UploadFile.FileUpLoad(FileUpload1.PostedFile, "sanping", out fileAtt, out oldfileAtt))
            {
                attInfo.FilePath = fileAtt;
            }
            else
            {
                EyouSoft.Common.Function.MessageBox.Show(this.Page, "上传附件失败!");
                return;
            }
            if (attInfo.FilePath.Length < 1)
            {
                attInfo.FilePath = hd_img.Value;
            }
            listAttachs.Add(attInfo);

            model.Attachs = listAttachs;
            #endregion
            #endregion
            #region 数据库操作
            if (Request.QueryString["act"] == "update")
            {
                model.TourId = Utils.GetQueryStringValue("id");
                int i = bll.UpdateTourEverydayInfo(model);
                if (i > 0)
                {
                    EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this.Page, "修改成功!", "DaydayPublish.aspx");
                }
                else
                {
                    EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this.Page, "修改失败!", Request.Url.ToString());
                }
            }
            else
            {
                int i = bll.InsertTourEverydayInfo(model);
                if (i > 0)
                {
                    EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this.Page, "添加成功!", "DaydayPublish.aspx");
                }
                else
                {
                    EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this.Page, "添加失败!", Request.Url.ToString());
                }
            }
            #endregion
        }
Exemplo n.º 15
0
        /// <summary>
        /// 修改绑定信息
        /// </summary>
        /// <param name="id"></param>
        void BindAllInfo(string id)
        {
            EyouSoft.BLL.TourStructure.TourEveryday       bl    = new EyouSoft.BLL.TourStructure.TourEveryday(SiteUserInfo);
            EyouSoft.Model.TourStructure.TourEverydayInfo model = new EyouSoft.Model.TourStructure.TourEverydayInfo();
            model = bl.GetTourEverydayInfo(id);
            ddl_area.SelectedItem.Selected = false;
            ddl_area.Items.FindByValue(model.AreaId.ToString()).Selected = true;
            selectXl.Name = model.RouteName;
            selectXl.Id   = model.RouteId.ToString();
            selectXl.Bind();
            txt_Days.Text = model.TourDays.ToString();
            if (model.TourQuickInfo != null)
            {
                txt_xinchen.Text = model.TourQuickInfo.QuickPlan;
                txt_fuwu.Text    = model.TourQuickInfo.Service;
                txt_remark.Text  = model.TourQuickInfo.Remark;
            }

            #region 附件
            if (model.Attachs.Count > 0)
            {
                if (model.Attachs[0].FilePath.Length > 1)
                {
                    pnlFile.Visible         = true;
                    hypFilePath.NavigateUrl = model.Attachs[0].FilePath;
                    hd_img.Value            = model.Attachs[0].FilePath;
                }
            }
            #endregion
            #region 价格绑定
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = model.PriceStandards;


            IList <EyouSoft.Model.CompanyStructure.CustomStand> list = new List <EyouSoft.Model.CompanyStructure.CustomStand>();
            EyouSoft.BLL.CompanyStructure.CompanyCustomStand    bll  = new CompanyCustomStand();

            list = bll.GetCustomStandByCompanyId(CurrentUserCompanyID);
            int kkk = list.Count;
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> plist = model.PriceStandards;
            for (int i = 0; i < listStand.Count; i++)
            {
                for (int j = 0; j < list.Count; j++)
                {
                    //if(listStand[i].CustomerLevels[i].LevelId == list.sel)
                    if (listStand[i].CustomerLevels.Count > j)
                    {
                        var vn = list.Where(x => x.Id == listStand[i].CustomerLevels[j].LevelId).FirstOrDefault();
                        if (vn != null)
                        {
                            listStand[i].CustomerLevels[j].LevelName = vn.CustomStandName;
                        }
                        else
                        {
                            listStand[i].CustomerLevels[i].LevelId = 0;
                        }
                        //listStand[i].CustomerLevels.RemoveAt(j);
                    }
                    var xn = listStand[i].CustomerLevels.Where(x => x.LevelId == list[j].Id).FirstOrDefault();
                    if (xn == null)
                    {
                        listStand[i].CustomerLevels.Add(new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo()
                        {
                            LevelId = list[j].Id, LevelType = list[j].LevType, LevelName = list[j].CustomStandName, AdultPrice = 0, ChildrenPrice = 0
                        });
                    }
                }
            }
            sinfo = plist;
            #endregion
        }
Exemplo n.º 16
0
        /// <summary>
        /// 生成计划
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            EyouSoft.Model.TourStructure.TourInfo   info = new EyouSoft.Model.TourStructure.TourInfo();
            EyouSoft.BLL.TourStructure.TourEveryday bl   = new EyouSoft.BLL.TourStructure.TourEveryday(SiteUserInfo);
            #region 基础数据
            string tourId  = Utils.GetQueryStringValue("tourid");
            string ApplyId = Utils.GetQueryStringValue("ApplyId");
            EyouSoft.Model.TourStructure.TourEverydayInfo      model      = bl.GetTourEverydayInfo(tourId);
            EyouSoft.Model.TourStructure.TourEverydayApplyInfo applyModel = new EyouSoft.Model.TourStructure.TourEverydayApplyInfo();
            applyModel   = bl.GetTourEverydayApplyInfo(ApplyId);
            info.AreaId  = model.AreaId;
            info.Attachs = model.Attachs;

            string tourcode = Utils.GetFormValue("txt_tuanhao");
            if (tourcode.Trim().Length == 0)
            {
                EyouSoft.Common.Function.MessageBox.Show(this, "团号不能为空!");
                BindInfo();
                return;
            }
            #region 子团
            IList <EyouSoft.Model.TourStructure.TourChildrenInfo> childlist = new
                                                                              List <EyouSoft.Model.TourStructure.TourChildrenInfo>();
            childlist.Add(new EyouSoft.Model.TourStructure.TourChildrenInfo()
            {
                LDate = applyModel.LDate, TourCode = tourcode
            });
            info.Childrens = childlist;
            #endregion
            info.CompanyId   = CurrentUserCompanyID;
            info.Coordinator = new EyouSoft.Model.TourStructure.TourCoordinatorInfo()
            {
                CoordinatorId = Utils.GetInt(Utils.GetFormValue("sel_oprator"))
            };
            info.CreateRule = new EyouSoft.Model.TourStructure.TourCreateRuleInfo()
            {
                Cycle = null, EDate = null, Rule = EyouSoft.Model.EnumType.TourStructure.CreateTourRule.日期, SDate = applyModel.LDate
            };
            info.CreateTime       = DateTime.Now;
            info.Gather           = Utils.GetFormValue("txt_jhfs");
            info.GatheringPlace   = Utils.GetFormValue("txt_jhdd");
            info.GatheringSign    = Utils.GetFormValue("txt_jhbz");
            info.GatheringTime    = Utils.GetFormValue("txt_jhdate");
            info.LDate            = applyModel.LDate;
            info.LTraffic         = Utils.GetFormValue("txt_qcDate");
            info.OperatorId       = SiteUserInfo.ID;
            info.ORouteId         = model.RouteId;
            info.PlanPeopleNumber = Utils.GetInt(Utils.GetFormValue("txt_ykrs"));
            info.PriceStandards   = model.PriceStandards;
            //info.RDate
            info.ReleaseType = EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick;
            info.RouteId     = model.RouteId;
            info.RouteName   = model.RouteName;
            info.RTraffic    = Utils.GetFormValue("txt_hcDate");
            //info.SellerId
            //info.SellerName

            info.Status       = EyouSoft.Model.EnumType.TourStructure.TourStatus.正在收客;
            info.TicketStatus = EyouSoft.Model.EnumType.PlanStructure.TicketState.None;
            info.TourCode     = Utils.GetFormValue("txt_tuanhao");
            info.TourDays     = model.TourDays;
            //info.TourId
            info.TourQuickInfo = new EyouSoft.Model.TourStructure.TourQuickPrivateInfo()
            {
                QuickPlan = model.TourQuickInfo.QuickPlan, Remark = model.TourQuickInfo.Remark, Service = model.TourQuickInfo.Service
            };
            info.TourType            = EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划;
            info.VirtualPeopleNumber = 0;
            #endregion
            int j = bl.BuildTour(info, tourId, ApplyId);
            if (j > 0)
            {
                Response.Write("<script>alert('生成计划成功!');parent.location.href=parent.location.href;</script>");
                BindInfo();
            }
            else
            {
                EyouSoft.Common.Function.MessageBox.Show(this, "生成失败");
                BindInfo();
            }
        }
Exemplo n.º 17
0
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            //散客天天发申请
            EyouSoft.Model.TourStructure.TourEverydayApplyInfo TourEverydayApplyInfo = new EyouSoft.Model.TourStructure.TourEverydayApplyInfo();
            EyouSoft.BLL.TourStructure.TourEveryday            tourbll = new EyouSoft.BLL.TourStructure.TourEveryday();
            //散拼天天发业务逻辑和实体类
            string TourId = Utils.GetQueryStringValue("tourId");

            toureveryday = blltour.GetTourEverydayInfo(TourId);
            if (TourId != null && TourId != "")
            {
                if (toureveryday != null)
                {
                    TourEverydayApplyInfo.CompanyId = toureveryday.CompanyId;
                }
            }
            TourEverydayApplyInfo.TourId             = Utils.GetQueryStringValue("tourId");
            TourEverydayApplyInfo.OperatorId         = SiteUserInfo.ID;
            TourEverydayApplyInfo.AdultNumber        = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetFormValue("TxtAdultPrice"));
            TourEverydayApplyInfo.ApplyCompanyId     = SiteUserInfo.TourCompany.TourCompanyId;
            TourEverydayApplyInfo.ApplyId            = SiteUserInfo.ID.ToString();
            TourEverydayApplyInfo.ApplyTime          = System.DateTime.Now;
            TourEverydayApplyInfo.ChildrenNumber     = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetFormValue("TxtChildrenPrice"));
            TourEverydayApplyInfo.HandleStatus       = EyouSoft.Model.EnumType.TourStructure.TourEverydayHandleStatus.未处理;
            TourEverydayApplyInfo.LDate              = EyouSoft.Common.Utils.GetDateTime(EyouSoft.Common.Utils.GetFormValue("TxtSartTime"));
            TourEverydayApplyInfo.LevelId            = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetFormValue(this.hd_LevelID.UniqueID));
            TourEverydayApplyInfo.StandardId         = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetFormValue(this.hd_PriceStandId.UniqueID));
            TourEverydayApplyInfo.SpecialRequirement = EyouSoft.Common.Utils.GetFormValue("txt_Special");

            #region
            TourEverydayApplyInfo.Traveller = new EyouSoft.Model.TourStructure.TourEverydayApplyTravellerInfo();
            TourEverydayApplyInfo.Traveller.TravellerDisplayType = EyouSoft.Model.EnumType.TourStructure.CustomerDisplayType.附件方式;
            #region 游客附件信息
            EyouSoft.Model.TourStructure.TourAttachInfo Attachinfo = new EyouSoft.Model.TourStructure.TourAttachInfo();
            string fileAtt         = string.Empty;
            string oldfileAtt      = string.Empty;
            string VisitorInfoFile = "/uploadFiles/zutuanFile/";
            if (EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files["fuiLoadAttachment"], VisitorInfoFile, out fileAtt, out oldfileAtt))
            {
                if (fileAtt.Trim() != "" && oldfileAtt.Trim() != "")
                {
                    TourEverydayApplyInfo.Traveller.TravellerFilePath = fileAtt;
                }
            }
            else
            {
                EyouSoft.Common.Function.MessageBox.Show(this.Page, "上传附件失败!");
                return;
            }
            #endregion
            TourEverydayApplyInfo.Traveller.Travellers = new List <EyouSoft.Model.TourStructure.TourOrderCustomer>();
            //获取所有的游客姓名
            string[] cus_arr = Utils.GetFormValues("txtVisitorName");
            //获取特服信息
            string[] uri        = Utils.GetFormValues("tefu");
            string[] cardType   = Utils.GetFormValues("ddlCardType");
            decimal  orderprice = 0;
            for (int k = 0; k < cus_arr.Length; k++)
            {
                if (Utils.GetFormValues("txtVisitorName")[k] == "")
                {
                    break;
                }
                //订单游客信息实体
                EyouSoft.Model.TourStructure.TourOrderCustomer item = new EyouSoft.Model.TourStructure.TourOrderCustomer();

                item.VisitorName = Utils.GetFormValues("txtVisitorName")[k];
                //游客类型
                item.VisitorType = Utils.GetFormValues("ddlVisitorType")[k] == "1" ? EyouSoft.Model.EnumType.TourStructure.VisitorType.成人 : EyouSoft.Model.EnumType.TourStructure.VisitorType.儿童;
                #region 游客证件类型
                //switch (Utils.GetFormValues("ddlCardType")[k])
                //{
                //    case "1":
                //        {
                //            item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.身份证;
                //        } break;
                //    case "2":
                //        {
                //            item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.护照;
                //        } break;
                //    case "3":
                //        {
                //            item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.军官证;
                //        } break;
                //    case "4":
                //        {
                //            item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.台胞证;
                //        } break;
                //    case "5":
                //        {
                //            item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.港澳通行证;
                //        } break;
                //    default:
                //        {
                //            item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.未知;
                //        } break;
                //}
                #endregion
                item.CradType = (EyouSoft.Model.EnumType.TourStructure.CradType)Utils.GetInt(cardType[k]);
                //游客证件号码
                item.CradNumber = Utils.GetFormValues("txtCardNo")[k];
                #region 游客性别
                switch (Utils.GetFormValues("ddlSex")[k])
                {
                case "2":
                {
                    item.Sex = EyouSoft.Model.EnumType.CompanyStructure.Sex.男;
                } break;

                case "1":
                {
                    item.Sex = EyouSoft.Model.EnumType.CompanyStructure.Sex.女;
                } break;

                default:
                {
                    item.Sex = EyouSoft.Model.EnumType.CompanyStructure.Sex.未知;
                } break;
                }
                #endregion

                //游客联系电话
                item.ContactTel = Utils.GetFormValues("txtContactTel")[k];

                //游客特服信息实体类
                EyouSoft.Model.TourStructure.CustomerSpecialService css = new EyouSoft.Model.TourStructure.CustomerSpecialService();
                //特服费用
                css.Fee = Utils.GetDecimal(Utils.GetFromQueryStringByKey(uri[k], "txtCost"));
                //增加费用还是减少费用
                css.IsAdd     = Utils.GetFromQueryStringByKey(uri[k], "ddlOperate") == "0" ? true : false;
                css.IssueTime = DateTime.Now;
                //项目
                css.ProjectName = Utils.GetFromQueryStringByKey(uri[k], "txtItem");
                //服务内容
                css.ServiceDetail = Utils.GetFromQueryStringByKey(uri[k], "txtServiceContent");
                //游客特服信息
                item.SpecialServiceInfo = css;
                item.IssueTime          = DateTime.Now;
                item.CompanyID          = SiteUserInfo.CompanyID;

                //游客所有的信息添加到订单
                TourEverydayApplyInfo.Traveller.Travellers.Add(item);
                orderprice += Utils.GetDecimal(Utils.GetFromQueryStringByKey(uri[k], "txtCost"));
            }
            #endregion

            int result = tourbll.ApplyTourEveryday(TourEverydayApplyInfo);
            if (result > 0)
            {
                Response.Write("<script>alert('提交成功');parent.Boxy.getIframeDialog('" + Request.QueryString["iframeid"] + "').hide()</script>");
            }
            else
            {
                Response.Write("<script>alert('提交失败!');location.href=location.href;</script>");
            }
        }
Exemplo n.º 18
0
        /// <summary>
        /// 页面初始化方法
        /// </summary>
        /// <param name="travelId">行程单ID</param>
        protected void DataInit(string travelId)
        {
            //声明bll对象
            EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(null, false);
            //声明团队计划对象
            EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(travelId);
            if (model != null)
            {
                //线路名称
                this.lblAreaName.Text = model.RouteName;
                //团号
                this.lblTeamNum.Text     = model.TourCode;
                this.lblTeamNum.Visible  = true;
                this.txttourcode.Visible = false;
                //天数
                this.lblDay.Text = model.TourDays.ToString();
                //成人数
                this.lblAdult.Text    = model.PlanPeopleNumber.ToString();
                this.lblAdult.Visible = true;
                this.TXTADULT.Visible = false;
                //儿童数
                this.lblChild.Visible = true;
                this.TXTCHILD.Visible = false;
                //出发交通
                this.lblBegin.Text    = model.LTraffic;
                this.lblBegin.Visible = true;
                this.TXtBEGIN.Visible = false;
                //返程交通
                this.lblEnd.Text    = model.RTraffic;
                this.lblEnd.Visible = true;
                this.TXTEnd.Visible = false;
                //行程安排
                this.litTravel.Text = model.TourQuickInfo.QuickPlan;
                //服务标准
                this.litService.Text = model.TourQuickInfo.Service;
                //地接社信息
                this.rptDjInfo.DataSource = model.LocalAgencys;
                this.rptDjInfo.DataBind();
                this.pnedij.Visible = true;
            }

            //组团散客天天发行程单
            if (EyouSoft.Common.Utils.GetQueryStringValue("action") == "tourevery")
            {
                string tourid = Utils.GetQueryStringValue("tourid");
                EyouSoft.BLL.TourStructure.TourEveryday       everybl    = new EyouSoft.BLL.TourStructure.TourEveryday(null, false);
                EyouSoft.Model.TourStructure.TourEverydayInfo everymodel = new EyouSoft.Model.TourStructure.TourEverydayInfo();
                everymodel = everybl.GetTourEverydayInfo(tourid);
                if (everymodel != null)
                {
                    //线路名称
                    this.lblAreaName.Text = everymodel.RouteName;
                    //团号
                    this.lblTeamNum.Visible  = false;
                    this.txttourcode.Visible = true;
                    //天数
                    this.lblDay.Text = everymodel.TourDays.ToString();
                    //成人数
                    this.lblAdult.Visible = false;
                    this.TXTADULT.Visible = true;
                    this.TXTADULT.Attributes.Add("style", "width:30px;");
                    //儿童数
                    this.lblChild.Visible = false;
                    this.TXTCHILD.Visible = true;
                    //出发交通
                    this.lblBegin.Visible = false;
                    this.TXtBEGIN.Visible = true;
                    //返程交通
                    this.lblEnd.Visible = false;
                    this.TXTEnd.Visible = true;

                    //行程安排
                    this.litTravel.Text = everymodel.TourQuickInfo.QuickPlan;
                    //服务标准
                    this.litService.Text = everymodel.TourQuickInfo.Service;
                    //地接社信息
                    this.pnedij.Visible = false;
                }
            }
        }
Exemplo n.º 19
0
        /// <summary>
        /// 页面初始化方法
        /// </summary>
        /// <param name="travelId">行程单ID</param>
        protected void DataInit(string tourId)
        {
            //声明bll对象
            EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(null, false);
            //声明团队计划对象
            EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(tourId);
            if (model != null && model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
            {
                //出团日期
                LeaveDate = model.LDate;
                //旅游天数
                lblDayCount.Text = model.TourDays.ToString();
                #region 页面控件赋值
                //线路名称
                this.lblAreaName.Text = model.RouteName;
                //团号
                this.lblTeamNum.Text     = model.TourCode;
                this.lblTeamNum.Visible  = true;
                this.txttourcode.Visible = false;
                //人数
                this.lblAdult.Text    = model.PlanPeopleNumber.ToString();
                this.lblAdult.Visible = true;
                this.TXTADULT.Visible = false;
                //出发交通
                this.lblBegin.Text    = model.LTraffic;
                this.lblBegin.Visible = true;
                this.TXtBEGIN.Visible = false;
                //返程交通
                this.lblEnd.Text    = model.RTraffic;
                this.lblEnd.Visible = true;
                this.TXTEnd.Visible = false;
                if (model.TourNormalInfo != null)
                {
                    //不含项目
                    this.lblNoProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu);
                    //购物安排
                    this.lblBuy.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai);
                    //儿童安排
                    this.lblChildPlan.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ErTongAnPai);
                    //自费项目
                    this.lblSelfProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZiFeiXIangMu);
                    //注意事项
                    this.lblNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang);
                    //温馨提示
                    this.lblTips.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.WenXinTiXing);
                    //行程安排
                    this.rptTravel.DataSource = model.TourNormalInfo.Plans;
                    this.rptTravel.DataBind();
                    //包含项目
                    if (model.TourNormalInfo.Services != null)
                    {
                        tdCount = model.TourNormalInfo.Services.Count * 2;
                    }
                    this.rptProject.DataSource = model.TourNormalInfo.Services;
                    this.rptProject.DataBind();
                }
                //地接社信息
                this.rptDjInfo.DataSource = model.LocalAgencys;
                this.rptDjInfo.DataBind();
                this.Panel1.Visible = true;
                #endregion
            }

            //组团散客天天发行程单
            if (EyouSoft.Common.Utils.GetQueryStringValue("action") == "tourevery")
            {
                string tourid = Utils.GetQueryStringValue("tourid");
                EyouSoft.BLL.TourStructure.TourEveryday       everybl    = new EyouSoft.BLL.TourStructure.TourEveryday(null, false);
                EyouSoft.Model.TourStructure.TourEverydayInfo everymodel = new EyouSoft.Model.TourStructure.TourEverydayInfo();
                everymodel = everybl.GetTourEverydayInfo(tourid);
                if (everymodel != null)
                {
                    //线路名称
                    this.lblAreaName.Text = everymodel.RouteName;
                    //团号
                    this.lblTeamNum.Visible  = false;
                    this.txttourcode.Visible = true;
                    //天数
                    this.lblDayCount.Text = everymodel.TourDays.ToString();
                    //成人数
                    this.lblAdult.Visible = false;
                    this.TXTADULT.Attributes.Add("style", "width:30px;");
                    //儿童数

                    //出发交通
                    this.lblBegin.Visible = false;
                    //返程交通
                    this.lblEnd.Visible = false;
                    if (everymodel.TourNormalInfo != null)
                    {
                        //不含项目
                        this.lblNoProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.BuHanXiangMu);
                        //购物安排
                        this.lblBuy.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.GouWuAnPai);
                        //儿童安排
                        this.lblChildPlan.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.ErTongAnPai);
                        //自费项目
                        this.lblSelfProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.ZiFeiXIangMu);
                        //注意事项
                        this.lblNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.ZhuYiShiXiang);
                        //温馨提示
                        this.lblTips.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.WenXinTiXing);
                        //行程安排
                        this.rptTravel.DataSource = everymodel.TourNormalInfo.Plans;
                        this.rptTravel.DataBind();
                        //包含项目
                        if (everymodel.TourNormalInfo.Services != null)
                        {
                            tdCount = everymodel.TourNormalInfo.Services.Count * 2;
                        }
                        this.rptProject.DataSource = everymodel.TourNormalInfo.Services;
                        this.rptProject.DataBind();
                    }

                    //地接社信息
                    this.Panel1.Visible = false;
                }
            }
        }
Exemplo n.º 20
0
        /// <summary>
        /// 绑定所有信息    用于修改或复制
        /// </summary>
        /// <returns></returns>
        void BindAllInfo(string id)
        {
            selectXl.Id   = "1";
            selectXl.Name = "";
            selectXl.Bind();
            EyouSoft.BLL.TourStructure.TourEveryday       bl    = new EyouSoft.BLL.TourStructure.TourEveryday(SiteUserInfo);
            EyouSoft.Model.TourStructure.TourEverydayInfo model = new EyouSoft.Model.TourStructure.TourEverydayInfo();
            model = bl.GetTourEverydayInfo(id);

            #region 价格绑定
            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = model.PriceStandards;

            IList <EyouSoft.Model.CompanyStructure.CustomStand> list = new List <EyouSoft.Model.CompanyStructure.CustomStand>();
            EyouSoft.BLL.CompanyStructure.CompanyCustomStand    bll  = new CompanyCustomStand();

            list = bll.GetCustomStandByCompanyId(CurrentUserCompanyID);
            int kkk = list.Count;

            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> plist = model.PriceStandards;
            for (int i = 0; i < listStand.Count; i++)
            {
                for (int j = 0; j < list.Count; j++)
                {
                    //if(listStand[i].CustomerLevels[i].LevelId == list.sel)
                    if (listStand[i].CustomerLevels.Count > j)
                    {
                        var vn = list.Where(x => x.Id == listStand[i].CustomerLevels[j].LevelId).FirstOrDefault();
                        if (vn != null)
                        {
                            listStand[i].CustomerLevels[j].LevelName = vn.CustomStandName;
                        }
                        else
                        {
                            listStand[i].CustomerLevels[j].LevelId = 0;
                        }
                        //listStand[i].CustomerLevels.RemoveAt(j);
                    }
                    var xn = listStand[i].CustomerLevels.Where(x => x.LevelId == list[j].Id).FirstOrDefault();
                    if (xn == null)
                    {
                        listStand[i].CustomerLevels.Add(new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo()
                        {
                            LevelId = list[j].Id, LevelType = list[j].LevType, LevelName = list[j].CustomStandName, AdultPrice = 0, ChildrenPrice = 0
                        });
                    }
                }
            }
            sinfo = plist;
            #endregion
            #region 基础数据绑定
            //行程
            List <EyouSoft.Model.TourStructure.TourPlanInfo> planInfo = model.TourNormalInfo.Plans.ToList();
            xingcheng1.Bind(planInfo);
            selectXl.Id   = model.RouteId.ToString();
            selectXl.Name = model.RouteName;
            selectXl.Bind();
            ddl_area.SelectedItem.Selected = false;
            ddl_area.Items.FindByValue(model.AreaId.ToString()).Selected = true;
            txt_Days.Text = model.TourDays.ToString();
            ConProjectControl1.SetList = model.TourNormalInfo.Services;
            txt_noProject.Value        = model.TourNormalInfo.BuHanXiangMu;
            txt_buy.Value      = model.TourNormalInfo.GouWuAnPai;
            txt_owner.Value    = model.TourNormalInfo.ZiFeiXIangMu;
            txt_child.Value    = model.TourNormalInfo.ErTongAnPai;
            txt_Note.Value     = model.TourNormalInfo.ZhuYiShiXiang;
            txt_Reminded.Value = model.TourNormalInfo.WenXinTiXing;
            txt_nbinfo.Value   = model.TourNormalInfo.NeiBuXingXi;
            //附件
            if (model.Attachs.Count > 0)
            {
                if (model.Attachs[0].FilePath.Length > 1)
                {
                    pnlFile.Visible         = true;
                    hypFilePath.NavigateUrl = model.Attachs[0].FilePath;
                    hd_img.Value            = model.Attachs[0].FilePath;
                }
            }
            #endregion
        }