public static DataTable GetCommandInfo() { try { DataTable DT_Temp = new DataTable(); MySqlConnectionHelp mySqlConnectionHelp = new MySqlConnectionHelp(); MySqlConnection mySqlConnection = mySqlConnectionHelp.GetMySqlCon(); string sql = "select * from tk_command"; MySqlCommand mySqlCommand = new MySqlCommand(sql, mySqlConnection); DT_Temp = mySqlConnectionHelp.GetDataSet(mySqlCommand).Tables[0]; mySqlConnectionHelp.CloseConn(mySqlConnection); return(DT_Temp); } catch (Exception ex) { MessageBox.Show(ex.Message); return(null); } }
public static DataTable GetTempletInfoByTemplet_ID(int templet_ID) { try { DataTable DT_Temp = new DataTable(); MySqlConnectionHelp mySqlConnectionHelp = new MySqlConnectionHelp(); MySqlConnection mySqlConnection = mySqlConnectionHelp.GetMySqlCon(); string sql = "select * from sp_templet_info where Templet_ID = " + templet_ID; MySqlCommand mySqlCommand = new MySqlCommand(sql, mySqlConnection); DT_Temp = mySqlConnectionHelp.GetDataSet(mySqlCommand).Tables[0]; mySqlConnectionHelp.CloseConn(mySqlConnection); return(DT_Temp); } catch (Exception ex) { AlarmRecord("数据库", ex.Message); MessageBox.Show(ex.Message); return(null); } }
public static DataTable GetPaintPathPositionByTemplet_ID(int templet_ID) { try { DataTable DT_Temp = new DataTable(); MySqlConnectionHelp mySqlConnectionHelp = new MySqlConnectionHelp(); MySqlConnection mySqlConnection = mySqlConnectionHelp.GetMySqlCon(); //string sql = "select * from sp_paint_path_position_info where Templet_ID = " + templet_ID + " ORDER BY Start_Position_X DESC"; string sql = "select * from sp_paint_path_position_info where Templet_ID = " + templet_ID; MySqlCommand mySqlCommand = new MySqlCommand(sql, mySqlConnection); DT_Temp = mySqlConnectionHelp.GetDataSet(mySqlCommand).Tables[0]; mySqlConnectionHelp.CloseConn(mySqlConnection); return(DT_Temp); } catch (Exception ex) { AlarmRecord("数据库", ex.Message); MessageBox.Show(ex.Message); return(null); } }