在src下新建文件夹 view,然后在view文件夹下新建页面CustomerManagePage.mxml,EmployeeManagePage.mxml,MoneyDayManagePage.mxml,ContactsConst.as
脚本3
private function manageIt(type:String):void{
switch(type){
case "customer"://客户信息管理
customerManage();
break;
case "employee"://员工信息管理
employeeManage();
break;
case "money"://日常开销管理
moneyDayManage();
break;
}
mainContainer.selectedChild=mainOperArea;
}
private function customerManage():void{
mainOperArea.removeAllChildren();
var cmp:CustomerManagePage=new CustomerManagePage();
cmp.conn=this.conn;
mainOperArea.addChild(cmp);
}
private function employeeManage():void{
mainOperArea.removeAllChildren();
var emp:EmployeeManagePage=new EmployeeManagePage();
emp.conn=this.conn;
mainOperArea.addChild(emp);
}
private function moneyDayManage():void{
mainOperArea.removeAllChildren();
var mmp:MoneyDayManagePage=new MoneyDayManagePage();
mmp.conn=this.conn;
mainOperArea.addChild(mmp);
}