예제 #1
0
        public ActionResult Map()
        {
            string    sql = string.Format("select t.itemname,t.itemvalue,t.itemcode from base_dataitem d join BASE_DATAITEMDETAIL t on d.itemid=t.itemid  where d.itemcode='KmConfigure' order by t.sortcode asc");
            DataTable dt  = new DepartmentBLL().GetDataTable(sql);

            if (dt.Rows.Count > 1)
            {                                                 //可门配置信息
                TimeSpan t = DateTime.Now - DateTime.Parse(dt.Rows[0][2].ToString());
                ViewBag.SafeDay   = t.Days + 1;               //安全天数
                ViewBag.Account   = dt.Rows[1][1].ToString(); //模拟登录账号
                ViewBag.weather   = dt.Rows[2][1].ToString(); //天气位置
                ViewBag.SDmanager = dt.Rows[3][1].ToString(); //三维图数据包路径
                dt.Dispose();
            }
            return(View());
        }