protected void CarePlanGoalGrid_OnItemCommand(Object sender, Telerik.Web.UI.GridCommandEventArgs e) { if (MemberCaseCarePlan == null) { return; } Mercury.Server.Application.MemberCaseModificationResponse response; switch (e.CommandName) { case Telerik.Web.UI.RadGrid.InitInsertCommandName: break; case Telerik.Web.UI.RadGrid.PerformInsertCommandName: #region Perform Insert of New Goal // RETREIVE REFERENCES TO ALL TEMPLATED CONTROLS RadioButtonList AddCarePlanGoalTypeSelection = (RadioButtonList)e.Item.FindControl("AddCarePlanGoalTypeSelection"); if (AddCarePlanGoalTypeSelection == null) { return; } Telerik.Web.UI.RadTextBox AddCarePlanGoalName = (Telerik.Web.UI.RadTextBox)e.Item.FindControl("AddCarePlanGoalName"); if (AddCarePlanGoalName == null) { return; } Telerik.Web.UI.RadComboBox AddCarePlanGoalExistingSelection = (Telerik.Web.UI.RadComboBox)e.Item.FindControl("AddCarePlanGoalExistingSelection"); if (AddCarePlanGoalExistingSelection == null) { return; } Telerik.Web.UI.RadComboBox AddCarePlanGoalCareMeasureSelection = (Telerik.Web.UI.RadComboBox)e.Item.FindControl("AddCarePlanGoalCareMeasureSelection"); if (AddCarePlanGoalCareMeasureSelection == null) { return; } Int64 selectedBaselineGoalId = (AddCarePlanGoalTypeSelection.SelectedValue == "0") ? Convert.ToInt64(AddCarePlanGoalExistingSelection.SelectedValue) : 0; Int64 selectedCareMeasureId = (AddCarePlanGoalTypeSelection.SelectedValue == "1") ? Convert.ToInt64(AddCarePlanGoalCareMeasureSelection.SelectedValue) : 0; String carePlanGoalName = (AddCarePlanGoalTypeSelection.SelectedValue == "1") ? AddCarePlanGoalName.Text : String.Empty; response = MercuryApplication.MemberCaseCarePlanGoal_Add(ParentMemberCasePage.Case, MemberCaseCarePlan.Id, selectedBaselineGoalId, carePlanGoalName, selectedCareMeasureId); if (response.HasException) { ParentMemberCasePage.ExceptionMessage = response.Exception.Message; } else { ParentMemberCasePage.Case = new Client.Core.Individual.Case.MemberCase(MercuryApplication, response.MemberCase); } CarePlanGoalGrid.DataSource = null; CarePlanGoalGrid.Rebind(); #endregion break; case Telerik.Web.UI.RadGrid.DeleteCommandName: response = MercuryApplication.MemberCaseCarePlanGoal_Delete(ParentMemberCasePage.Case, MemberCaseCarePlan.Goals [e.Item.ItemIndex].Id); if (response.HasException) { ParentMemberCasePage.ExceptionMessage = response.Exception.Message; } else { ParentMemberCasePage.Case = new Client.Core.Individual.Case.MemberCase(MercuryApplication, response.MemberCase); } CarePlanGoalGrid.DataSource = null; CarePlanGoalGrid.Rebind(); break; case Telerik.Web.UI.RadGrid.CancelCommandName: case Telerik.Web.UI.RadGrid.RebindGridCommandName: CarePlanGoalGrid.DataSource = MemberCaseCarePlan.Goals; CarePlanGoalGrid.DataBind(); break; default: break; } return; }
private void InitializeCarePlan() { if (MemberCaseCarePlan == null) { return; } MemberCaseCarePlanStatus.Text = MemberCaseCarePlan.StatusDescription; PeformAssessmentHyperLink.NavigateUrl = "/Application/MemberCase/Actions/MemberCaseCarePlanAssessment.aspx?MemberCaseId=" + MemberCaseCarePlan.MemberCaseId.ToString() + "&MemberCaseCarePlanId=" + MemberCaseCarePlan.Id.ToString(); // INITIALIZE SELECTED CARE PLAN SEVERITY RAD COMBO BOX WITH ENBALED VISIBLE CARE LEVELS InitializeSelectedCarePlanSeverity(); //System.Web.UI.HtmlControls.HtmlControl titlePanel = (System.Web.UI.HtmlControls.HtmlControl)FindControl ("TitlePanel_" + carePlanGoal.MemberCaseCarePlan.Status.ToString ()); //if (titlePanel != null) { titlePanel.Visible = true; } //// MAP PROPERTY VALUES INTO CONTROLS //CarePlanGoalEditName.Text = CarePlanGoalName.Text = carePlanGoal.Name; //// CARE PLAN GOAL STATUS //CarePlanGoalEditClinicalNarrative.Text = CarePlanGoalClinicalNarrative.Text = carePlanGoal.ClinicalNarrative; //CarePlanGoalEditCommonNarrative.Text = CarePlanGoalCommonNarrative.Text = carePlanGoal.CommonNarrative; //CarePlanGoalMeasureName.Text = carePlanGoal.CareMeasureName; //CarePlanGoalMeasureName.ToolTip = (carePlanGoal.CareMeasure != null) ? carePlanGoal.CareMeasure.Description : String.Empty; //// EDIT PANELS BASED ON CARE PLAN GOAL STATUS (GOAL STATUS IS MORE DETAILED THAN CARE PLAN STATUS) //System.Web.UI.HtmlControls.HtmlControl carePlanGoalEditPanel = (System.Web.UI.HtmlControls.HtmlControl)FindControl ("CarePlanGoalEditPanel_" + carePlanGoal.MemberCaseCarePlan.Status.ToString ()); //if (carePlanGoalEditPanel != null) { carePlanGoalEditPanel.Visible = true; } //#region EDIT PANEL - UNDER DEVELOPMENT //CarePlanGoalTimeframeSelection.SelectedValue = ((Int32)carePlanGoal.GoalTimeframe).ToString (); //CarePlanGoalScheduleValue.Value = carePlanGoal.ScheduleValue; //CarePlanGoalScheduleQualifierSelection.SelectedValue = ((Int32)carePlanGoal.ScheduleQualifier).ToString (); //CarePlanGoalCareMeasureSelection.DataSource = MercuryApplication.CareMeasuresAvailable (true); //CarePlanGoalCareMeasureSelection.DataTextField = "Name"; //CarePlanGoalCareMeasureSelection.DataValueField = "Id"; //CarePlanGoalCareMeasureSelection.SelectedValue = carePlanGoal.CareMeasureId.ToString (); //#endregion CarePlanGoalGrid.DataSource = MemberCaseCarePlan.Goals; CarePlanGoalGrid.DataBind(); CarePlanInterventionGrid.DataSource = DataSourceCarePlanInterventionGrid; CarePlanInterventionGrid.DataBind(); return; }