예제 #1
0
        public ActionResult DeleteConfirmed(long id)
        {
            HandlingUnitsShippingPost handlingunitsshipping = _handlingunitsshippingService.GetPost(id);

            handlingunitsshipping.UserName = User.Identity.Name;
            _handlingunitsshippingService.Delete(handlingunitsshipping);
            return(RedirectToAction("Index"));
        }
예제 #2
0
        public ActionResult Edit(long id)
        {
            HandlingUnitsShippingPost handlingunitsshipping = _handlingunitsshippingService.GetPost(id);

            if (handlingunitsshipping == null)
            {
                return(NotFound());
            }
            ViewBag.ixHandlingUnit = new SelectList(_handlingunitsshippingService.selectHandlingUnits().Select(x => new { x.ixHandlingUnit, x.sHandlingUnit }), "ixHandlingUnit", "sHandlingUnit", handlingunitsshipping.ixHandlingUnit);
            ViewBag.ixStatus       = new SelectList(_handlingunitsshippingService.selectStatuses().Select(x => new { x.ixStatus, x.sStatus }), "ixStatus", "sStatus", handlingunitsshipping.ixStatus);

            return(View(handlingunitsshipping));
        }
예제 #3
0
        public ActionResult Edit([Bind("ixHandlingUnitShipping,sHandlingUnitShipping,ixHandlingUnit,ixStatus")] HandlingUnitsShippingPost handlingunitsshipping)
        {
            if (ModelState.IsValid)
            {
                handlingunitsshipping.UserName = User.Identity.Name;
                _handlingunitsshippingService.Edit(handlingunitsshipping);
                return(RedirectToAction("Index"));
            }
            ViewBag.ixHandlingUnit = new SelectList(_handlingunitsshippingService.selectHandlingUnits().Select(x => new { x.ixHandlingUnit, x.sHandlingUnit }), "ixHandlingUnit", "sHandlingUnit", handlingunitsshipping.ixHandlingUnit);
            ViewBag.ixStatus       = new SelectList(_handlingunitsshippingService.selectStatuses().Select(x => new { x.ixStatus, x.sStatus }), "ixStatus", "sStatus", handlingunitsshipping.ixStatus);

            return(View(handlingunitsshipping));
        }
        public Task Delete(HandlingUnitsShippingPost handlingunitsshippingPost)
        {
            // Additional validations

            // Pre-process

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

            // Post-process

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

            // Pre-process

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

            // Post-process

            return(Task.FromResult(handlingunitsshippingPost.ixHandlingUnitShipping));
        }
예제 #6
0
 public void RegisterDelete(HandlingUnitsShippingPost handlingunitsshippingPost)
 {
     _context.HandlingUnitsShippingPost.Remove(handlingunitsshippingPost);
 }
예제 #7
0
 public void RegisterEdit(HandlingUnitsShippingPost handlingunitsshippingPost)
 {
     _context.Entry(handlingunitsshippingPost).State = EntityState.Modified;
 }
예제 #8
0
 public void RegisterCreate(HandlingUnitsShippingPost handlingunitsshippingPost)
 {
     _context.HandlingUnitsShippingPost.Add(handlingunitsshippingPost);
 }