示例#1
0
        public void subSearchDatabase(string dataTable)
        {
            StringBuilder mySQLString = new StringBuilder();

            try
            {
                DeviceConfig.partType  = dataGridViewTrackpad["PartType", dataGridViewTrackpad.SelectedCells[0].RowIndex].Value.ToString();
                mySQLFunction.Commonds = new DataSet();
                mySQLString.Append("select * from " + dataTable + " where DUTID = " + dataGridViewTrackpad["Id", dataGridViewTrackpad.SelectedCells[0].RowIndex].Value.ToString());
                MySql.Data.MySqlClient.MySqlDataAdapter mySQLData = new MySqlDataAdapter(mySQLString.ToString(), mySQLFunction.conn);
                mySQLData.Fill(mySQLFunction.Commonds);
            }
            catch (Exception ex)
            {
                MessageBox.Show("ERROR: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            if (dataTable == "iddstandby")
            {
                string IDDSlepp1    = mySQLFunction.Commonds.Tables[0].Rows[0]["IDDSleep1"].ToString();
                string IDDDeepSleep = mySQLFunction.Commonds.Tables[0].Rows[0]["IDDDeepSleep"].ToString();
                MessageBox.Show("IDD Sleep1: " + IDDSlepp1 + "mA; IDD Deep Sleep: " + IDDDeepSleep + "uA.", "Test Result", MessageBoxButtons.OK);
            }
            else
            {
                FormGrid formGrid = new FormGrid();
                formGrid.dsFormGrid   = mySQLFunction.Commonds;
                formGrid.indicateInfo = dataTable;

                formGrid.ShowDialog();
            }
        }
示例#2
0
        public void subSearchDatabase(string dataTable)
        {
            StringBuilder mySQLString = new StringBuilder();

            try
            {

                DeviceConfig.partType = dataGridViewTrackpad["PartType", dataGridViewTrackpad.SelectedCells[0].RowIndex].Value.ToString();
                mySQLFunction.Commonds = new DataSet();
                mySQLString.Append("select * from " + dataTable + " where DUTID = " + dataGridViewTrackpad["Id", dataGridViewTrackpad.SelectedCells[0].RowIndex].Value.ToString());
                MySql.Data.MySqlClient.MySqlDataAdapter mySQLData = new MySqlDataAdapter(mySQLString.ToString(), mySQLFunction.conn);
                mySQLData.Fill(mySQLFunction.Commonds);

            }
            catch (Exception ex)
            {
                MessageBox.Show("ERROR: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

            }

            if (dataTable == "iddstandby")
            {
                string IDDSlepp1 = mySQLFunction.Commonds.Tables[0].Rows[0]["IDDSleep1"].ToString();
                string IDDDeepSleep = mySQLFunction.Commonds.Tables[0].Rows[0]["IDDDeepSleep"].ToString();
                MessageBox.Show("IDD Sleep1: " + IDDSlepp1 + "mA; IDD Deep Sleep: " + IDDDeepSleep + "uA.", "Test Result", MessageBoxButtons.OK);

            }
            else
            {
                FormGrid formGrid = new FormGrid();
                formGrid.dsFormGrid = mySQLFunction.Commonds;
                formGrid.indicateInfo = dataTable;

                formGrid.ShowDialog();
            }
        }