@ -55,7 +55,7 @@ namespace formula_manage.View
{
{
Connstr_SC = "server=" + TEXT_SQLIP + ";database=" + TEXT_SQLNAME + ";User ID=" + TEXT_SQLUSER + ";Password=" + TEXT_SQLPASWOR ;
Connstr_SC = "server=" + TEXT_SQLIP + ";database=" + TEXT_SQLNAME + ";User ID=" + TEXT_SQLUSER + ";Password=" + TEXT_SQLPASWOR ;
}
}
string order_sql = "SELECT PROC_CODE,PROC_NAME,PROC_TEST,PROC_STEP,MODIFY_TIME,PROC_FABRIC,PROC_PRODUCT,custom, REMARK FROM [Dispensing].[dbo].[PROCEDUR_TITLE]" ; //查询语句
string order_sql = "SELECT PROC_CODE,PROC_NAME,PROC_TEST,PROC_STEP,MODIFY_TIME,PROC_FABRIC,PROC_PRODUCT,REMARK FROM [Dispensing].[dbo].[PROCEDUR_TITLE]" ; //查询语句
SqlConnection conn_SC = new SqlConnection ( Connstr_SC ) ; //实例化
SqlConnection conn_SC = new SqlConnection ( Connstr_SC ) ; //实例化
try
try
@ -77,17 +77,25 @@ namespace formula_manage.View
}
}
}
}
public delegate void SendMessage ( string value ) ;
public delegate void SendMessage ( string [ ] value ) ;
public SendMessage sendMessage ;
public SendMessage sendMessage ;
string [ ] OrderData = new string [ 6 ] ;
private void DataGrid_Technology ( object sender , MouseButtonEventArgs e ) //数据表双击事件
private void DataGrid_Technology ( object sender , MouseButtonEventArgs e ) //数据表双击事件
{
{
int rownum = Technology . SelectedIndex ; //获取鼠标选中行并定义变量
int rownum = Technology . SelectedIndex ; //获取鼠标选中行并定义变量
if ( rownum ! = - 1 ) //判断鼠标定位是否有效
if ( rownum ! = - 1 ) //判断鼠标定位是否有效
{
{
/*定位选中行及指定列单元格文本信息*/
/*定位选中行及指定列单元格文本信息*/
sendMessage ( ( Technology . Columns [ 0 ] . GetCellContent ( Technology . Items [ rownum ] ) as TextBlock ) . Text . Trim ( ) ) ; //定位第列
OrderData [ 0 ] = ( Technology . Columns [ 0 ] . GetCellContent ( Technology . Items [ rownum ] ) as TextBlock ) . Text . Trim ( ) ; //定位第列
OrderData [ 1 ] = ( Technology . Columns [ 1 ] . GetCellContent ( Technology . Items [ rownum ] ) as TextBlock ) . Text . Trim ( ) ; //定位第列
OrderData [ 2 ] = ( Technology . Columns [ 2 ] . GetCellContent ( Technology . Items [ rownum ] ) as TextBlock ) . Text . Trim ( ) ; //定位第列
OrderData [ 3 ] = ( Technology . Columns [ 3 ] . GetCellContent ( Technology . Items [ rownum ] ) as TextBlock ) . Text . Trim ( ) ; //定位第列
OrderData [ 4 ] = ( Technology . Columns [ 4 ] . GetCellContent ( Technology . Items [ rownum ] ) as TextBlock ) . Text . Trim ( ) ; //定位第列
OrderData [ 5 ] = ( Technology . Columns [ 5 ] . GetCellContent ( Technology . Items [ rownum ] ) as TextBlock ) . Text . Trim ( ) ; //定位第列
sendMessage ( OrderData ) ; //传入数组
}
}
}
}