예제 #1
0
        /// <summary>
        ///保存
        /// </summary>
        void BaoCun()
        {
            var gj         = Utils.GetFormValues("ddlguoji");
            var jg         = Utils.GetFormValues("zhanchuang");
            var id         = Utils.GetFormValues("hidid");
            var chuanzhiid = Utils.GetQueryStringValue("id");
            var hx         = Utils.GetFormValues("ddlhangxian");
            var ls         = new List <EyouSoft.Model.YlStructure.MChuanZhiBasePrice>();

            if (id != null && id.Length > 0)
            {
                for (int i = 0; i < id.Length; i++)
                {
                    ls.Add(new EyouSoft.Model.YlStructure.MChuanZhiBasePrice()
                    {
                        Id = !string.IsNullOrEmpty(id[i]) ? id[i] : Guid.NewGuid().ToString(), ChuanZhiId = chuanzhiid, CountryId = Utils.GetInt(gj[i]), BasePrice = Utils.GetDecimal(jg[i]), HangXianId = Utils.GetInt(hx[i])
                    });
                }
            }
            var r = new BLL.YlStructure.BJiChuXinXi().BasePrice(chuanzhiid, ls);

            if (r > 0)
            {
                RCWE(UtilsCommons.AjaxReturnJson("1", "保存成功"));
            }
            else
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "保存失败"));
            }
        }
예제 #2
0
        /// <summary>
        /// 获取设施附件
        /// </summary>
        /// <param name="fangxingId"></param>
        /// <returns></returns>
        protected string GetChuanZhiSheShiFujian(string chuanzhiId)
        {
            var s = new StringBuilder();
            var l = new BLL.YlStructure.BJiChuXinXi().GetChuanZhiSheShis(chuanzhiId);

            s.Append("<div class=\"user_boxy ship_boxy\">");
            s.Append("   <a href=\"javascript:;\" onclick=\"closeZZ()\" class=\"close_btn\"><em>X</em>关闭</a>");
            s.Append("   <div class=\"R_area\">");
            s.Append("					<div class=\"big_img\">");
            s.Append("					  <span class=\"big_jtL\"></span>");
            s.Append("					  <span class=\"big_jtR\"></span>");
            s.Append("					<a href=\"#\"><img src=\"../images/pic01.jpg\" width=\"450\" height=\"278\" /><p class=\"title\">卧室</p></a></div>");
            s.Append("					<div class=\"small_img\">");
            s.Append("					  <span class=\"small_jtL\"></span>");
            s.Append("					  <span class=\"small_jtR\"></span>");
            s.Append("					  <ul>");
            if (l != null && l.Count > 0)
            {
                foreach (var m in l)
                {
                    s.AppendFormat("							 <li><a href=\"javascript:;\"><img src=\"{0}\" /><p class=\"title\">{1}</p></a></li>", EyouSoft.YlWeb.TuPian.F1(Utils.GetErpFilepath() + m.Filepath, 968, 500), m.MingCheng);
                }
            }
            s.Append("					  </ul>");
            s.Append("					  <div class=\"clear\"></div>");
            s.Append("					</div>");
            s.Append("   </div>");
            s.Append("</div>");

            return(s.ToString());
        }
예제 #3
0
        protected string GetJiChuXX(object xinxiid)
        {
            var m = new BLL.YlStructure.BJiChuXinXi().GetJiChuXinXiInfo(Common.Utils.GetInt(xinxiid.ToString()));

            if (m != null)
            {
                return(m.MingCheng);
            }
            return(string.Empty);
        }
예제 #4
0
        /// <summary>
        ///获取航线
        /// </summary>
        /// <returns></returns>
        protected string GetHangXian()
        {
            var m = new BLL.YlStructure.BJiChuXinXi().GetJiChuXinXiInfo(HangXianId);

            if (m != null)
            {
                return(m.MingCheng);
            }
            return(string.Empty);
        }
예제 #5
0
        /// <summary>
        /// 国籍初始化
        /// </summary>
        void InitGuoJi()
        {
            var l = new BLL.YlStructure.BJiChuXinXi().GetJiChuXinXis(this.HuiYuanInfo.CompanyId, new Model.YlStructure.MJiChuXinXiChaXunInfo()
            {
                LeiXing = Model.EnumType.YlStructure.JiChuXinXiLeiXing.国籍
            });

            this.ddlGuoJi.DataTextField  = "MingCheng";
            this.ddlGuoJi.DataValueField = "XinXiId";
            this.ddlGuoJi.DataSource     = l; this.ddlGuoJi.DataBind();
            this.ddlGuoJi.Items.Insert(0, new ListItem("--请选择--", "0"));
        }
예제 #6
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        void InitData()
        {
            //航线初始化
            var l = new BLL.YlStructure.BJiChuXinXi().GetJiChuXinXis(YuMingInfo.CompanyId, new EyouSoft.Model.YlStructure.MJiChuXinXiChaXunInfo()
            {
                LeiXing = Model.EnumType.YlStructure.JiChuXinXiLeiXing.航线, YouLunLeiXing = Model.EnumType.YlStructure.YouLunLeiXing.长江游轮
            });

            if (l != null && l.Count > 0)
            {
                HangXianId             = Common.Utils.GetInt(Common.Utils.GetQueryStringValue("x"), l[0].XinXiId);
                rptHangXian.DataSource = l;
                rptHangXian.DataBind();
            }
        }
예제 #7
0
파일: map.aspx.cs 프로젝트: windygu/XiaZhou
 protected void rptxl_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemIndex != -1)
     {
         var rptxld  = (Repeater)e.Item.FindControl("rptxld");
         var xilieid = DataBinder.Eval(e.Item.DataItem, "xilieid");
         var l       = new BLL.YlStructure.BJiChuXinXi().GetChuanZhis(YuMingInfo.CompanyId, new Model.YlStructure.MChuanZhiChaXunInfo()
         {
             XiLieId = xilieid.ToString()
         });
         if (l != null && l.Count > 0)
         {
             rptxld.DataSource = l;
             rptxld.DataBind();
         }
     }
 }
예제 #8
0
        /// <summary>
        /// 获取航线系列船只
        /// </summary>
        /// <param name="mingcheng"></param>
        /// <param name="xielieid"></param>
        /// <returns></returns>
        protected string GetChuanZhis(object mingcheng, object xielieid)
        {
            var s = new StringBuilder();
            var l = new BLL.YlStructure.BJiChuXinXi().GetChuanZhis(YuMingInfo.CompanyId, new MChuanZhiChaXunInfo()
            {
                XiLieId = xielieid.ToString()
            });

            if (l != null && l.Count > 0)
            {
                foreach (var m in l)
                {
                    s.AppendFormat("   <dd><a title=\"{2}\" href=\"/Hangqi/chaxun.aspx?lx={0}&xl={1}&cz={3}&cn={2}\">{2}</a></dd>", (int)YouLunLeiXing, xielieid, m.MingCheng, m.ChuanZhiId);
                }
            }

            return(s.ToString());
        }
예제 #9
0
        /// <summary>
        /// 航线重构
        /// </summary>
        /// <param name="l"></param>
        /// <returns></returns>
        private IList <MYouLunHangXian> GetYouLunHangXian(IList <EyouSoft.Model.YlStructure.MJiChuXinXiInfo> l)
        {
            var lst = new List <MYouLunHangXian>();

            if (l != null && l.Count > 0)
            {
                var b = new BLL.YlStructure.BJiChuXinXi();
                //var ls = l.Select(m => m.PXinXiId).Distinct().ToList();
                //if (ls != null && ls.Count > 0)
                //{
                //    foreach (int m in ls)
                //    {
                //        var mdl = b.GetJiChuXinXiInfo(m);
                //        lst.Add(new MYouLunHangXian() { BieMing = mdl != null && !string.IsNullOrEmpty(mdl.BieMing) ? mdl.BieMing : string.Empty, YouLunHangXians = l.Where(mm => mm.PXinXiId == m).ToList() });
                //    }
                //}
                var ls = b.GetJiChuXinXis(YuMingInfo.CompanyId, new MJiChuXinXiChaXunInfo()
                {
                    LeiXing = Model.EnumType.YlStructure.JiChuXinXiLeiXing.港口, YouLunLeiXing = YouLunLeiXing
                });
                if (ls != null && ls.Count > 0)
                {
                    foreach (var m in ls)
                    {
                        if (!string.IsNullOrEmpty(m.BieMing))
                        {
                            lst.Add(new MYouLunHangXian()
                            {
                                BieMing = m.BieMing, YouLunHangXians = l.Where(mm => mm.PXinXiId == m.XinXiId).ToList()
                            });
                        }
                    }
                }
                ls = l.Where(mm => mm.PXinXiId == 0).ToList();
                if (ls != null && ls.Count > 0)
                {
                    lst.Add(new MYouLunHangXian()
                    {
                        BieMing = string.Empty, YouLunHangXians = ls
                    });
                }
            }
            return(lst);
        }
예제 #10
0
        /// <summary>
        /// 根据游轮类型获取港口别名选择列表
        /// </summary>
        /// <param name="youlunleixing"></param>
        /// <returns></returns>
        protected string GetGangKouBieMingDDL(Model.EnumType.YlStructure.YouLunLeiXing youlunleixing)
        {
            var s = new System.Text.StringBuilder("<option value=\"0\">请选择</option>");
            var l = new BLL.YlStructure.BJiChuXinXi().GetJiChuXinXis(SiteUserInfo.CompanyId, new EyouSoft.Model.YlStructure.MJiChuXinXiChaXunInfo()
            {
                LeiXing = Model.EnumType.YlStructure.JiChuXinXiLeiXing.港口, YouLunLeiXing = youlunleixing
            });

            if (l != null && l.Count > 0)
            {
                foreach (var m in l)
                {
                    if (!string.IsNullOrEmpty(m.BieMing))
                    {
                        s.AppendFormat("<option value=\"{0}\" {2}>{1}</option>", m.XinXiId, m.BieMing, m.XinXiId == PXinXiId?"selected=\"selected\"":"");
                    }
                }
            }
            return(s.ToString());
        }
예제 #11
0
파일: map.aspx.cs 프로젝트: windygu/XiaZhou
        void InitPage()
        {
            var b  = new BLL.YlStructure.BJiChuXinXi();
            var xl = b.GetXiLies(YuMingInfo.CompanyId, new Model.YlStructure.MXiLieChaXunInfo()
            {
                GongSiLeiXing = EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing.长江游轮
            });

            if (xl != null && xl.Count > 0)
            {
                rptxl.DataSource = xl; rptxl.DataBind();
            }
            var gs = b.GetGongSis(YuMingInfo.CompanyId, new Model.YlStructure.MGongSiChaXunInfo()
            {
                GongSiLeiXing = Model.EnumType.YlStructure.YouLunLeiXing.海洋邮轮
            });

            if (gs != null && gs.Count > 0)
            {
                rptgs.DataSource = gs; rptgs.DataBind();
            }
        }
예제 #12
0
        /// <summary>
        /// 获取航期表
        /// </summary>
        /// <returns></returns>
        protected string GetHangQi()
        {
            var sb = new System.Text.StringBuilder();                                           //航期表
            var st = new System.Text.StringBuilder();                                           //船只信息
            var d  = Common.Utils.GetDateTime(Year + "-" + Month + "-1");                       //当前月第一天
            var w  = (int)d.DayOfWeek;                                                          //当前月第一天星期几
            var f  = d.AddDays(-w);                                                             //起始日期
            var t  = d.AddMonths(1).AddDays(6 - (DateTime.DaysInMonth(Year, Month) + w) % 7);   //结束日期
            var s  = string.Empty;                                                              //td样式
            var b  = string.Empty;                                                              //tr样式
            var bl = new BLL.YlStructure.BJiChuXinXi();

            System.Collections.Generic.IList <EyouSoft.Model.YlStructure.MChuanZhiInfo> l = null;

            sb.AppendFormat("<div class=\"font24 hq_yellow\" style=\"text-align:center;\"><strong>{0}年{1}月  {2}</strong></div>", Year, Month, GetHangXian());
            sb.Append("<div class=\"hq_side02\">");
            sb.Append("     <div class=\"hq_rilibox\">");
            sb.Append("       <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
            sb.Append("         <tr class=\"headbg\">");
            sb.Append("           <td>周日</td>");
            sb.Append("           <td>周一</td>");
            sb.Append("           <td>周二</td>");
            sb.Append("           <td>周三</td>");
            sb.Append("           <td>周四</td>");
            sb.Append("           <td>周五</td>");
            sb.Append("           <td class=\"noborderR\">周六</td>");
            sb.Append("         </tr>");
            //从起始日期到结束日期循环
            for (var c = f; c <= t; c = c.AddDays(1))
            {
                //判断是否星期六设置td样式
                if (c.DayOfWeek == DayOfWeek.Saturday)
                {
                    s = " class=\"noborderR\"";
                }
                else
                {
                    s = string.Empty;
                }
                //判断是否最后七天设置tr样式
                if ((t - c).TotalDays <= 7)
                {
                    b = "bg02 noborderB";
                }
                else
                {
                    b = "bg02";
                }
                //判断是否当前年当前月
                if (c.Year == Year && c.Month == Month)
                {
                    //航期日历
                    if (c.DayOfWeek == DayOfWeek.Sunday)
                    {
                        sb.Append("<tr class=\"bg01\">");
                    }
                    sb.AppendFormat("  <td{0}>{1}</td>", s, string.Format("{0:00}", c.Day));
                    if (c.DayOfWeek == DayOfWeek.Saturday)
                    {
                        sb.Append("</tr>");
                    }
                    //航期船只信息
                    if (c.DayOfWeek == DayOfWeek.Sunday)
                    {
                        st.AppendFormat("<tr class=\"{0}\">", b);
                    }
                    st.AppendFormat("  <td{0}>", s);
                    //获取当天航期的船只信息
                    l = bl.GetChuanZhiInfo(YuMingInfo.CompanyId, c, HangXianId);
                    if (l != null && l.Count > 0)
                    {
                        st.Append("    <ul>");
                        foreach (var m in l)
                        {
                            if (!String.IsNullOrEmpty(m.RiQiId))
                            {
                                m.RiQiId = "/" + m.RiQiId;
                            }
                            switch (m.YouLunLeiXing)
                            {
                            case EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing.长江游轮:
                                st.AppendFormat("        <li><a target=\"_blank\" href=\"/hangqi/{1}{2}.html\">{0}</a></li>", m.MingCheng, m.HangQiId, m.RiQiId);
                                break;

                            case EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing.海洋邮轮:
                                st.AppendFormat("        <li><a target=\"_blank\" href=\"/hangqi/HY{1}{2}.html\">{0}</a></li>", m.MingCheng, m.HangQiId, m.RiQiId);
                                break;
                            }
                        }
                        st.Append("    </ul>");
                    }
                    st.Append("  </td>");
                    if (c.DayOfWeek == DayOfWeek.Saturday)
                    {
                        st.Append("</tr>");
                    }
                }
                else
                {
                    //航期日历
                    if (c.DayOfWeek == DayOfWeek.Sunday)
                    {
                        sb.Append("<tr class=\"bg01\">");
                    }
                    sb.AppendFormat("  <td{0}></td>", s);
                    if (c.DayOfWeek == DayOfWeek.Saturday)
                    {
                        sb.Append("</tr>");
                    }
                    //航期船只信息
                    if (c.DayOfWeek == DayOfWeek.Sunday)
                    {
                        st.AppendFormat("<tr class=\"{0}\">", b);
                    }
                    st.AppendFormat("  <td{0}>", s);
                    st.Append("  </td>");
                    if (c.DayOfWeek == DayOfWeek.Saturday)
                    {
                        st.Append("</tr>");
                    }
                }
                //判断是否星期六
                if (c.DayOfWeek == DayOfWeek.Saturday)
                {
                    //以一周为单位合并日历和船只
                    sb.Append(st);
                    //清空一周船只信息
                    st.Remove(0, st.Length);
                }
            }
            sb.Append("       </table>");
            sb.Append("     </div>");
            sb.Append(" </div>");

            return(sb.ToString());
        }