Example #1
0
 public static BO.Host CastingToBOHost(DO.Host host)
 {
     BO.Host bHost = new BO.Host();
     bHost.Person              = new Person();
     bHost.Person              = imp.GetPerson(host.HostID);
     bHost.BankBranch          = imp.GetBankBranch(host.BranchNumber);
     bHost.BankAccuontNumber   = host.BankAccuontNumber;
     bHost.CollectionClearance = host.CollectionClearance;
     bHost.Status              = (BO.Status)host.Status;
     bHost.TotalCommission     = host.TotalCommission;
     bHost.HostingUnits        = imp.GetHostingUnitsOfHost(host.HostID);
     bHost.Orders              = imp.GetOrdersOfHost(host.HostID);
     bHost.Website             = host.Website;
     return(bHost);
 }
Example #2
0
 public MainHostPage(BlApi.IBl bl, BO.Host host)
 {
     InitializeComponent();
     this.bl   = bl;
     this.Host = host;
     UpdateHostGrid.DataContext = Host;
     HostId = Host.Person.Id;
     try
     {
         this.Host.HostingUnits = bl.GetHostingUnitsOfHost(HostId);
         this.Host.Orders       = bl.GetOrdersOfHost(HostId);
     }
     catch
     {
         this.Host.HostingUnits = new List <BO.HostingUnit>();
         this.Host.Orders       = new List <BO.Order>();
     }
 }