Ejemplo n.º 1
0
        public ActionResult Addtype(PhotoGrapherPhotoGraphyType pyped)
        {
            ph.AddPhotoGraphy_Type(pyped);
            TempData["msg"] = "<script>alert('Add PhotoGraphyType Successfully');</script>";


            return(Redirect(HttpContext.Request.UrlReferrer.AbsoluteUri));
        }
Ejemplo n.º 2
0
        public bool AddPhotoGraphy_Type(PhotoGrapherPhotoGraphyType Add_Type)
        {
            Db.Set <PhotoGrapherPhotoGraphyType>().Add(Add_Type);
            Db.SaveChanges();


            return(true);
        }
Ejemplo n.º 3
0
        public bool UpdatePhotoGraphy_Type(PhotoGrapherPhotoGraphyType UpType, int id)
        {
            var find_single_type = Db.Set <PhotoGrapherPhotoGraphyType>().Find(id);

            if (find_single_type != null)
            {
                Db.Entry(UpType).State = EntityState.Modified;
                Db.SaveChanges();
                return(true);
            }
            else
            {
                return(false);
            }
        }