public ResultStatus Add(GEMA_TM_SLIDESHOW slideshow) { try { _ctx.GEMA_TM_SLIDESHOW.Add(slideshow); _ctx.SaveChanges(); rs.SetSuccessStatus(); } catch (Exception ex) { rs.SetErrorStatus(ex.Message); } return(rs); }
public ResultStatus Delete(int id, string modifiedBy, DateTime modifiedTime) { try { GEMA_TM_SLIDESHOW slideshow = _ctx.GEMA_TM_SLIDESHOW.Find(id); slideshow.LAST_MODIFIED_TIME = modifiedTime; slideshow.LAST_MODIFIED_BY = modifiedBy; slideshow.ROW_STATUS = eStat.fg.NotActive; _ctx.Entry(slideshow).State = EntityState.Modified; _ctx.SaveChanges(); rs.SetSuccessStatus(); } catch (Exception ex) { rs.SetErrorStatus(ex.Message); } return(rs); }
public ResultStatus Edit(GEMA_TM_SLIDESHOW slideshow) { try { GEMA_TM_SLIDESHOW slideshowNew = _ctx.GEMA_TM_SLIDESHOW.Find(slideshow.ID); slideshowNew.TITTLE = slideshow.TITTLE; slideshowNew.CONTENT_DESCRIPTION = slideshow.CONTENT_DESCRIPTION; slideshowNew.CLASS = slideshow.CLASS; slideshowNew.PHOTO_PATH = slideshow.PHOTO_PATH; slideshowNew.URL = slideshow.URL; slideshowNew.LAST_MODIFIED_TIME = slideshow.LAST_MODIFIED_TIME; slideshowNew.LAST_MODIFIED_BY = slideshow.LAST_MODIFIED_BY; _ctx.Entry(slideshowNew).State = System.Data.Entity.EntityState.Modified; _ctx.SaveChanges(); rs.SetSuccessStatus(); } catch (Exception ex) { rs.SetErrorStatus(ex.Message); } return(rs); }