コード例 #1
0
        /// <summary>
        /// Will Fritz
        /// Created:  2015/02/06
        /// initializes screen
        /// </summary>
        /// <remarks>
        /// Miguel Santana
        /// Updated:  2015/04/09
        /// combined add/edit screens
        /// </remarks>
        /// <param name="supplierToEdit"></param>
        /// <param name="readOnly"></param>
        /// <exception cref="WanderingTurtleException">Error setting the fields as read only.</exception>
        public AddEditSupplier(Supplier supplierToEdit, bool readOnly = false)
        {
            InitializeComponent();
            _updatableSupplier = supplierToEdit;
            Title = "Editing Supplier: " + _updatableSupplier.GetFullName;

            //retrieve the username
            _supplierUserName = _loginManager.RetrieveSupplierUserName(supplierToEdit.SupplierID);

            FillComboBox();
            FillUpdateList();

            TxtUserName.IsEnabled = false;

            if (readOnly)
            {
                (Content as Panel).MakeReadOnly();
            }
        }
コード例 #2
0
 public void TestSupplierUserNameGet()
 {
     setup();
     Assert.AreEqual("Test", access.RetrieveSupplierUserName(suppID));
 }