Commit 73eca74
Changed files (12)
trunk
product
Gorilla.Commons.Infrastructure
Threading
MoMoney.DTO
MoMoney.Presentation
Presenters
Billing
Views
MoMoney.Service
Application
MyMoney
boot
container
registration
trunk/product/Gorilla.Commons.Infrastructure/Threading/AsynchronousCommandProcessor.cs
@@ -49,6 +49,7 @@ namespace Gorilla.Commons.Infrastructure.Threading
{
keep_working = false;
manual_reset.Set();
+ manual_reset.Close();
}
[STAThread]
trunk/product/MoMoney.DTO/AddNewBillDTO.cs
@@ -1,10 +1,10 @@
using System;
-namespace MoMoney.Presentation.Presenters.billing.dto
+namespace MoMoney.DTO
{
public class AddNewBillDTO
{
- public string company_name { get; set; }
+ public Guid company_id { get; set; }
public DateTime due_date { get; set; }
public double total { get; set; }
}
trunk/product/MoMoney.Presentation/Presenters/Billing/AddBillPaymentPresenter.cs
@@ -4,6 +4,7 @@ using MoMoney.DTO;
using MoMoney.Presentation.Core;
using MoMoney.Presentation.Presenters.billing.dto;
using MoMoney.Presentation.Views.billing;
+using MoMoney.Service.Application;
using MoMoney.Tasks.application;
namespace MoMoney.Presentation.Presenters.billing
trunk/product/MoMoney.Presentation/Views/Billing/AddBillPaymentView.cs
@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using Gorilla.Commons.Utility.Extensions;
using Gorilla.Commons.Windows.Forms;
+using Gorilla.Commons.Windows.Forms.Helpers;
using Gorilla.Commons.Windows.Forms.Krypton;
using MoMoney.DTO;
using MoMoney.Presentation.Presenters.billing;
@@ -13,12 +14,14 @@ namespace MoMoney.Presentation.Views.billing
public partial class AddBillPaymentView : ApplicationDockedWindow, IAddBillPaymentView
{
ControlAction<EventArgs> submit_clicked = x => { };
+ readonly IBindableList<CompanyDTO> companies_list;
public AddBillPaymentView()
{
InitializeComponent();
titled("Add Bill Payment");
ux_submit_button.Click += (sender, e) => submit_clicked(e);
+ companies_list = ux_company_names.create_for<CompanyDTO>();
}
public void attach_to(IAddBillPaymentPresenter presenter)
@@ -28,7 +31,8 @@ namespace MoMoney.Presentation.Views.billing
public void run(IEnumerable<CompanyDTO> companys)
{
- ux_company_names.bind_to(companys);
+ companies_list.bind_to(companys);
+ //ux_company_names.bind_to(companys);
}
public void run(IEnumerable<BillInformationDTO> bills)
@@ -40,7 +44,7 @@ namespace MoMoney.Presentation.Views.billing
{
return new AddNewBillDTO
{
- company_name = ux_company_names.SelectedItem.to_string(),
+ company_id = companies_list.get_selected_item().id,
due_date = ux_due_date.Value,
total = ux_amount.Text.to_double()
};
trunk/product/MoMoney.Presentation/Views/Menu/AboutTheApplicationView.cs
@@ -4,7 +4,7 @@ using Gorilla.Commons.Utility.Extensions;
using MoMoney.Presentation.Resources;
using MoMoney.Presentation.Views.core;
-namespace MoMoney.Presentation.Views.Menu.Help
+namespace MoMoney.Presentation.Views.Menu
{
public partial class AboutTheApplicationView : ApplicationDockedWindow, IAboutApplicationView
{
trunk/product/MoMoney.Presentation/Views/Menu/AboutTheApplicationView.Designer.cs
@@ -1,4 +1,4 @@
-namespace MoMoney.Presentation.Views.Menu.Help
+namespace MoMoney.Presentation.Views.Menu
{
public partial class AboutTheApplicationView
{
trunk/product/MoMoney.Presentation/Views/AddCompanyView.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Text;
using System.Windows.Forms;
using Gorilla.Commons.Utility.Extensions;
using Gorilla.Commons.Windows.Forms;
@@ -10,7 +9,6 @@ using MoMoney.DTO;
using MoMoney.Presentation.Presenters;
using MoMoney.Presentation.Resources;
using MoMoney.Presentation.Views.core;
-using MoMoney.Service.Application;
namespace MoMoney.Presentation.Views
{
trunk/product/MoMoney.Service/Application/EventLog.cs
@@ -0,0 +1,21 @@
+using System.Collections.Generic;
+using Gorilla.Commons.Utility.Core;
+
+namespace MoMoney.Service.Application
+{
+ public interface IEventLog
+ {
+ void process(ICommand the_event);
+ }
+
+ public class EventLog : IEventLog
+ {
+ readonly IList<ICommand> events = new List<ICommand>();
+
+ public void process(ICommand the_event)
+ {
+ the_event.run();
+ events.Add(the_event);
+ }
+ }
+}
\ No newline at end of file
trunk/product/MoMoney.Service/Application/SaveNewBillCommand.cs
@@ -1,10 +1,9 @@
using Gorilla.Commons.Utility.Core;
using MoMoney.Domain.Core;
using MoMoney.Domain.repositories;
-using MoMoney.Presentation.Presenters.billing.dto;
-using MoMoney.Service.Application;
+using MoMoney.DTO;
-namespace MoMoney.Tasks.application
+namespace MoMoney.Service.Application
{
public interface ISaveNewBillCommand : IParameterizedCommand<AddNewBillDTO>
{
@@ -24,7 +23,7 @@ namespace MoMoney.Tasks.application
public void run(AddNewBillDTO item)
{
companys
- .find_company_named(item.company_name)
+ .find_company_by(item.company_id)
.issue_bill_to(
tasks.get_the_current_customer(),
item.due_date,
trunk/product/MoMoney.Service/MoMoney.Service.csproj
@@ -61,6 +61,7 @@
<Compile Include="Application\AddNewIncomeCommand.cs" />
<Compile Include="Application\AddNewIncomeCommandSpecs.cs" />
<Compile Include="Application\CustomerTasks.cs" />
+ <Compile Include="Application\EventLog.cs" />
<Compile Include="Application\GetAllBillsQuery.cs" />
<Compile Include="Application\GetAllCompanysQuery.cs" />
<Compile Include="Application\GetAllIncomeQuery.cs" />
trunk/product/MyMoney/boot/container/registration/wire_up_the_views_in_to_the.cs
@@ -7,7 +7,6 @@ using MoMoney.Presentation.Views.billing;
using MoMoney.Presentation.Views.dialogs;
using MoMoney.Presentation.Views.income;
using MoMoney.Presentation.Views.Menu;
-using MoMoney.Presentation.Views.Menu.Help;
using MoMoney.Presentation.Views.Navigation;
using MoMoney.Presentation.Views.Shell;
using MoMoney.Presentation.Views.Startup;