public CompanyOrderWithLinesController(ICompanyOrderManager companyOrderManager, ISupplierManager supplierManager, IUserManager userManager) { _companyOrderManager = companyOrderManager; _supplierManager = supplierManager; _userManager = userManager; }
/// <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> /// Ryan Spurgetis /// 4/29/2017 /// /// Loads the form window based on values from pickup selected /// </summary> /// <param name="_pickupLine"></param> private void SetValuesFromPickupLine(PickupLine _pickupLine) { _supplierManager = new SupplierManager(); ProductManager _productManager = new ProductManager(); btnCreateFromPickup.Visibility = Visibility.Visible; try { Pickup _pickup = _pickupManager.RetrievePickupById(_pickupLine.PickupId); var supplierName = _supplierManager.RetrieveSupplierBySupplierID((int)_pickup.SupplierId); var productName = _productManager.RetrieveProductById((int)_pickupLine.ProductId).Name; lblSupplierVal.Content = supplierName; cboSupplierIDVal.SelectedIndex = (int)_pickup.SupplierId; cboSupplierIDVal.Visibility = Visibility.Collapsed; lblWarehouseIDVal.Content = (int)_pickup.WarehouseId; cboWarehouseIDVal.SelectedIndex = (int)_pickup.WarehouseId; cboWarehouseIDVal.Visibility = Visibility.Collapsed; lblProductVal.Content = productName; cboProductIDVal.SelectedItem = (int)_pickupLine.ProductId; cboProductIDVal.Visibility = Visibility.Collapsed; txtQuantity.Text = _pickupLine.Quantity.ToString(); _locationList = (new LocationManager()).ListLocations(); cboLocationIDVal.ItemsSource = _locationList; cboLocationIDVal.Visibility = Visibility.Visible; lblSupplyManagerID.Visibility = Visibility.Hidden; cboSupplyManagerIDVal.Visibility = Visibility.Hidden; dpDateReceived.SelectedDate = DateTime.Now; } catch (Exception ex) { MessageBox.Show("An error occured" + ex.Message + ex.StackTrace); } }
/// <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; }
/// <summary> /// Alissa Duffy /// Updated: 2017/04/21 /// /// Initialize the Supplier Invoice Details Window. /// Standardized method. /// </summary> /// </summary> /// <param name="supplierInvoice"></param> /// <param name="supplierInvoiceManager"></param> /// <param name="supplierManager"></param> public frmSupplierInvoiceDetails(SupplierInvoice supplierInvoice, ISupplierInvoiceManager supplierInvoiceManager, ISupplierManager supplierManager) { _supplierInvoice = supplierInvoice; _supplierInvoiceManager = supplierInvoiceManager; _supplierManager = supplierManager; _invoiceLines = new List <SupplierInvoiceLine>(); InitializeComponent(); }
public SupplierAppService(ISupplierManager supplierManager, IRepository <Supplier> supplierRepo, ISupplierListExcelExporter supplierExporter) { _supplierManager = supplierManager; _supplierRepo = supplierRepo; _supplierExporter = supplierExporter; }
/// <summary> /// Alissa Duffy /// Updated: 2017/04/24 /// /// Initialize Approval form Window for a supplier manager. /// Standardized methods. /// </summary> /// <param name="supplierMrg"></param> /// <param name="supplier"></param> /// <param name="userid"></param> public frmApproval(ISupplierManager supplierMrg, Supplier supplier, int userid) { _supplier = supplier; _supplierMgr = supplierMrg; InitializeComponent(); txtID.Text = _supplier.SupplierID.ToString(); txtName.Text = _supplier.FarmName.ToString(); _userid = userid; }
/// <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; }
public ImportReceiptController(IImportReceiptManager importReceiptManager, IHttpContextAccessor httpContextAccessor, IEmployeeManager employeeManager , ISupplierManager supplierManager, IAccessoriesManager accessoriesManager, IAccountManager accountManager) { this._importReceiptManager = importReceiptManager; this._httpContextAccessor = httpContextAccessor; this._employeeManager = employeeManager; this._supplierManager = supplierManager; this._accessoriesManager = accessoriesManager; this._accountManager = accountManager; }
/// <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?"; }
/// <summary> /// Alissa Duffy /// Updated: 2017/04/21 /// /// Initialize Manage Stock Window. /// Standardized method. /// </summary> /// <param name="productLotManager"></param> /// <param name="productManager"></param> /// <param name="supplierManager"></param> /// <param name="locationManager"></param> public frmManageStock(IProductLotManager productLotManager, IProductManager productManager, ISupplierManager supplierManager, ILocationManager locationManager) { _productLotManager = productLotManager; _supplierManager = supplierManager; _productManager = productManager; _locationManager = locationManager; InitializeComponent(); RetrieveProductLots(); ParseLotsIntoViewModel(); RefreshDgProductLot(); }
/// <summary> /// Alissa Duffy /// Updated: 2017/04/24 /// /// Initialize the Add Inspection form. /// Standardized method. /// </summary> /// <param name="productLot"></param> /// <param name="gradeManager"></param> /// <param name="currentEmp"></param> /// <param name="productManager"></param> /// <param name="supplierManager"></param> /// <param name="InspectionManager"></param> /// <param name="productLotManager"></param> public frmAddInspection(ProductLot productLot, IGradeManager gradeManager, Employee currentEmp, IProductManager productManager, ISupplierManager supplierManager, IInspectionManager InspectionManager, IProductLotManager productLotManager) { _gradeManager = gradeManager; _productLot = productLot; _currentEmp = currentEmp; _productManager = productManager; _supplierManager = supplierManager; _inspectionManager = InspectionManager; _productLotManager = productLotManager; InitializeComponent(); }
/// <summary> /// Bobby Thorne /// 2017/04/14 /// /// OverLoad method to view user's own invoices /// </summary> /// <param name="supplierInvoice"></param> /// <param name="supplierInvoiceManager"></param> /// <param name="supplierManager"></param> /// <param name="purpose"></param> public frmSupplierInvoiceDetails(SupplierInvoice supplierInvoice, ISupplierInvoiceManager supplierInvoiceManager, ISupplierManager supplierManager, string purpose) { // TODO: Complete member initialization _supplierInvoice = supplierInvoice; _supplierInvoiceManager = supplierInvoiceManager; _supplierManager = supplierManager; _invoiceLines = new List <SupplierInvoiceLine>(); InitializeComponent(); if (purpose == "ReadOnly") { btnApprove.Visibility = Visibility.Hidden; } }
public ApiSupplier Get(int ID) { ISupplierManager SupplierManager = UnityResolver.Resolve <ISupplierManager>(); Supplier supplierModel = SupplierManager.FindSupplierById(ID); ApiSupplier supplier = new ApiSupplier { ID = supplierModel.ID, name = supplierModel.name, address = supplierModel.address, company = supplierModel.company, telephone = supplierModel.telephone }; return(supplier); }
public bool Update(ApiSupplier apiSupplier) { ISupplierManager SupplierManager = UnityResolver.Resolve <ISupplierManager>(); Supplier supplier = new Supplier { ID = apiSupplier.ID, name = apiSupplier.name, address = apiSupplier.address, company = apiSupplier.company, telephone = apiSupplier.telephone, CustomerID = apiSupplier.CustomerID }; return(SupplierManager.UpdateSupplier(supplier)); }
public bool Update(ApiSupplier apiSupplier) { // string id = User.Identity.Name; ISupplierManager SupplierManager = UnityResolver.Resolve <ISupplierManager>(); Supplier supplier = new Supplier { ID = apiSupplier.ID, name = apiSupplier.name, address = apiSupplier.address, company = apiSupplier.company, telephone = apiSupplier.telephone, CustomerID = Helper.getCustID() }; return(SupplierManager.UpdateSupplier(supplier)); }
/// <summary> ///Created by Michael Takrama ///2017/03/02 /// Parses the lots into a View Model for Datagrid /// </summary> private void ParseLotsIntoViewModel() { _productManager = new ProductManager(); _supplierManager = new SupplierManager(); _locationManager = new LocationManager(); try { _manageStockViewModels.Clear(); foreach (var a in _productLotList) { var manageStockViewModel = new ManageStockViewModel { ProductId = a.ProductId, ProductName = _productManager.RetrieveProductById((int)a.ProductId).Name, SupplierId = a.SupplierId, SupplierName = _supplierManager.RetrieveSupplierBySupplierID((int)a.SupplierId).FarmName, LocationDesc = _locationManager.RetrieveLocationByID((int)a.LocationId).Description, Quantity = a.Quantity, AvailableQuantity = a.AvailableQuantity, ProductLotId = a.ProductLotId }; if (manageStockViewModel.AvailableQuantity != 0 || _checkBoxOverride) { _manageStockViewModels.Add(manageStockViewModel); } } } catch (Exception ex) { if (null != ex.InnerException) { MessageBox.Show(ex.Message + "\n\n" + ex.InnerException.Message); } else { MessageBox.Show("Catastrophic Error: " + ex.Message); } } }
public List <ApiSupplier> GetList() { ISupplierManager SupplierManager = UnityResolver.Resolve <ISupplierManager>(); List <Supplier> supplierModelList = SupplierManager.getAllSupplier(); List <ApiSupplier> supplierList = new List <ApiSupplier>(); foreach (Supplier supplierModel in supplierModelList) { ApiSupplier supplier = new ApiSupplier { ID = supplierModel.ID, name = supplierModel.name, address = supplierModel.address, company = supplierModel.company, telephone = supplierModel.telephone }; supplierList.Add(supplier); } return(supplierList); }
public SupplierController() { _aManager = new SupplierManager(); }
public SupplierController(ISupplierManager supplierManager, IHttpContextAccessor httpContextAccessor) { this._supplierManager = supplierManager; this._httpContextAccessor = httpContextAccessor; }
public SupplierGoodsController(ISupplierProductLotManager plMgr, ISupplierManager supMgr, IUserManager usrMgr) { this.plMgr = plMgr; this.supMgr = supMgr; this.usrMgr = usrMgr; }
public HomeController(IAppliancesDistribution productManager, ISupplierManager supplierManager) { _productManager = productManager; _supplierManager = supplierManager; }
public SupplierController(ISupplierManager supplierManager) { _supplierManager = supplierManager; }
public SupplierController(ISupplierManager store) { _store = store; }