- lek.zip
- ChangeLog.txt
- ClientServer
- ClientUtil
- DalEF
- DalLinqToSql
- DalNH
- DomainUtil
- DomainUtilTest
- DTO
- GlobalType
- Lek.sln
- Lek1.vsmdi
- LocalTestRun.testrunconfig
- NHibernate
- NhLambdaExtensions
- Presenter
- ProjDep.ppt
- Schema.ppt
- SchemaAdd.sql
- SchemaAdd2000.sql
- SchemaAdd2000Raw.sql
- SchemaDrop.sql
- ServerUtil
- ServiceEF
- ServiceFactory
- ServiceInterface
- ServiceInterfaceTest
- ServiceLinqToSql
- ServiceNH
- Transaction.sql
- UIInterface
- UIType
- Util
- UtilTest
- Web
- 001Launch.gif
- 002Transactions.gif
- 002TransactionsSHRUNK.gif
- 003Items.gif
- 004ERD.gif
- 005NWAccntDlts.gif
- 006Transaction.gif
- 007Arch_Base.gif
- 008Arch_Util.gif
- 009Arch_WinApp.gif
- 010Arch_ClientServer.gif
- 011Arch_UIInterface.gif
- 012Arch_GlobalType.gif
- 013Arch_DTO.gif
- 014Arch_TierUtils.gif
- 015Arch_Dal.gif
- 016Arch_ORM.gif
- 017ERDSQL.gif
- 018ERDEF.gif
- 018ERDEFSHRUNK.gif
- 019ERDLinqToSQL.gif
- 019ERDLinqToSQLSHRUNK.gif
- AddORMClasses_EF.GIF
- AddORMClasses_LtS.GIF
- csharp.css
- DalEFProject.GIF
- DalLinqToSqlProject.GIF
- DalNHlProject.GIF
- DeltaAllocationAccounts.GIF
- DependencyMatrix.GIF
- Items.GIF
- ItemsForAnAccount.gif
- ItemsForAnAccountSHRUNK.gif
- ItemsSHRUNK.GIF
- Lek.GIF
- lek.htm
- NetWorthAccountDeltasForAnAccount.GIF
- NetWorthAccounts.GIF
- Ownerships.GIF
- Participants.GIF
- SaveTransFunctions.GIF
- Summary.GIF
- WinApp
- WinFormClient
- WinFormServer
- WinUI
- WRLEASTransaction.sql
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ui=UIInterface;
using uib=UIInterface;
//using sch = Schema;
using s = System;
using cu = ClientUtil;
//using ddal = DomainDAL;
using du = DomainUtil;
using u = Util;
using ns = Presenter;
using si=ServiceInterface;
namespace Presenter
{
public class WinUI : C, ui.WinUI.IPresenter
{
si.IService _Service;
ui.WinUI.IView _view;
uib.IViewFactory _ViewFactory;
string _strDBInitString;
protected override UIInterface.IView GetView(){return _view;}
public WinUI(ui.WinUI.IView aView, uib.IViewFactory theViewFactory, si.IService theService, string strDBInitString)
{
_strDBInitString= strDBInitString;
_view = aView;
_Service = theService;
_view.SetPresenter(this);
_ViewFactory = theViewFactory;
}
Presenter.DltAllocAccnts CreateDltAllocAccntsPresenter (){return new Presenter.DltAllocAccnts ( _ViewFactory, _Service);}
Presenter.DltAllocs CreateShowDltAllocPresenter (){return new Presenter.DltAllocs ( _ViewFactory, _Service);}
Presenter.Items CreateShowItemsPresenter (){return new Presenter.Items ( _ViewFactory, _Service);}
Presenter.NWAccntDlts CreateNWAccntDltsPresenter (){return new Presenter.NWAccntDlts ( _ViewFactory, _Service);}
Presenter.NWAccnts CreateNWAccntsPresenter (){return new Presenter.NWAccnts ( _ViewFactory, _Service);}
Presenter.Ownership CreateOwnershipPresenter (){return new Presenter.Ownership ( _ViewFactory, _Service);}
Presenter.Participants CreateParticipantsPresenter (){return new Presenter.Participants ( _ViewFactory, _Service);}
Presenter.Summary CreateSummaryPresenter (){return new Presenter.Summary ( _ViewFactory, _Service);}
Presenter.Transactions CreateTransactionsPresenter (){return new Presenter.Transactions ( _ViewFactory, _Service);}
public void ShowDltAllocAccntsForm( )
{
u.FuncCommand<DltAllocAccnts> cmd = new Util.FuncCommand<DltAllocAccnts>(CreateDltAllocAccntsPresenter, null);
this.ExecuteWithErrorHandlingAndBusyIndicator(cmd);
if(cmd.Result!=null)
cmd.Result.Show();
}
public void ShowDltAllocForm( )
{
u.FuncCommand<DltAllocs> cmd = new Util.FuncCommand<DltAllocs>(CreateShowDltAllocPresenter, null);
this.ExecuteWithErrorHandlingAndBusyIndicator(cmd);
if(cmd.Result!=null)
cmd.Result.Show();
}
public void ShowItemsForm( )
{
u.FuncCommand<Items> cmd = new Util.FuncCommand<Items>(CreateShowItemsPresenter, null);
this.ExecuteWithErrorHandlingAndBusyIndicator(cmd);
cmd.Result.Show();
}
public void ShowNWAccntDltsForm( )
{
u.FuncCommand<NWAccntDlts> cmd = new Util.FuncCommand<NWAccntDlts>(CreateNWAccntDltsPresenter, null);
this.ExecuteWithErrorHandlingAndBusyIndicator(cmd);
if(cmd.Result!=null)
cmd.Result.Show();
}
public void ShowNWAccntsForm( )
{
u.FuncCommand<NWAccnts> cmd = new Util.FuncCommand<NWAccnts>(CreateNWAccntsPresenter, null);
this.ExecuteWithErrorHandlingAndBusyIndicator(cmd);
if(cmd.Result!=null)
cmd.Result.Show();
}
public void ShowOwnershipForm( )
{
u.FuncCommand<Ownership> cmd = new Util.FuncCommand<Ownership>(CreateOwnershipPresenter, null);
this.ExecuteWithErrorHandlingAndBusyIndicator(cmd);
if(cmd.Result!=null)
cmd.Result.Show();
}
public void ShowParticipantsForm( )
{
u.FuncCommand<Participants> cmd = new Util.FuncCommand<Participants>(CreateParticipantsPresenter, null);
this.ExecuteWithErrorHandlingAndBusyIndicator(cmd);
if(cmd.Result!=null)
cmd.Result.Show();
}
public void ShowSummaryForm( )
{
u.FuncCommand<Summary> cmd = new Util.FuncCommand<Summary>(CreateSummaryPresenter, null);
this.ExecuteWithErrorHandlingAndBusyIndicator(cmd);
if(cmd.Result!=null)
cmd.Result.Show();
}
public void ShowTransactionsForm( )
{
u.FuncCommand<Transactions> cmd = new Util.FuncCommand<Transactions>(CreateTransactionsPresenter, null);
this.ExecuteWithErrorHandlingAndBusyIndicator(cmd );
if(cmd.Result!=null)
cmd.Result.Show();
}
// public void ShowTransactionForm( ){new Presenter.Transaction( _ViewFactory);}
// public void ShowTransactionItemsForm( ){new Presenter.TransactionItems( _ViewFactory);}
// public void ShowTransactionNWAccntDltsForm( ){new Presenter.TransactionNWAccntDlts( _ViewFactory);}
public void VerifyAll()
{
try
{
_view.ShowBusyIndicator();
_Service.VerifyAllTransactions();
_view.ClearBusyIndicator();
_view.ShowSimpleMessage("All transactions are in balance.");
}
catch (System.Exception ex)
{
_view.ClearBusyIndicator();
_view.ShowException(ex);
}
}
public void Post()
{
try
{
_view.ShowBusyIndicator();
_Service.Post();
_view.ClearBusyIndicator();
_view.ShowSimpleMessage("Post complete.");
}
catch (System.Exception ex)
{
_view.ClearBusyIndicator();
_view.ShowException(ex);
}
}
public void Test()
{
try
{
_view.ShowBusyIndicator();
_Service.Test();
// _Service.InitDatabase(_strDBInitString);
_view.ClearBusyIndicator();
_view.ShowSimpleMessage("Test complete.");
}
catch (System.Exception ex)
{
_view.ClearBusyIndicator();
_view.ShowException(ex);
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.