Beispiel #1
0
        public ActionResult ListData(int pid, int did, string tagname, int rows, int page)
        {
            try
            {
                string pdrlist = HomeController.GetPID(CurrentUser.UNITList);
                //string pdrlist = CurrentUser.PDRList;
                string query = " 1=1";
                if (pid > 0)
                {
                    query = query + " and pid=" + pid;
                }
                if (did > 0)
                {
                    query = query + " and did=" + did;
                }
                if (!tagname.Equals(""))
                {
                    query = query + " and tagname like '%" + tagname + "%'";
                }


                var rowcounts = bll.P_HisDataCount("V_Points_Contrast", query).ToList();
                int rowcount  = rowcounts[0].Value;
                List <t_CM_PointsInfo> list = bll.P_PointsInfo("V_Points_Contrast", "*", "tagid", rows, page, true, query).ToList();
                string strJson = Common.List2Json(list, rows, page);
                return(Content(strJson));
            }
            catch (Exception ex)
            {
                string error = ex.ToString();
                return(Content(""));
            }
        }