protected void Page_Load(object sender, EventArgs e)
        {
            //todo
            if (!Page.IsPostBack)
            {
                var service = new FormsFluxProto.Flux.Services.TodoService();
                FormsFluxProto.Flux.Stores.TodoStore.Instance.SetAll(service.GetAll());
            }

            Dispatcher.Dispatcher.Instance.Register(TodoEnums.ADD_TODO,
                                                    data => TodoStore.Instance.SetAll((List<TodoModel>)data));
        }
示例#2
0
        private static void dispatchAllTodos()
        {
            var service = new FormsFluxProto.Flux.Services.TodoService();

               Dispatcher.Dispatcher.Instance.Dispatch(Constants.TodoEnums.ADD_TODO, service.GetAll());
        }