package command
{
	import com.adobe.cairngorm.control.CairngormEvent;
	
	import business.LoadEmployeesDelegate;
	import model.EmployeesModelLocator;
	
	public class LoadEmployeesCommand extends BaseCommand
	{
		public override function execute(event:CairngormEvent):void {
			var delegate:LoadEmployeesDelegate = new LoadEmployeesDelegate(this);
			delegate.load();
		}
		
		public override function result(data:Object):void {
			var employeesModelLocator:EmployeesModelLocator = EmployeesModelLocator.getInstance();
			employeesModelLocator.employeesList = data.result;
		}
	}
}