/// <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(); } }
public void TestSetup() { _mock = new OfferingAccessorMock(); _offeringManager = new OfferingManager(_mock); _offerings = new List <Offering>(); _viewModels = new List <OfferingVM>(); }