Exemplo n.º 1
0
 private void BackToList_Click(object sender, RoutedEventArgs e)
 {
     if (OwnerId > 0)
     {
         ListHostingUnits lhpage = new ListHostingUnits();
         MainNavigate(lhpage);
     }
     else
     {
         //is admin
         var      parenthost = app.GetHostById(CurrentHU.OwnerId);
         EditHost hostpage   = new EditHost(parenthost);
         MainNavigate(hostpage);
     }
 }
Exemplo n.º 2
0
        private void UpdateButton_Click(object sender, RoutedEventArgs e)
        {
            Enums.HostingUnitSaveStatus status;
            if (CurrentHU.stSerialKey == 0)
            {
                app.AddHostingUnit(CurrentHU, out status);
            }
            else
            {
                app.UpdatingHostingUnit(CurrentHU, out status);
            }

            switch (status)
            {
            case Enums.HostingUnitSaveStatus.Success:
                MessageBox.Show("נשמר בהצלחה");
                ListHostingUnits lhpage = new ListHostingUnits();

                var RequestsList = app.GetRequestsThatRelevantForOwner(c => c.Status == Enums.GuestRequestStatus.Opened || c.Status == Enums.GuestRequestStatus.InProccess, OwnerId);
                int counter      = RequestsList.Count();
                CurrentWindow.setBadge(counter);

                MainNavigate(lhpage);
                break;

            case Enums.HostingUnitSaveStatus.MissingFields:
                MessageBox.Show("שדות חובה חסרים או שגויים");
                break;

            case Enums.HostingUnitSaveStatus.ImageMissing:

                break;

            default:
                break;
            }
        }
Exemplo n.º 3
0
 private void ManageHostingUnit_Click(object sender, RoutedEventArgs e)
 {
     //check your logic
     Pages.ListHostingUnits hosingList = new Pages.ListHostingUnits();
     MainFrame.Content = hosingList;
 }