Esempio n. 1
0
        public ActionResult DeleteConfirmed(long id)
        {
            BusinessPartnerTypesPost businesspartnertypes = _businesspartnertypesService.GetPost(id);

            businesspartnertypes.UserName = User.Identity.Name;
            _businesspartnertypesService.Delete(businesspartnertypes);
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        public ActionResult Edit([Bind("ixBusinessPartnerType,sBusinessPartnerType")] BusinessPartnerTypesPost businesspartnertypes)
        {
            if (ModelState.IsValid)
            {
                businesspartnertypes.UserName = User.Identity.Name;
                _businesspartnertypesService.Edit(businesspartnertypes);
                return(RedirectToAction("Index"));
            }

            return(View(businesspartnertypes));
        }
Esempio n. 3
0
        public ActionResult Edit(long id)
        {
            BusinessPartnerTypesPost businesspartnertypes = _businesspartnertypesService.GetPost(id);

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

            return(View(businesspartnertypes));
        }
        public Task Delete(BusinessPartnerTypesPost businesspartnertypesPost)
        {
            // Additional validations

            // Pre-process

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

            // Post-process

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

            // Pre-process

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

            // Post-process

            return(Task.FromResult(businesspartnertypesPost.ixBusinessPartnerType));
        }
 public void RegisterDelete(BusinessPartnerTypesPost businesspartnertypesPost)
 {
     _context.BusinessPartnerTypesPost.Remove(businesspartnertypesPost);
 }
 public void RegisterEdit(BusinessPartnerTypesPost businesspartnertypesPost)
 {
     _context.Entry(businesspartnertypesPost).State = EntityState.Modified;
 }
 public void RegisterCreate(BusinessPartnerTypesPost businesspartnertypesPost)
 {
     _context.BusinessPartnerTypesPost.Add(businesspartnertypesPost);
 }