Exemplo n.º 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);
 }
Exemplo n.º 2
0
        private void btnSubmit_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                person = bl.GetPerson(int.Parse(LoginTextBox.Text));
            }
            catch (MissingMemberException exp)
            {
                MessageBox.Show("שם המשתמש או הסיסמה אינם נכונים", "שגיאה", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            if (person.Id != int.Parse(LoginTextBox.Text) || person.Password != LoginPassword.Password)
            {
                MessageBox.Show("שם המשתמש או הסיסמה אינם נכונים", "שגיאה", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }
            NavigationService.Navigate(new MainWindowPage(bl, person));
        }