/[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 103 by kevin, Sun May 27 13:32:36 2007 UTC revision 104 by kevin, Sun May 27 15:03:22 2007 UTC
# Line 205  void mysocket::OnReceive(int nErrorCode) Line 205  void mysocket::OnReceive(int nErrorCode)
205          CString senddata, termID, ssum, hellodata1, hellodata2;          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, intlogid;
         int intlogid;  
209          unsigned char reqID;          unsigned char reqID;
210          log l;          log l;
211          translog tl;          translog tl;
# Line 296  void mysocket::OnReceive(int nErrorCode) Line 295  void mysocket::OnReceive(int nErrorCode)
295                          test = 10;                          test = 10;
296                  }                  }
297                                    
                 //l.logID = "5";  
298    
299                  for (int i=3; i < (3+test); i++){                  for (int i=3; i < (3+test); i++){
300                          barcode[i-3] = buffer[i];                          barcode[i-3] = buffer[i];
# Line 305  void mysocket::OnReceive(int nErrorCode) Line 303  void mysocket::OnReceive(int nErrorCode)
303                  eq = CommonStorage::Instance()->getDBLayer()->GetEquipment(barcode,0,0);                  eq = CommonStorage::Instance()->getDBLayer()->GetEquipment(barcode,0,0);
304                  price = (atoi(eq.price)*100);                  price = (atoi(eq.price)*100);
305                  Output[0] = 1;                  Output[0] = 1;
306                  Output[1] = 1;                  Output[1] = price >> 24;
307                  Output[2] = price >> 24;                  Output[2] = price >> 16;
308                  Output[3] = price >> 16;                  Output[3] = price >> 8;
309                  Output[4] = price >> 8;                  Output[4] = price;
310                  Output[5] = price;                  Output[5] = eq.description.GetLength();
                 Output[6] = eq.description.GetLength();  
311                  int outputlength;                  int outputlength;
312                  outputlength = Output[6];                  outputlength = Output[5];
313                  for (int i = 7; i < (7+outputlength); i++){                  for (int i = 6; i < (6+outputlength); i++){
314                          Output[i] = eq.description[i-7];                          Output[i] = eq.description[i-6];
315                  }                  }
316                  Output[outputlength] = '\0';                  Output[outputlength] = '\0';
317    
318                  worksock.Send(Output,7);                  worksock.Send(Output,6);
319    
320                  //LOG SKAL LAVES NUUUUUUUUUUUUUUUUUUUUUUU                  //LOG SKAL LAVES NUUUUUUUUUUUUUUUUUUUUUUU
321                  if(intlogid > 0)                  if(intlogid > 0)

Legend:
Removed from v.103  
changed lines
  Added in v.104

  ViewVC Help
Powered by ViewVC 1.1.20