Beispiel #1
0
        /// <summary>
        /// 文档管理Ajax列表
        /// </summary>
        /// <returns></returns>
        public ActionResult getDocIndexAjax()
        {
            string PageSize = Request.Params["PageSize"];

            if (PageSize == "0")
            {
                PageSize = ConfigCls.getTableDefaultPageSize();
            }
            string          Page       = Request.Params["Page"];
            string          EMAILTITLE = Request.Params["TITLE"];
            string          tid        = Request.Params["tid"];
            string          BYORGNO    = Request.Params["BYORGNO"];
            string          FIRELEVEL  = Request.Params["FIRELEVEL"];
            int             total      = 0;
            ART_DOCUMENT_SW sw         = new ART_DOCUMENT_SW {
                curPage = int.Parse(Page), pageSize = int.Parse(PageSize), ARTTITLE = EMAILTITLE, ARTTYPEID = tid
            };
            var           result = ART_DOCUMENTCls.getModelList(sw, out total);
            StringBuilder sb     = new StringBuilder();

            sb.AppendFormat("<table cellpadding=\"0\" cellspacing=\"0\">");
            sb.AppendFormat("<thead>");
            sb.AppendFormat("<tr>");
            sb.AppendFormat("<th style='width:10%;'>序号</th>");
            sb.AppendFormat("<th style='width:10%;'>单位</th>");
            sb.AppendFormat("<th style='width:30%;'>标题</th>");
            sb.AppendFormat("<th style='width:15%;'>添加人</th>");
            sb.AppendFormat("<th style='width:15%;'>时间</th>");
            sb.AppendFormat("</tr>");
            sb.AppendFormat("</thead>");
            sb.AppendFormat("<tbody>");
            int i = 0;

            foreach (var v in result)
            {
                if (i % 2 == 0)
                {
                    sb.AppendFormat("<tr>");
                }
                else
                {
                    sb.AppendFormat("<tr class='row1'>");
                }
                sb.AppendFormat("<td class=\"center\">{0}</td>", (i + 1).ToString());
                sb.AppendFormat("<td class=\"center\">{0}</td>", v.orgName);// v.ARTTYPENAME);
                sb.AppendFormat("<td class=\"left\"><a href=\"/ArtDocument/DocShow?ID={1}\" target='_blank'>{0}</a></td>", v.ARTTITLE, v.ARTID);
                sb.AppendFormat("<td class=\"left\">{0}</td>", v.ARTADDUSERName);
                sb.AppendFormat("<td class=\"center\">{0}</td>", v.ARTTIME);
                sb.AppendFormat("</td>");
                sb.AppendFormat("</tr>");
                i++;
            }
            sb.AppendFormat("</tbody>");
            sb.AppendFormat("</table>");
            string pageInfo = PagerCls.getPagerInfoAjax(new PagerSW {
                curPage = sw.curPage, pageSize = sw.pageSize, rowCount = total
            });

            return(Content(JsonConvert.SerializeObject(new MessagePagerAjax(true, sb.ToString(), pageInfo)), "text/html;charset=UTF-8"));;
        }
        /// <summary>
        /// ajax 获取各种火情数据
        /// </summary>
        /// <returns></returns>
        public JsonResult GetFireInfosAjax()
        {
            int    total    = 0;                          //记录总数
            string topOrg   = "";
            var    firetype = Request.Params["firetype"]; //火情类型
            string PageSize = Request.Params["PageSize"]; //记录个数
            string page     = Request.Params["page"];     //页数

            if (string.IsNullOrEmpty(firetype))
            {
                return(Json(new Message(false, "没有火情类型", "")));
            }
            var currOrgNo = SystemCls.getCurUserOrgNo();

            if (PublicCls.OrgIsXian(currOrgNo))//县
            {
                topOrg = currOrgNo.Substring(0, 6);
            }
            else if (PublicCls.OrgIsZhen(currOrgNo))//乡镇
            {
                topOrg = currOrgNo;
            }
            var result = JC_FIRECls.getModelPager(new JC_FIRE_SW {
                curPage = int.Parse(page), pageSize = int.Parse(PageSize), FIREFROM = firetype, TopORGNO = topOrg
            }, out total);
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("<table cellpadding=\"0\" cellspacing=\"0\">");
            sb.AppendFormat("<thead>");
            sb.AppendFormat("<tr>");
            sb.AppendFormat("<th>序号</th>");
            sb.AppendFormat("<th>区域</th>");
            //sb.AppendFormat("<th>经度</th>");
            //sb.AppendFormat("<th>纬度</th>");
            sb.AppendFormat("<th>接收时间</th>");
            //sb.AppendFormat("<th>周围(公里)</th>");
            sb.AppendFormat("</tr>");
            sb.AppendFormat("</thead>");
            sb.AppendFormat("<tbody>");
            if (result.Any())
            {
                int i    = 0;
                int rowB = (int.Parse(page) - 1) * int.Parse(PageSize);
                foreach (var s in result)
                {
                    if (i % 2 == 0)
                    {
                        // onclick="moveto(@item.JD,@item.WD,'@item.FIRENAME',@item.JCFID);"
                        sb.AppendFormat("<tr style=\"cursor: pointer;\" title='双击行定位' ondblclick=\"moveto(" + s.JD + "," + s.WD + ",'" + s.FIRENAME + "'," + s.JCFID + ")\">");
                    }
                    else
                    {
                        sb.AppendFormat("<tr style=\"cursor: pointer;\" title='双击行定位' class='row1'  ondblclick=\"moveto(" + s.JD + "," + s.WD + ",'" + s.FIRENAME + "'," + s.JCFID + ")\">");
                    }
                    sb.AppendFormat("<td>{0}</td>", ++rowB);
                    if (s.FIREFROM == "5")//护林员报警
                    {
                        sb.AppendFormat("<td><font color=\"#FF0000;\">{0}</font></td>", StateSwitch.GetOrgNameByOrgNO(s.BYORGNO));
                    }
                    else
                    {
                        sb.AppendFormat("<td><font color=\"#FF0000;\">{0}</font></td>", s.ZQWZ);
                    }
                    //sb.AppendFormat("<td>{0}</td>", Convert.ToDouble(s.JD).ToString("f3"));
                    //sb.AppendFormat("<td>{0}</td>", Convert.ToDouble(s.WD).ToString("f3"));
                    sb.AppendFormat("<td>{0}</td>", Convert.ToDateTime(s.RECEIVETIME).ToString("MM-dd HH:mm"));
                    //sb.AppendFormat("<td><select onchange=\"GetHlyInfos(" + s.JD + "," + s.WD + ",'" + s.FIRENAME + "'," + s.JCFID + ")\" id=\"areaselect_{0}\" ><option value=\"0\">请选择</option><option value=\"1\">1</option><option value=\"2\">2</option><option value=\"3\">3</option><option value=\"4\">4</option><option value=\"5\">5</option>/select></td>", s.JCFID);
                    sb.AppendFormat("</tr>");
                    ++i;
                }
            }
            else
            {
                sb.AppendFormat("<tr>");
                sb.AppendFormat("<td colspan='5'>未查询出结果</td>");
                sb.AppendFormat("</tr>");
            }
            sb.AppendFormat("</tbody>");
            sb.AppendFormat("</table>");
            string pageInfo = PagerCls.getPagerInfoAjax(new PagerSW {
                curPage = int.Parse(page), pageSize = int.Parse(PageSize), rowCount = total, hidePageList = true, hidePageSize = true
            });

            return(Json(new MessagePagerAjax(true, sb.ToString(), pageInfo)));
        }
Beispiel #3
0
        /// <summary>
        /// 文档管理Ajax列表
        /// </summary>
        /// <returns></returns>
        public ActionResult getDocDefaultAjax()
        {
            string PageSize = Request.Params["PageSize"];

            if (PageSize == "0")
            {
                PageSize = ConfigCls.getTableDefaultPageSize();
            }
            string Page       = Request.Params["Page"];
            string EMAILTITLE = Request.Params["TITLE"];
            string typeID     = (string.IsNullOrEmpty(Request.Params["typeID"])) ? "" : Request.Params["typeID"].ToString();
            string bigTypeID  = "";// (string.IsNullOrEmpty(Request.Params["ArtTID"])) ? "" : Request.Params["ArtTID"].ToString();

            if (typeID == "006101")
            {
                bigTypeID = "013";                    //通告公告
            }
            if (typeID == "006102")
            {
                bigTypeID = "014";                    //防火百科
            }
            if (typeID == "006103")
            {
                bigTypeID = "015";                    //帮助
            }
            if (typeID == "006024")
            {
                bigTypeID = "031";                    //有害生物
            }
            int             total = 0;
            ART_DOCUMENT_SW sw    = new ART_DOCUMENT_SW {
                curPage = int.Parse(Page), pageSize = int.Parse(PageSize), ARTTITLE = EMAILTITLE, ARTBigTYPEID = bigTypeID, BYORGNO = SystemCls.getCurUserOrgNo()
            };
            var           result = ART_DOCUMENTCls.getModelList(sw, out total);
            StringBuilder sb     = new StringBuilder();

            sb.AppendFormat("<table cellpadding=\"0\" cellspacing=\"0\">");
            sb.AppendFormat("<thead>");
            sb.AppendFormat("<tr>");
            sb.AppendFormat("<th style='width:10%;'>序号</th>");
            sb.AppendFormat("<th style='width:10%;'>类别</th>");
            sb.AppendFormat("<th style='width:30%;'>标题</th>");
            sb.AppendFormat("<th style='width:15%;'>添加人</th>");
            sb.AppendFormat("<th style='width:15%;'>时间</th>");
            sb.AppendFormat("<th style='width:20%;'>管理</th>");
            sb.AppendFormat("</tr>");
            sb.AppendFormat("</thead>");
            sb.AppendFormat("<tbody>");
            int i = 0;

            foreach (var v in result)
            {
                if (i % 2 == 0)
                {
                    sb.AppendFormat("<tr>");
                }
                else
                {
                    sb.AppendFormat("<tr class='row1'>");
                }
                sb.AppendFormat("<td class=\"center\">{0}</td>", (i + 1).ToString());
                sb.AppendFormat("<td class=\"center\">{0}</td>", v.ARTTYPENAME);// v.ARTTYPENAME);
                sb.AppendFormat("<td class=\"left\"><a href=\"/ArtDocument/DocShow?ID={1}\" target='_blank'>{0}</a></td>", v.ARTTITLE, v.ARTID);
                sb.AppendFormat("<td class=\"center\">{0}</td>", v.ARTADDUSERName);
                sb.AppendFormat("<td class=\"center\">{0}</td>", v.ARTTIME);
                sb.AppendFormat("<td class=\"center\">");
                sb.AppendFormat("<a href='#' onclick=\"Mdy('{0}','{1}')\" class=\"searchBox_01 LinkMdy\">修改</a>", v.ARTID, typeID);
                sb.AppendFormat("&nbsp;<a href='#' onclick='Manager({0})' class=\"searchBox_01 LinkDel\">删除</a>", v.ARTID);
                sb.AppendFormat("</td>");
                sb.AppendFormat("</tr>");
                i++;
            }
            sb.AppendFormat("</tbody>");
            sb.AppendFormat("</table>");
            string pageInfo = PagerCls.getPagerInfoAjax(new PagerSW {
                curPage = sw.curPage, pageSize = sw.pageSize, rowCount = total
            });

            return(Content(JsonConvert.SerializeObject(new MessagePagerAjax(true, sb.ToString(), pageInfo)), "text/html;charset=UTF-8"));;
        }
        /// <summary>
        /// ajax 获取公益林数据
        /// </summary>
        /// <returns></returns>
        public JsonResult GetGYLAjax()
        {
            int    total    = 0;                          //记录总数
            var    COUNTY   = Request.Params["COUNTY"];   //县市
            var    COUNTRY  = Request.Params["COUNTRY"];  //乡镇
            var    VILLAGE  = Request.Params["VILLAGE"];  //村
            var    LINBAN   = Request.Params["LINBAN"];   //林班
            var    XIAOBAN  = Request.Params["XIAOBAN"];  //小班
            string PageSize = Request.Params["PageSize"]; //记录个数
            string page     = Request.Params["page"];     //页数
            var    result   = GONGYILINCls.getModelPager(new SDE_GONGYILIN_Model {
                curPage = int.Parse(page), pageSize = int.Parse(PageSize), COUNTY = COUNTY, COUNTRY = COUNTRY, VILLAGE = VILLAGE, LINBAN = LINBAN, XIAOBAN = XIAOBAN
            }, out total);
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("<table cellpadding=\"0\" cellspacing=\"0\">");
            sb.AppendFormat("<thead>");
            sb.AppendFormat("<tr>");
            sb.AppendFormat("<th>序号</th>");
            sb.AppendFormat("<th>县</th>");
            sb.AppendFormat("<th>乡</th>");
            sb.AppendFormat("<th>村</th>");
            sb.AppendFormat("<th>林班</th>");
            sb.AppendFormat("<th>小班</th>");
            sb.AppendFormat("</tr>");
            sb.AppendFormat("</thead>");
            sb.AppendFormat("<tbody>");
            if (result.Any())
            {
                int i    = 0;
                int rowB = (int.Parse(page) - 1) * int.Parse(PageSize);
                foreach (var s in result)
                {
                    if (i % 2 == 0)
                    {
                        sb.AppendFormat("<tr onClick='onClickGYL(" + s.OBJECTID + "," + s.STX + "," + s.STY + ")'>");
                    }
                    else
                    {
                        sb.AppendFormat("<tr class='row1'  onClick='onClickGYL(" + s.OBJECTID + "," + s.STX + "," + s.STY + ")'>");
                    }
                    sb.AppendFormat("<td>{0}</td>", ++rowB);
                    sb.AppendFormat("<td>{0}</td>", s.COUNTY);
                    sb.AppendFormat("<td>{0}</td>", s.COUNTRY);
                    sb.AppendFormat("<td>{0}</td>", s.VILLAGE);
                    sb.AppendFormat("<td>{0}</td>", s.LINBAN);
                    sb.AppendFormat("<td>{0}</td>", s.XIAOBAN);
                    sb.AppendFormat("</tr>");
                    ++i;
                }
            }
            else
            {
                sb.AppendFormat("<tr>");
                sb.AppendFormat("<td colspan='6'>未查询出结果</td>");
                sb.AppendFormat("</tr>");
            }
            sb.AppendFormat("</tbody>");
            sb.AppendFormat("</table>");
            string pageInfo = PagerCls.getPagerInfoAjax(new PagerSW {
                curPage = int.Parse(page), pageSize = int.Parse(PageSize), rowCount = total, hidePageList = true, hidePageSize = true
            });

            return(Json(new MessagePagerAjax(true, sb.ToString(), pageInfo)));
        }