public ActionResult DeleteConfirmed(long id)
        {
            LocationFunctionsPost locationfunctions = _locationfunctionsService.GetPost(id);

            locationfunctions.UserName = User.Identity.Name;
            _locationfunctionsService.Delete(locationfunctions);
            return(RedirectToAction("Index"));
        }
        public ActionResult Edit([Bind("ixLocationFunction,sLocationFunction,sLocationFunctionCode")] LocationFunctionsPost locationfunctions)
        {
            if (ModelState.IsValid)
            {
                locationfunctions.UserName = User.Identity.Name;
                _locationfunctionsService.Edit(locationfunctions);
                return(RedirectToAction("Index"));
            }

            return(View(locationfunctions));
        }
        public ActionResult Edit(long id)
        {
            LocationFunctionsPost locationfunctions = _locationfunctionsService.GetPost(id);

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

            return(View(locationfunctions));
        }
Example #4
0
        public Task Delete(LocationFunctionsPost locationfunctionsPost)
        {
            // Additional validations

            // Pre-process

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

            // Post-process

            return(Task.CompletedTask);
        }
Example #5
0
        public Task <Int64> Create(LocationFunctionsPost locationfunctionsPost)
        {
            // Additional validations

            // Pre-process

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

            // Post-process

            return(Task.FromResult(locationfunctionsPost.ixLocationFunction));
        }
 public void RegisterDelete(LocationFunctionsPost locationfunctionsPost)
 {
     _context.LocationFunctionsPost.Remove(locationfunctionsPost);
 }
 public void RegisterEdit(LocationFunctionsPost locationfunctionsPost)
 {
     _context.Entry(locationfunctionsPost).State = EntityState.Modified;
 }
 public void RegisterCreate(LocationFunctionsPost locationfunctionsPost)
 {
     _context.LocationFunctionsPost.Add(locationfunctionsPost);
 }