Beispiel #1
0
        public ActionResult DeleteConfirmed(long id)
        {
            FacilityFloorsPost facilityfloors = _facilityfloorsService.GetPost(id);

            facilityfloors.UserName = User.Identity.Name;
            _facilityfloorsService.Delete(facilityfloors);
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        public ActionResult Edit(long id)
        {
            FacilityFloorsPost facilityfloors = _facilityfloorsService.GetPost(id);

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

            return(View(facilityfloors));
        }
Beispiel #3
0
        public ActionResult Edit([Bind("ixFacilityFloor,sFacilityFloor")] FacilityFloorsPost facilityfloors)
        {
            if (ModelState.IsValid)
            {
                facilityfloors.UserName = User.Identity.Name;
                _facilityfloorsService.Edit(facilityfloors);
                return(RedirectToAction("Index"));
            }

            return(View(facilityfloors));
        }
        public Task Delete(FacilityFloorsPost facilityfloorsPost)
        {
            // Additional validations

            // Pre-process

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

            // Post-process

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

            // Pre-process

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

            // Post-process

            return(Task.FromResult(facilityfloorsPost.ixFacilityFloor));
        }
Beispiel #6
0
 public void RegisterDelete(FacilityFloorsPost facilityfloorsPost)
 {
     _context.FacilityFloorsPost.Remove(facilityfloorsPost);
 }
Beispiel #7
0
 public void RegisterEdit(FacilityFloorsPost facilityfloorsPost)
 {
     _context.Entry(facilityfloorsPost).State = EntityState.Modified;
 }
Beispiel #8
0
 public void RegisterCreate(FacilityFloorsPost facilityfloorsPost)
 {
     _context.FacilityFloorsPost.Add(facilityfloorsPost);
 }