Пример #1
0
 /// <remarks>
 /// Jared Greenfield
 /// Updated: 2019/04/03
 /// Updated to remove products and add in Item
 /// </remarks>
 public CreateItem(Item selectedItem, Employee user)
 {
     _user   = user;
     oldItem = selectedItem;
     InitializeComponent();
     try
     {
         _offeringManager = new OfferingManager();
         if (oldItem.OfferingID != null)
         {
             _offering = _offeringManager.RetrieveOfferingByID((int)oldItem.OfferingID);
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Error collecting price.");
     }
     SetupReadOnly(selectedItem.ItemID);
     this.txtDescription.IsReadOnly = true;
     this.txtName.IsReadOnly        = true;
     this.txtOnHand.IsReadOnly      = true;
     this.txtReorder.IsReadOnly     = true;
     this.txtPrice.IsReadOnly       = true;
     this.cbPurchasable.IsEnabled   = false;
     this.cbActive.IsEnabled        = false;
     this.dpDateActive.IsEnabled    = false;
     this.btnSubmit.Visibility      = Visibility.Hidden;
     this.btnEdit.Visibility        = Visibility.Visible;
     this.lblDateActive.Visibility  = Visibility.Visible;
     this.lblActive.Visibility      = Visibility.Visible;
     this.dpDateActive.Visibility   = Visibility.Visible;
     this.cbActive.Visibility       = Visibility.Visible;
     this.dpDateActive.SelectedDate = selectedItem.DateActive;
     this.txtDescription.Text       = selectedItem.Description;
     this.txtName.Text = selectedItem.Name;
     if (_offering != null)
     {
         this.txtPrice.Text = _offering.Price.ToString();
     }
     this.txtOnHand.Text  = selectedItem.OnHandQty.ToString();
     this.txtReorder.Text = selectedItem.ReorderQty.ToString();
     if (selectedItem.Active)
     {
         this.cbActive.IsChecked = true;
     }
     else
     {
         this.cbActive.IsChecked = false;
     }
     if (selectedItem.CustomerPurchasable)
     {
         this.cbPurchasable.IsChecked = true;
     }
     this.cboItemType.SelectedItem = selectedItem.ItemType;
     ///this.txtPrice.Text = selectedItem.;
     this.cbActive.IsChecked = true;
     this.Title = "View Item";
 }
    private void Awake()
    {
        if (instance != null)
        {
            Destroy(this);
        }
        else
        {
            instance = this;
        }

        FirebaseCommunicator.LoggedIn.AddListener(OnLoggedIn);
    }
Пример #3
0
 public frmReservationCheckout(int reservationID)
 {
     _reservationID          = reservationID;
     _roomAssignmentManager  = new GuestRoomAssignmentManager();
     _memberManager          = new MemberManagerMSSQL();
     _reservationManager     = new ReservationManagerMSSQL();
     _tabManager             = new MemberTabManager();
     _offeringManager        = new OfferingManager();
     _checkoutReceiptManager = new CheckoutReceiptManager();
     InitializeComponent();
     try
     {
         populateGrid();
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #4
0
 public CreateItem()
 {
     InitializeComponent();
     try
     {
         _offeringManager = new OfferingManager();
     }
     catch (Exception)
     {
         MessageBox.Show("Error collecting price.");
     }
     this.btnEdit.Visibility       = Visibility.Hidden;
     this.lblDateActive.Visibility = Visibility.Hidden;
     this.lblActive.Visibility     = Visibility.Hidden;
     this.dpDateActive.Visibility  = Visibility.Hidden;
     this.cbActive.Visibility      = Visibility.Hidden;
     txtPrice.Visibility           = Visibility.Collapsed;
     lblPrice.Visibility           = Visibility.Collapsed;
 }