public JsonResult Post(ITSM_EgrSchedule _t) { if (WMFactory.ITSMEgrSchedule.Insert(_t)) return Json(ResultMsg.Success("新增成功!")); else return Json(ResultMsg.Failure("新增失败,请您重试!")); }
public JsonResult Put(ITSM_EgrSchedule _t,Guid TagId) { _t.Id = TagId; IITSMEgrScheduleService service = WMFactory.ITSMEgrSchedule; ITSM_EgrSchedule entity = service.GetById(_t.Id.ToString()); entity = AutoMapper<ITSM_EgrSchedule, ITSM_EgrSchedule>.Convert(_t, entity); if (service.Update(entity)) return Json(ResultMsg.Success("更新成功!")); else return Json(ResultMsg.Failure("更新失败,请您重试!")); }
public JsonResult Delete(ITSM_EgrSchedule _t, Guid TagId) { if (WMFactory.ITSMEgrSchedule.Delete(s => s.Id == TagId)) return Json(ResultMsg.Success("删除成功!")); else return Json(ResultMsg.Failure("删除失败,请您重试!")); }