Пример #1
0
        /// <summary>
        ///左侧列表
        /// </summary>
        /// <param name="chineseName">中文名称</param>
        /// <param name="englishName">英文名称</param>
        /// <returns></returns>
        public ActionResult Danger(string chineseName, string englishName)
        {
            BLL.Knowledge.Danger danger = new BLL.Knowledge.Danger();

            //radio框的值
            string type = Request.QueryString["type"];

            this.ViewData["type"] = type == null?"1":type;

            IList <TDanger> cot = danger.GetDanger(chineseName, englishName);

            this.ViewData["danger"] = cot;

            //给详细内容传递的id
            if (cot.Count != 0)
            {
                this.ViewData["id"] = cot[0].序号;
            }
            else
            {
                this.ViewData["id"] = "1";
            }

            return(View());
        }
Пример #2
0
        /// <summary>
        /// 右侧详细内容
        /// </summary>
        /// <param name="id">化学危险品序号</param>
        /// <returns></returns>
        public ActionResult DangerDetail(string id)
        {
            BLL.Knowledge.Danger danger = new BLL.Knowledge.Danger();

            if (id != null)
            {
                TDanger cot = danger.GetDangerById(id);

                this.ViewData["danger"]                   = cot;
                this.ViewData["Character"]                = cot.性状;
                this.ViewData["Taboo"]                    = cot.禁忌;
                this.ViewData["Synonym"]                  = cot.义词;
                this.ViewData["Fatalness"]                = cot.危险性;
                this.ViewData["FirstAidMeasure"]          = cot.急救措施;
                this.ViewData["PreventMeasure"]           = cot.防护措施;
                this.ViewData["Store"]                    = cot.储存;
                this.ViewData["LeakOutDisposal"]          = cot.泄露处理;
                this.ViewData["TransportDemand"]          = cot.运输要求;
                this.ViewData["Postscript"]               = cot.附注;
                this.ViewData["LimitAndMensurateInAir"]   = cot.空气中的允许极限及测定;
                this.ViewData["LimitAndMensurateInWater"] = cot.水中的允许极限及测定;
            }
            return(View());
        }