Exemple #1
0
        public void TestDel()
        {
            var role = new Role
            {
                Name       = "即将删除" + _time,
                CreateTime = DateTime.Now,
                OrgId      = 1
            };

            _app.AddOrUpdate(role);
            Console.WriteLine("new role:" + role.Id);
            _app.Delete(role.Id);
        }
Exemple #2
0
 public string Add(Role role)
 {
     try
     {
         _app.AddOrUpdate(role);
     }
     catch (Exception ex)
     {
         BjuiResponse.statusCode = "300";
         BjuiResponse.message    = ex.Message;
     }
     return(JsonHelper.Instance.Serialize(BjuiResponse));
 }
Exemple #3
0
 public string Add([FromBody] JObject obj)
 {
     try
     {
         _app.AddOrUpdate(obj);
     }
     catch (Exception ex)
     {
         Result.Status  = false;
         Result.Message = ex.Message;
     }
     return(JsonHelper.Instance.Serialize(Result));
 }