Esempio n. 1
0
 public JsonResult Post(ITSM_BasicInfo _t)
 {
     _t.TntId = Guid.Parse(AuthToken.CurrentUser.GroupId);
     if (WMFactory.ITSMBasicInfo.Insert(_t))
         return Json(ResultMsg.Success("新增成功!"));
     else
         return Json(ResultMsg.Failure("新增失败,请您重试!"));
 }
Esempio n. 2
0
 public JsonResult Put(ITSM_BasicInfo _t)
 {
     IITSMBasicInfoService service = WMFactory.ITSMBasicInfo;
     ITSM_BasicInfo entity = service.GetById(_t.Id.ToString());
     entity = AutoMapper<ITSM_BasicInfo, ITSM_BasicInfo>.Convert(_t, entity);
     if (service.Update(entity))
         return Json(ResultMsg.Success("更新成功!"));
     else
         return Json(ResultMsg.Failure("更新失败,请您重试!"));
 }
Esempio n. 3
0
 public JsonResult Delete(ITSM_BasicInfo _t)
 {
     if (WMFactory.ITSMBasicInfo.Delete(s => s.Id == _t.Id ))
         return Json(ResultMsg.Success("删除成功!"));
     else
         return Json(ResultMsg.Failure("删除失败,请您重试!"));
 }