예제 #1
0
        public ActionResult Delete(string[] ids)
        {
            if (ids == null || !ids.Any())
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            foreach (string id in ids)
            {
                operatorService.Delete(id);
            }

            return(RedirectToAction("Index")
                   .WithWarning("The selected operator have been deleted".TA()));
        }
        public ActionResult OperatorDelete(OperatorVm operatorModel)
        {
            _operatorService.Delete(operatorModel.Id);

            return(RedirectToAction("GetOperators", "Operator", new { area = "Admin" }));
        }
예제 #3
0
        public async Task <ActionResult> DeleteOperator(int id)
        {
            await _operatorService.Delete(id);

            return(NoContent());
        }