Пример #1
0
        public void Create()
        {
            var sm = new TradeCode
            {
                trade_code = this.trade_code
            };


            _tradeCodeService.CreateTradeCode(sm);
        }
Пример #2
0
        public void Edit()
        {
            var st = new TradeCode
            {
                Id         = this.Id,
                trade_code = this.trade_code
            };


            _tradeCodeService.EditTradeCode(st);
        }
Пример #3
0
        public async Task <IActionResult> Assign(TradeCodeViewModel model, Guid ApplicationUserId)
        {
            ApplicationUser user = await UserManagerService.FindByIdAsync(ApplicationUserId.ToString());

            TradeCode       tradeCode       = TradeCodeService.ReturnSingleTradeCode(model.TradeCodeToAssign.Id);
            RepairOperative RepairOperative = new RepairOperative
            {
                ApplicationUser = user,
                Id        = Guid.NewGuid(),
                TradeCode = tradeCode
            };

            TradeCodeService.AssignTradeCode(RepairOperative);
            TradeCodeService.SaveChanges();
            return(RedirectToAction("Manage", new { ApplicationUserId = ApplicationUserId }));
        }