private string DeleteObjects(HttpContext context) { string msg = string.Empty; string paras = context.Request["objects"]; if (string.IsNullOrEmpty(paras)) { return("Arguments Error!"); } FileApplication fileApp = new FileApplication(); string[] items = paras.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); if (items.Length > 0) { foreach (string item in items) { string[] keyorvalue = item.Split("-".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); if (keyorvalue.Length == 3) { int id = 0; int fileid = 0; if (int.TryParse(keyorvalue[1], out id) && int.TryParse(keyorvalue[2], out fileid) && keyorvalue[0] == DirectoryObjectType.Directory.ToString()) { if ((!fileApp.RemoveDirectory(id)) && fileApp.BrokenRuleMessages.Count > 0) { msg += fileApp.BrokenRuleMessages[0].Message; } } else { if (!fileApp.RemoveObjects(id, fileid) && fileApp.BrokenRuleMessages.Count > 0) { msg += fileApp.BrokenRuleMessages[0].Message; } } } } return(msg); } else { return("Arguments Error!"); } }