private void guestRequstBut_Click(object sender, RoutedEventArgs e) { host = bl.GetHost(host.PersonalInfo.Id); GuestRequestListUserControl listRequestControl = new GuestRequestListUserControl(host); listRequestControl.AddOrderEvent += ListRequestControl_AddOrderEvent; MaterialDesignThemes.Wpf.DialogHost.Show(listRequestControl, "HostWinDialog"); }
public GuestRequestListUserControl(HostBO host) { InitializeComponent(); myHost = host; GetRequestsAccAera(); clearRequestsWithOdr(); requestList.DataContext = guestRequests; }
public UserControlBankInfo(HostBO host, string state = "create") { InitializeComponent(); State = state; BankNumberDictionary = bl.getBanknameList(); Host = host; UserControlGrid.DataContext = Host; BankName.ItemsSource = BankNumberDictionary.Values; }
private void AddBankDeitels_OpenHostWin(string obj) { MaterialDesignThemes.Wpf.DialogHost.CloseDialogCommand.Execute(null, null); host = bl.GetHost(obj); HostInfo.DataContext = host; hostOrders = new ObservableCollection <OrderBO>(host.OrdersHost); // making the list request of the guest OrderList.DataContext = hostOrders; HostLogin.Visibility = Visibility.Collapsed; HostWindow.Visibility = Visibility.Visible; }
public Request_Detals_UserControl(GuestRequestBO request, HostBO host) { InitializeComponent(); myRequest = request; myHost = host; Person = bl.GetPersonById(myRequest.ClientId); FirstName.Text = Person.FirstName; LastName.Text = Person.LastName; GridRequest.DataContext = myRequest; initi_comboxes(); }
private void AddHoset_Click(string obj) { MaterialDesignThemes.Wpf.DialogHost.CloseDialogCommand.Execute(null, null); host = new HostBO(); host.PersonalInfo = bl.GetPersonById(obj); host.BankDetales = new BankBranchBO(); UserControlBankInfo AddBankDeitels = new UserControlBankInfo(host); AddBankDeitels.OpenHostWin += AddBankDeitels_OpenHostWin; MaterialDesignThemes.Wpf.DialogHost.Show(AddBankDeitels, "HostLoginDialog"); }
public static BO.HostBO ConverFrom_DO_To_BoHost(DO.Host other) { HostBO per = new HostBO(); per.Info = instance.GetPerson(other.Id); per.Acoount = ConverFrom_DO_To_BoBankAccount(other.Account); per.CollectionClearance = other.CollectionClearance; per.Website = other.website; per.MyOrders = instance.GetOrdersByHost(other.Id); per.MyUnits = instance.GetHostingUnits(other.Id); return(per); }
Host ConvertHostBOToDO(HostBO host) { Host target = new Host(); target.CollectingClearance = host.CollectingClearance; target.WebSite = host.WebSite; target.BankAccountNumber = host.BankAccountNumber; target.BankNumber = host.BankDetales.BankNumber; target.BranchNumber = host.BankDetales.BranchNumber; target.Id = host.PersonalInfo.Id; target.Status = (Status)host.Status; return(target); }
HostBO ConvertHostDOToBO(Host host) { HostBO target = new HostBO(); target.CollectingClearance = host.CollectingClearance; target.WebSite = host.WebSite; target.BankAccountNumber = host.BankAccountNumber; target.BankDetales = GetBranch(host.BankNumber, host.BranchNumber); target.PersonalInfo = GetPersonById(host.Id); target.UnitsHost = GetHostUnits(host.Id); target.OrdersHost = GetOdrsOfHost(host.Id); target.AppovedOrdersHost = GetAprrovedOdrsOfHost(host.Id); target.Status = (StatusBO)host.Status; return(target); }
public void DelHost(HostBO host) { if (host.CollectingClearance == false) { var temp = from item in host.OrdersHost where item.Status != OrderStatusBO.APPROVED select item; if (temp.Any()) { throw new TypeAccessException ("NOT allowed to delete Host while there is opened orders in the system"); } } try { dal.DelHost(host.PersonalInfo.Id); } catch (MissingMemberException ex) { throw ex; } }
public void UpdHost(HostBO host) { if (host.CollectingClearance == false) { var temp = from item in host.OrdersHost where item.Status != OrderStatusBO.APPROVED select item; if (temp.Any()) { throw new TypeAccessException ("אינך יכול לבטל את ההרשאה לחיוב בזמן שיש הזמנות פתוחות במערכת"); } } try { dal.UpdateHost(ConvertHostBOToDO(host)); } catch (MissingMemberException ex) { throw ex; } }
public ControllerResultTO <ICollection <HostTO> > GetHostList() { try { return(new ControllerResultTO <ICollection <HostTO> > { Result = Result.Pass, TO = HostBO.ListAll() }); } catch (Exception ex) { return(new ControllerResultTO <ICollection <HostTO> > { Result = Result.Fail, ExecuteMessage = ex.Message, Exception = ex }); } }
private void hostsListManager_MouseDoubleClick(object sender, MouseButtonEventArgs e) { hostManger = (HostBO)hostsListManager.SelectedItem; UserControlSingUp hostDetalse = new UserControlSingUp(); hostDetalse.Email.Text = hostManger.PersonalInfo.Email; hostDetalse.Email.IsEnabled = false; hostDetalse.FirstName.Text = hostManger.PersonalInfo.FirstName; hostDetalse.FirstName.IsEnabled = false; hostDetalse.LastName.Text = hostManger.PersonalInfo.LastName; hostDetalse.LastName.IsEnabled = false; hostDetalse.Phone.Text = hostManger.PersonalInfo.PhoneNomber; hostDetalse.Phone.IsEnabled = false; hostDetalse.Password.Visibility = Visibility.Collapsed; hostDetalse.PassIcon.Visibility = Visibility.Collapsed; hostDetalse.Id.Text = hostManger.PersonalInfo.Id; hostDetalse.Id.IsEnabled = false; hostDetalse.IDType.SelectedItem = hostManger.PersonalInfo.IdType; hostDetalse.IDType.IsEnabled = false; hostDetalse.CreateBut.Visibility = Visibility.Collapsed; hostDetalse.CloseBut.Content = "סגור"; MaterialDesignThemes.Wpf.DialogHost.Show(hostDetalse, "ManagerDialog"); }
public void AddHost(HostBO host) { try { dal.AddHost(ConvertHostBOToDO(host)); } catch (DuplicateKeyException ex) { throw ex; } }