Esempio n. 1
0
 /// <summary>
 /// Author: Jared Greenfield
 /// Created On: 03/28/2019
 /// Construtcts the window to do it's crud function
 /// </summary>
 public frmOffering(DataObjects.CrudFunction type, Offering offering, Employee employee)
 {
     InitializeComponent();
     _offering        = offering;
     _offeringManager = new OfferingManager();
     _employee        = employee;
     _eventManager    = new LogicLayer.EventManager();
     try
     {
         List <string> types = _offeringManager.RetrieveAllOfferingTypes();
         cboOfferingType.Items.Clear();
         foreach (var item in types)
         {
             cboOfferingType.Items.Add(item);
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Unable to load Offering Types.");
     }
     if (type == CrudFunction.Retrieve)
     {
         setupReadOnly();
     }
 }
Esempio n. 2
0
 public void TestSetup()
 {
     _mock            = new OfferingAccessorMock();
     _offeringManager = new OfferingManager(_mock);
     _offerings       = new List <Offering>();
     _viewModels      = new List <OfferingVM>();
 }