public ActionResult UpdateReagent(Reagents reagent)
 {
     if (reagent != null)
     {
         try
         {
             _reagentService.UpdateReagent(reagent);
         }
         catch (Exception e)
         {
             Program.Logger.Error(e);
             return(Ok(GetResponse(ResponseType.FAIL, ResponseStatusCode.FAIL, GetError(ErrorCodes.dataNotFound, "Failed", "Error occurred while updating 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"))));
     }
 }
        protected async override void UpdateModelItem(Reagents model)
        {
            IsBusy = Visibility.Visible;
            var response = await _reagentService.UpdateReagent(model);

            IsBusy = Visibility.Hidden;

            if (response != null && response.Acknowledgement != null)
            {
                if (response.Acknowledgement.Status.Equals(ResponseStatusCode.success.ToString()))
                {
                    GetModelItems();
                }
                else
                {
                    MessageBox.Show("Failed in updating the reagent", "Error");
                    SelectedModel = oldSelectedModel;
                }
            }
        }