Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
 public bool AddHukamnama(Hukamnama hukamnama)
 {
     try
     {
         _entity.Hukamnamas.Add(hukamnama);
         _entity.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Exemplo n.º 3
0
 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);
     }
 }
Exemplo n.º 4
0
        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);
            }
        }