protected async override void DeleteModelItem(Reagents model)
        {
            IsBusy = Visibility.Visible;
            var response = await _reagentService.DeleteReagent(model);

            IsBusy = Visibility.Hidden;

            if (response != null && response.Acknowledgement != null)
            {
                if (response.Acknowledgement.Status.Equals(ResponseStatusCode.success.ToString()))
                {
                    GetModelItems();
                }
                else
                {
                    MessageBox.Show("Failed deleting the reagent", "Error");
                }
            }
        }
        public ActionResult DeleteReagent(int id)
        {
            if (id > 0)
            {
                try
                {
                    _reagentService.DeleteReagent(id);
                }
                catch (Exception e)
                {
                    Program.Logger.Error(e);
                    return(Ok(GetResponse(ResponseType.FAIL, ResponseStatusCode.FAIL, GetError(ErrorCodes.dataNotFound, "Failed", "Error occurred while deleting the reagent"))));
                }

                return(Ok(GetResponse(ResponseType.ACK, ResponseStatusCode.SUCCESS)));
            }
            else
            {
                return(BadRequest(GetResponse(ResponseType.ERROR, ResponseStatusCode.ERROR, GetError(ErrorCodes.invalidData, "Invalid input", "Please enter proper reagent details"))));
            }
        }