public int SaveNotice(string keyValue, CheckNoticeEntity sn) { var db = DbFactory.Base().BeginTrans(); try { db.ExecuteBySql(string.Format("delete from BIS_CHECKNOTICE where checkid='{0}'", sn.CheckId)); sn.Id = keyValue; sn.Create(); db.Insert <CheckNoticeEntity>(sn); db.Commit(); return(1); } catch { db.Rollback(); return(0); } }
public ActionResult Make(string keyValue, CheckNoticeEntity sn) { try { SaftyCheckDataRecordBLL srbll = new SaftyCheckDataRecordBLL(); SaftyCheckDataRecordEntity entity = srbll.GetEntity(sn.CheckId); if (entity != null) { sn.StartDate = entity.CheckBeginTime; sn.EndDate = entity.CheckEndTime; } SaftyCheckContentBLL scbll = new SaftyCheckContentBLL(); scbll.SaveNotice(keyValue, sn); return(Success("操作成功")); } catch (Exception ex) { return(Error(ex.Message)); } }
public int SaveNotice(string keyValue, CheckNoticeEntity sn) { return(service.SaveNotice(keyValue, sn)); }