public ActionResult DeleteConfirmed(long id)
        {
            OutboundOrderTypesPost outboundordertypes = _outboundordertypesService.GetPost(id);

            outboundordertypes.UserName = User.Identity.Name;
            _outboundordertypesService.Delete(outboundordertypes);
            return(RedirectToAction("Index"));
        }
        public ActionResult Edit([Bind("ixOutboundOrderType,sOutboundOrderType")] OutboundOrderTypesPost outboundordertypes)
        {
            if (ModelState.IsValid)
            {
                outboundordertypes.UserName = User.Identity.Name;
                _outboundordertypesService.Edit(outboundordertypes);
                return(RedirectToAction("Index"));
            }

            return(View(outboundordertypes));
        }
        public ActionResult Edit(long id)
        {
            OutboundOrderTypesPost outboundordertypes = _outboundordertypesService.GetPost(id);

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

            return(View(outboundordertypes));
        }
        public Task Delete(OutboundOrderTypesPost outboundordertypesPost)
        {
            // Additional validations

            // Pre-process

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

            // Post-process

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

            // Pre-process

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

            // Post-process

            return(Task.FromResult(outboundordertypesPost.ixOutboundOrderType));
        }
Exemple #6
0
 public void RegisterDelete(OutboundOrderTypesPost outboundordertypesPost)
 {
     _context.OutboundOrderTypesPost.Remove(outboundordertypesPost);
 }
Exemple #7
0
 public void RegisterEdit(OutboundOrderTypesPost outboundordertypesPost)
 {
     _context.Entry(outboundordertypesPost).State = EntityState.Modified;
 }
Exemple #8
0
 public void RegisterCreate(OutboundOrderTypesPost outboundordertypesPost)
 {
     _context.OutboundOrderTypesPost.Add(outboundordertypesPost);
 }