关闭

AIR版的通讯簿(二十)

694人阅读 评论(0) 收藏 举报

今天写的是日常开销管理页面的内容

<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" paddingTop="5" 
 paddingLeft="2" paddingRight="2" creationComplete="init()" xmlns:view="view.*">
 <mx:Script>
  <![CDATA[
   import mx.controls.DateField;
   import mx.controls.dataGridClasses.DataGridColumn;
   import mx.printing.FlexPrintJobScaleType;
   import mx.printing.FlexPrintJob;
   import mx.events.CloseEvent;
   import mx.managers.PopUpManager;
   import mx.collections.ArrayCollection;
   import mx.controls.Alert;
   import mx.core.WindowedApplication;
   public  var conn:SQLConnection;
   private var stat:SQLStatement;
   [Bindable]private var useWayList:ArrayCollection=new ArrayCollection([{id:'1',label:'餐费'},{id:'2',label:'办公用品'},{id:'3',label:'差旅费'},{id:'4',label:'其他'}]);
   [Bindable]private var dataList:ArrayCollection=new ArrayCollection();
   [Bindable]private var editObj:Object;
   private function init():void{
    queryList();
   }
   private function queryList():void{
    dataList.removeAll();
    stat=new SQLStatement();
    stat.sqlConnection=conn;
    var sql:String=" select * from ql_money_day where 1=1";
    stat.text=sql;
    stat.execute(-1,new Responder(getCusList,errorHandler));
   }
   private function getCusList(result:SQLResult):void{
    if(result.data!=null){
     var numResults:int =result.data.length;
     for (var i:int = 0; i < numResults; i++){
             var row:Object = result.data[i];
             dataList.addItem(row);
         }
    }
   }
   private function errorHandler(error:SQLError):void{
    Alert.show("查询日常开销列表出错");
    Alert.show(error.details);
   }
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:359250次
    • 积分:4648
    • 等级:
    • 排名:第6253名
    • 原创:152篇
    • 转载:28篇
    • 译文:1篇
    • 评论:25条
    文章分类
    最新评论