public CallNumberControl(ISBNbookListInfo info) { InitializeComponent(); this.info = info; DataContext = null; DataContext = new CallNumberViewModel(this); }
public async Task <IActionResult> CallNumber([FromBody] CallNumberViewModel viewModel) { if (ModelState.IsValid) { var model = _authorityBusinessInterface.GetViewModelChangeCounterCuteGirl(viewModel); var query = await _bankHandle.GetBusinessMan(); //得到当前都队列 var id = query.Dequeue().Id; //先进先出 var flag = await _counterCuteGirlServices.CallNumber(model, id); if (flag) { return(Ok(new SucessModelData <CallNumberViewModel>(viewModel))); } else { var result = await _counterCuteGirlServices.RepeatNumber(model, id); if (result) { return(Ok(new JsonResult("正在重新呼叫"))); } else { var models = await _businessManServices.GetModelAsync(u => u.Id == id); models.Istrue = true; await _businessManServices.Modify(models); return(Ok(new JsonFailCatch("重呼失败,下一个用户"))); } } } return(Ok(new JsonFailCatch("呼叫失败"))); }
public CounterCuteGirl GetViewModelChangeCounterCuteGirl(CallNumberViewModel viewModel) { return(Mapper.Map <CallNumberViewModel, CounterCuteGirl>(viewModel)); }