private Result get_page(HttpContext context) { DataTablesRequest param = new DataTablesRequest(context.Request); int region = Convert.ToInt32(context.Request["region"]); int restype = Convert.ToInt32(context.Request["restype"]); int projectsource = Convert.ToInt32(context.Request["projectsource"]); string positionid = context.Request["position"]; string positionname = context.Request["positionname"]; string pagename = context.Request["pagename"]; string pagetype = context.Server.UrlDecode(context.Request["pagetype"]); int downtype = Convert.ToInt32(context.Request["downtype"]); int checkistag = Convert.ToInt32(context.Request["checkistag"]); int pagesize = param.iDisplayLength; int pageIndex = (param.iDisplayStart + 1) / param.iDisplayLength + 1; int recordcount = 0; B_BaseTool_DataAccess basetool = new B_BaseTool_DataAccess(); int softid2 = basetool.getSoftid2byProjectsource(projectsource, region); var list = B_BaseDownPositionService.Instance.GetB_DownPositionListByCache((ProjectSourceTypeOptions)region, downtype, checkistag, restype, projectsource, positionid, positionname, pagename, pagetype, (pageIndex - 1) * pagesize, pagesize, softid2, out recordcount); JQueryDataTableData dt = new JQueryDataTableData(); dt.sEcho = param.sEcho; dt.iTotalRecords = dt.iTotalDisplayRecords = recordcount; dt.aaData = GetDataStrList(list); return(Result.GetSuccessedResult(dt, false)); }
private Result addPosition(HttpContext context) { int region = Convert.ToInt32(context.Request["region"]); int restype = Convert.ToInt32(context.Request["restype"]); int projectsource = Convert.ToInt32(context.Request["projectsource"]); int positionid = Convert.ToInt32(context.Request["position"]); string positionname = context.Request["positionname"]; string tag = context.Request["checkistag"]; int downtype = Convert.ToInt32(context.Request["downtype"]); string pagename = context.Request["pagename"]; string pagetype = context.Server.UrlDecode(context.Request["pagetype"]); B_BaseTool_DataAccess basedata = new B_BaseTool_DataAccess(); int softid2 = basedata.getSoftid2byProjectsource(projectsource, region); int flag2 = B_BaseDownPositionService.AddPosition2MySql( new B_DownPositionEntity { ByTag4MySql = tag == "1" ? 1 : 0, Name = positionname, PageName = pagename, PageType = pagetype, Position = positionid, ProjectSource = projectsource, ProjectSourceType = region, ResType = restype, DownType = downtype, SoftId = softid2 }); if ((flag2) <= 0) { return(Result.GetFailedResult(string.Format("添加到{0}失败", "新数据库"))); } return(Result.GetSuccessedResult("", "添加成功", true)); }