public override void BindControls() { DataSet dsHealthHomeDocuments = new DataSet(); dsHealthHomeDocuments = BaseCommonFunctions.GetScreenInfoDataSet(); DynamicFormsDiagnosticRiskAssessment.FormId = 95; DynamicFormsDiagnosticRiskAssessment.Activate(); CustomGrid_CustomDocumentHealthHomeCarePlanDiagnoses.Bind(10977); CustomGrid_CustomDocumentHealthHomeCarePlanPESNeeds.Bind(ParentDetailPageObject.ScreenId); using (DataView DataViewGlobalCodes = BaseCommonFunctions.FillDropDown("XDIAGNOSISSOURCE", true, "", "", false)) { if (DataViewGlobalCodes != null) { DataViewGlobalCodes.Sort = "SortOrder asc"; DropDownList_CustomDocumentHealthHomeCarePlanDiagnoses_DiagnosisSource.DataTextField = "CodeName"; DropDownList_CustomDocumentHealthHomeCarePlanDiagnoses_DiagnosisSource.DataValueField = "GlobalCodeID"; DropDownList_CustomDocumentHealthHomeCarePlanDiagnoses_DiagnosisSource.DataSource = DataViewGlobalCodes; DropDownList_CustomDocumentHealthHomeCarePlanDiagnoses_DiagnosisSource.DataBind(); DropDownList_CustomDocumentHealthHomeCarePlanDiagnoses_DiagnosisSource.Items.Insert(0, new ListItem("", "0")); } } using (DataView DataViewGlobalCodes = BaseCommonFunctions.FillDropDown("XICPNEEDS", true, "", "", false)) { DataViewGlobalCodes.Sort = "SortOrder asc"; DropDownList_CustomDocumentHealthHomeCarePlanPESNeeds_PsychosocialSupportNeedType.DataTextField = "CodeName"; DropDownList_CustomDocumentHealthHomeCarePlanPESNeeds_PsychosocialSupportNeedType.DataValueField = "GlobalCodeID"; DropDownList_CustomDocumentHealthHomeCarePlanPESNeeds_PsychosocialSupportNeedType.DataSource = DataViewGlobalCodes; DropDownList_CustomDocumentHealthHomeCarePlanPESNeeds_PsychosocialSupportNeedType.DataBind(); DropDownList_CustomDocumentHealthHomeCarePlanPESNeeds_PsychosocialSupportNeedType.Items.Insert(0, new ListItem("", "0")); } }
public override void BindControls() { CustomGrid_CustomDocumentHealthHomeCarePlanDiagnoses.Bind(ParentDetailPageObject.ScreenId); using (DataView DataViewGlobalCodes = BaseCommonFunctions.FillDropDown("XENCOUNTERREASON", true, "", "", false)) { if (DataViewGlobalCodes != null) { DataViewGlobalCodes.Sort = "SortOrder asc"; DropDownList_CustomDocumentHealthHomeServiceNotes_ReasonTodaysEncounter.DataTextField = "CodeName"; DropDownList_CustomDocumentHealthHomeServiceNotes_ReasonTodaysEncounter.DataValueField = "GlobalCodeID"; DropDownList_CustomDocumentHealthHomeServiceNotes_ReasonTodaysEncounter.DataSource = DataViewGlobalCodes; DropDownList_CustomDocumentHealthHomeServiceNotes_ReasonTodaysEncounter.DataBind(); DropDownList_CustomDocumentHealthHomeServiceNotes_ReasonTodaysEncounter.Items.Insert(0, new ListItem("", "0")); DropDownList_CustomDocumentHealthHomeServiceNotes_ReasonTodaysEncounter.SelectedIndex = 0; } } using (DataView DataViewGlobalCodes = BaseCommonFunctions.FillDropDown("XDIAGNOSISSOURCE", true, "", "", false)) { if (DataViewGlobalCodes != null) { DataViewGlobalCodes.Sort = "SortOrder asc"; DropDownList_CustomDocumentHealthHomeCarePlanDiagnoses_DiagnosisSource.DataTextField = "CodeName"; DropDownList_CustomDocumentHealthHomeCarePlanDiagnoses_DiagnosisSource.DataValueField = "GlobalCodeID"; DropDownList_CustomDocumentHealthHomeCarePlanDiagnoses_DiagnosisSource.DataSource = DataViewGlobalCodes; DropDownList_CustomDocumentHealthHomeCarePlanDiagnoses_DiagnosisSource.DataBind(); DropDownList_CustomDocumentHealthHomeCarePlanDiagnoses_DiagnosisSource.Items.Insert(0, new ListItem("", "0")); } } }
private void getLabDropDownList() { SqlParameter[] _objectSqlParmeters; DataSet dataSetLabOrders = new DataSet(); try { _objectSqlParmeters = new SqlParameter[1]; _objectSqlParmeters[0] = new SqlParameter("@ClientID", BaseCommonFunctions.ApplicationInfo.Client.ClientId); SqlHelper.FillDataset(Connection.ConnectionString, CommandType.StoredProcedure, "csp_getLabOrders", dataSetLabOrders, new string[] { "LabOrders" }, _objectSqlParmeters); if (dataSetLabOrders != null && dataSetLabOrders.Tables.Count > 0) { if (dataSetLabOrders.Tables.Contains("LabOrders") && BaseCommonFunctions.CheckRowExists(dataSetLabOrders, "LabOrders", 0)) { DataView dataviewLabOrders = new DataView(dataSetLabOrders.Tables["LabOrders"]); DropDownList_CustomDocumentPsychiatricServiceNoteMDMs_LabsSelected.DataSource = dataviewLabOrders; DropDownList_CustomDocumentPsychiatricServiceNoteMDMs_LabsSelected.DataTextField = "OrderName"; DropDownList_CustomDocumentPsychiatricServiceNoteMDMs_LabsSelected.DataValueField = "ClientOrderId"; DropDownList_CustomDocumentPsychiatricServiceNoteMDMs_LabsSelected.DataBind(); DropDownList_CustomDocumentPsychiatricServiceNoteMDMs_LabsSelected.Items.Insert(0, new ListItem("", "")); DropDownList_CustomDocumentPsychiatricServiceNoteMDMs_LabsSelected.SelectedIndex = -1; } } } finally { if (dataSetLabOrders != null) { dataSetLabOrders.Dispose(); } _objectSqlParmeters = null; } }
public override void BindControls() { //BindCAFASRaterList(); //For binding of RaterClinician dropdown which contains all those active staff where clinician='Y' if (SHS.BaseLayer.SharedTables.ApplicationSharedTables.Staff != null) { //DataView dataViewStaff = new DataView(SHS.BaseLayer.SharedTables.ApplicationSharedTables.Staff); DataView dataViewStaff = SHS.BaseLayer.SharedTables.GetSharedTableStaff(); dataViewStaff.RowFilter = "Clinician='Y'"; dataViewStaff.Sort = "StaffName"; DropDownList_CustomCAFAS2_RaterClinician.DataTextField = "StaffName"; DropDownList_CustomCAFAS2_RaterClinician.DataValueField = "StaffId"; DropDownList_CustomCAFAS2_RaterClinician.DataSource = dataViewStaff; DropDownList_CustomCAFAS2_RaterClinician.DataBind(); DropDownList_CustomCAFAS2_RaterClinician.Items.Insert(0, new ListItem("", "")); } //For binding of CAFASInterval dropdown using (DataView DataViewGlobalCodes = BaseCommonFunctions.FillDropDown("XCAFASINTERVAL", true, "", "CodeName", true)) { DropDownList_CustomCAFAS2_CAFASInterval.DataTextField = "CodeName"; DropDownList_CustomCAFAS2_CAFASInterval.DataValueField = "GlobalCodeId"; DropDownList_CustomCAFAS2_CAFASInterval.DataSource = DataViewGlobalCodes; DropDownList_CustomCAFAS2_CAFASInterval.DataBind(); } }
/// <summary> /// <Author>Mohit Madaan</Author> /// <Description>This function is used to bind Server side Controls (Like Dropdowns and Custom Grid)</Description> /// <CreatedDate>September 11,2009</CreatedDate> /// </summary> public override void BindControls() { CustomGrid.Bind(ParentDetailPageObject.ScreenId); CustomICDGrid.Bind(ParentDetailPageObject.ScreenId); using (DataView DataViewGlobalCodes = BaseCommonFunctions.FillDropDown("DIAGNOSISSEVERITY", true, "", "", false)) { //DropDownList_DiagnosesIAndII_Severity.DataTextField = "CodeName"; //DropDownList_DiagnosesIAndII_Severity.DataValueField = "GlobalCodeID"; //DropDownList_DiagnosesIAndII_Severity.DataSource = DataViewGlobalCodes; //DropDownList_DiagnosesIAndII_Severity.DataBind(); } using (DataView DataViewGlobalCodes = BaseCommonFunctions.FillDropDown("DxRemissionType", true, "", "", false)) { DropDownList_DiagnosesIAndII_Remission.DataTextField = "CodeName"; DropDownList_DiagnosesIAndII_Remission.DataValueField = "GlobalCodeID"; DropDownList_DiagnosesIAndII_Remission.DataSource = DataViewGlobalCodes; DropDownList_DiagnosesIAndII_Remission.DataBind(); DropDownList_DiagnosesIAndII_Remission.Items.Insert(0, new ListItem("", "")); } using (DataView DataViewGlobalCodes = BaseCommonFunctions.FillDropDown("DIAGNOSISTYPE", true, "", "", false)) { DataViewGlobalCodes.Sort = "SortOrder asc"; DropDownList_DiagnosesIAndII_DiagnosisType.DataTextField = "CodeName"; DropDownList_DiagnosesIAndII_DiagnosisType.DataValueField = "GlobalCodeID"; DropDownList_DiagnosesIAndII_DiagnosisType.DataSource = DataViewGlobalCodes; DropDownList_DiagnosesIAndII_DiagnosisType.DataBind(); DropDownList_DiagnosesIAndII_DiagnosisType.Items.Insert(0, new ListItem("", "0")); } //DropDownList_DiagnosesIAndII_Remission.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes; }
public override void CustomAjaxRequest() { Literal literalStart = new Literal(); Literal literalHtmlText = new Literal(); Literal literalEnd = new Literal(); literalStart.Text = "###StartUc###"; if (GetRequestParameterValue("CustomAjaxRequestType") == "CountSequenceNumber") { DataSet dsHealthHomeDocuments = new DataSet(); dsHealthHomeDocuments = BaseCommonFunctions.GetScreenInfoDataSet(); int SequenceCount = 0; string tablename = GetRequestParameterValue("TableName"); if (dsHealthHomeDocuments.Tables.Contains(tablename)) { if (dsHealthHomeDocuments.Tables[tablename].Rows.Count > 0) { SequenceCount = Convert.ToInt32(dsHealthHomeDocuments.Tables[tablename].Rows[dsHealthHomeDocuments.Tables[tablename].Rows.Count - 1]["SequenceNumber"]); } } SequenceCount = SequenceCount + 1; literalHtmlText.Text = GetRequestParameterValue("GridDataTable") + "^" + GetRequestParameterValue("GridDivName") + "^" + GetRequestParameterValue("DataGridID") + "^" + GetRequestParameterValue("ButtonCtrl") + "^" + SequenceCount.ToString(); } literalEnd.Text = "###EndUc###"; PanelLoadUC.Controls.Add(literalStart); PanelLoadUC.Controls.Add(literalHtmlText); PanelLoadUC.Controls.Add(literalEnd); }
private void getLabOrderList() { SqlParameter[] _objectSqlParmeters; DataSet dataSetLabOrders = new DataSet(); try { _objectSqlParmeters = new SqlParameter[1]; _objectSqlParmeters[0] = new SqlParameter("@ClientID", BaseCommonFunctions.ApplicationInfo.Client.ClientId); SqlHelper.FillDataset(Connection.ConnectionString, CommandType.StoredProcedure, "csp_getLabOrdersPsycNote", dataSetLabOrders, new string[] { "LabOrders" }, _objectSqlParmeters); if (dataSetLabOrders != null && dataSetLabOrders.Tables.Count > 0) { if (dataSetLabOrders.Tables.Contains("LabOrders") && BaseCommonFunctions.CheckRowExists(dataSetLabOrders, "LabOrders", 0)) { DataView dataviewLabOrders = new DataView(dataSetLabOrders.Tables["LabOrders"]); ClientOrderId = dataSetLabOrders.Tables["LabOrders"].Columns["ClientOrderId"].ToString(); GridViewLaborders.DataSource = dataviewLabOrders; GridViewLaborders.DataBind(); } } } finally { if (dataSetLabOrders != null) { dataSetLabOrders.Dispose(); } _objectSqlParmeters = null; } }
public override void BindControls() { getLabOrderList(); #region Bind DropDownList For Transition/Discharge Reason using (DataView DataViewGlobalCodetransitionProblemStatus = BaseCommonFunctions.FillDropDown("XPROBLEMSTATUS", true, "", "CodeName", true)) { if (DataViewGlobalCodetransitionProblemStatus != null) { DataViewGlobalCodetransitionProblemStatus.RowFilter = "GlobalCodeId is not null and Active='Y' and ISNULL(RecordDeleted,'N')<>'Y'"; DropDownListCommon_CustomDocumentPsychiatricNoteMDMs_ProblemStatus.DataTableGlobalCodes = DataViewGlobalCodetransitionProblemStatus.ToDataTable(); DropDownListCommon_CustomDocumentPsychiatricNoteMDMs_ProblemStatus.FillDropDownDropGlobalCodes(); DropDownListCommon_CustomDocumentPsychiatricNoteMDMs_ProblemStatus.Items.Insert(0, new ListItem("", "0"));; } } DataSet DatasetAgency = null; DatasetAgency = new DataSet(); SqlHelper.FillDataset(Connection.ConnectionString, CommandType.StoredProcedure, "CSP_SCGetAgencyNameDetails", DatasetAgency, new string[] { "Agency" }); if (DatasetAgency.Tables["Agency"].Rows.Count > 0) { HiddenField_CustomDocumentConsentTreatments_AgencyName.Value = DatasetAgency.Tables["Agency"].Rows[0]["AgencyName"].ToString(); } HiddenField_CustomDocumentConsentTreatments_AgencyaAbbreviation.Value = DatasetAgency.Tables["Agency"].Rows[0]["AbbreviatedAgencyName"].ToString(); #endregion }
public override void BindControls() { DataView dataViewClinician = SHS.BaseLayer.SharedTables.GetSharedTableStaff(); dataViewClinician.RowFilter = "Clinician='Y' and Active='Y' and ISNULL(RecordDeleted,'N')<>'Y'"; dataViewClinician.Sort = "StaffName ASC"; DropDownList_CustomDocumentHealthHomeCrisisPlans_ClinicianFacilitatingDischarge.DataTextField = "StaffName"; DropDownList_CustomDocumentHealthHomeCrisisPlans_ClinicianFacilitatingDischarge.DataValueField = "StaffId"; DropDownList_CustomDocumentHealthHomeCrisisPlans_ClinicianFacilitatingDischarge.DataSource = dataViewClinician; DropDownList_CustomDocumentHealthHomeCrisisPlans_ClinicianFacilitatingDischarge.DataBind(); DropDownList_CustomDocumentHealthHomeCrisisPlans_ClinicianFacilitatingDischarge.Items.Insert(0, new ListItem("", "0")); DropDownList_CustomDocumentHealthHomeCrisisPlans_ClinicianFacilitatingDischarge.SelectedIndex = 0; CustomGrid_CustomDocumentHealthHomeCommPlanFamilyMembers.Bind(ParentDetailPageObject.ScreenId); CustomGrid_CustomDocumentHealthHomeMentalHealthCrisisPlanSteps.Bind(ParentDetailPageObject.ScreenId); CustomGrid_CustomDocumentHealthHomeCrisisPlanTypes.Bind(ParentDetailPageObject.ScreenId); CustomGrid_CustomDocumentHealthHomeCarePlanDiagnoses.Bind(ParentDetailPageObject.ScreenId); using (DataView DataViewGlobalCodes = BaseCommonFunctions.FillDropDown("XDIAGNOSISSOURCE", true, "", "", false)) { if (DataViewGlobalCodes != null) { DataViewGlobalCodes.Sort = "SortOrder asc"; DropDownList_CustomDocumentHealthHomeCarePlanDiagnoses_DiagnosisSource.DataTextField = "CodeName"; DropDownList_CustomDocumentHealthHomeCarePlanDiagnoses_DiagnosisSource.DataValueField = "GlobalCodeID"; DropDownList_CustomDocumentHealthHomeCarePlanDiagnoses_DiagnosisSource.DataSource = DataViewGlobalCodes; DropDownList_CustomDocumentHealthHomeCarePlanDiagnoses_DiagnosisSource.DataBind(); DropDownList_CustomDocumentHealthHomeCarePlanDiagnoses_DiagnosisSource.Items.Insert(0, new ListItem("", "0")); } } }
/// <summary> /// This function added by Rakesh to merge ASAM pop up data in parent screen dataset /// </summary> private void MergeASAMPopUpDataInDataSet() { string AutoSaveXML = GetRequestParameterValue("ASAMPopUpData").Replace("%PL", "+"); StringReader stringReader; DataSet datasetXMLReader = null; string strxml = AutoSaveXML.Replace("xmlns=\"\"", ""); if (strxml.IndexOf("xmlns:xsi=") == -1) { int index = strxml.IndexOf("xmlns"); if (index != -1) { strxml = strxml.Insert(index - 1, " " + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" + " "); } } if (!string.IsNullOrEmpty(strxml)) { stringReader = new StringReader(strxml); datasetXMLReader = new DataSet(); datasetXMLReader.ReadXml(stringReader); } if (BaseCommonFunctions.CheckRowExists(BaseCommonFunctions.GetScreenInfoDataSet(), "CustomASAMPlacements")) { BaseCommonFunctions.GetScreenInfoDataSet().Tables["CustomASAMPlacements"].Merge(datasetXMLReader.Tables[0], false, MissingSchemaAction.Ignore); } }
/// <summary> /// <Author>Rohit Katoch</Author> /// <CreatedOn>24th-June-2011</CreatedOn> /// <Description>To remove the tables from dataset which need not be saved</Description> /// </summary> /// <param name="dataSetObject"></param> public override void ChangeDataSetBeforeUpdate(ref DataSet dataSetObject) { if (dataSetObject.Tables.Contains("CurrentDiagnoses")) { dataSetObject.Tables.Remove("CurrentDiagnoses"); } if (dataSetObject.Tables.Contains("CustomTPQuickObjectives")) { dataSetObject.Tables.Remove("CustomTPQuickObjectives"); } if (dataSetObject.Tables.Contains("CustomTPGlobalQuickGoals")) { dataSetObject.Tables.Remove("CustomTPGlobalQuickGoals"); } if (dataSetObject.Tables.Contains("CustomTPGlobalQuickTransitionPlans")) { dataSetObject.Tables.Remove("CustomTPGlobalQuickTransitionPlans"); } if (BaseCommonFunctions.CheckRowExists(dataSetObject, "CustomTPObjectives", 0)) { DataRow[] drTPObjectives = dataSetObject.Tables["CustomTPObjectives"].Select(); foreach (DataRow row in drTPObjectives) { if (row["Status"].ToString() == "") { row["Status"] = 1; } } } // dataSetObject.Tables["CustomTPServices"].Rows[0]["AuthorizationCodeId"] if (BaseCommonFunctions.CheckRowExists(dataSetObject, "CustomTPServices", 0)) { DataRow[] drDeletedTPServices = dataSetObject.Tables["CustomTPServices"].Select("isnull(RecordDeleted,'N')='Y' and TPServiceId>0 and isnull(AuthorizationCodeId,-1)=-1"); foreach (DataRow drTPServices in drDeletedTPServices) { if ((drTPServices.RowState == DataRowState.Modified)) //&& Convert.ToString(drTPServices["RecordDeleted"]) == "Y" && (drTPServices["AuthorizationCodeId"]==DBNull.Value || Convert.ToInt32(drTPServices["AuthorizationCodeId"])<=0)) { //if (Convert.ToInt32(drTPServices["TPServiceId"]) > 0 && drTPServices.RowState == DataRowState.Modified) //{ drTPServices["AuthorizationCodeId"] = drTPServices["AuthorizationCodeId", DataRowVersion.Original]; //} } } DataRow[] dataRowTPServices = dataSetObject.Tables["CustomTPServices"].Select("TPServiceId<=0 and isnull(AuthorizationCodeId,-1)=-1 and isnull(RecordDeleted,'N')='Y'"); int i = 0; while (i < dataRowTPServices.Length) { dataSetObject.Tables["CustomTPServices"].Rows.Remove(dataRowTPServices[i]); i++; } } }
public override DataTable GetExportDataSet() { DataSet dataset = null; string FromDate; string Todate; int RecorderBy = BaseCommonFunctions.ApplicationInfo.LoggedInUser.LoggedinUserId; int pageNumber = 0; int pageSize = 0; string sortExpression = ""; int StaffId = 0; int ProgramId = 0; int FormId = 0; int LOI = 0; int IncidentCategory = -1; int SecondaryCategory = 0; int Status = 0; int ClientId = -1; string IndividualName = string.Empty; int ResidentialUnit = 0; pageNumber = ParentPageListObject.CurrentPage; pageSize = ParentPageListObject.PageSize == 0 ? 1 : ParentPageListObject.PageSize; sortExpression = ParentPageListObject.SortExpression; char Recorder = GetSignedByRecorder(); char Nursing = GetSignedByNursing(); char Supervisior = GetSignedBySupervisior(); char Administrator = GetSignedByAdministrator(); char FromDashboard = 'N'; if (!String.IsNullOrEmpty(GetFilterValue("FromDashboard"))) { FromDashboard = GetFilterValue("FromDashboard") == "Y" ? 'Y' : 'N'; } if (sortExpression.Trim() == "" || sortExpression.Trim() == null || sortExpression == string.Empty) { sortExpression = ""; } LOI = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "GeneralLocationOfIncident", ParentPageObject.PageFiltersXML); IncidentCategory = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "GeneralIncidentCategory", ParentPageObject.PageFiltersXML); SecondaryCategory = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "GeneralSecondaryCategory", ParentPageObject.PageFiltersXML); StaffId = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "Staff", ParentPageObject.PageFiltersXML); FromDate = BaseCommonFunctions.GetSelectedValueFromXML <string>("/PageFilters/", "StartDate", ParentPageObject.PageFiltersXML); Todate = BaseCommonFunctions.GetSelectedValueFromXML <string>("/PageFilters/", "EndDate", ParentPageObject.PageFiltersXML); IndividualName = BaseCommonFunctions.GetSelectedValueFromXML <string>("/PageFilters/", "Individual", ParentPageObject.PageFiltersXML); RecorderBy = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "Staff", ParentPageObject.PageFiltersXML); Status = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "Status", ParentPageObject.PageFiltersXML); ProgramId = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "ProgramId", ParentPageObject.PageFiltersXML); FormId = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "Forms", ParentPageObject.PageFiltersXML); ResidentialUnit = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "ResidentialUnit", ParentPageObject.PageFiltersXML); dataset = GetIncidentRestrictive(pageNumber, pageSize, ClientId, sortExpression, FromDate, Todate, ProgramId, FormId, LOI, IncidentCategory, SecondaryCategory, IndividualName, RecorderBy, Status, Recorder, Nursing, Supervisior, Administrator, FromDashboard, ResidentialUnit); return(dataset.Tables["IncidentRestrictive"]); }
public override void BindControls() { DataSet dsHealthHomeDocuments = new DataSet(); dsHealthHomeDocuments = BaseCommonFunctions.GetScreenInfoDataSet(); BindDropDowns(); CustomGrid_CustomDocumentHealthHomeCommPlanProviders.Bind(ParentPageObject.ScreenId); CustomGrid_CustomDocumentHealthHomeCommPlanFamilyMembers.Bind(ParentPageObject.ScreenId); CustomGrid_CustomDocumentHealthHomeCommPlanSocialSupports.Bind(ParentPageObject.ScreenId); }
/// <summary> /// Overridden function of DataActivityTab /// </summary> public override void BindControls() { HiddenFieldRelativePath.Value = Page.ResolveUrl("~/"); RelativePath = Page.ResolveUrl("~/"); using (DataView dataViewGlobalCodes = BaseCommonFunctions.FillDropDown("AUTHORIZATIONTEAM", true, "", "", false)) { dataViewGlobalCodes.RowFilter = "Active='Y' and isnull(RecordDeleted,'N')='N'"; dataViewGlobalCodes.Sort = "CodeName"; } }
public override void BindControls() { using (DataView dataViewGlobalCodes = BaseCommonFunctions.FillDropDown("STAGEOFCHANGE", true, "", "SortOrder", true)) { DropDownList_CustomDocumentCRAFFTs_CrafftStageOfChange.DataTextField = "CodeName"; DropDownList_CustomDocumentCRAFFTs_CrafftStageOfChange.DataValueField = "GlobalCodeId"; DropDownList_CustomDocumentCRAFFTs_CrafftStageOfChange.DataSource = dataViewGlobalCodes; DropDownList_CustomDocumentCRAFFTs_CrafftStageOfChange.DataBind(); } }
private void BindControl() { using (DataView dataViewGlobalCodes = BaseCommonFunctions.FillDropDown("XGuardianType", true, "", "CodeName", true)) { DropDownList_CustomHRMAssessments_GuardianType.DataTextField = "CodeName"; DropDownList_CustomHRMAssessments_GuardianType.DataValueField = "GlobalCodeId"; DropDownList_CustomHRMAssessments_GuardianType.DataSource = dataViewGlobalCodes; DropDownList_CustomHRMAssessments_GuardianType.DataBind(); } }
/// <summary> /// Davinder Kumar 03-06-2011 /// Method Use To get the Data of The Rows /// </summary> protected void GridViewCustomTPNeed_HtmlRowPrepared(object sender, ASPxGridViewTableRowEventArgs e) { if (e.RowType != GridViewRowType.Data || e.Row.Cells.Count < 3) { return; } if (e.GetValue("NeedId").ToString() != "") { NeedId = Convert.ToInt32(e.GetValue("NeedId")); } if (e.GetValue("NeedText").ToString() != "") { NeedText = HttpUtility.UrlEncode(Convert.ToString(e.GetValue("NeedText"))); } else { NeedText = string.Empty; } string Checked = string.Empty; using (DataSet dataSetTreatmentPlan = BaseCommonFunctions.GetScreenInfoDataSet()) { //if (e.DataColumn.FieldName == "NeedId") //{ string lstSessionNeedId = string.Empty; DataRow[] drSessionNeeds = dataSetTreatmentPlan.Tables["CustomTPGoalNeeds"].Select("NeedId='" + NeedId + "' and ISNULL(RecordDeleted,'N')<>'Y'"); foreach (DataRow drNeeds in drSessionNeeds) { lstSessionNeedId += drNeeds["TPGoalId"].ToString() + ","; } DataRow[] dRowGoalNeed = dataSetTreatmentPlan.Tables["CustomTPGoalNeeds"].Select("TPGoalId='" + TPGoalId + "' AND NeedId='" + NeedId + "' and ISNULL(RecordDeleted,'N')<>'Y'"); if (dRowGoalNeed.Length > 0) { Checked = "Checked"; //e.Row.Cells[0].Text = "<table><tr><td style='width:20px;'><img id=Img_CustomTPGoalNeeds_" + NeedId + " name=Img_CustomTPGoalNeeds_" + NeedId + " src=" + RelativePath + "App_Themes/Includes/Images/deleteIcon.gif tag=" + dRowGoalNeed[0]["TPGoalNeeds"].ToString() + " style='cursor:hand;display:None;' onclick = \"DeleteTpGoalNeeds('" + NeedId + "','" + e.GetValue("LinkedInDb") + "','" + e.GetValue("LinkedInSession") + "');\"/></td><td><input type='checkbox' checked='checked' id='CheckBox_" + NeedId + "_" + NeedText + "' name='CheckBox_" + NeedId + "_" + NeedText + "' style='width:20px;' onclick=ChangeDisplayChecked('Img_CustomTPGoalNeeds_" + NeedId + "','CheckBox_" + NeedId + "') /> <label for='CheckBox_" + NeedId + "_" + NeedText + "' >" + SHS.BaseLayer.BaseCommonFunctions.TrancateElementText(NeedText, 20) + "</label> <input type='hidden' id='Hidden_" + NeedId + "' value='" + NeedText + "' /> <input type='hidden' id='HiddenSessionNeeds_" + NeedId + "' value='"+lstSessionNeedId+"' /> </td></tr></table>"; e.Row.Cells[0].Text = "<table width='43'><tr><td style='width:18px;'><img id='Img_CustomTPGoalNeeds_" + NeedId + "' name='Img_CustomTPGoalNeeds_" + NeedId + "' src='" + RelativePath + "App_Themes/Includes/Images/deleteIcon.gif' tag='" + dRowGoalNeed[0]["TPGoalNeeds"].ToString() + "' style='cursor:hand;display:None;' onclick = \"DeleteTpGoalNeeds('" + NeedId + "','" + e.GetValue("LinkedInDb") + "','" + e.GetValue("LinkedInSession") + "');\"/></td><td style='width:18px'><input type='checkbox' checked='checked' id='CheckBox_" + NeedId + "' name='CheckBox_" + NeedId + "' onclick=ChangeDisplayChecked('Img_CustomTPGoalNeeds_" + NeedId + "','CheckBox_" + NeedId + "') /> <input type='hidden' id='Hidden_" + NeedId + "' value='" + NeedText + "' /> <input type='hidden' id='HiddenSessionNeeds_" + NeedId + "' value='" + lstSessionNeedId + "' /> </td></tr></table>"; e.Row.Cells[2].Text = (dRowGoalNeed[0]["DateNeedAddedtoPlan"].ToString().Trim() != string.Empty) ? Convert.ToDateTime(dRowGoalNeed[0]["DateNeedAddedtoPlan"]).ToString("MM/dd/yyyy") : ""; } else { Checked = string.Empty; e.Row.Cells[0].Text = "<table width='43'><tr><td style='width:18px;'><img id='Img_CustomTPGoalNeeds_" + NeedId + "' name='Img_CustomTPGoalNeeds_" + NeedId + "' src='" + RelativePath + "App_Themes/Includes/Images/deleteIcon.gif' tag='" + -1 + "' style='cursor:hand;display:block;' onclick = \"DeleteTpGoalNeeds('" + NeedId + "','" + e.GetValue("LinkedInDb") + "','" + e.GetValue("LinkedInSession") + "');\"/></td><td style='width:18px'><input type='checkbox' id='CheckBox_" + NeedId + "' name='CheckBox_" + NeedId + "' onclick=ChangeDisplayChecked('Img_CustomTPGoalNeeds_" + NeedId + "','CheckBox_" + NeedId + "') /><input type='hidden' id='Hidden_" + NeedId + "' value='" + NeedText + "' /> <input type='hidden' id='HiddenSessionNeeds_" + NeedId + "' value='" + lstSessionNeedId + "' /> </td></tr></table>"; } e.Row.Cells[1].Text = "<label for='CheckBox_" + NeedId + "_" + NeedText + "' id='label_" + NeedId + "'>" + SHS.BaseLayer.BaseCommonFunctions.TrancateElementText(HttpUtility.UrlDecode(NeedText), 20) + "</label>"; //GrantPermissionTemplateItems //e.DataColumn.CellStyle.HorizontalAlign = HorizontalAlign.Center; //DataRow[] dRowGoalNeed = dataSetTreatmentPlan.Tables["CustomTPGoalNeeds"].Select("TPGoalId='" + TPGoalId + "' AND NeedId='" + NeedId + "' and ISNULL(RecordDeleted,'N')<>'Y'"); } }
public override void BindControls() { //This Code is used to bind the RelationShip DropDown using (DataView DataViewGlobalCodes = BaseCommonFunctions.FillDropDown("RELATIONSHIP", true, "", "CodeName", true)) { DropDownList_CustomAcuteServicesPrescreens_ClientRelationship.DataTextField = "CodeName"; DropDownList_CustomAcuteServicesPrescreens_ClientRelationship.DataValueField = "GlobalCodeId"; DropDownList_CustomAcuteServicesPrescreens_ClientRelationship.DataSource = DataViewGlobalCodes; DropDownList_CustomAcuteServicesPrescreens_ClientRelationship.DataBind(); } //This Code is used to bind the Physician Name //DataRow[] dataRowStaff = SHS.BaseLayer.SharedTables.ApplicationSharedTables.Staff.Select("Active='Y'", "StaffName asc"); // DataSet dataSetStaff = new DataSet(); //dataSetStaff.Merge(dataRowStaff,false,MissingSchemaAction.Ignore); //Modified by Jitender Kumar Kamboj on 10 sep 2010 //DropDownList_CustomAcuteServicesPrescreens_CMHStatusPrimaryClinician.DataSource = SHS.BaseLayer.SharedTables.ApplicationSharedTables.Staff; DataView DataViewStaffName = SHS.BaseLayer.SharedTables.ApplicationSharedTables.Staff.DefaultView; DataViewStaffName.Sort = "StaffName"; DataViewStaffName.RowFilter = "Active='Y'"; DropDownList_CustomAcuteServicesPrescreens_CMHStatusPrimaryClinician.DataSource = DataViewStaffName; DropDownList_CustomAcuteServicesPrescreens_CMHStatusPrimaryClinician.DataTextField = "StaffName"; DropDownList_CustomAcuteServicesPrescreens_CMHStatusPrimaryClinician.DataValueField = "StaffId"; DropDownList_CustomAcuteServicesPrescreens_CMHStatusPrimaryClinician.DataBind(); DropDownList_CustomAcuteServicesPrescreens_CMHStatusPrimaryClinician.Items.Insert(0, new ListItem("", "")); //Bind The County DropDown int stateFips = -1; //Added By Vikas Vyas in ref to task #1038 if (SHS.BaseLayer.SharedTables.ApplicationSharedTables.SystemConfigurations != null) { if (SHS.BaseLayer.SharedTables.ApplicationSharedTables.SystemConfigurations.Rows[0]["StateFips"] != DBNull.Value) { stateFips = Convert.ToInt32(SHS.BaseLayer.SharedTables.ApplicationSharedTables.SystemConfigurations.Rows[0]["StateFips"]); } } DataView dataViewCountyOfResidence = new DataView(SHS.BaseLayer.SharedTables.ApplicationSharedTables.Counties); dataViewCountyOfResidence.Sort = "CountyName"; dataViewCountyOfResidence.RowFilter = "StateFips=" + stateFips; if (dataViewCountyOfResidence.Count > 0) { DropDownList_CustomAcuteServicesPrescreens_ClientCounty.DataSource = dataViewCountyOfResidence; DropDownList_CustomAcuteServicesPrescreens_ClientCounty.DataTextField = "CountyName"; DropDownList_CustomAcuteServicesPrescreens_ClientCounty.DataValueField = "CountyFIPS"; DropDownList_CustomAcuteServicesPrescreens_ClientCounty.DataBind(); DropDownList_CustomAcuteServicesPrescreens_ClientCounty.Items.Insert(0, new ListItem("", "")); } }
public override void BindControls() { FillEventsDropDown(); if (BaseCommonFunctions.ScreenInfo.CurrentDocument.DocumentDataSet != null) { if (BaseCommonFunctions.CheckRowExists(BaseCommonFunctions.ScreenInfo.CurrentDocument.DocumentDataSet, "CustomDocumentEventInformations", 0)) { DataRow dataRowEvent = BaseCommonFunctions.ScreenInfo.CurrentDocument.DocumentDataSet.Tables["CustomDocumentEventInformations"].Rows[0]; HiddenFieldDocumentVersionId.Value = Convert.ToString(dataRowEvent["DocumentVersionId"]); DataRow dataRowDocument = BaseCommonFunctions.ScreenInfo.CurrentDocument.DocumentDataSet.Tables["Documents"].Rows[0]; } } }
public override void BindControls() { getLabDropDownList(); using (DataView DataViewGlobalCodetransitionProblemStatus = BaseCommonFunctions.FillDropDown("XPSYCHEVALSTATUS", true, "", "CodeName", true)) { if (DataViewGlobalCodetransitionProblemStatus != null) { DataViewGlobalCodetransitionProblemStatus.RowFilter = "GlobalCodeId is not null and Active='Y' and ISNULL(RecordDeleted,'N')<>'Y'"; DropDownListCommon_CustomDocumentPsychiatricEvaluations_ProblemStatus.DataTableGlobalCodes = DataViewGlobalCodetransitionProblemStatus.ToDataTable(); DropDownListCommon_CustomDocumentPsychiatricEvaluations_ProblemStatus.FillDropDownDropGlobalCodes(); DropDownListCommon_CustomDocumentPsychiatricEvaluations_ProblemStatus.Items.Insert(0, new ListItem("", "0"));; } } }
public void GetClientProgramsList() { StringBuilder ClientProgramsList = null; ClientProgramsList = new StringBuilder(); SqlParameter[] _objectSqlParmeters = null; _objectSqlParmeters = new SqlParameter[1]; _objectSqlParmeters[0] = new SqlParameter("@ClientId", SHS.BaseLayer.BaseCommonFunctions.ApplicationInfo.Client.ClientId); DataSet dataSetClientProgramsList = new DataSet(); SqlHelper.FillDataset(Connection.ConnectionString, CommandType.StoredProcedure, "csp_GetClientProgramsList", dataSetClientProgramsList, new string[] { "ClientProgramsList" }, _objectSqlParmeters); if (dataSetClientProgramsList != null) { if (dataSetClientProgramsList.Tables.Count > 0 && dataSetClientProgramsList.Tables["ClientProgramsList"].Rows.Count > 0) { ClientProgramsList.Append("["); string CustomDischargeNewPrimaryProgramId = string.Empty; string primaryAssignment = string.Empty; //EI#677.2 - Analysis and Resolution to Fix - Exception: "There is no row at position 0" in SmartCare Application if (BaseCommonFunctions.GetScreenInfoDataSet().IsDataTableFound("CustomDocumentDischarges")) { CustomDischargeNewPrimaryProgramId = BaseCommonFunctions.GetScreenInfoDataSet().Tables["CustomDocumentDischarges"].Rows[0]["NewPrimaryClientProgramId"].ToString(); } for (int Count = 0; Count < dataSetClientProgramsList.Tables["ClientProgramsList"].Rows.Count; Count++) { if (CustomDischargeNewPrimaryProgramId == dataSetClientProgramsList.Tables["ClientProgramsList"].Rows[Count]["ClientProgramId"].ToString()) { primaryAssignment = "Y"; } else { primaryAssignment = Convert.ToString(dataSetClientProgramsList.Tables["ClientProgramsList"].Rows[Count]["PrimaryAssignment"]); } ClientProgramsList.Append("{ " + "ProgramCode: \"" + Convert.ToString(dataSetClientProgramsList.Tables["ClientProgramsList"].Rows[Count]["ProgramCode"]) + "\"," + "PrimaryAssignment: \"" + primaryAssignment + "\"," + "ClientProgramId: " + Convert.ToString(dataSetClientProgramsList.Tables["ClientProgramsList"].Rows[Count]["ClientProgramId"]) + "," + "EnrolledDate: \"" + Convert.ToString(dataSetClientProgramsList.Tables["ClientProgramsList"].Rows[Count]["EnrolledDate"]) + "\" },"); } ClientProgramsList = ClientProgramsList.Remove(ClientProgramsList.Length - 1, 1); ClientProgramsList.Append("];"); } else { ClientProgramsList.Append("[];"); } } Response.Clear(); Response.Write(ClientProgramsList.ToString()); Response.End(); }
public override void BindControls() { //Added by Sonia with Reference to ticket //460 7.3 - Dx Tab: Tab does not stay disabled when DxTabDisabled = 'Y' if (BaseCommonFunctions.CheckRowExists(BaseCommonFunctions.ScreenInfo.CurrentDocument.DocumentDataSet, "CustomHRMAssessments", 0) == true) { if (BaseCommonFunctions.ScreenInfo.CurrentDocument.DocumentDataSet.Tables["CustomHRMAssessments"].Rows[0]["DxTabDisabled"] != null && BaseCommonFunctions.ScreenInfo.CurrentDocument.DocumentDataSet.Tables["CustomHRMAssessments"].Rows[0]["DxTabDisabled"].ToString() == "Y") { BaseCustomGrid obj = (BaseCustomGrid)UserControl_UCDiagnosis.FindControl("CustomGrid"); obj.DoNotDisplayDeleteImage = true; } } UserControl_UCDiagnosis.Activate(); }
public override void BindControls() { getLabDropDownList(); #region Bind DropDownList For Transition/Discharge Reason using (DataView DataViewGlobalCodetransitionProblemStatus = BaseCommonFunctions.FillDropDown("XPROBLEMSTATUS", true, "", "CodeName", true)) { if (DataViewGlobalCodetransitionProblemStatus != null) { DataViewGlobalCodetransitionProblemStatus.RowFilter = "GlobalCodeId is not null and Active='Y' and ISNULL(RecordDeleted,'N')<>'Y'"; DropDownListCommon_CustomDocumentPsychiatricServiceNoteMDMs_ProblemStatus.DataTableGlobalCodes = DataViewGlobalCodetransitionProblemStatus.ToDataTable(); DropDownListCommon_CustomDocumentPsychiatricServiceNoteMDMs_ProblemStatus.FillDropDownDropGlobalCodes(); DropDownListCommon_CustomDocumentPsychiatricServiceNoteMDMs_ProblemStatus.Items.Insert(0, new ListItem("", "0"));; } } #endregion }
public override DataTable GetExportDataSet() { using (SHS.UserBusinessServices.ListPages listPagesObj = new SHS.UserBusinessServices.ListPages()) { int instanceId = 0; int pageNumber = ParentPageListObject.CurrentPage; int pageSize = ParentPageListObject.PageSize == 0 ? 1 : ParentPageListObject.PageSize; string sortExpression = ParentPageListObject.SortExpression; DataSet dataSet = null; // Begin custom code int recordedByStaffId = -1; int assignedToStaffId = 0; string memberLastName = ""; string memberFirstName = ""; int otherFilter = 0; int dispositions = 0; int inquiryStatus = 0; source = "GetExportDataSet"; DateTime InquiriesFrom; DateTime InquiriesTo; recordedByStaffId = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "RecordedByStaffId", ParentPageObject.PageFiltersXML); assignedToStaffId = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "AssignedToStaffId", ParentPageObject.PageFiltersXML); dispositions = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "Dispositions", ParentPageObject.PageFiltersXML); inquiryStatus = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "InquiryStatus", ParentPageObject.PageFiltersXML); InquiriesFrom = BaseCommonFunctions.GetSelectedValueFromXML <DateTime>("/PageFilters/", "InquiriesFrom", ParentPageObject.PageFiltersXML); InquiriesTo = BaseCommonFunctions.GetSelectedValueFromXML <DateTime>("/PageFilters/", "InquiriesTo", ParentPageObject.PageFiltersXML); otherFilter = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "CustomFilter", ParentPageObject.PageFiltersXML); memberLastName = BaseCommonFunctions.GetSelectedValueFromXML <string>("/PageFilters/", "MemberLatName", ParentPageObject.PageFiltersXML); memberFirstName = BaseCommonFunctions.GetSelectedValueFromXML <string>("/PageFilters/", "MemberFirstName", ParentPageObject.PageFiltersXML); dataSet = GetInquriesList(instanceId, pageNumber, pageSize, sortExpression, recordedByStaffId, assignedToStaffId, InquiriesFrom, InquiriesTo, memberLastName, memberFirstName, dispositions, inquiryStatus, otherFilter); dataSet.Tables["CustomInquiries"].Columns.Remove("RowNumber"); dataSet.Tables["CustomInquiries"].Columns.Remove("InquiryId"); dataSet.Tables["CustomInquiries"].Columns["MemberName"].ColumnName = "Client (Potential)"; dataSet.Tables["CustomInquiries"].Columns["MemberId"].ColumnName = "Client Id"; dataSet.Tables["CustomInquiries"].Columns["InquirerName"].ColumnName = "Inquirer"; dataSet.Tables["CustomInquiries"].Columns["InQuiryDateTime"].ColumnName = "Date/Time"; dataSet.Tables["CustomInquiries"].Columns["RecordedByName"].ColumnName = "Recorded By"; dataSet.Tables["CustomInquiries"].Columns["AssignedToName"].ColumnName = "Assigned To"; return(dataSet.Tables["CustomInquiries"]); } }
/// <summary> /// <Created By>Sanjay Bhardwaj</Created> /// <Purpose>TO Add a New ROI</Purpose> /// </summary> public void AddNewCentraWellnessROI() { using (DataSet dataSetDocument = SHS.BaseLayer.BaseCommonFunctions.ScreenInfo.CurrentDocument.DocumentDataSet) { int CustomDocumentReleaseOfInformationId = 0; DataTable datatableROIs = dataSetDocument.Tables["CustomDocumentReleaseOfInformations"]; DataRow datarowNewROI = datatableROIs.NewRow(); if (BaseCommonFunctions.CheckRowExists(datatableROIs, 0)) { //This is used to maintain the ROI Primary Key and Document Version ID. CustomDocumentReleaseOfInformationId = Convert.ToInt32(datatableROIs.Rows[datatableROIs.Rows.Count - 1]["ReleaseOfInformationId"]); if (CustomDocumentReleaseOfInformationId < 0) { datarowNewROI["ReleaseOfInformationId"] = CustomDocumentReleaseOfInformationId + Convert.ToInt16("-1"); } else { datarowNewROI["ReleaseOfInformationId"] = "-1"; } datarowNewROI["DocumentVersionId"] = Convert.ToInt32(datatableROIs.Rows[datatableROIs.Rows.Count - 1]["DocumentVersionId"]); } else { datarowNewROI["ReleaseOfInformationId"] = "-1"; datarowNewROI["DocumentVersionId"] = "-1"; } //This is used to maintain the ROI order. int minROIId = 1; minROIId = Convert.ToInt32(datatableROIs.Compute("Min(ReleaseOfInformationOrder)", "ReleaseOfInformationOrder>0")); if (minROIId < 1) { datarowNewROI["ReleaseOfInformationOrder"] = "1"; } else { datarowNewROI["ReleaseOfInformationOrder"] = Convert.ToInt32(datatableROIs.Compute("Max(ReleaseOfInformationOrder)", "ISNULL(RecordDeleted,'N')<>'Y'")) + 1; } datarowNewROI["ReleaseEndDate"] = DateTime.Now.AddYears(1).ToString("MM/dd/yyyy"); BaseCommonFunctions.InitRowCredentials(datarowNewROI); datatableROIs.Rows.Add(datarowNewROI); SetResponseOnAddROI(datatableROIs, Convert.ToInt64(datarowNewROI["ReleaseOfInformationId"]), Convert.ToInt64(datarowNewROI["ReleaseOfInformationOrder"])); } }
/// <summary> ///<Author>Jagdeep Hundal</Author> ///<CreatedOn>July 20,2011</CreatedOn> /// </summary> /// <param name="dataSetObject"></param> public override void ChangeDataSetBeforeUpdate(ref DataSet dataSetObject) { string[] dataTables = new string[] { "DiagnosesIANDIIMaxOrder" }; //Added defensive code to avoid error in any case if audit columns like CreatedBy, CreatedDate, ModifiedBy and ModifiedDate are Null in ServiceDiagnosis table. Ref: #802 A Renewed Mind - Support. if (dataSetObject != null) { if (BaseCommonFunctions.CheckRowExists(dataSetObject, "ServiceDiagnosis", 0)) { for (int i = 0; i < dataSetObject.Tables["ServiceDiagnosis"].Rows.Count; i++) { if (String.IsNullOrEmpty(dataSetObject.Tables["ServiceDiagnosis"].Rows[i]["CreatedBy"].ToString())) { dataSetObject.Tables["ServiceDiagnosis"].Rows[i]["CreatedBy"] = BaseCommonFunctions.ApplicationInfo.LoggedInUser.UserCode; } if (String.IsNullOrEmpty(dataSetObject.Tables["ServiceDiagnosis"].Rows[i]["CreatedDate"].ToString())) { dataSetObject.Tables["ServiceDiagnosis"].Rows[i]["CreatedDate"] = DateTime.Now; } if (String.IsNullOrEmpty(dataSetObject.Tables["ServiceDiagnosis"].Rows[i]["ModifiedBy"].ToString())) { dataSetObject.Tables["ServiceDiagnosis"].Rows[i]["ModifiedBy"] = BaseCommonFunctions.ApplicationInfo.LoggedInUser.UserCode; } if (String.IsNullOrEmpty(dataSetObject.Tables["ServiceDiagnosis"].Rows[i]["ModifiedDate"].ToString())) { dataSetObject.Tables["ServiceDiagnosis"].Rows[i]["ModifiedDate"] = DateTime.Now; } } } } if (dataSetObject != null) { for (int count = 0; count < dataTables.Length; count++) { if (dataSetObject.Tables.Contains(dataTables[count]) == true) { dataSetObject.Tables.Remove(dataTables[count].ToString()); } } } else { throw new ApplicationException("DataSet is Null"); } }
private void DeleteDiagnosisOnSubstanceUnSelect(string Substance) { var dataSetDocument = BaseCommonFunctions.GetScreenInfoDataSet(); if (BaseCommonFunctions.CheckRowExists(dataSetDocument, "CustomPsychiatricNoteSubstanceUses")) { DataRow[] datarowGoalRelatedObjs = dataSetDocument.Tables["CustomPsychiatricNoteSubstanceUses"].Select("SubstanceUseName='" + Substance + "' and ISNULL(RecordDeleted,'N')='N' "); if (datarowGoalRelatedObjs.Length > 0) { foreach (DataRow datarowCurrent in datarowGoalRelatedObjs) { int ICD10CodeId = (int)datarowCurrent["DocumentDiagnosisCodeId"]; DeletefromDocumentDiagnosisCodes(ICD10CodeId, Substance); BaseCommonFunctions.UpdateRecordDeletedInformation(datarowCurrent); } } } }
/// <summary> /// Davinder Kumar 02-May 2011 /// Method to Bind The Need grid on the Popup /// </summary> protected override void OnLoad(EventArgs e) { //SHS.UserBusinessServices.CustomTPNeeds customTPNeeds = null; //customTPNeeds = new SHS.UserBusinessServices.CustomTPNeeds(); DataView DataViewCustomTPNeeds = null; try { using (DataSet datasetCustomTPNeed = BaseCommonFunctions.GetScreenInfoDataSet()) { HiddenField_TPGoalId.Value = GetRequestParameterValue("TPGoalId"); TPGoalId = Convert.ToInt32(HiddenField_TPGoalId.Value); /////////////////////////// //var res=from ctpn in datasetCustomTPNeed.Tables["CustomTPNeeds"].AsEnumerable() // join ctpgn in datasetCustomTPNeed.Tables["CustomTPGoalNeeds"].AsEnumerable() // on ctpn.Field<int>("CustomTPNeedId") equals ctpgn.Field<int>("CustomTPNeedId") into joinedTable // from ch in joinedTable.DefaultIfEmpty() // select new // { // CustomTPNeedId=ctpn.Field<int>("CustomTPNeedId"), // NeedText=ctpn.Field<string>("NeedText"), // Need // } ////////////////////////// DataViewCustomTPNeeds = datasetCustomTPNeed.Tables["CustomTPNeeds"].DefaultView; DataViewCustomTPNeeds.RowFilter = "isnull(RecordDeleted,'N')<>'Y'"; GridViewCustomTPNeed.DataSource = DataViewCustomTPNeeds; //GridViewCustomTPNeed.DataSource = datasetCustomTPNeed.Tables["CustomTPNeeds"]; GridViewCustomTPNeed.DataBind(); } } finally { DataViewCustomTPNeeds = null; //customTPNeeds = null; } }
public override void BindControls() { DataSet ds = BaseCommonFunctions.ScreenInfo.CurrentDocument.DocumentDataSet; using (DataView DataViewGlobalCodes = BaseCommonFunctions.FillDropDown("XCSSRSYESNO", true, "", "", false)) { DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_WishToBeDead.DataTextField = "CodeName"; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_WishToBeDead.DataValueField = "GlobalCodeID"; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_WishToBeDead.DataSource = DataViewGlobalCodes; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_WishToBeDead.DataBind(); DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_WishToBeDead.Items.Insert(0, new ListItem("", "")); DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalThoughts.DataTextField = "CodeName"; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalThoughts.DataValueField = "GlobalCodeID"; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalThoughts.DataSource = DataViewGlobalCodes; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalThoughts.DataBind(); DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalThoughts.Items.Insert(0, new ListItem("", "")); DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalThoughtsWithMethods.DataTextField = "CodeName"; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalThoughtsWithMethods.DataValueField = "GlobalCodeID"; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalThoughtsWithMethods.DataSource = DataViewGlobalCodes; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalThoughtsWithMethods.DataBind(); DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalThoughtsWithMethods.Items.Insert(0, new ListItem("", "")); DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalIntentWithoutSpecificPlan.DataTextField = "CodeName"; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalIntentWithoutSpecificPlan.DataValueField = "GlobalCodeID"; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalIntentWithoutSpecificPlan.DataSource = DataViewGlobalCodes; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalIntentWithoutSpecificPlan.DataBind(); DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalIntentWithoutSpecificPlan.Items.Insert(0, new ListItem("", "")); DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalIntentWithSpecificPlan.DataTextField = "CodeName"; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalIntentWithSpecificPlan.DataValueField = "GlobalCodeID"; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalIntentWithSpecificPlan.DataSource = DataViewGlobalCodes; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalIntentWithSpecificPlan.DataBind(); DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalIntentWithSpecificPlan.Items.Insert(0, new ListItem("", "")); DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalBehaviorQuestion.DataTextField = "CodeName"; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalBehaviorQuestion.DataValueField = "GlobalCodeID"; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalBehaviorQuestion.DataSource = DataViewGlobalCodes; DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalBehaviorQuestion.DataBind(); DropDownList_CustomDocumentCSSRSAdultSinceLastVisits_SuicidalBehaviorQuestion.Items.Insert(0, new ListItem("", "")); } }
/// <summary> /// <Description>Create New Row in TPNeeds table</Description> /// <Author>Vikas Vyas</Author> /// <CreatedOn>22nd-Sept-2009</CreatedOn> /// </summary> private void AddGoal() { DataRow[] dataRowTPNeed = null; int needId = 0; string filterString = string.Empty; string strFirstNameLastName = string.Empty; //try catch finally block commented by shifali in ref to task# 950 on 5 june,2010 //try //{ needId = Convert.ToInt32(Request.QueryString["needId"]); using (DataSet dataSetTreatmentPlanHRM = BaseCommonFunctions.ScreenInfo.CurrentDocument.DocumentDataSet) { if (dataSetTreatmentPlanHRM != null && dataSetTreatmentPlanHRM.Tables.Count > 0) { if (dataSetTreatmentPlanHRM.Tables.Contains("TPNeeds")) { dataRowTPNeed = dataSetTreatmentPlanHRM.Tables["TPNeeds"].Select("Isnull(RecordDeleted,'N')<>'Y' and NeedId=" + needId); using (DataView DataViewGlobalCodes = BaseCommonFunctions.FillDropDown("StageOfTreatment", true, "", "SortOrder", false)) { } HiddenField_TPNeeds_NeedId.Value = needId.ToString(); // Convert.ToString(dataRowTPNeeds[0]["NeedId"]); Litral_TPNeeds_GoalNumber.Text = "Goal " + Convert.ToString(Convert.ToInt32(dataSetTreatmentPlanHRM.Tables["TPNeeds"].Compute("Max(NeedNumber)", "Isnull(RecordDeleted,'N')<>'Y'")) + 1); //"Goal " + Convert.ToString(dataRowTPNeeds["NeedNumber"]); if (BaseCommonFunctions.ApplicationInfo.LoggedInUser.LastName != string.Empty) { strFirstNameLastName = BaseCommonFunctions.ApplicationInfo.LoggedInUser.LastName; } if (BaseCommonFunctions.ApplicationInfo.LoggedInUser.FirstName != string.Empty) { if (strFirstNameLastName != string.Empty) { strFirstNameLastName = strFirstNameLastName + ", " + BaseCommonFunctions.ApplicationInfo.LoggedInUser.FirstName; } else { strFirstNameLastName = BaseCommonFunctions.ApplicationInfo.LoggedInUser.FirstName; } } } } } }