35323e8f0962af284ddcfb4e3cc4b3359634dbb6.svn-base 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. package xin.glue.ui.G.G04;
  2. import com.posdata.glue.biz.activity.PosActivity;
  3. import com.posdata.glue.biz.constants.PosBizControlConstants;
  4. import com.posdata.glue.context.PosContext;
  5. import com.posdata.glue.dao.PosGenericDao;
  6. import com.posdata.glue.dao.vo.PosParameter;
  7. //import com.posdata.glue.dao.vo.PosRowSet;
  8. //import com.posdata.glue.msg.PosMessage;
  9. public class PosSaveAuthRemovedSlab extends PosActivity {
  10. public String runActivity(PosContext ctx)
  11. {
  12. logger.logDebug("UIG040050_Save runActivity start ...");
  13. String[] rowStatus = (String[]) ctx.get("SLAB_CNT");
  14. int SLAB_CNT = Integer.parseInt(rowStatus[0]);
  15. if (SLAB_CNT == 0)
  16. return PosBizControlConstants.SUCCESS;
  17. //1. Get DAO Class
  18. PosGenericDao dao = this.getDao("mesdao");
  19. //2. Get Parameter
  20. String[] FROM_ADDR = (String[]) ctx.get("FROM_ADDR");
  21. String[] TO_ADDR = (String[]) ctx.get("TO_ADDR");
  22. String[] SLAB_NO = (String[]) ctx.get("SLAB_NO");
  23. String[] SrcLAY = (String[]) ctx.get("SrcLAY");
  24. String[] DescLAY = (String[]) ctx.get("DescLAY");
  25. logger.logDebug("UIG040050_Save runActivity SLAB_CNT:"+SLAB_CNT);
  26. for(int i = 0; i < SLAB_CNT; i++)
  27. {
  28. logger.logDebug("UIG040050_Save SLAB_NO["+i+"]:"+SLAB_NO[i]);
  29. //3. Bind Parameter
  30. PosParameter param = new PosParameter();
  31. param.setWhereClauseParameter(0, null);
  32. param.setWhereClauseParameter(1, FROM_ADDR[0]);
  33. param.setWhereClauseParameter(2, SrcLAY[i]);
  34. //4. Execute
  35. dao.update("UCG040050.update", param);
  36. PosParameter param2 = new PosParameter();
  37. param2.setWhereClauseParameter(0, SLAB_NO[i]);
  38. param2.setWhereClauseParameter(1, TO_ADDR[0]);
  39. param2.setWhereClauseParameter(2, DescLAY[i]);
  40. //4. Execute
  41. dao.update("UCG040050.update", param2);
  42. //PosRowSet rowset = dao.find("emp.select",param);
  43. //5. Save Result
  44. //ctx.put("Result",rowset);
  45. }
  46. return PosBizControlConstants.SUCCESS;
  47. }
  48. }