/[H8]/trunk/h8server/h8serverDlg.cpp
ViewVC logotype

Diff of /trunk/h8server/h8serverDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 99 by kevin, Tue May 22 06:55:23 2007 UTC revision 100 by kevin, Fri May 25 08:34:08 2007 UTC
# Line 202  void mysocket::OnReceive(int nErrorCode) Line 202  void mysocket::OnReceive(int nErrorCode)
202          char buffer[30];          char buffer[30];
203          char barcode[15];          char barcode[15];
204          int ack = 1;          int ack = 1;
205          CString senddata, termID, ssum;          CString senddata, termID, ssum, hellodata1, hellodata2;
206          unsigned char Output[30];          unsigned char Output[30];
207          unsigned int price, isum, cash, bytte;          unsigned int price, isum, cash, bytte;
208          int status;          int status;
209          unsigned char reqID;          unsigned char reqID;
210          log l;          log l;
211            translog tl;
212          Equipment eq;          Equipment eq;
213                                    
214          status = worksock.Receive(buffer,30);          status = worksock.Receive(buffer,30);
# Line 225  void mysocket::OnReceive(int nErrorCode) Line 226  void mysocket::OnReceive(int nErrorCode)
226                          test = 10;                          test = 10;
227                  }                  }
228                                    
229                  l.logID = "5";                  //l.logID = "5";
230    
231                  for (int i=3; i < (3+test); i++){                  for (int i=3; i < (3+test); i++){
232                          barcode[i-3] = buffer[i];                          barcode[i-3] = buffer[i];
# Line 250  void mysocket::OnReceive(int nErrorCode) Line 251  void mysocket::OnReceive(int nErrorCode)
251                  worksock.Send(Output,7);                  worksock.Send(Output,7);
252    
253                  //LOG SKAL LAVES NUUUUUUUUUUUUUUUUUUUUUUU                  //LOG SKAL LAVES NUUUUUUUUUUUUUUUUUUUUUUU
254                  if(atoi(l.logID) < 0)                  if(atoi(tl.logID) > 0)
255                  {                  {
256                          CString logantal;                          CString logantal;
257                          logantal.Format("%d",antal);                          logantal.Format("%d",antal-48);
258                          CommonStorage::Instance()->getDBLayer()->TransaktionsEnhed(l.logID, eq.price, barcode,logantal);                          CommonStorage::Instance()->getDBLayer()->TransaktionsEnhed(tl.logID, eq.price, barcode,logantal);
259                  }                  }
260          }          }
261                    
# Line 269  void mysocket::OnReceive(int nErrorCode) Line 270  void mysocket::OnReceive(int nErrorCode)
270                                    
271                          senddata.Format("%d", ack);                          senddata.Format("%d", ack);
272                          worksock.Send(senddata, senddata.GetLength(),0);                          worksock.Send(senddata, senddata.GetLength(),0);
273                          CommonStorage::Instance()->getDBLayer()->Transaktionslog(termID);                          CommonStorage::Instance()->getDBLayer()->Transaktionslog(termID,0);
274                          break;                          break;
275    
276          case '2':          case '2':

Legend:
Removed from v.99  
changed lines
  Added in v.100

  ViewVC Help
Powered by ViewVC 1.1.20