public string Delete(string[] ids) { try { _orgApp.DelOrg(ids); } catch (Exception e) { Result.Code = 500; Result.Message = e.Message; } return(JsonHelper.Instance.Serialize(Result)); }
/// <summary> /// 删除指定ID的组织 /// <para>Id为逗号分开的字符串</para> /// </summary> /// <returns>System.String.</returns> public string DelOrg(int Id) { try { _orgApp.DelOrg(Id); } catch (Exception e) { BjuiResponse.statusCode = "300"; BjuiResponse.message = e.Message; } return(JsonHelper.Instance.Serialize(BjuiResponse)); }
public string DelOrg(Guid[] ids) { try { _orgApp.DelOrg(ids); } catch (Exception e) { Result.Status = false; Result.Message = e.Message; } return(JsonHelper.Instance.Serialize(Result)); }
public void TestDelOrg() { int rootId = _app.AddOrUpdate(new Org { Name = "即将被删除", ParentId = 0 }); Assert.IsTrue(rootId != 0); int id = _app.AddOrUpdate(new Org { Name = "即将被删除1", ParentId = rootId }); id = _app.AddOrUpdate(new Org { Name = "即将被删除2", ParentId = id }); _app.DelOrg(rootId); }