Example #1
0
        public ActionResult DeleteConfirmed(long id)
        {
            FoundationModuleGridsPost foundationmodulegrids = _foundationmodulegridsService.GetPost(id);

            foundationmodulegrids.UserName = User.Identity.Name;
            _foundationmodulegridsService.Delete(foundationmodulegrids);
            return(RedirectToAction("Index"));
        }
Example #2
0
        public ActionResult Edit(long id)
        {
            FoundationModuleGridsPost foundationmodulegrids = _foundationmodulegridsService.GetPost(id);

            if (foundationmodulegrids == null)
            {
                return(NotFound());
            }

            return(View(foundationmodulegrids));
        }
Example #3
0
        public ActionResult Edit([Bind("ixFoundationModuleGrid,sFoundationModuleGrid,sShortDescription,sDataEntityType,bCanCreate,bCanEdit,bCanDelete")] FoundationModuleGridsPost foundationmodulegrids)
        {
            if (ModelState.IsValid)
            {
                foundationmodulegrids.UserName = User.Identity.Name;
                _foundationmodulegridsService.Edit(foundationmodulegrids);
                return(RedirectToAction("Index"));
            }

            return(View(foundationmodulegrids));
        }
        public Task Delete(FoundationModuleGridsPost foundationmodulegridsPost)
        {
            // Additional validations

            // Pre-process

            // Process
            this._foundationmodulegridsRepository.RegisterDelete(foundationmodulegridsPost);
            try
            {
                this._foundationmodulegridsRepository.Commit();
            }
            catch (Exception ex)
            {
                this._foundationmodulegridsRepository.Rollback();
                // Log exception
                throw;
            }

            // Post-process

            return(Task.CompletedTask);
        }
        public Task <Int64> Create(FoundationModuleGridsPost foundationmodulegridsPost)
        {
            // Additional validations

            // Pre-process

            // Process
            this._foundationmodulegridsRepository.RegisterCreate(foundationmodulegridsPost);
            try
            {
                this._foundationmodulegridsRepository.Commit();
            }
            catch (Exception ex)
            {
                this._foundationmodulegridsRepository.Rollback();
                // Log exception
                throw;
            }

            // Post-process

            return(Task.FromResult(foundationmodulegridsPost.ixFoundationModuleGrid));
        }
Example #6
0
 public void RegisterDelete(FoundationModuleGridsPost foundationmodulegridsPost)
 {
     _context.FoundationModuleGridsPost.Remove(foundationmodulegridsPost);
 }
Example #7
0
 public void RegisterEdit(FoundationModuleGridsPost foundationmodulegridsPost)
 {
     _context.Entry(foundationmodulegridsPost).State = EntityState.Modified;
 }
Example #8
0
 public void RegisterCreate(FoundationModuleGridsPost foundationmodulegridsPost)
 {
     _context.FoundationModuleGridsPost.Add(foundationmodulegridsPost);
 }