public void ProcessRequest(HttpContext context) { string result = string.Empty; if (string.IsNullOrEmpty(context.Request["CopyEntities"])) { result = "请勾选实体!"; } if (string.IsNullOrEmpty(context.Request["Categories"])) { result += "请选择目标类别!"; } if (string.IsNullOrEmpty(result)) { string[] ids = context.Request["CopyEntities"].Trim().Split(','); if (context.Request["Move"] == "true") { result = CheckEntityChildren.CheckSelectMoveEntities(ids); } else { result = CheckEntityChildren.CheckSelectEntities(ids); } string[] categories = context.Request["Categories"].Trim().Split(','); if (string.IsNullOrEmpty(result)) { try { if (context.Request["Move"] == "true") { DEObjectOperations.InstanceWithPermissions.MoveEntities(ids.ToList(), categories.ToList()); } else { DEObjectOperations.InstanceWithPermissions.CopyEntities(ids.ToList(), categories.ToList()); } } catch (Exception e) { result = e.Message; } } } context.Response.ContentType = "text/plain"; context.Response.Write(result); }
public void ProcessRequest(HttpContext context) { string result = string.Empty; if (!string.IsNullOrEmpty(context.Request["CopyEntities"])) { string[] ids = context.Request["CopyEntities"].Trim().Split(','); if (context.Request["Move"] == "true") { result = CheckEntityChildren.CheckSelectMoveEntities(ids); } else { result = CheckEntityChildren.CheckSelectEntities(ids); } } context.Response.ContentType = "text/plain"; context.Response.Write(result); }