Example #1
0
        public ActionResult RenewalLogShow()
        {
            int menuId = int.Parse(Request.QueryString["menuId"]);
            PublicHelpController pub = new PublicHelpController();

            #region 权限查看
            if (!pub.isFunPermisson(helpcommon.ParmPerportys.GetNumParms(userInfo.User.personaId), menuId, funName.selectName))
            {
                return(View("../NoPermisson/Index"));
            }
            if (pub.isFunPermisson(helpcommon.ParmPerportys.GetNumParms(userInfo.User.personaId), menuId, funName.deleteName))
            {
                ViewData["Delete"] = "true";
            }
            else
            {
                ViewData["Delete"] = "false";
            }
            #endregion
            bll.SystemConfigManagerbll system = new bll.SystemConfigManagerbll();
            int       count;
            DataTable dt = system.GetProGetProductsourceUpdateLog(0, 10, "1", null, null, out count, userInfo.User.UserId);
            ViewData["pageProCount"]  = count % 10 == 0 ? count / 10 : count / 10 + 1;
            ViewData["pageRowsCount"] = count;
            ViewData["menuId"]        = menuId;
            bool isShowid;
            dt = GetRenewalLogShow(dt, menuId, funName.selectName, out isShowid);
            ViewData["IsShowId"] = isShowid;
            return(View(dt));
        }
Example #2
0
        public ActionResult PageIndexChange()
        {
            if (!IsIntType(Request.Form["pageIndex"]) || !IsIntType(Request.Form["pgCount"]))
            {
                return(Content(""));
            }
            int    pageIndex = int.Parse(Request.Form["pageIndex"]);
            int    pgCount   = int.Parse(Request.Form["pgCount"]);
            int    menuId    = int.Parse(Request.Form["menuId"]);
            string log       = Request.Form["log"];
            string beginTime = Request.Form["beginTime"];
            string endTime   = Request.Form["endTime"];

            bll.SystemConfigManagerbll system = new bll.SystemConfigManagerbll();
            int       count;
            DataTable dt = system.GetProGetProductsourceUpdateLog(pgCount * (pageIndex - 1), pgCount, log, beginTime, endTime, out count, userInfo.User.UserId);
            bool      isShowId;

            dt = GetRenewalLogShow(dt, menuId, funName.selectName, out isShowId);
            PublicHelpController pub = new PublicHelpController();
            bool IsDelete            = false;

            if (pub.isFunPermisson(helpcommon.ParmPerportys.GetNumParms(userInfo.User.personaId), menuId, funName.deleteName))
            {
                IsDelete = true;
            }
            string html = "";

            foreach (DataRow dr in dt.Rows)
            {
                html += "<tr id='" + dr["编号"] + "'>";
                for (int i = 0; i < dt.Columns.Count; i++)
                {
                    if (dt.Columns[i].ColumnName == "编号")
                    {
                        if (isShowId)
                        {
                            html += "<td>";
                            html += dr[i];
                            html += "</td>";
                        }
                    }
                    else
                    {
                        if (dr[i].ToString().Length > 20)
                        {
                            string str = dr[i].ToString();
                            html += "<td  class='curren'  onmouseout='mouseOut(this)' onmousemove='mouseOver(this)'>";
                            html += str.Substring(0, 20) + "...";
                            html += "<div>" + str + "</div>";
                        }
                        else
                        {
                            html += "<td>";
                            html += dr[i];
                        }
                        html += "</td>";
                    }
                }
                if (IsDelete)
                {
                    html += "<td><a href='#' onclick=\"onDelete('" + dr["编号"] + "')\">删除</a></td>";
                }
                else
                {
                    html += "<td>无权限</td>";
                }
                html += "</tr>";
            }
            //html += "<script>$('#pageCount').html('" + (count % 10 == 0 ? count / 10 : count / 10 + 1) + "');$('#pageRowsCount').html('" + count + "'); </script>";
            html += "╋" + (count % pgCount == 0 ? count / pgCount : count / pgCount + 1) + "╋" + count;
            return(Content(html));
        }