public ActionResult DeleteConfirmed(long id)
        {
            InboundOrderTypesPost inboundordertypes = _inboundordertypesService.GetPost(id);

            inboundordertypes.UserName = User.Identity.Name;
            _inboundordertypesService.Delete(inboundordertypes);
            return(RedirectToAction("Index"));
        }
        public ActionResult Edit([Bind("ixInboundOrderType,sInboundOrderType")] InboundOrderTypesPost inboundordertypes)
        {
            if (ModelState.IsValid)
            {
                inboundordertypes.UserName = User.Identity.Name;
                _inboundordertypesService.Edit(inboundordertypes);
                return(RedirectToAction("Index"));
            }

            return(View(inboundordertypes));
        }
        public ActionResult Edit(long id)
        {
            InboundOrderTypesPost inboundordertypes = _inboundordertypesService.GetPost(id);

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

            return(View(inboundordertypes));
        }
Exemplo n.º 4
0
        public Task Delete(InboundOrderTypesPost inboundordertypesPost)
        {
            // Additional validations

            // Pre-process

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

            // Post-process

            return(Task.CompletedTask);
        }
Exemplo n.º 5
0
        public Task <Int64> Create(InboundOrderTypesPost inboundordertypesPost)
        {
            // Additional validations

            // Pre-process

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

            // Post-process

            return(Task.FromResult(inboundordertypesPost.ixInboundOrderType));
        }
 public void RegisterDelete(InboundOrderTypesPost inboundordertypesPost)
 {
     _context.InboundOrderTypesPost.Remove(inboundordertypesPost);
 }
 public void RegisterEdit(InboundOrderTypesPost inboundordertypesPost)
 {
     _context.Entry(inboundordertypesPost).State = EntityState.Modified;
 }
 public void RegisterCreate(InboundOrderTypesPost inboundordertypesPost)
 {
     _context.InboundOrderTypesPost.Add(inboundordertypesPost);
 }