Exemplo n.º 1
0
        private void setMeasureStepID()
        {
            try
            {
                modGlobal.gv_sql = "SELECT ms.MeasureStepID  FROM " + " tbl_setup_measurecriteria mc, tbl_setup_measurecriteriaset mcs, tbl_setup_MeasureStep ms " +
                                   " WHERE mc.measurecriteriasetid = mcs.measurecriteriasetid " + " AND ms.MeasureStepID = mcs.MeasureStepID " + " AND mc.MeasureCriteriaID = " + ii_MeasureCriteriaID;
                //LDW modGlobal.gv_rs = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
                const string sqlTableName2 = "tbl_setup_measurecriteria";
                modGlobal.gv_rs = DALcop.DalConnectDataSet(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql, sqlTableName2, modGlobal.gv_rs);

                //LDW if (modGlobal.gv_rs.EOF)
                for (int itr = 0; itr < modGlobal.gv_rs.Tables[sqlTableName2].Rows.Count; itr++)
                {
                    var myRow11  = modGlobal.gv_rs.Tables[sqlTableName2].Rows[itr];
                    int rowIndex = modGlobal.gv_rs.Tables[sqlTableName2].Rows.IndexOf(myRow11);
                    int rowLast  = modGlobal.gv_rs.Tables[sqlTableName2].Rows.Count - 1;

                    if (rowIndex == rowLast)
                    {
                        RadMessageBox.Show("Could not determine step id from selected criteria", "Fatal Error", MessageBoxButtons.OK, RadMessageIcon.Error);
                        this.Close();
                    }
                    else
                    {
                        ii_MeasureStepID = (object.ReferenceEquals(modGlobal.gv_rs.Tables[sqlTableName2].Rows[0]["MeasureStepID"], DBNull.Value) ?
                                            0 : Convert.ToInt32(modGlobal.gv_rs.Tables[sqlTableName2].Rows[0]["MeasureStepID"]));
                    }
                }
                modGlobal.gv_rs.Dispose();
                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();
        }
Exemplo n.º 2
0
        private void cmdSelect_Click(object sender, EventArgs e)
        {
            frmHospStatSetup frmHospStatSetupCopy = new frmHospStatSetup();
            int newfieldorder;
            var i = 0;

            try
            {
                for (i = 0; i <= lstHospStatFields.Items.Count - 1; i++)
                {
                    if (lstHospStatFields.SelectedIndex == i)
                    {
                        //NewID = FindMaxRecID("tbl_Setup_DataReq", "IndicatorDDID")

                        modGlobal.gv_sql = "select max(fieldorder) as maxorder from tbl_setup_HospStatGroupFields ";
                        //LDW modGlobal.gv_rs = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
                        const string sqlTableName1 = "tbl_setup_HospStatGroupFields";
                        modGlobal.gv_rs = DALcop.DalConnectDataSet(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql, sqlTableName1, modGlobal.gv_rs);

                        newfieldorder = Convert.ToInt32(modGlobal.gv_rs.Tables[sqlTableName1].Rows[0]["maxorder"]) + 1;

                        modGlobal.gv_sql = "Insert into tbl_setup_HospStatGroupFields (HospStatGroupID, DDID, fieldorder )";
                        modGlobal.gv_sql = modGlobal.gv_sql + " Values (";
                        modGlobal.gv_sql = modGlobal.gv_sql + Support.GetItemData(frmHospStatSetupCopy.lstHospStatGroup,
                                                                                  frmHospStatSetupCopy.lstHospStatGroup.SelectedIndex);
                        modGlobal.gv_sql = string.Format("{0},{1}, {2}", modGlobal.gv_sql, Support.GetItemData(lstHospStatFields, i), newfieldorder);
                        modGlobal.gv_sql = modGlobal.gv_sql + ")";

                        //LDW modGlobal.gv_cn.Execute(modGlobal.gv_sql);
                        DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql);
                    }
                }
                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));
            }
        }
Exemplo n.º 3
0
        private void cmdNewIndicator_Click(System.Object eventSender, System.EventArgs eventArgs)
        {
            int    NewIndID;
            string NewIndicator = null;

            //UPGRADE_WARNING: Couldn't resolve default property of object NewIndicator. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            NewIndicator = Interaction.InputBox("Please enter the description of the new indicator:", "Add New Indicator", "");
            //UPGRADE_WARNING: Couldn't resolve default property of object NewIndicator. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            if (string.IsNullOrEmpty(NewIndicator))
            {
                return;
            }

            //UPGRADE_WARNING: Couldn't resolve default property of object NewIndID. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            NewIndID = modDBSetup.FindMaxRecID("tbl_Setup_Indicator", "IndicatorID");

            modGlobal.gv_sql = "Insert into tbl_setup_Indicator (IndicatorID, Description, State, RecordStatus) ";
            //UPGRADE_WARNING: Couldn't resolve default property of object NewIndicator. 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 NewIndID. 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 (" + NewIndID + ",'" + NewIndicator + "',";
            //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);

            RefreshIndicator();

            //UPGRADE_WARNING: Couldn't resolve default property of object NewIndicator. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            lstIndicators.Text = NewIndicator;
        }
Exemplo n.º 4
0
        private void cmdMeasureFieldDetails_Click(object sender, EventArgs e)
        {
            frmPatientFieldsExportLinks frmPatientFieldsExportLinksCopy = new frmPatientFieldsExportLinks();

            try
            {
                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 = string.Format("{0}'{1}'", 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 = string.Format("{0}'{1}'", modGlobal.gv_sql, txtJCFieldCode.Text);
                    }
                    modGlobal.gv_sql = string.Format("{0} where ddid = {1}", modGlobal.gv_sql, Support.GetItemData(lstFieldList, lstFieldList.SelectedIndex));
                    DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_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));
            }

            frmPatientFieldsExportLinksCopy.ShowDialog();
        }
Exemplo n.º 5
0
        private void cmdRemoveAction_Click(System.Object eventSender, System.EventArgs eventArgs)
        {
            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();
        }
Exemplo n.º 6
0
        private void OKButton_Click(object sender, EventArgs e)
        {
            try
            {
                if (!string.IsNullOrEmpty(cboType.Text) & !string.IsNullOrEmpty(txtCatID.Text) & !string.IsNullOrEmpty(txtCatDesc.Text))
                {
                    if (Information.IsNumeric(is_CatID))
                    {
                        modGlobal.gv_sql = string.Format("UPDATE tbl_MEASURE_CAT SET CAT = '{0}', CAT_DESC = '{1}', CAT_TYPE = '{2}' WHERE MEASURE_CATID = {3}",
                                                         txtCatID.Text, txtCatDesc.Text, cboType.Text, is_CatID);
                    }
                    else
                    {
                        //table has unique constraint setup on CAT field so duplicates will not be allowed
                        modGlobal.gv_sql = string.Format("INSERT INTO tbl_MEASURE_CAT (CAT, CAT_DESC, CAT_TYPE) VALUES ('{0}', '{1}', '{2}')",
                                                         txtCatID.Text, txtCatDesc.Text, cboType.Text);
                    }

                    //LDW modGlobal.gv_cn.Execute(modGlobal.gv_sql);
                    DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql);
                    this.Close();
                }
                else
                {
                    //LDW RadMessageBox.Show("Please fill in all the Information", MsgBoxStyle.Critical, "Information Incomplete");

                    DialogResult ds1 = RadMessageBox.Show(this, "Please fill in all the Information.", "Create Category", MessageBoxButtons.OK, RadMessageIcon.Error);
                    this.Text = ds1.ToString();
                }
                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();
        }
Exemplo n.º 7
0
        public void RefreshSetList()
        {
            frmReportSetup frmReportSetupCopy = new frmReportSetup();
            int            SetIndex           = 1;


            try
            {
                cboSet.Items.Clear();

                modGlobal.gv_sql = "Select CriteriaSet from tbl_setup_SavedAdhocReportCriteria ";
                modGlobal.gv_sql = string.Format("{0} where Report_id = {1}", modGlobal.gv_sql, Support.GetItemData(frmReportSetupCopy.cboReportList, frmReportSetupCopy.cboReportList.SelectedIndex));
                modGlobal.gv_sql = modGlobal.gv_sql + " Group by CriteriaSet ";

                //LDW modGlobal.gv_rs = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
                const string sqlTableName3 = "tbl_setup_SavedAdhocReportCriteria";
                modGlobal.gv_rs = DALcop.DalConnectDataSet(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql, sqlTableName3, modGlobal.gv_rs);

                //Display the list of criteria

                //LDW while (!modGlobal.gv_rs.EOF)
                foreach (DataRow myRow3 in modGlobal.gv_rs.Tables[sqlTableName3].Rows)
                {
                    cboSet.Items.Add("Set " + SetIndex);
                    Support.SetItemData(cboSet, cboSet.Items.Count - 1, SetIndex);
                    SetIndex = SetIndex + 1;
                    //LDW modGlobal.gv_rs.MoveNext();
                }
                modGlobal.gv_rs.Dispose();

                //always add a new one to the list in addition to the previous ones
                cboSet.Items.Add(new ListBoxItem("Set " + SetIndex, SetIndex).ToString());
            }
            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));
            }
        }
Exemplo n.º 8
0
        public void RefreshSetDef()
        {
            frmReportSetup frmReportSetupCopy = new frmReportSetup();


            try
            {
                if (cboSet.SelectedIndex < 0)
                {
                    return;
                }

                modGlobal.gv_sql = "Select JoinOperator from tbl_setup_SavedAdhocReportSumCriteria ";
                modGlobal.gv_sql = string.Format("{0} where Report_ID = {1}", modGlobal.gv_sql, Support.GetItemData(frmReportSetupCopy.cboReportList, frmReportSetupCopy.cboReportList.SelectedIndex));
                modGlobal.gv_sql = string.Format("{0} and CriteriaSet = {1}", modGlobal.gv_sql, Support.GetItemData(cboSet, cboSet.SelectedIndex));

                //LDW modGlobal.gv_rs = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
                const string sqlTableName2 = "tbl_setup_SavedAdhocReportSumCriteria";
                modGlobal.gv_rs = DALcop.DalConnectDataSet(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql, sqlTableName2, modGlobal.gv_rs);

                if (modGlobal.gv_rs.Tables[sqlTableName2].Rows.Count == 0)
                {
                    cboJoinOperator.Text    = "";
                    cboJoinOperator.Enabled = true;
                }
                else
                {
                    cboJoinOperator.Text    = modGlobal.gv_rs.Tables[sqlTableName2].Rows[0]["JoinOperator"].ToString();
                    cboJoinOperator.Enabled = false;
                }
                modGlobal.gv_rs.Dispose();
            }
            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));
            }
        }
Exemplo n.º 9
0
        private void cmdDelete_Click(System.Object eventSender, System.EventArgs eventArgs)
        {
            DialogResult resp;

            //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 to delete this layout? All the associated fields will be deleted too.", MsgBoxStyle.YesNo, "Delete ImportLayout");
            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 = modGlobal.gv_sql + " where impf.importsetupid = " + rdcImportLayout.Resultset.rdoColumns["ImportSetupID"].Value;
            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 = modGlobal.gv_sql + " where impf.importsetupid = " + rdcImportLayout.Resultset.rdoColumns["ImportSetupID"].Value;
            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 = modGlobal.gv_sql + " where importsetupid = " + rdcImportLayout.Resultset.rdoColumns["ImportSetupID"].Value;

            DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql);

            modGlobal.gv_sql = " delete tbl_setup_ImportSetup ";
            modGlobal.gv_sql = modGlobal.gv_sql + " where importsetupid = " + rdcImportLayout.Resultset.rdoColumns["ImportSetupID"].Value;

            DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql);

            RefreshImportLayout();
        }
Exemplo n.º 10
0
        private void frmPatientFieldsExportFormat_Load(object sender, EventArgs e)
        {
            this.CenterToParent();

            try
            {
                txtJCFieldCode.Enabled       = false;
                txtCMSFieldCode.Enabled      = false;
                lstMeasureList.Enabled       = false;
                lstSelectedMeasures.Enabled  = false;
                cmdLinkToMeasure.Enabled     = false;
                cmdRemoveFromMeasure.Enabled = false;

                //retrieve the list of table fields
                modGlobal.gv_sql = "Select * from tbl_setup_DataDef ";
                modGlobal.gv_sql = modGlobal.gv_sql + " where BaseTableID in ";
                modGlobal.gv_sql = modGlobal.gv_sql + " (select basetableid from tbl_setup_tableDef where BaseTable = 'PATIENT' )";
                modGlobal.gv_sql = modGlobal.gv_sql + " order by FieldName ";

                //LDW rdcFieldList.Resultset = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
                rdcFieldListTable = "tbl_setup_DataDef";
                rdcFieldList      = DALcop.DalConnectDataSet(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql, rdcFieldListTable, rdcFieldList);
                rdcFieldList.AcceptChanges();

                lstFieldList.Items.Clear();
                //LDW while (!rdcFieldList.Resultset.EOF)
                foreach (DataRow myRow1 in rdcFieldList.Tables[rdcFieldListTable].Rows)
                {
                    lstFieldList.Items.Add(new ListBoxItem(myRow1.Field <string>("FieldName"), myRow1.Field <int>("DDID")).ToString());
                    //LDW rdcFieldList.Resultset.MoveNext();
                }
            }
            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));
            }
        }
Exemplo n.º 11
0
        private void RefreshMeasureSetDetail()
        {
            try
            {
                modGlobal.gv_sql = "Select MeasureCriteriaID, CriteriaTitle, [DDID1], [DDID2], [ValueOperator], [FieldValue], [DestDDID], [LookupID]," +
                                   "[FieldOperator], [DateUnit], [JoinOperator], [LookupTableID] FROM tbl_Setup_MeasureCriteria WHERE MeasureCriteriaSetID = " + il_MeasureCriteriaSetID;
                modGlobal.gv_sql = modGlobal.gv_sql + " order by MeasureCriteriaID";

                //LDW modGlobal.gv_rs = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
                modGlobal.gv_rs = DALcop.DalConnectDataSet(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql, rdcMeasureSetTable, modGlobal.gv_rs);
                //LDW if (modGlobal.gv_rs.RowCount == 0)
                if (modGlobal.gv_rs.Tables[rdcMeasureSetTable].Rows.Count == 0)
                {
                    //LDW RadMessageBox.Show("Please Create measure sets before using this form", MsgBoxStyle.Information, "No Measures Exist");

                    DialogResult dsn = RadMessageBox.Show(this, "Please Create measure sets before using this form", "Measure Set Detail", MessageBoxButtons.OK, RadMessageIcon.Error);
                    this.Text = dsn.ToString();
                    return;
                }
                else
                {
                    rdcMeasureSet = modGlobal.gv_rs;
                    rdcMeasureSet.AcceptChanges();
                    dbgMeasureSet.Refresh();
                    //        RefreshMeasureCriteria
                }

                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();
        }
Exemplo n.º 12
0
        private void cmdDeleteIndicator_Click(System.Object eventSender, System.EventArgs eventArgs)
        {
            if (lstIndicators.SelectedIndex < -1)
            {
                return;
            }

            modGlobal.gv_sql = "delete tbl_setup_datareq ";
            modGlobal.gv_sql = modGlobal.gv_sql + " where indicatorid = " + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(lstIndicators, lstIndicators.SelectedIndex);
            DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql);

            modGlobal.gv_sql = "delete tbl_setup_indicator ";
            modGlobal.gv_sql = modGlobal.gv_sql + " where indicatorid = " + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(lstIndicators, lstIndicators.SelectedIndex);
            DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql);

            RefreshIndicator();
        }
Exemplo n.º 13
0
        private void cmdChangeStatus_Click(object sender, EventArgs e)
        {
            DialogResult resp;
            string       MoveToModule = null;


            try
            {
                if (lstGroups.SelectedIndex < 0)
                {
                    return;
                }

                MoveToModule = (modGlobal.gv_status == "TEST" ? "Active" : "Test");
                resp         = RadMessageBox.Show("Are you sure you want this group to the " + MoveToModule + " Module?", "", MessageBoxButtons.YesNo, RadMessageIcon.Question);
                if (resp == DialogResult.No)
                {
                    return;
                }

                modGlobal.gv_sql = "Update tbl_Setup_submitGroup ";
                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 groupID = {1}", modGlobal.gv_sql, Support.GetItemData(lstGroups, lstGroups.SelectedIndex));
                DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql);

                sstabGroup.ActiveWindow = sstabGroup0;
                RefreshGroupList();
                RefreshGroupToUpdate();

                modGlobal.gv_Action = "Update";
            }
            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));
            }
        }
Exemplo n.º 14
0
        private void cmdEdit_Click(System.Object eventSender, System.EventArgs eventArgs)
        {
            string gv_Command = null;

            //UPGRADE_WARNING: Use of Null/IsNull() detected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="2EED02CB-5C0E-4DC1-AE94-4FAA3A30F51A"'
            if (string.IsNullOrEmpty(txtID.Text) | Information.IsDBNull(txtID.Text))
            {
                RadMessageBox.Show("ID cannot be blank");
                return;
            }

            //UPGRADE_WARNING: Couldn't resolve default property of object gv_Command. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            gv_Command = "Update tbl_Setup_miscLookupList set ";
            //UPGRADE_WARNING: Couldn't resolve default property of object gv_Command. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            gv_Command = gv_Command + " ID = '" + txtID.Text + "',";
            //UPGRADE_WARNING: Couldn't resolve default property of object gv_Command. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            gv_Command = gv_Command + " FieldValue = '" + txtLookupValue.Text + "'";
            //UPGRADE_WARNING: Couldn't resolve default property of object gv_Command. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            gv_Command = gv_Command + " Where lookupid = " + frmLookupSetupCopy.rdcLookupList.Tables[rdcLookupListTable].Columns["LookupID"];
            //UPGRADE_WARNING: Couldn't resolve default property of object gv_Command. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, gv_Command);


            modGlobal.gv_sql = " update tbl_setup_savedadhocreportcriteria ";
            modGlobal.gv_sql = modGlobal.gv_sql + " set [value] = '" + txtID.Text + "'";
            modGlobal.gv_sql = modGlobal.gv_sql + " Where lookupid = " + frmLookupSetupCopy.rdcLookupList.Tables[rdcLookupListTable].Columns["LookupID"];
            DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql);

            modGlobal.gv_sql = " update tbl_setup_submitcleanuprecord ";
            modGlobal.gv_sql = modGlobal.gv_sql + " set [value] = '" + txtID.Text + "'";
            modGlobal.gv_sql = modGlobal.gv_sql + " Where lookupid = " + frmLookupSetupCopy.rdcLookupList.Tables[rdcLookupListTable].Columns["LookupID"];
            DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql);

            modGlobal.gv_sql = " update tbl_setup_submitcriteria ";
            modGlobal.gv_sql = modGlobal.gv_sql + " set [value] = '" + txtID.Text + "'";
            modGlobal.gv_sql = modGlobal.gv_sql + " Where lookupid = " + frmLookupSetupCopy.rdcLookupList.Tables[rdcLookupListTable].Columns["LookupID"];
            DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql);

            modGlobal.gv_sql = " update tbl_setup_tablevalidation ";
            modGlobal.gv_sql = modGlobal.gv_sql + " set [value] = '" + txtID.Text + "'";
            modGlobal.gv_sql = modGlobal.gv_sql + " Where lookupid = " + frmLookupSetupCopy.rdcLookupList.Tables[rdcLookupListTable].Columns["LookupID"];
            DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql);

            this.Close();
        }
Exemplo n.º 15
0
        private void PopulateSetList()
        {
            try
            {
                lstSetList.Items.Clear();

                if (ii_MeasureStepID == 0)
                {
                    setMeasureStepID();
                }

                modGlobal.gv_sql = "SELECT MeasureCriteriaSet, MeasureCriteriaSetID FROM tbl_Setup_MeasureCriteriaSet " + " WHERE MeasureStepID = " +
                                   ii_MeasureStepID + " ORDER BY MeasureCriteriaSet";

                //LDW modGlobal.gv_rs = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
                const string sqlTableName1 = "tbl_Setup_MeasureCriteriaSet";
                modGlobal.gv_rs = DALcop.DalConnectDataSet(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql, sqlTableName1, modGlobal.gv_rs);
                //LDW while (!modGlobal.gv_rs.EOF)
                foreach (DataRow myRow1 in modGlobal.gv_rs.Tables[sqlTableName1].Rows)
                {
                    lstSetList.Items.Add(new ListBoxItem(myRow1.Field <string>("MeasureCriteriaSet"),
                                                         myRow1.Field <int>("measurecriteriasetid")).ToString());
                    //LDW modGlobal.gv_rs.MoveNext();
                }
                modGlobal.gv_rs.Dispose();

                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();
        }
Exemplo n.º 16
0
        private void dlgCreateCat_Load(Object eventSender, EventArgs eventArgs)
        {
            var dalAccess = new DALcop();

            if (Information.IsNumeric(is_CatID))
            {
                modGlobal.gv_sql = "SELECT * FROM tbl_MEASURE_CAT WHERE MEASURE_CATID = " + is_CatID;
                //LDW modGlobal.gv_rs = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
                const string sqlTableName1 = "tbl_MEASURE_CAT";
                modGlobal.gv_rs = dalAccess.DalConnectDataSet(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql, sqlTableName1, modGlobal.gv_rs);
                //LDW txtCatID.Text = modGlobal.gv_rs.rdoColumns["CAT"].Value;
                txtCatID.Text = modGlobal.gv_rs.Tables[sqlTableName1].Columns["CAT"].ToString();
                //LDW txtCatDesc.Text = modGlobal.gv_rs.rdoColumns["CAT_DESC"].Value;
                txtCatDesc.Text = modGlobal.gv_rs.Tables[sqlTableName1].Columns["CAT_DESC"].ToString();
                //LDW cboType.Text = modGlobal.gv_rs.rdoColumns["CAT_TYPE"].Value;
                cboType.Text = modGlobal.gv_rs.Tables[sqlTableName1].Columns["CAT_TYPE"].ToString();
            }
        }
Exemplo n.º 17
0
        private void RefreshFields()
        {
            var          dalAccess     = new DALcop();
            const string sqlTableName2 = "tbl_Setup_DataDef";

            modGlobal.gv_sql = string.Format("SELECT * FROM tbl_Setup_DataDef WHERE FieldType = '{0}' AND (ParentDDID IS NULL OR ParentDDID = DDID) ORDER BY FIELDNAME", is_PreviousDataType);
            //LDW modGlobal.gv_rs = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
            modGlobal.gv_rs = dalAccess.DalConnectDataSet(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql, sqlTableName2, modGlobal.gv_rs);

            cboField.Items.Clear();
            //LDW while (!modGlobal.gv_rs.EOF)
            foreach (DataRow myRow2 in modGlobal.gv_rs.Tables[sqlTableName2].Rows)
            {
                //LDW cboField.Items.Add(new Microsoft.VisualBasic.Compatibility.VB6.ListBoxItem(modGlobal.gv_rs.rdoColumns["FieldName"].Value, modGlobal.gv_rs.rdoColumns["DDID"].Value));
                cboField.Items.Add(new Microsoft.VisualBasic.Compatibility.VB6.ListBoxItem(myRow2.Field <string>("FieldName"), myRow2.Field <int>("DDID")));
                //LDW modGlobal.gv_rs.MoveNext();
            }
        }
Exemplo n.º 18
0
        public void RefreshPeriods()
        {
            List <Item> itemslstPeriods = new List <Item>();

            try
            {
                //retrieve the list of periods
                modGlobal.gv_sql = "Select Quarter from tbl_Setup_IndicatorRiskAdjustmentCoefficients GROUP BY quarter order by quarter desc";
                //LDW modGlobal.gv_rs = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
                const string sqlTableName6 = "tbl_Setup_IndicatorRiskAdjustmentCoefficients";
                modGlobal.gv_rs = DALcop.DalConnectDataSet(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql, sqlTableName6, modGlobal.gv_rs);

                lstPeriods.Items.Clear();
                //LDW while (!modGlobal.gv_rs.EOF)
                foreach (DataRow myRow6 in modGlobal.gv_rs.Tables[sqlTableName6].Rows)
                {
                    itemslstPeriods.Add(new Item(myRow6.Field <int>("Quarter"), Strings.Mid(myRow6.Field <string>("Quarter"), 5, 2) + " - " + Strings.Mid(myRow6.Field <string>("Quarter"), 1, 4)));


                    //lstPeriods.Items.Add(new ListBoxItem(Strings.Mid(myRow6.Field<string>("Quarter"), 5, 2) + " - " + Strings.Mid(myRow6.Field<string>("Quarter"), 1, 4), myRow6.Field<int>("Quarter")).ToString());
                    //LDW modGlobal.gv_rs.MoveNext();
                }
                this.lstPeriods.DataSource    = itemslstPeriods;
                this.lstPeriods.DisplayMember = "Description";
                this.lstPeriods.ValueMember   = "Id";

                //LDW lstPeriods.SetSelected(0, true);
                lstPeriods.SelectedIndex       = 0;
                lstPeriods.SelectedItem.Active = true;
            }
            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));
            }
        }
Exemplo n.º 19
0
        private void frmSubmissionAddValidation_Load(object sender, EventArgs e)
        {
            this.CenterToParent();

            try
            {
                cboIndicators.Items.Clear();

                modGlobal.gv_sql = "select tbl_setup_Indicator.* ";
                modGlobal.gv_sql = modGlobal.gv_sql + " from tbl_setup_Indicator  ";
                if (string.IsNullOrEmpty(modGlobal.gv_State))
                {
                    modGlobal.gv_sql = modGlobal.gv_sql + " Where (State = '' or State is Null) ";
                }
                else
                {
                    modGlobal.gv_sql = string.Format("{0} Where (State = '' or State is null or State = '{1}')", modGlobal.gv_sql, modGlobal.gv_State);
                }
                modGlobal.gv_sql = modGlobal.gv_sql + " order by Description ";

                //LDW modGlobal.gv_rs = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
                const string sqlTableName1 = "tbl_setup_Indicator";
                modGlobal.gv_rs = DALcop.DalConnectDataSet(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql, sqlTableName1, modGlobal.gv_rs);
                //LDW while (!modGlobal.gv_rs.EOF)
                foreach (DataRow myRow1 in modGlobal.gv_rs.Tables[sqlTableName1].Rows)
                {
                    cboIndicators.Items.Add(new ListBoxItem(myRow1.Field <string>("Description"), myRow1.Field <int>("IndicatorID")).ToString());
                    //LDW modGlobal.gv_rs.MoveNext();
                }
            }
            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));
            }
        }
Exemplo n.º 20
0
        private void cmdDelete_Click(System.Object eventSender, System.EventArgs eventArgs)
        {
            DialogResult resp;

            if (rdcVersionHistory.Resultset.AbsolutePosition == 0)
            {
                return;
            }

            //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 to delete the log for this version?", MsgBoxStyle.YesNo, "Delete Log");
            if (resp == DialogResult.Yes)
            {
                modGlobal.gv_sql = "Delete tbl_setup_Version where versionid = " + rdcVersionHistory.Resultset.rdoColumns["versionid"].Value;
                DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql);

                refreshVersionHistory();
            }
        }
Exemplo n.º 21
0
        private void cmdSelect_Click(System.Object eventSender, System.EventArgs eventArgs)
        {
            var i = 0;

            for (i = 0; i <= lstIndicators.Items.Count - 1; i++)
            {
                if (lstIndicators.GetSelected(i))
                {
                    modGlobal.gv_sql = "Insert into tbl_setup_MeasureSetMapMeas (MeasureSetID, IndicatorID)";
                    modGlobal.gv_sql = modGlobal.gv_sql + " Values (" + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(frmMeasureSetup.cboMeasureSet, frmMeasureSetup.cboMeasureSet.SelectedIndex);
                    modGlobal.gv_sql = modGlobal.gv_sql + "," + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(lstIndicators, i) + ")";

                    DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql);
                }
            }
            frmMeasureSetup.RefreshMeasureSetField();

            this.Close();
        }
Exemplo n.º 22
0
        private void RefreshMeasureFieldGroupLogic()
        {
            DataSet rs_Temp = new DataSet();
            string  ls_Sql  = null;

            try
            {
                ls_Sql = "SELECT CriteriaTitle, MeasureFieldGroupLogicID  FROM tbl_Setup_MeasureFieldGroupLogic ORDER BY CriteriaTitle";
                //LDW rs_Temp = modGlobal.gv_cn.OpenResultset(ls_Sql, RDO.ResultsetTypeConstants.rdOpenStatic);
                const string MSRDCGroupsTable = "tbl_Setup_MeasureFieldGroupLogic";
                rs_Temp = DALcop.DalConnectDataSet(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql, MSRDCGroupsTable, rs_Temp);

                //LDW if (!rs_Temp.EOF)
                for (int itr = 0; itr < rs_Temp.Tables[MSRDCGroupsTable].Rows.Count; itr++)
                {
                    var myRow    = (DataRow)rs_Temp.Tables[MSRDCGroupsTable].Rows[itr];
                    int rowIndex = rs_Temp.Tables[MSRDCGroupsTable].Rows.IndexOf(myRow);
                    if (rowIndex != rs_Temp.Tables[MSRDCGroupsTable].Rows.Count - 1)
                    {
                        MSRDCGroups = rs_Temp;
                    }
                    else
                    {
                        MSRDCGroups = null;
                    }
                }
                MSRDCGroups.AcceptChanges();
                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));
            }
        }
Exemplo n.º 23
0
        private void dlgField_Load(Object eventSender, EventArgs eventArgs)
        {
            var          dalAccess     = new DALcop();
            const string sqlTableName1 = "tbl_Setup_MeasureCriteria";

            modGlobal.gv_sql = string.Format("SELECT dd.DDID, dd.FieldName, dd.FieldType, mc.CriteriaTitle FROM  tbl_Setup_MeasureCriteria mc, tbl_Setup_DataDef dd WHERE  dd.DDID = mc.DDID1 AND mc.MeasureCriteriaID = {0}", ii_MeasureCriteriaID);
            //LDW modGlobal.gv_rs = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
            modGlobal.gv_rs = dalAccess.DalConnectDataSet(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql, sqlTableName1, modGlobal.gv_rs);

            //LDW if (!modGlobal.gv_rs.EOF)
            foreach (DataRow myRow1 in modGlobal.gv_rs.Tables[sqlTableName1].Rows)
            {
                //LDW if (!Information.IsDBNull(modGlobal.gv_rs.rdoColumns["DDID"].Value))
                if (!Information.IsDBNull(myRow1.Field <string>("DDID")))
                {
                    /*LDW txtPreviousField.Text = modGlobal.gv_rs.rdoColumns["FieldName"].Value;
                     * is_PreviousDataType = modGlobal.gv_rs.rdoColumns["FieldType"].Value;
                     * is_CriteriaTitle = modGlobal.gv_rs.rdoColumns["CriteriaTitle"].Value; */
                    txtPreviousField.Text = myRow1.Field <string>("FieldName");
                    is_PreviousDataType   = myRow1.Field <string>("FieldType");
                    is_CriteriaTitle      = myRow1.Field <string>("CriteriaTitle");

                    RefreshFields();
                    OKButton.Enabled = true;
                }
                else
                {
                    Interaction.MsgBox("This criteria can not be modified");
                    OKButton.Enabled = false;
                }
                if (Information.IsDBNull(myRow1.Field <string>("DDID")))
                {
                    Interaction.MsgBox("This criteria can not be modified");
                    OKButton.Enabled = false;
                }
            }

            /*LDW else
             * {
             *  Interaction.MsgBox("This criteria can not be modified");
             *  OKButton.Enabled = false;
             * } */
        }
Exemplo n.º 24
0
        public void RefreshCategoryList()
        {
            var LIndex = 0;

            try
            {
                //retrieve the list of table fields
                modGlobal.gv_sql = "Select * ";
                modGlobal.gv_sql = modGlobal.gv_sql + " from tbl_measure_cat ";
                modGlobal.gv_sql = modGlobal.gv_sql + " order by cat ";

                //LDW modGlobal.gv_rs = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
                const string sqlTableName2 = "tbl_measure_cat";
                modGlobal.gv_rs = DALcop.DalConnectDataSet(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql, sqlTableName2, modGlobal.gv_rs);

                //Display the list of fields
                cboCategory.Items.Clear();
                LIndex = -1;

                //LDW while (!modGlobal.gv_rs.EOF)
                foreach (DataRow myRow2 in modGlobal.gv_rs.Tables[sqlTableName2].Rows)
                {
                    LIndex = LIndex + 1;
                    cboCategory.Items.Add(new ListBoxItem(myRow2.Field <string>("CAT") + " - " + myRow2.Field <string>("CAT_DESC"), myRow2.Field <int>("measure_catid")).ToString());
                    //LDW modGlobal.gv_rs.MoveNext();
                }
                modGlobal.gv_rs.Dispose();
            }
            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));
            }
        }
Exemplo n.º 25
0
        public void RefreshOperatorList()
        {
            try
            {
                cmbOperators.Items.Clear();

                modGlobal.gv_sql = "select * from tbl_Setup_MeasureCriteria ";
                modGlobal.gv_sql = string.Format("{0} where MeasureCriteriaID  = {1}", modGlobal.gv_sql, mcid);
                //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 (modGlobal.gv_rs.Tables[sqlTableName1].Rows[0]["valueoperator"].ToString() == "In" | modGlobal.gv_rs.Tables[sqlTableName1].Rows[0]["valueoperator"].ToString() == "Not In")
                {
                    cmbOperators.Items.Add("In");
                    cmbOperators.Items.Add("Not In");
                }
                else
                {
                    cmbOperators.Items.Add("=");
                    cmbOperators.Items.Add("<>");
                    cmbOperators.Items.Add(">");
                    cmbOperators.Items.Add("<");
                    cmbOperators.Items.Add(">=");
                    cmbOperators.Items.Add("<=");
                }
                modGlobal.gv_rs.Dispose();
            }
            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));
            }
        }
Exemplo n.º 26
0
        private void lstUtilizationFields_ItemCheckedChanged(object sender, Telerik.WinControls.UI.ListViewItemEventArgs e)
        {
            frmIndicatorReportSetup frmIndicatorReportSetupCopy = new frmIndicatorReportSetup();
            int sid;
            int fid = 0;

            try
            {
                if (openning == 0)
                {
                    sid = Support.GetItemData(frmIndicatorReportSetupCopy.lstHeading, frmIndicatorReportSetupCopy.lstHeading.SelectedIndex);
                    fid = Support.GetItemData(lstUtilizationFields, lstUtilizationFields.SelectedIndex);
                    //LDW if (lstUtilizationFields.GetItemChecked(eventArgs.Index) == true)
                    if (Convert.ToBoolean(e.Item.CheckState) == true)
                    {
                        modGlobal.gv_sql = "INSERT into tbl_Setup_IndicatorReportDenominators (SubGroupID, tName, FieldID, OpChar)";
                        modGlobal.gv_sql = modGlobal.gv_sql + " values (" + sid + ",'Utilization'," +
                                           Support.GetItemData(lstUtilizationFields, lstUtilizationFields.SelectedIndex) + " , 1)";
                        DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql);
                    }
                    else
                    {
                        modGlobal.gv_sql = "delete from tbl_Setup_IndicatorReportDenominators ";
                        modGlobal.gv_sql = string.Format("{0} where SubGroupID = {1} and  tName = 'Utilization' and FieldID ={2}", modGlobal.gv_sql, sid, fid);
                        DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_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));
            }
        }
Exemplo n.º 27
0
        private void cmdChangeStatus_Click(object sender, EventArgs e)
        {
            DialogResult resp;
            string       MoveToModule = null;

            try
            {
                if (rdcImportLayout.Tables[rdcImportLayoutTable].Rows.Count == 0)
                {
                    return;
                }

                MoveToModule = (modGlobal.gv_status == "TEST" ? "Active" : "Test");
                resp         = RadMessageBox.Show("Are you sure you want this import layout to the " + MoveToModule + " Module?",
                                                  "Layout Import", MessageBoxButtons.YesNo, RadMessageIcon.Question);
                if (resp == DialogResult.No)
                {
                    return;
                }

                modGlobal.gv_sql = "Update tbl_Setup_ImportSetup ";
                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 ImportSetupID = {1}", modGlobal.gv_sql, rdcImportLayout.Tables[rdcImportLayoutTable].Rows[0]["ImportSetupID"]);
                //LDW modGlobal.gv_cn.Execute(modGlobal.gv_sql);
                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));
            }
        }
Exemplo n.º 28
0
        private void cmdDeleteSet_Click(System.Object eventSender, System.EventArgs eventArgs)
        {
            if (cboIndicatorSet.SelectedIndex < 0)
            {
                return;
            }

            modGlobal.gv_sql = "Delete tbl_Setup_IndicatorSetField ";
            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);

            modGlobal.gv_sql = "Delete tbl_Setup_IndicatorSet ";
            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();
            cboIndicatorSet.SelectedIndex = -1;
            RefreshIndicatorSetField();
        }
        private void cmsAddFieldLink_Click()
        {
            object lstFieldsToLink = null;

            //UPGRADE_WARNING: Couldn't resolve default property of object lstFieldsToLink.ListIndex. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            if (lstFieldsToLink.ListIndex > -1)
            {
                modGlobal.gv_sql = "update tbl_setup_cmsfieldmeasures ";
                modGlobal.gv_sql = modGlobal.gv_sql + " set LinkToDDID = " + rdcFieldList.Resultset.rdoColumns["DDID"].Value;
                //UPGRADE_WARNING: Couldn't resolve default property of object lstFieldsToLink.ListIndex. 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 lstFieldsToLink.ItemData. 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 + " where ddid = " + lstFieldsToLink.ItemData(lstFieldsToLink.ListIndex);
                modGlobal.gv_sql = modGlobal.gv_sql + " and MeasureCode  = '" + rdcFieldList.Resultset.rdoColumns["measurecode"].Value + "' ";

                DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql);

                RefreshFieldsToLink();
                RefreshLinkedFields();
            }
        }
Exemplo n.º 30
0
        private void cmdSelect_Click(object sender, EventArgs e)
        {
            frmIndicatorSetup frmIndicatorSetupCopy = new frmIndicatorSetup();
            int newid;
            var i = 0;


            try
            {
                for (i = 0; i <= lstIndicators.Items.Count - 1; i++)
                {
                    if (lstIndicators.SelectedIndex == i)
                    {
                        newid = modDBSetup.FindMaxRecID("tbl_Setup_IndicatorsetField", "IndLinkID");

                        modGlobal.gv_sql = "Insert into tbl_setup_IndicatorsetField (IndLinkID, IndicatorSetID, IndicatorID)";
                        modGlobal.gv_sql = string.Format("{0} Values ({1}", modGlobal.gv_sql, newid);
                        modGlobal.gv_sql = string.Format("{0},{1}", modGlobal.gv_sql,
                                                         Support.GetItemData(frmIndicatorSetupCopy.cboIndicatorSet, frmIndicatorSetupCopy.cboIndicatorSet.SelectedIndex));
                        modGlobal.gv_sql = string.Format("{0},{1})", modGlobal.gv_sql, Support.GetItemData(lstIndicators, i));
                        DALcop.ExecuteCommand(modGlobal.gv_cn.ConnectionString, modGlobal.gv_sql);
                    }
                }
                frmIndicatorSetupCopy.RefreshIndicatorSetField();

                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));
            }
        }