private Result savePosition(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"]); int flag2 = B_BaseDownPositionService.UpdatePosition2MySql( new B_DownPositionEntity { ByTag4MySql = tag == "1" ? 1 : 0, Name = positionname, ProjectSourceType = region, PageName = pagename, PageType = pagetype, Position = positionid, ProjectSource = projectsource, ResType = restype, DownType = downtype, }); if (flag2 <= 0) { return(Result.GetFailedResult(string.Format("保存{0}失败", "新数据库"))); } return(Result.GetSuccessedResult("", "保存成功", true)); }
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)); }
private Result BatchEditPositionName(HttpContext context) { int region = Convert.ToInt32(context.Request["region"]); int restype = Convert.ToInt32(context.Request["restype"]); int projectsource = Convert.ToInt32(context.Request["projectsource"]); string pagetype = context.Request["pagetype"]; string idnamelist = context.Request["idnamelist"]; int flag = B_BaseDownPositionService.BatchEditPositionName( new B_DownPositionEntity { ProjectSourceType = region, PageType = pagetype, ProjectSource = projectsource, ResType = restype, }, idnamelist); if (flag <= 0) { return(Result.GetFailedResult("保存失败")); } return(Result.GetSuccessedResult("", "保存成功", true)); }