private void cmdUpdate_Click(object sender, EventArgs e) { string thislayoutdesc = null; try { if (rdcImportLayout.Tables[rdcImportLayoutTable].Rows.Count == 0) { return; } thislayoutdesc = RadInputBox.Show("Layout Description:", "Update Description", rdcImportLayout.Tables[rdcImportLayoutTable].Rows[0]["Description"].ToString()); if (!string.IsNullOrEmpty(thislayoutdesc)) { modGlobal.gv_sql = "update tbl_setup_ImportSetup "; modGlobal.gv_sql = string.Format("{0} set description = '{1}'", modGlobal.gv_sql, thislayoutdesc); modGlobal.gv_sql = string.Format("{0} where importsetupid = {1}", modGlobal.gv_sql, rdcImportLayout.Tables[rdcImportLayoutTable].Rows[0]["ImportSetupID"]); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshImportLayout(); } } catch (Exception ex) { const string errorMessage = "Oops...Something went wrong... "; // Create an EventLog instance and assign its source. EventLog appLog = new EventLog(); appLog.Source = "CopSetup"; appLog.WriteEntry(errorMessage + "Source: " + ex.Source + "=>" + "TargetSite: " + ex.TargetSite + "Exception #: " + ex.HResult + " => " + "Error Message: " + ex.Message + " => " + "Inner Exception: " + ex.InnerException + " => " + "Stack Trace: " + ex.StackTrace, EventLogEntryType.Error, 1002); RadMessageBox.Show(errorMessage + String.Format(format: "Exception: {0} => Inner Exception: {1}", arg0: ex.Message, arg1: ex.InnerException)); } }
private void cmdLinkToMeasure_Click(object sender, EventArgs e) { try { if (lstMeasureList.SelectedIndex > -1) { modGlobal.gv_sql = "Insert into tbl_setup_CMSfieldmeasures (ddid, indicatorid, MeasureCode) "; modGlobal.gv_sql = string.Format("{0} values ({1}, ", modGlobal.gv_sql, Support.GetItemData(lstFieldList, lstFieldList.SelectedIndex)); modGlobal.gv_sql = string.Format("{0}{1}, ", modGlobal.gv_sql, Support.GetItemData(lstMeasureList, lstMeasureList.SelectedIndex)); modGlobal.gv_sql = string.Format("{0}'{1}')", modGlobal.gv_sql, lstMeasureList.Text); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshMeasureList(); } } catch (Exception ex) { const string errorMessage = "Oops...Something went wrong... "; // Create an EventLog instance and assign its source. EventLog appLog = new EventLog(); appLog.Source = "CopSetup"; appLog.WriteEntry(errorMessage + "Source: " + ex.Source + "=>" + "TargetSite: " + ex.TargetSite + "Exception #: " + ex.HResult + " => " + "Error Message: " + ex.Message + " => " + "Inner Exception: " + ex.InnerException + " => " + "Stack Trace: " + ex.StackTrace, EventLogEntryType.Error, 1002); RadMessageBox.Show(errorMessage + String.Format(format: "Exception: {0} => Inner Exception: {1}", arg0: ex.Message, arg1: ex.InnerException)); } }
private void cmdChangeFieldJoin_Click(System.Object eventSender, System.EventArgs eventArgs) { string ls_JoinOp = null; int li_cnt = 0; DataSet rs_Temp = null; // ERROR: Not supported in C#: OnErrorStatement if (lstFieldsInMeasure.SelectedIndex > -1) { modGlobal.gv_sql = "SELECT JoinOperator FROM tbl_Setup_CMSFieldMeasureCriteriaSet WHERE CMSFieldMeasureID = " + Support.GetItemData(lstFieldsInMeasure, lstFieldsInMeasure.SelectedIndex); rs_Temp = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic); if (!rs_Temp.EOF) { ls_JoinOp = rs_Temp.rdoColumns["JoinOperator"].Value; modGlobal.gv_sql = "UPDATE tbl_Setup_CMSFieldMeasureCriteriaSet SET JoinOperator = " + (ls_JoinOp == "AND" ? "'OR'" : "'AND'") + " WHERE CMSFieldMeasureID = " + Support.GetItemData(lstFieldsInMeasure, lstFieldsInMeasure.SelectedIndex); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshFieldMeasureCriteria(); } rs_Temp.Dispose(); //UPGRADE_NOTE: Object rs_Temp may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"' rs_Temp = null; } return; ErrHandler: modGlobal.CheckForErrors(); }
private void cmdRemoveAction_Click(object sender, EventArgs e) { try { if (lstAppliedActions.SelectedIndex < 0) { return; } modGlobal.gv_sql = "Delete tbl_setup_datadefactions "; modGlobal.gv_sql = modGlobal.gv_sql + " Where datadefactionid = "; modGlobal.gv_sql = modGlobal.gv_sql + Support.GetItemData(lstAppliedActions, lstAppliedActions.SelectedIndex); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshAvailableActions(); RefreshAppliedActions(); } catch (Exception ex) { const string errorMessage = "Oops...Something went wrong... "; // Create an EventLog instance and assign its source. EventLog appLog = new EventLog(); appLog.Source = "CopSetup"; appLog.WriteEntry(errorMessage + "Source: " + ex.Source + "=>" + "TargetSite: " + ex.TargetSite + "Exception #: " + ex.HResult + " => " + "Error Message: " + ex.Message + " => " + "Inner Exception: " + ex.InnerException + " => " + "Stack Trace: " + ex.StackTrace, EventLogEntryType.Error, 1002); RadMessageBox.Show(errorMessage + String.Format(format: "Exception: {0} => Inner Exception: {1}", arg0: ex.Message, arg1: ex.InnerException)); } }
private void cmdDeleteRow_Click(System.Object eventSender, System.EventArgs eventArgs) { if (lstRows.SelectedIndex < 0) { return; } modGlobal.gv_resp = Convert.ToString(RadMessageBox.Show("Are you sure you want to delete '" + Support.GetItemString(lstRows, lstRows.SelectedIndex) + "'?", "Delete Row", MessageBoxButtons.YesNo, RadMessageIcon.Question)); if (modGlobal.gv_resp == Convert.ToString(DialogResult.Yes)) { //UPGRADE_WARNING: Couldn't resolve default property of object gv_Action. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' modGlobal.gv_Action = "Delete"; modGlobal.gv_sql = "Delete tbl_setup_SubmitCriteria "; modGlobal.gv_sql = modGlobal.gv_sql + " Where SubGroupID in "; modGlobal.gv_sql = modGlobal.gv_sql + " (Select SubGroupID "; modGlobal.gv_sql = modGlobal.gv_sql + " from tbl_setup_SubmitSubGroup "; modGlobal.gv_sql = modGlobal.gv_sql + " Where tbl_setup_SubmitSubGroup.GroupRowID = " + Support.GetItemData(lstRows, lstRows.SelectedIndex); modGlobal.gv_sql = modGlobal.gv_sql + " )"; DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); modGlobal.gv_sql = "Delete tbl_setup_SubmitSubGroup "; modGlobal.gv_sql = modGlobal.gv_sql + " Where GroupRowID = " + Support.GetItemData(lstRows, lstRows.SelectedIndex); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); modGlobal.gv_sql = "Delete tbl_setup_SubmitGroupRow "; modGlobal.gv_sql = modGlobal.gv_sql + " Where "; modGlobal.gv_sql = modGlobal.gv_sql + " GroupRowID = " + Support.GetItemData(lstRows, lstRows.SelectedIndex); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshRowList(); } }
private void cmdUpdate_Click(System.Object eventSender, System.EventArgs eventArgs) { if (cboIndicators.SelectedIndex < 0) { RadMessageBox.Show("Please select an indicator."); return; } if (string.IsNullOrEmpty(txtMessage.Text)) { RadMessageBox.Show("Please define a validation message for the report."); return; } modGlobal.gv_sql = "Update tbl_setup_SubmitValidation "; modGlobal.gv_sql = modGlobal.gv_sql + " set IndicatorID = " + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(cboIndicators, cboIndicators.SelectedIndex) + ","; modGlobal.gv_sql = modGlobal.gv_sql + " Message = '" + modGlobal.ConvertApastroph(txtMessage.Text) + "',"; //UPGRADE_WARNING: Couldn't resolve default property of object gv_Action. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' modGlobal.gv_sql = modGlobal.gv_sql + " ValType = '" + modGlobal.gv_Action + "' "; //UPGRADE_WARNING: Couldn't resolve default property of object gv_Action. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' if (modGlobal.gv_Action == "ERROR") { modGlobal.gv_sql = modGlobal.gv_sql + " Where SubmitValID = " + frmSubmissionSetupCopy.rdcValidationErrors.Resultset.rdoColumns["SubmitValID"].Value; } else { modGlobal.gv_sql = modGlobal.gv_sql + " Where SubmitValID = " + frmSubmissionSetupCopy.rdcValidationWarnings.Resultset.rdoColumns["SubmitValID"].Value; } DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); //UPGRADE_WARNING: Couldn't resolve default property of object gv_Action. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' modGlobal.gv_Action = "Update"; this.Close(); }
private void cmdReset_Click(object sender, EventArgs e) { try { DialogResult resp = RadMessageBox.Show("This feature will remove the version history from the system. Are you sure you want to continue?", "Reset Version", MessageBoxButtons.YesNo, RadMessageIcon.Question); if (resp == DialogResult.Yes) { modGlobal.gv_sql = "Delete tbl_setup_version "; DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); refreshVersionHistory(); } } catch (Exception ex) { const string errorMessage = "Oops...Something went wrong... "; // Create an EventLog instance and assign its source. EventLog appLog = new EventLog(); appLog.Source = "CopSetup"; appLog.WriteEntry(errorMessage + "Source: " + ex.Source + "=>" + "TargetSite: " + ex.TargetSite + "Exception #: " + ex.HResult + " => " + "Error Message: " + ex.Message + " => " + "Inner Exception: " + ex.InnerException + " => " + "Stack Trace: " + ex.StackTrace, EventLogEntryType.Error, 1002); RadMessageBox.Show(errorMessage + String.Format(format: "Exception: {0} => Inner Exception: {1}", arg0: ex.Message, arg1: ex.InnerException)); } }
private void cmdDelete_Click(object sender, EventArgs e) { try { DialogResult resp = RadMessageBox.Show("Are you sure you want to delete this layout? All the associated fields will be deleted too.", "Delete ImportLayout", MessageBoxButtons.YesNo, RadMessageIcon.Question); if (resp == DialogResult.No) { return; } modGlobal.gv_sql = " delete tbl_setup_ImportValidation "; modGlobal.gv_sql = modGlobal.gv_sql + " where msgid in "; modGlobal.gv_sql = modGlobal.gv_sql + " (select msgid "; modGlobal.gv_sql = modGlobal.gv_sql + " from tbl_setup_importvalidationmessage as msg "; modGlobal.gv_sql = modGlobal.gv_sql + " inner join tbl_setup_importfields as impf "; modGlobal.gv_sql = modGlobal.gv_sql + " on msg.importfieldid = impf.importfieldid "; modGlobal.gv_sql = string.Format("{0} where impf.importsetupid = {1}", modGlobal.gv_sql, rdcImportLayout.Tables[rdcImportLayoutTable].Rows[0]["ImportSetupID"]); modGlobal.gv_sql = modGlobal.gv_sql + " )"; DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); modGlobal.gv_sql = " delete tbl_setup_ImportValidationMessage "; modGlobal.gv_sql = modGlobal.gv_sql + " where importfieldid in "; modGlobal.gv_sql = modGlobal.gv_sql + " (select importfieldid "; modGlobal.gv_sql = modGlobal.gv_sql + " from tbl_setup_importfields as impf "; modGlobal.gv_sql = string.Format("{0} where impf.importsetupid = {1}", modGlobal.gv_sql, rdcImportLayout.Tables[rdcImportLayoutTable].Rows[0]["ImportSetupID"]); modGlobal.gv_sql = modGlobal.gv_sql + " )"; DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); modGlobal.gv_sql = " delete tbl_setup_ImportFields "; modGlobal.gv_sql = string.Format("{0} where importsetupid = {1}", modGlobal.gv_sql, rdcImportLayout.Tables[rdcImportLayoutTable].Rows[0]["ImportSetupID"]); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); modGlobal.gv_sql = " delete tbl_setup_ImportSetup "; modGlobal.gv_sql = string.Format("{0} where importsetupid = {1}", modGlobal.gv_sql, rdcImportLayout.Tables[rdcImportLayoutTable].Rows[0]["ImportSetupID"]); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshImportLayout(); } catch (Exception ex) { const string errorMessage = "Oops...Something went wrong... "; // Create an EventLog instance and assign its source. EventLog appLog = new EventLog(); appLog.Source = "CopSetup"; appLog.WriteEntry(errorMessage + "Source: " + ex.Source + "=>" + "TargetSite: " + ex.TargetSite + "Exception #: " + ex.HResult + " => " + "Error Message: " + ex.Message + " => " + "Inner Exception: " + ex.InnerException + " => " + "Stack Trace: " + ex.StackTrace, EventLogEntryType.Error, 1002); RadMessageBox.Show(errorMessage + String.Format(format: "Exception: {0} => Inner Exception: {1}", arg0: ex.Message, arg1: ex.InnerException)); } }
private void frmSubmissionGroupAdd_Load(object sender, EventArgs e) { this.CenterToParent(); int OrdNum = 0; try { modGlobal.gv_Action = "NotDefined"; if (modGlobal.gv_status == "TEST") { cmdChangeStatus.Text = "Move to Active"; } else { cmdChangeStatus.Text = "Move to Test"; } sstabGroup.ActiveWindow = sstabGroup0; //Re-order every set DataSet rs_group = new DataSet(); modGlobal.gv_sql = "Select GroupID "; modGlobal.gv_sql = modGlobal.gv_sql + " from tbl_setup_Submitgroup "; modGlobal.gv_sql = modGlobal.gv_sql + " order by ordernumber "; //LDW rs_group = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic); const string sqlTableName5 = "tbl_setup_Submitgroup"; rs_group = DALcop.DalConnectDataSet(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql, sqlTableName5, rs_group); //LDW while (!rs_group.EOF) foreach (DataRow myRow5 in rs_group.Tables[sqlTableName5].Rows) { OrdNum = OrdNum + 1; modGlobal.gv_sql = "Update tbl_setup_SubmitGroup "; modGlobal.gv_sql = string.Format("{0} set OrderNumber = {1}", modGlobal.gv_sql, OrdNum); modGlobal.gv_sql = string.Format("{0} where groupid = {1}", modGlobal.gv_sql, rs_group.Tables[sqlTableName5].Rows[0]["groupid"]); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); //LDW rs_group.MoveNext(); } RefreshGroupList(); } catch (Exception ex) { const string errorMessage = "Oops...Something went wrong... "; // Create an EventLog instance and assign its source. EventLog appLog = new EventLog(); appLog.Source = "CopSetup"; appLog.WriteEntry(errorMessage + "Source: " + ex.Source + "=>" + "TargetSite: " + ex.TargetSite + "Exception #: " + ex.HResult + " => " + "Error Message: " + ex.Message + " => " + "Inner Exception: " + ex.InnerException + " => " + "Stack Trace: " + ex.StackTrace, EventLogEntryType.Error, 1002); RadMessageBox.Show(errorMessage + String.Format(format: "Exception: {0} => Inner Exception: {1}", arg0: ex.Message, arg1: ex.InnerException)); } }
private void cmdEffDate_Click(System.Object eventSender, System.EventArgs eventArgs) { object EditEffDate = null; if (lstRequiredIndicator.SelectedIndex < 0) { return; } //UPGRADE_WARNING: Couldn't resolve default property of object EditEffDate. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' EditEffDate = Interaction.InputBox("Please type the EFFECTIVE DATE for this requirement.", "Edit Effective Date", Microsoft.VisualBasic.Compatibility.VB6.Support.Format(DateAndTime.Now, "mm/dd/yyyy")); //UPGRADE_WARNING: Couldn't resolve default property of object EditEffDate. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' if (!string.IsNullOrEmpty(EditEffDate)) { if (!Information.IsDate(EditEffDate)) { RadMessageBox.Show("Invalid Date Format."); return; } //UPGRADE_WARNING: Couldn't resolve default property of object EditEffDate. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' modGlobal.gv_sql = "Update tbl_Setup_IndicatorDep set EffDate = '" + EditEffDate + "'"; modGlobal.gv_sql = modGlobal.gv_sql + " where IndicatorDepID = " + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(lstRequiredIndicator, lstRequiredIndicator.SelectedIndex); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshIndicatorDep(); } }
private void cmdDelFieldCrit_Click(object sender, EventArgs e) { try { if (lstFieldsInMeasure.SelectedIndex > -1) { if (lstFieldCriteria.SelectedIndex > -1) { //there are triggers on these tables to keep the set numbers and everything in order modGlobal.gv_sql = "DELETE FROM tbl_Setup_CMSFieldMeasureCriteria WHERE CMSFieldMeasureCriteriaID = " + Support.GetItemData(lstFieldCriteria, lstFieldCriteria.SelectedIndex); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshFieldMeasureCriteria(); } } return; } catch (Exception ex) { const string errorMessage = "Oops...Something went wrong... "; // Create an EventLog instance and assign its source. EventLog appLog = new EventLog(); appLog.Source = "CopSetup"; appLog.WriteEntry(errorMessage + "Source: " + ex.Source + "=>" + "TargetSite: " + ex.TargetSite + "Exception #: " + ex.HResult + " => " + "Error Message: " + ex.Message + " => " + "Inner Exception: " + ex.InnerException + " => " + "Stack Trace: " + ex.StackTrace, EventLogEntryType.Error, 1002); RadMessageBox.Show(errorMessage + String.Format(format: "Exception: {0} => Inner Exception: {1}", arg0: ex.Message, arg1: ex.InnerException)); } //LDW ErrHandler: //LDW modGlobal.CheckForErrors(); }
private void cmdRemoveEffDate_Click(object sender, EventArgs e) { try { if (lstRequiredIndicator.SelectedIndex < 0) { return; } modGlobal.gv_sql = "Update tbl_Setup_IndicatorDep set EffDate = null "; modGlobal.gv_sql = string.Format("{0} where IndicatorDepID = {1}", modGlobal.gv_sql, Support.GetItemData(lstRequiredIndicator, lstRequiredIndicator.SelectedIndex)); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshIndicatorDep(); } catch (Exception ex) { const string errorMessage = "Oops...Something went wrong... "; // Create an EventLog instance and assign its source. EventLog appLog = new EventLog(); appLog.Source = "CopSetup"; appLog.WriteEntry(errorMessage + "Source: " + ex.Source + "=>" + "TargetSite: " + ex.TargetSite + "Exception #: " + ex.HResult + " => " + "Error Message: " + ex.Message + " => " + "Inner Exception: " + ex.InnerException + " => " + "Stack Trace: " + ex.StackTrace, EventLogEntryType.Error, 1002); RadMessageBox.Show(errorMessage + String.Format(format: "Exception: {0} => Inner Exception: {1}", arg0: ex.Message, arg1: ex.InnerException)); } }
private void cmdSelect_Click(System.Object eventSender, System.EventArgs eventArgs) { object newid = null; var i = 0; for (i = 0; i <= lstIndicators.Items.Count - 1; i++) { if (lstIndicators.GetSelected(i)) { //UPGRADE_WARNING: Couldn't resolve default property of object newid. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' newid = modDBSetup.FindMaxRecID("tbl_Setup_DataReq", "IndicatorDDID"); modGlobal.gv_sql = "Insert into tbl_setup_DataReq (IndicatorDDID, IndicatorID, DDID)"; //UPGRADE_WARNING: Couldn't resolve default property of object newid. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' modGlobal.gv_sql = modGlobal.gv_sql + " Values (" + newid; modGlobal.gv_sql = modGlobal.gv_sql + "," + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(lstIndicators, i); modGlobal.gv_sql = modGlobal.gv_sql + "," + frmPatientSetupCopy.rdcPatientFields.Tables[rdcPatientFieldsTable].Columns["DDID"] + ")"; DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); } } this.Close(); }
private void cmdUpdate_Click(System.Object eventSender, System.EventArgs eventArgs) { if (lstFieldList.SelectedIndex > -1) { modGlobal.gv_sql = "update tbl_setup_DataDef "; modGlobal.gv_sql = modGlobal.gv_sql + " set CMSFieldCode = "; if (string.IsNullOrEmpty(txtCMSFieldCode.Text)) { modGlobal.gv_sql = modGlobal.gv_sql + " null "; } else { modGlobal.gv_sql = modGlobal.gv_sql + "'" + txtCMSFieldCode.Text + "'"; } modGlobal.gv_sql = modGlobal.gv_sql + ", "; modGlobal.gv_sql = modGlobal.gv_sql + " JCFieldCode = "; if (string.IsNullOrEmpty(txtJCFieldCode.Text)) { modGlobal.gv_sql = modGlobal.gv_sql + " null "; } else { modGlobal.gv_sql = modGlobal.gv_sql + "'" + txtJCFieldCode.Text + "'"; } modGlobal.gv_sql = modGlobal.gv_sql + " where ddid = " + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(lstFieldList, lstFieldList.SelectedIndex); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); } }
private void cmdUpdate_Click(object sender, EventArgs e) { try { if (cmbOperators.SelectedIndex < 0) { RadMessageBox.Show("Please select an operator"); return; } modGlobal.gv_sql = "update tbl_Setup_MeasureCriteria "; modGlobal.gv_sql = string.Format("{0} set valueoperator = '{1}' ", modGlobal.gv_sql, cmbOperators.Text); modGlobal.gv_sql = string.Format("{0} where MeasureCriteriaID = {1}", modGlobal.gv_sql, mcid); //LDW modGlobal.gv_cn.Execute(modGlobal.gv_sql); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); modGlobal.UpdateVerificationCriteriaTitle(mcid); this.Close(); } catch (Exception ex) { const string errorMessage = "Oops...Something went wrong... "; // Create an EventLog instance and assign its source. EventLog appLog = new EventLog(); appLog.Source = "CopSetup"; appLog.WriteEntry(errorMessage + "Source: " + ex.Source + "=>" + "TargetSite: " + ex.TargetSite + "Exception #: " + ex.HResult + " => " + "Error Message: " + ex.Message + " => " + "Inner Exception: " + ex.InnerException + " => " + "Stack Trace: " + ex.StackTrace, EventLogEntryType.Error, 1002); RadMessageBox.Show(errorMessage + String.Format(format: "Exception: {0} => Inner Exception: {1}", arg0: ex.Message, arg1: ex.InnerException)); } }
private void cmdChangeStatus_Click(System.Object eventSender, System.EventArgs eventArgs) { DialogResult resp; object MoveToModule = null; if (rdcImportLayout.Resultset.RowCount == 0) { return; } //UPGRADE_WARNING: Couldn't resolve default property of object gv_status. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' //UPGRADE_WARNING: Couldn't resolve default property of object MoveToModule. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' MoveToModule = (modGlobal.gv_status == "TEST" ? "Active" : "Test"); //UPGRADE_WARNING: Couldn't resolve default property of object MoveToModule. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' //UPGRADE_WARNING: Couldn't resolve default property of object resp. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' resp = RadMessageBox.Show("Are you sure you want this import layout to the " + MoveToModule + " Module?", MsgBoxStyle.YesNo); if (resp == DialogResult.No) { return; } modGlobal.gv_sql = "Update tbl_Setup_ImportSetup "; //UPGRADE_WARNING: Couldn't resolve default property of object gv_status. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' modGlobal.gv_sql = modGlobal.gv_sql + " Set RecordStatus = " + (modGlobal.gv_status == "TEST" ? "Null" : "'TEST'"); modGlobal.gv_sql = modGlobal.gv_sql + " where ImportSetupID = " + rdcImportLayout.Resultset.rdoColumns["ImportSetupID"].Value; DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshImportLayout(); }
private void cmdAddAction_Click(System.Object eventSender, System.EventArgs eventArgs) { int NextID = modDBSetup.FindMaxRecID("tbl_setup_datadefactions", "datadefactionid"); if (lstAvailableActions.SelectedIndex < 0) { return; } //UPGRADE_WARNING: Couldn't resolve default property of object NextID. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' modGlobal.gv_sql = "insert into tbl_setup_datadefactions (datadefactionid, dataentryactionid, ddid) "; modGlobal.gv_sql = modGlobal.gv_sql + " values ( "; //UPGRADE_WARNING: Couldn't resolve default property of object NextID. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' modGlobal.gv_sql = modGlobal.gv_sql + NextID + ", "; modGlobal.gv_sql = modGlobal.gv_sql + Support.GetItemData(lstAvailableActions, lstAvailableActions.SelectedIndex) + ", "; modGlobal.gv_sql = modGlobal.gv_sql + frmTableSetupCopy.rdcFieldList.Resultset.rdoColumns["DDID"].Value; modGlobal.gv_sql = modGlobal.gv_sql + " )"; DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshAvailableActions(); RefreshAppliedActions(); }
private void cmdChangeStatusForset_Click(System.Object eventSender, System.EventArgs eventArgs) { DialogResult resp; object MoveToModule = null; if (cboIndicatorSet.SelectedIndex < 0) { return; } //UPGRADE_WARNING: Couldn't resolve default property of object gv_status. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' //UPGRADE_WARNING: Couldn't resolve default property of object MoveToModule. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' MoveToModule = (modGlobal.gv_status == "TEST" ? "Active" : "Test"); //UPGRADE_WARNING: Couldn't resolve default property of object MoveToModule. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' //UPGRADE_WARNING: Couldn't resolve default property of object resp. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' resp = RadMessagebox.Show("Are you sure you want this indicator set to the " + MoveToModule + " Module?", MessageBoxButtons.YesNo); if (resp == DialogResult.No) { return; } modGlobal.gv_sql = "Update tbl_Setup_Indicatorset "; //UPGRADE_WARNING: Couldn't resolve default property of object gv_status. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' modGlobal.gv_sql = modGlobal.gv_sql + " Set RecordStatus = " + (modGlobal.gv_status == "TEST" ? "Null" : "'TEST'"); modGlobal.gv_sql = modGlobal.gv_sql + " where IndicatorsetID = " + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(cboIndicatorSet, cboIndicatorSet.SelectedIndex); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshIndicatorSet(); RefreshIndicatorSetField(); }
private void cmdAdd_Click(object sender, EventArgs e) { int NewValID = modDBSetup.FindMaxRecID("tbl_Setup_SubmitValidation", "SubmitValID"); try { if (cboIndicators.SelectedIndex < 0) { RadMessageBox.Show("Please select an indicator."); return; } if (string.IsNullOrEmpty(txtMessage.Text)) { RadMessageBox.Show("Please define a validation message for the report."); return; } modGlobal.gv_sql = "Insert into tbl_setup_SubmitValidation(SubmitValID, IndicatorID, Message, ValType, State, RecordStatus)"; modGlobal.gv_sql = string.Format("{0} values ( {1}, ", modGlobal.gv_sql, NewValID); modGlobal.gv_sql = string.Format("{0}{1},", modGlobal.gv_sql, Support.GetItemData(cboIndicators, cboIndicators.SelectedIndex)); modGlobal.gv_sql = string.Format("{0} '{1}',", modGlobal.gv_sql, modGlobal.ConvertApastroph(txtMessage.Text)); modGlobal.gv_sql = string.Format("{0} '{1}',", modGlobal.gv_sql, modGlobal.gv_Action); if (string.IsNullOrEmpty(modGlobal.gv_State)) { modGlobal.gv_sql = modGlobal.gv_sql + " null, "; } else { modGlobal.gv_sql = string.Format("{0} '{1}',", modGlobal.gv_sql, modGlobal.gv_State); } if (string.IsNullOrEmpty(modGlobal.gv_status)) { modGlobal.gv_sql = modGlobal.gv_sql + " null "; } else { modGlobal.gv_sql = string.Format("{0} '{1}'", modGlobal.gv_sql, modGlobal.gv_status); } modGlobal.gv_sql = modGlobal.gv_sql + ")"; DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); modGlobal.gv_Action = "Add"; this.Close(); } catch (Exception ex) { const string errorMessage = "Oops...Something went wrong... "; // Create an EventLog instance and assign its source. EventLog appLog = new EventLog(); appLog.Source = "CopSetup"; appLog.WriteEntry(errorMessage + "Source: " + ex.Source + "=>" + "TargetSite: " + ex.TargetSite + "Exception #: " + ex.HResult + " => " + "Error Message: " + ex.Message + " => " + "Inner Exception: " + ex.InnerException + " => " + "Stack Trace: " + ex.StackTrace, EventLogEntryType.Error, 1002); RadMessageBox.Show(errorMessage + String.Format(format: "Exception: {0} => Inner Exception: {1}", arg0: ex.Message, arg1: ex.InnerException)); } }
private void cmdAdd_Click(System.Object eventSender, System.EventArgs eventArgs) { object newid = null; if (string.IsNullOrEmpty(txtNewImportLayout.Text)) { RadMessageBox.Show("Please enter a description for the new layout."); return; } modGlobal.gv_sql = "select * from tbl_setup_ImportSetup "; modGlobal.gv_sql = modGlobal.gv_sql + " where upper(description) = '" + Strings.UCase(txtNewImportLayout.Text) + "'"; modGlobal.gv_rs = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic); if (modGlobal.gv_rs.RowCount > 0) { RadMessageBox.Show("There is a layout with the same description."); return; } //UPGRADE_WARNING: Couldn't resolve default property of object newid. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' newid = modDBSetup.FindMaxRecID(ref "tbl_setup_Importsetup", ref "importsetupid"); modGlobal.gv_sql = "Insert into tbl_setup_ImportSetup (importsetupid, description, state, recordstatus)"; modGlobal.gv_sql = modGlobal.gv_sql + " values ("; //UPGRADE_WARNING: Couldn't resolve default property of object newid. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' modGlobal.gv_sql = modGlobal.gv_sql + newid + ", "; modGlobal.gv_sql = modGlobal.gv_sql + " '" + txtNewImportLayout.Text + "',"; //UPGRADE_WARNING: Couldn't resolve default property of object gv_State. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' if (string.IsNullOrEmpty(modGlobal.gv_State)) { modGlobal.gv_sql = modGlobal.gv_sql + " Null, "; } else { //UPGRADE_WARNING: Couldn't resolve default property of object gv_State. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' modGlobal.gv_sql = modGlobal.gv_sql + " '" + modGlobal.gv_State + "',"; } //UPGRADE_WARNING: Couldn't resolve default property of object gv_status. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' if (string.IsNullOrEmpty(modGlobal.gv_status)) { modGlobal.gv_sql = modGlobal.gv_sql + " null "; } else { //UPGRADE_WARNING: Couldn't resolve default property of object gv_status. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' modGlobal.gv_sql = modGlobal.gv_sql + " '" + modGlobal.gv_status + "'"; } modGlobal.gv_sql = modGlobal.gv_sql + ")"; DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshImportLayout(); txtNewImportLayout.Text = ""; cmdSelect.Enabled = true; cmdDelete.Enabled = true; cmdUpdate.Enabled = true; }
private void updatetReportIncludes() { SqlCommand ps = new SqlCommand(); string SQL = null; try { if (lstHeading.SelectedIndex > -1) { // // delete them first, keeps out dups... // SQL = "delete tbl_Setup_IndicatorReportIncludes where indicatorID = " + Support.GetItemData(cmbIndicators, cmbIndicators.SelectedIndex) + " and subgroupID = " + Support.GetItemData(lstHeading, lstHeading.SelectedIndex); /*LDW ps = modGlobal.gv_cn.CreatePreparedStatement("", SQL); * ps.Execute(); * ps.Close();*/ DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, SQL); // // add it back if necessary.... // //LDW if (lstHeading.GetItemChecked(lstHeading.SelectedIndex) == true) if (Convert.ToBoolean(lstHeading.SelectedItem.CheckState) == true) { SQL = "insert into tbl_Setup_IndicatorReportIncludes (indicatorID, subgroupID) select " + Support.GetItemData( cmbIndicators, cmbIndicators.SelectedIndex) + ", " + Support.GetItemData(lstHeading, lstHeading.SelectedIndex); /*LDW ps = modGlobal.gv_cn.CreatePreparedStatement("", SQL); * ps.Execute(); * ps.Close();*/ DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, SQL); SQL = "update tbl_Setup_IndicatorReportIncludes set sortorder = includeID where sortorder is null"; /*LDW ps = modGlobal.gv_cn.CreatePreparedStatement("", SQL); * ps.Execute(); * ps.Close(); */ DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, SQL); } } } catch (Exception ex) { const string errorMessage = "Oops...Something went wrong... "; // Create an EventLog instance and assign its source. EventLog appLog = new EventLog(); appLog.Source = "CopSetup"; appLog.WriteEntry(errorMessage + "Source: " + ex.Source + "=>" + "TargetSite: " + ex.TargetSite + "Exception #: " + ex.HResult + " => " + "Error Message: " + ex.Message + " => " + "Inner Exception: " + ex.InnerException + " => " + "Stack Trace: " + ex.StackTrace, EventLogEntryType.Error, 1002); RadMessageBox.Show(errorMessage + String.Format(format: "Exception: {0} => Inner Exception: {1}", arg0: ex.Message, arg1: ex.InnerException)); } }
private void dbgGroups_KeyDown(object sender, KeyEventArgs e) { bool Cancel; try { if (e.KeyCode == Keys.Delete) { if (dbgGroups.RowCount >= 0) { modGlobal.gv_sql = "SELECT Count(*) Used FROM tbl_Setup_MeasureCriteria WHERE MeasureFieldGroupLogicID = " + dbgGroups.Columns.GetColumnByFieldName("measurefieldgrouplogicid"); //LDW modGlobal.gv_rs = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic); const string sqlTableName1 = "tbl_Setup_MeasureCriteria"; modGlobal.gv_rs = DALcop.DalConnectDataSet(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql, sqlTableName1, modGlobal.gv_rs); if (Convert.ToInt32(modGlobal.gv_rs.Tables[sqlTableName1].Rows[0]["Used"]) > 0) { RadMessageBox.Show("Can not delete this group it is used in criteria", "Can Not Delete", MessageBoxButtons.OK, RadMessageIcon.Error); } else { if (RadMessageBox.Show("Are you sure you want to delete this Measure Field Group Logic?", "Confirm Delete", MessageBoxButtons.YesNo, RadMessageIcon.Question) == DialogResult.Yes) { modGlobal.gv_sql = "DELETE FROM tbl_Setup_MeasureFieldGroupLogic WHERE MeasureFieldGroupLogicID = " + dbgGroups.Columns.GetColumnByFieldName("measurefieldgrouplogicid"); //LDW modGlobal.gv_cn.Execute(modGlobal.gv_sql); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshMeasureFieldGroupLogic(); } else { Cancel = true; } } } } Application.DoEvents(); dbgGroups.Refresh(); } catch (Exception ex) { const string errorMessage = "Oops...Something went wrong... "; // Create an EventLog instance and assign its source. EventLog appLog = new EventLog(); appLog.Source = "CopSetup"; appLog.WriteEntry(errorMessage + "Source: " + ex.Source + "=>" + "TargetSite: " + ex.TargetSite + "Exception #: " + ex.HResult + " => " + "Error Message: " + ex.Message + " => " + "Inner Exception: " + ex.InnerException + " => " + "Stack Trace: " + ex.StackTrace, EventLogEntryType.Error, 1002); RadMessageBox.Show(errorMessage + String.Format(format: "Exception: {0} => Inner Exception: {1}", arg0: ex.Message, arg1: ex.InnerException)); } }
private void cmdCopy_Click(System.Object eventSender, System.EventArgs eventArgs) { int NewCritID; if (cboSet.SelectedIndex < 0 | cboColumns.SelectedIndex < 0 | (cboJoinOperator.SelectedIndex < 0 & string.IsNullOrEmpty(cboJoinOperator.Text))) { RadMessageBox.Show("Define the definition of the new criteria."); } else { //copy the criteria //UPGRADE_WARNING: Couldn't resolve default property of object gv_Action. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' modGlobal.gv_Action = "Add"; //UPGRADE_WARNING: Couldn't resolve default property of object NewCritID. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' NewCritID = modDBSetup.FindMaxRecID("tbl_Setup_SubmitCriteria", "SubmitCriteriaID"); modGlobal.gv_sql = " insert into tbl_Setup_SubmitCriteria ("; modGlobal.gv_sql = modGlobal.gv_sql + " SubmitCriteriaID, "; modGlobal.gv_sql = modGlobal.gv_sql + " SubGroupID, "; modGlobal.gv_sql = modGlobal.gv_sql + " CriteriaTitle, "; modGlobal.gv_sql = modGlobal.gv_sql + " DDID1, "; modGlobal.gv_sql = modGlobal.gv_sql + " DDID2, "; modGlobal.gv_sql = modGlobal.gv_sql + " FieldOperator, "; modGlobal.gv_sql = modGlobal.gv_sql + " ValueOperator, "; modGlobal.gv_sql = modGlobal.gv_sql + " [Value], "; modGlobal.gv_sql = modGlobal.gv_sql + " LookupID, "; modGlobal.gv_sql = modGlobal.gv_sql + " LookupTableID, "; modGlobal.gv_sql = modGlobal.gv_sql + " DateUnit, "; modGlobal.gv_sql = modGlobal.gv_sql + " JoinOperator, "; modGlobal.gv_sql = modGlobal.gv_sql + " Criteriaset "; modGlobal.gv_sql = modGlobal.gv_sql + " ) "; modGlobal.gv_sql = modGlobal.gv_sql + " select "; //UPGRADE_WARNING: Couldn't resolve default property of object NewCritID. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' modGlobal.gv_sql = modGlobal.gv_sql + NewCritID + ", "; modGlobal.gv_sql = modGlobal.gv_sql + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(cboColumns, cboColumns.SelectedIndex) + ", "; modGlobal.gv_sql = modGlobal.gv_sql + " CriteriaTitle, "; modGlobal.gv_sql = modGlobal.gv_sql + " DDID1, "; modGlobal.gv_sql = modGlobal.gv_sql + " DDID2, "; modGlobal.gv_sql = modGlobal.gv_sql + " FieldOperator, "; modGlobal.gv_sql = modGlobal.gv_sql + " ValueOperator, "; modGlobal.gv_sql = modGlobal.gv_sql + " [Value], "; modGlobal.gv_sql = modGlobal.gv_sql + " LookupID, "; modGlobal.gv_sql = modGlobal.gv_sql + " LookupTableID, "; modGlobal.gv_sql = modGlobal.gv_sql + " DateUnit, "; modGlobal.gv_sql = modGlobal.gv_sql + " '" + cboJoinOperator.Text + "', "; modGlobal.gv_sql = modGlobal.gv_sql + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(cboSet, cboSet.SelectedIndex); modGlobal.gv_sql = modGlobal.gv_sql + " from tbl_Setup_SubmitCriteria "; modGlobal.gv_sql = modGlobal.gv_sql + " where SubmitCriteriaID = " + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(frmSubmissionSetupCopy.lstSummaryDef, frmSubmissionSetupCopy.lstSummaryDef.SelectedIndex); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); this.Close(); } }
private void cmdRemoveFromMeasure_Click(System.Object eventSender, System.EventArgs eventArgs) { if (lstSelectedMeasures.SelectedIndex > -1) { modGlobal.gv_sql = "delete tbl_setup_CMSfieldmeasures "; modGlobal.gv_sql = modGlobal.gv_sql + " where ddid = " + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(lstFieldList, lstFieldList.SelectedIndex); modGlobal.gv_sql = modGlobal.gv_sql + " and MeasureCode = '" + lstSelectedMeasures.Text + "'"; DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshMeasureList(); } }
private void cmdChangeStatus_Click(Object eventSender, EventArgs eventArgs) { DialogResult resp; string MoveToModule = ""; try { if (rdcFieldList.Tables[rdcFieldListTable].Rows.Count == 0) { return; } //LDW if (rdcFieldList.Resultset.rdoColumns["FieldCategory"].Value == "Fix") if (rdcFieldList.Tables[rdcFieldListTable].Rows[0]["FieldCategory"].ToString() == "Fix") { //LDW RadMessageBox.Show("Cannot move this field, because this is a fix field."); RadMessageBox.Show(this, "Cannot move this field, because this is a fix field.", "Change Status", MessageBoxButtons.OK, RadMessageIcon.Error); return; } MoveToModule = (modGlobal.gv_status == "TEST" ? "Active" : "Test"); //LDW resp = RadMessageBox.Show("Are you sure you want this field to the " + MoveToModule + " Module?", MsgBoxStyle.YesNo); resp = RadMessageBox.Show(this, string.Format("Are you sure you want this field to the {0} Module?", MoveToModule), "Change Status", MessageBoxButtons.YesNo, RadMessageIcon.Question); if (resp == DialogResult.No) { return; } modGlobal.gv_sql = "Update tbl_Setup_DataDef "; modGlobal.gv_sql = string.Format("{0} Set RecordStatus = {1}", modGlobal.gv_sql, modGlobal.gv_status == "TEST" ? "Null" : "'TEST'"); modGlobal.gv_sql = string.Format("{0} where DDID = {1}", modGlobal.gv_sql, rdcFieldList.Tables[rdcFieldListTable].Rows[0]["DDID"]); //LDW modGlobal.gv_cn.Execute(modGlobal.gv_sql); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshFieldList(); } catch (Exception ex) { const string errorMessage = "Oops...Something went wrong... "; // Create an EventLog instance and assign its source. EventLog appLog = new EventLog(); appLog.Source = "CopSetup"; appLog.WriteEntry(errorMessage + "Source: " + ex.Source + "=>" + "TargetSite: " + ex.TargetSite + "Exception #: " + ex.HResult + " => " + "Error Message: " + ex.Message + " => " + "Inner Exception: " + ex.InnerException + " => " + "Stack Trace: " + ex.StackTrace, EventLogEntryType.Error, 1002); RadMessageBox.Show(errorMessage + String.Format(format: "Exception: {0} => Inner Exception: {1}", arg0: ex.Message, arg1: ex.InnerException)); } }
private void cmdRemoveEffDate_Click(System.Object eventSender, System.EventArgs eventArgs) { if (lstRequiredIndicator.SelectedIndex < 0) { return; } modGlobal.gv_sql = "Update tbl_Setup_IndicatorDep set EffDate = null "; modGlobal.gv_sql = modGlobal.gv_sql + " where IndicatorDepID = " + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(lstRequiredIndicator, lstRequiredIndicator.SelectedIndex); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshIndicatorDep(); }
private void cmdLinkToMeasure_Click(System.Object eventSender, System.EventArgs eventArgs) { if (lstMeasureList.SelectedIndex > -1) { modGlobal.gv_sql = "Insert into tbl_setup_CMSfieldmeasures (ddid, indicatorid, MeasureCode) "; modGlobal.gv_sql = modGlobal.gv_sql + " values (" + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(lstFieldList, lstFieldList.SelectedIndex) + ", "; modGlobal.gv_sql = modGlobal.gv_sql + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(lstMeasureList, lstMeasureList.SelectedIndex) + ", "; modGlobal.gv_sql = modGlobal.gv_sql + "'" + lstMeasureList.Text + "')"; DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshMeasureList(); } }
private void cmdNewIndicator_Click(object sender, EventArgs e) { int NewIndID = modDBSetup.FindMaxRecID("tbl_Setup_Indicator", "IndicatorID"); string NewIndicator = null; try { NewIndicator = RadInputBox.Show("Please enter the description of the new indicator:", "Add New Indicator", ""); if (string.IsNullOrEmpty(NewIndicator)) { return; } modGlobal.gv_sql = "Insert into tbl_setup_Indicator (IndicatorID, Description, State, RecordStatus) "; modGlobal.gv_sql = string.Format("{0} Values ({1},'{2}',", modGlobal.gv_sql, NewIndID, NewIndicator); if (string.IsNullOrEmpty(modGlobal.gv_State)) { modGlobal.gv_sql = modGlobal.gv_sql + " null, "; } else { modGlobal.gv_sql = string.Format("{0} '{1}',", modGlobal.gv_sql, modGlobal.gv_State); } if (string.IsNullOrEmpty(modGlobal.gv_status)) { modGlobal.gv_sql = modGlobal.gv_sql + " null "; } else { modGlobal.gv_sql = string.Format("{0} '{1}'", modGlobal.gv_sql, modGlobal.gv_status); } modGlobal.gv_sql = modGlobal.gv_sql + " )"; DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); RefreshIndicator(); lstIndicators.Text = NewIndicator; } catch (Exception ex) { const string errorMessage = "Oops...Something went wrong... "; // Create an EventLog instance and assign its source. EventLog appLog = new EventLog(); appLog.Source = "CopSetup"; appLog.WriteEntry(errorMessage + "Source: " + ex.Source + "=>" + "TargetSite: " + ex.TargetSite + "Exception #: " + ex.HResult + " => " + "Error Message: " + ex.Message + " => " + "Inner Exception: " + ex.InnerException + " => " + "Stack Trace: " + ex.StackTrace, EventLogEntryType.Error, 1002); RadMessageBox.Show(errorMessage + String.Format(format: "Exception: {0} => Inner Exception: {1}", arg0: ex.Message, arg1: ex.InnerException)); } }
private void dbgDenominatorFields_DoubleClick(object sender, EventArgs e) { //LDW object ps = null; string SQL = null; try { if (rdcDenominatorFields.Tables[rdcDenominatorFieldsTable].Rows.Count > 0) { DialogResult resp = RadMessageBox.Show("Change Summary Operation?", "Operation Update", MessageBoxButtons.YesNo, RadMessageIcon.Question); if (resp == DialogResult.Yes) { if (Convert.ToInt32(rdcDenominatorFields.Tables[rdcDenominatorFieldsTable].Rows[0]["OpChar"]) == 1) { SQL = "update tbl_Setup_IndicatorReportDenominators set opchar = -1 where denomfieldID = " + rdcDenominatorFields.Tables[rdcDenominatorFieldsTable].Rows[0]["DenomFieldID"]; } else { SQL = "update tbl_Setup_IndicatorReportDenominators set opchar = 1 where denomfieldID = " + rdcDenominatorFields.Tables[rdcDenominatorFieldsTable].Rows[0]["DenomFieldID"]; } // // run the update... // /*LDW ps = modGlobal.gv_cn.CreatePreparedStatement("", SQL); * ps.Execute(); * ps.Close();*/ DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, SQL); // // now update the display... // RefreshDenominatorGrid(); } } } catch (Exception ex) { const string errorMessage = "Oops...Something went wrong... "; // Create an EventLog instance and assign its source. EventLog appLog = new EventLog(); appLog.Source = "CopSetup"; appLog.WriteEntry(errorMessage + "Source: " + ex.Source + "=>" + "TargetSite: " + ex.TargetSite + "Exception #: " + ex.HResult + " => " + "Error Message: " + ex.Message + " => " + "Inner Exception: " + ex.InnerException + " => " + "Stack Trace: " + ex.StackTrace, EventLogEntryType.Error, 1002); RadMessageBox.Show(errorMessage + String.Format(format: "Exception: {0} => Inner Exception: {1}", arg0: ex.Message, arg1: ex.InnerException)); } }
private void cmdUpdate_Click(object sender, EventArgs e) { try { if (lstRows.SelectedIndex < 0) { RadMessageBox.Show("Select a row to update."); return; } if (cboGroupListToUpdate.SelectedIndex < 0) { RadMessageBox.Show("Select a Group for the row before updating."); return; } if (!string.IsNullOrEmpty(txtRowNameToUpdate.Text)) { modGlobal.gv_Action = "Update"; modGlobal.gv_sql = "update tbl_Setup_SubmitGroupRow "; modGlobal.gv_sql = string.Format("{0} set Title = '{1}',", modGlobal.gv_sql, txtRowNameToUpdate.Text); modGlobal.gv_sql = string.Format("{0} GroupID = {1},", modGlobal.gv_sql, Support.GetItemData(cboGroupListToUpdate, cboGroupListToUpdate.SelectedIndex)); modGlobal.gv_sql = modGlobal.gv_sql + " ShowOnReport = "; if (chkIncludeRowToUpdate.CheckState == CheckState.Checked) { modGlobal.gv_sql = modGlobal.gv_sql + " 'Y' "; } else { modGlobal.gv_sql = modGlobal.gv_sql + " Null "; } modGlobal.gv_sql = string.Format("{0} Where GroupRowID = {1}", modGlobal.gv_sql, Support.GetItemData(lstRows, lstRows.SelectedIndex)); DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql); modGlobal.gv_SubmitRowID = Support.GetItemData(lstRows, lstRows.SelectedIndex).ToString(); RefreshRowList(); } } catch (Exception ex) { const string errorMessage = "Oops...Something went wrong... "; // Create an EventLog instance and assign its source. EventLog appLog = new EventLog(); appLog.Source = "CopSetup"; appLog.WriteEntry(errorMessage + "Source: " + ex.Source + "=>" + "TargetSite: " + ex.TargetSite + "Exception #: " + ex.HResult + " => " + "Error Message: " + ex.Message + " => " + "Inner Exception: " + ex.InnerException + " => " + "Stack Trace: " + ex.StackTrace, EventLogEntryType.Error, 1002); RadMessageBox.Show(errorMessage + String.Format(format: "Exception: {0} => Inner Exception: {1}", arg0: ex.Message, arg1: ex.InnerException)); } }