Beispiel #1
0
        public ActionResult DeleteConfirmed(long id)
        {
            PickBatchTypesPost pickbatchtypes = _pickbatchtypesService.GetPost(id);

            pickbatchtypes.UserName = User.Identity.Name;
            _pickbatchtypesService.Delete(pickbatchtypes);
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        public ActionResult Edit([Bind("ixPickBatchType,sPickBatchType")] PickBatchTypesPost pickbatchtypes)
        {
            if (ModelState.IsValid)
            {
                pickbatchtypes.UserName = User.Identity.Name;
                _pickbatchtypesService.Edit(pickbatchtypes);
                return(RedirectToAction("Index"));
            }

            return(View(pickbatchtypes));
        }
Beispiel #3
0
        public ActionResult Edit(long id)
        {
            PickBatchTypesPost pickbatchtypes = _pickbatchtypesService.GetPost(id);

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

            return(View(pickbatchtypes));
        }
Beispiel #4
0
        public Task Delete(PickBatchTypesPost pickbatchtypesPost)
        {
            // Additional validations

            // Pre-process

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

            // Post-process

            return(Task.CompletedTask);
        }
Beispiel #5
0
        public Task <Int64> Create(PickBatchTypesPost pickbatchtypesPost)
        {
            // Additional validations

            // Pre-process

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

            // Post-process

            return(Task.FromResult(pickbatchtypesPost.ixPickBatchType));
        }
 public void RegisterDelete(PickBatchTypesPost pickbatchtypesPost)
 {
     _context.PickBatchTypesPost.Remove(pickbatchtypesPost);
 }
 public void RegisterEdit(PickBatchTypesPost pickbatchtypesPost)
 {
     _context.Entry(pickbatchtypesPost).State = EntityState.Modified;
 }
 public void RegisterCreate(PickBatchTypesPost pickbatchtypesPost)
 {
     _context.PickBatchTypesPost.Add(pickbatchtypesPost);
 }