コード例 #1
0
ファイル: frmRStatus.cs プロジェクト: VKK-cell/Turbo-Edac
        private void LoadError()
        {
            try
            {
                //"D:\\TestCell_" + Global.T_CellNo + "\\" + Global.Data_Dir + "\\Log_Data\\" + OnLog_Data + ".csv"

                GridGen.Refresh();
                String          DataPath    = "D:\\TestCell_" + Global.T_CellNo + "\\" + Global.Data_Dir + "\\";
                string          strFileName = DataPath + "Log_Data\\" + Global.OnLog_Data + ".csv";
                OleDbConnection conn        = new OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0; Data Source = " + System.IO.Path.GetDirectoryName(strFileName) + "; Extended Properties = \"Text;HDR=YES;FMT=Delimited\"");
                conn.Open();
                OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM " + System.IO.Path.GetFileName(strFileName), conn);
                DataSet          ds1     = new DataSet("Temp");
                adapter.Fill(ds1);
                GridGen.DataSource = ds1.Tables[0];
                for (int i = 0; i <= 6; i++)
                {
                    if (GridGen.Columns[i].Name.Substring(3, 8) == "Not_Prog")
                    {
                        GridGen.Columns[i].Visible = false;
                    }
                }
            }
            catch (Exception ex)
            {
                Global.Create_OnLog("Alart", ex.Message + " :  LoadError file....");
                //MessageBox.Show("Error Code:- 12002", ex.Message);
            }
        }
コード例 #2
0
ファイル: frmRStatus.cs プロジェクト: vkk12345678/sonalika
 private void RunStatus_Click(object sender, EventArgs e)
 {
     try
     {
         GridGen.Refresh();
         String          DataPath    = "D:\\TestCell_" + Global.T_CellNo + "\\" + Global.Data_Dir + "\\";
         string          strFileName = DataPath + "Error_Data\\" + Global.Eng_Error_FileNm + ".csv";
         OleDbConnection conn        = new OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0; Data Source = " + System.IO.Path.GetDirectoryName(strFileName) + "; Extended Properties = \"Text;HDR=YES;FMT=Delimited\"");
         conn.Open();
         OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM " + System.IO.Path.GetFileName(strFileName), conn);
         DataSet          ds1     = new DataSet("Temp");
         adapter.Fill(ds1);
         GridGen.DataSource       = ds1.Tables[0];
         GridGen.Columns[0].Width = 60;
         GridGen.Columns[1].Width = 100;
         GridGen.Columns[2].Width = 60;
         GridGen.Columns[3].Width = 350;
         GridGen.Columns[4].Width = 120;
         GridGen.Columns[5].Width = 60;
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error Code:- 12002", ex.Message);
     }
 }
コード例 #3
0
ファイル: frmRStatus.cs プロジェクト: vkk12345678/sonalika
        //private void LoadPm()
        //{
        //    try
        //    {
        //        GridGen.Refresh();

        //        Global.Open_PMConn("Data", "conPM");
        //        OleDbDataAdapter adp = new OleDbDataAdapter("Select * from " + Global.Eng_PMFileNm + " Order By TM ", Global.conPM);
        //        DataSet ds = new DataSet();
        //        adp.Fill(ds);
        //        GridGen.DataSource = ds.Tables[0];
        //        foreach (DataGridViewColumn colm in GridGen.Columns)
        //        {
        //            colm.SortMode = DataGridViewColumnSortMode.NotSortable;
        //            colm.Width = 80;
        //        }

        //    }
        //    catch (Exception ex)
        //    {
        //        MessageBox.Show("Error Code:- 12001", ex.Message);
        //    }
        //}
        private void LoadPm()
        {
            try
            {
                GridGen.Refresh();
                String          DataPath    = "D:\\TestCell_" + Global.T_CellNo + "\\" + Global.Data_Dir + "\\";
                string          strFileName = DataPath + "PM_Data\\" + Global.Eng_PMFileNm + ".csv";
                OleDbConnection conn        = new OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0; Data Source = " + System.IO.Path.GetDirectoryName(strFileName) + "; Extended Properties = \"Text;HDR=YES;FMT=Delimited\"");
                conn.Open();
                OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM " + System.IO.Path.GetFileName(strFileName), conn);
                DataSet          ds1     = new DataSet("Temp");
                adapter.Fill(ds1);
                GridGen.DataSource = ds1.Tables[0];
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error Code:- 12003", ex.Message);
            }
        }