@ -115,8 +115,19 @@ namespace Rs.MotionPlat.Recipe
for ( int j = 0 ; j < colNum ; j + + )
{
int tempIndex = ( colNum + 1 ) - ( index - ( i * colNum ) ) + ( i * colNum ) ;
double xRun = double . Parse ( txtMarkX1 . Text ) + ( j * double . Parse ( txtSlotOffsetDistX . Text ) ) ; // +GlobalVar.StockTrayOffsetX;
double yRun = double . Parse ( txtMarkY2 . Text ) + ( i * double . Parse ( txtSlotOffsetDistY . Text ) ) ; // +GlobalVar.StockTrayOffsetY;
double xRun = 0.0 ;
double yRun = 0.0 ;
if ( rsTray1 . SortDir = = ESortDir . LeftToRight )
{
xRun = double . Parse ( txtMarkX1 . Text ) + ( j * double . Parse ( txtSlotOffsetDistX . Text ) ) ;
yRun = double . Parse ( txtMarkY2 . Text ) + ( i * double . Parse ( txtSlotOffsetDistY . Text ) ) ;
}
else if ( rsTray1 . SortDir = = ESortDir . LeftBottomToTop )
{
xRun = double . Parse ( txtMarkX1 . Text ) + ( j * double . Parse ( txtSlotOffsetDistX . Text ) ) ;
yRun = double . Parse ( txtMarkY2 . Text ) + ( i * double . Parse ( txtSlotOffsetDistY . Text ) ) ;
}
string insertRunSql = $"insert into TrayPoints(trayid,recipename,trayname,slotindex,x,y) values('{dt.Rows[0][" id "]}','{dt.Rows[0][" recipename "]}','{dt.Rows[0][" TrayName "]}',{index},{xRun},{yRun})" ;
db . ExecuteNonQuery ( insertRunSql ) ;
index + + ;