Пример #1
0
 public string DeleteData(string id,string userid)
 {
     var tran = Utility.Database.BeginDbTransaction();
     try
     {
         B_WorkLog b_WorkLog = new B_WorkLog();
         b_WorkLog.Condition.Add("id = " + id);//设置查询条件,条件为当前用户ID
         Utility.Database.Delete(b_WorkLog, tran);
         Utility.Database.Commit(tran);
         return Utility.JsonResult(true, "删除成功!");
     }
     catch (Exception ex)
     {
         Utility.Database.Rollback(tran);
         ComBase.Logger(ex);//写日专到本地文件
         return Utility.JsonResult(false, "删除失败:" + ex.Message);
     }
 }
Пример #2
0
 public string GetWorkLogModel()
 {
     B_WorkLog model = new B_WorkLog();
     return Utility.JsonResult(true, null, model);
 }
Пример #3
0
 public string GetWorkLogModel()
 {
     B_WorkLog model = new B_WorkLog();
     return JsonConvert.SerializeObject( model);
 }