/// <summary>
        /// Christian Lopez
        /// Created on 2017/01/31
        ///
        /// Constructor for the form
        ///
        /// Update
        /// Bobby Thorne
        /// 5/11/2017
        ///
        /// Hide the submit button when in view mode
        /// </summary>
        /// <param name="currentEmp">The current User</param>
        /// <param name="userManager">Something implementing the IUserManager interface</param>
        /// <param name="supplierManager">Something implementing the ISupplierManager interface</param>
        /// <remarks>Last modified by Christian Lopez 2017/03/08</remarks>
        public frmAddSupplier(User currentUser, IUserManager userManager, ISupplierManager supplierManager,
                              IProductManager productManager, IAgreementManager agreementManager, string type = "Adding", Supplier supplierToEdit = null)
        {
            _currentUser      = currentUser;
            _supplierToEdit   = supplierToEdit;
            _userManager      = userManager;
            _supplierManager  = supplierManager;
            _productManager   = productManager;
            _agreementManager = agreementManager;
            InitializeComponent();
            if (null == _supplierToEdit)
            {
                _type = type;
            }
            else if (type == "Editing")
            {
                _type         = type;
                supplierFound = true;
            }
            else if (type == "Viewing")
            {
                _type                         = type;
                supplierFound                 = true;
                btnSubmit.Visibility          = Visibility.Collapsed;
                btnCancel.HorizontalAlignment = HorizontalAlignment.Center;
            }

            _usernames = _userManager.RetrieveFullUserList().Select(u => u.UserName).ToList();
            cboUsername.ItemsSource = _usernames;
        }
 /// <summary>
 /// Ariel Sigo
 ///
 /// Created:
 /// 2017/04/29
 /// </summary>
 /// <param name="supplierManager"></param>
 /// <param name="productManager"></param>
 /// <param name="agreementManager"></param>
 /// <param name="userManager"></param>
 public SupplierWithAgreementsController(ISupplierManager supplierManager, IProductManager productManager, IAgreementManager agreementManager, IUserManager userManager)
 {
     _supplierManager  = supplierManager;
     _productManager   = productManager;
     _agreementManager = agreementManager;
     _userManager      = userManager;
 }
 public AgreementController(IAgreementManager logicManager)
 {
     if (logicManager == null)
     {
         throw new ArgumentNullException("logicManager");
     }
     LogicManager = logicManager;
 }
 public AgreementController(IAgreementManager logicManager)
 {
     if (logicManager == null)
     {
         throw new ArgumentNullException("logicManager");
     }
     LogicManager = logicManager;
 }
 /// <summary>
 /// Bobby Thorne
 /// Created: 2017/03/24
 ///
 /// Customizes window to supplier application request
 /// </summary>
 /// <param name="user"></param>
 /// <param name="userManager"></param>
 /// <param name="supplierManager"></param>
 /// <param name="_productManager"></param>
 /// <param name="agreementManager"></param>
 public frmApplicationAskUser(User user, IUserManager userManager, ISupplierManager supplierManager, IProductManager productManager, IAgreementManager agreementManager)
 {
     InitializeComponent();
     use                    = "supplier";
     _user                  = user;
     _userManager           = (UserManager)userManager;
     _supplierManager       = (SupplierManager)supplierManager;
     _productManager        = (ProductManager)productManager;
     _agreementManager      = (AgreementManager)agreementManager;
     lblWindowTitle.Content = "Would you like to apply to be a supplier?";
 }
예제 #6
0
 /// <summary>
 /// Bobby Thorne
 /// Created: 2017/03/10
 /// 
 /// Initialized the checkSupplierStatus window
 /// More work is needed to add an ability to apply after
 /// this window if they choose to
 /// </summary>
 /// <param name="user"></param>
 /// <param name="userManager"></param>
 /// <param name="supplierManager"></param>
 /// <param name="_productManager"></param>
 /// <param name="agreementManager"></param>
 public frmCheckSupplierStatus(User user, IUserManager userManager, ISupplierManager supplierManager, IProductManager productManager, IAgreementManager agreementManager)
 {
     InitializeComponent();
     _user = user;
     _userManager =(UserManager) userManager;
     _supplierManager = (SupplierManager)supplierManager;
     _productManager = (ProductManager)productManager;
     _agreementManager = (AgreementManager)agreementManager;
 }