public bool UpdateHukamnama(HukamnamaModel model) { var objhukamnama = new Hukamnama { Tittle = model.Tittle, HukamnamImage = model.HukamnamImage, CratedDate = DateTime.Now, ModifiedDate = DateTime.Now, IsActive = true }; return(_objRepository.UpdateHukamnama(objhukamnama)); }
public bool AddHukamnama(Hukamnama hukamnama) { try { _entity.Hukamnamas.Add(hukamnama); _entity.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool DeleteHukamnama(long id) { try { Hukamnama hukamanma = _entity.Hukamnamas.First(m => m.Id == id); _entity.Hukamnamas.Remove(hukamanma); _entity.SaveChanges(); return(true); } catch (Exception ex) { // Logging.TrackError(ex, "CreateLab"); return(false); } }
public bool UpdateHukamnama(Hukamnama hukamnamainfo) { try { var objhukamnama = _entity.Hukamnamas.Single(d => d.Id == hukamnamainfo.Id); objhukamnama.HukamnamImage = hukamnamainfo.HukamnamImage; objhukamnama.Tittle = hukamnamainfo.Tittle; objhukamnama.IsActive = true; objhukamnama.CratedDate = DateTime.Now; objhukamnama.ModifiedDate = DateTime.Now; _entity.SaveChanges(); return(true); } catch (Exception) { return(false); } }