public ActionResult Delete(int id)
        {
            ResponceModel responceModel = new ResponceModel();

            try
            {
                var companyProfileData = _companyProfileService.GetCompanyProfileById(id);

                if (companyProfileData != null)
                {
                    bool IsProcedureIdUsed = false;
                    foreach (var data in companyProfileData.PoliciesAndProcedures.Where(a => a.IsPolicy == false))
                    {
                        //To Check Is it Used In PatientInfo As FK
                        var count = _treatmentRecordservice.GetPatientInfoByProcedureId(data.Id).Count();
                        if (count != 0)
                        {
                            IsProcedureIdUsed = true;
                        }
                    }
                    if (!IsProcedureIdUsed)
                    {
                        _companyProfileService.DeleteCompanyProfile(companyProfileData);
                        responceModel.Success = true;
                        responceModel.Message = "Deleted.";
                        AddNotification(NotificationMessage.TitleSuccess, NotificationMessage.msgDeleteCompanyProfile, NotificationMessage.TypeSuccess);
                        return(Json(responceModel));
                    }
                    else
                    {
                        responceModel.Success = false;
                        responceModel.Message = "NotDeleted.";

                        AddNotification(NotificationMessage.TitleError, NotificationMessage.CompanyProfileInUse, NotificationMessage.TypeError);
                        return(Json(responceModel));
                    }
                }
                else
                {
                    responceModel.Success = false;
                    responceModel.Message = "NotDeleted.";

                    AddNotification(NotificationMessage.TitleError, NotificationMessage.CompanyProfileNotFount, NotificationMessage.TypeError);

                    return(Json(responceModel));
                }
            }
            catch (Exception e)
            {
                responceModel.Success = false;
                responceModel.Message = "NotDeleted.";

                return(Json(responceModel));
            }
        }