public ProfitAnlsForm() { InitializeComponent(); numudYear.Maximum = DateTime.Now.Year; numudYear.Value = DateTime.Now.Year; if (null == goodsManager) { goodsManager = InterfaceProxyGenerator.CreateInterfaceProxy <IGoodsManager>(MainForm.usr); } if (null == anlsManager) { anlsManager = InterfaceProxyGenerator.CreateInterfaceProxy <IDataAnlsManager>(MainForm.usr); } if (null == subCatgManager) { subCatgManager = InterfaceProxyGenerator.CreateInterfaceProxy <ISubCatgManager>(MainForm.usr); } List <SubCatgVO> subCatgs = subCatgManager.LoadData(false, null); List <SubCatgVO> list = new List <SubCatgVO>(); SubCatgVO subCatg = new SubCatgVO(); subCatg.CName = "全部"; subCatg.CId__PK = 0; list.Add(subCatg); list.AddRange(subCatgs); cboxCatg.DisplayMember = "CName"; cboxCatg.ValueMember = "CID__PK"; cboxCatg.DataSource = list; }
private readonly IMessageManager _messageManager; //实时消息领域服务 /*-------------------CAP订阅发布数据示例---------------------------*/ //private readonly ICapPublisher _capPublisher;//数据发布器 //public GoodsAppService(IRepository<Goods,string> repository, // IGoodsRecordManager goodsRecordManager, // IGoodsManager goodsManager, // IMessageManager messageManager, // ICapPublisher capPublisher) :base(repository) //{ // _goodsRecordManager = goodsRecordManager; // _goodsManager = goodsManager; // _messageManager = messageManager; // EventBus = NullEventBus.Instance; // _capPublisher = capPublisher; //} /*----------------------------------------------------------------*/ public GoodsAppService(IRepository <Goods, string> repository, IGoodsRecordManager goodsRecordManager, IGoodsManager goodsManager) : base(repository) { _goodsRecordManager = goodsRecordManager; _goodsManager = goodsManager; }
public MRefund2SupplierForm() { InitializeComponent(); dtgvRfGoods.AutoGenerateColumns = false; dtgvRfOrders.AutoGenerateColumns = false; Usr usr = MainForm.usr; page = new PageVO(); page.PageNo = 1; if (null == custManager) { custManager = InterfaceProxyGenerator.CreateInterfaceProxy <ICustomerManager>(usr); } if (null == subCatgManager) { subCatgManager = InterfaceProxyGenerator.CreateInterfaceProxy <ISubCatgManager>(usr); } if (null == refundManager) { refundManager = InterfaceProxyGenerator.CreateInterfaceProxy <IRefund2SupplierManager>(usr); } if (null == goodsManager) { goodsManager = InterfaceProxyGenerator.CreateInterfaceProxy <IGoodsManager>(usr); } Customer cust = new Customer(); cust.Grade = GRADE.SUPPLIER; cust.St = ST.VALID; List <Customer> custs = custManager.LoadData(cust, null); cboxNSupplier.DisplayMember = "CName"; cboxNSupplier.ValueMember = "CID__PK"; cboxNSupplier.DataSource = custs; List <Customer> custList = new List <Customer>(); Customer tmpCust = new Customer(); tmpCust.CID__PK = 0; tmpCust.CName = "--全部--"; custList.Add(tmpCust); custList.AddRange(custs); cboxQySupplier.DisplayMember = "CName"; cboxQySupplier.ValueMember = "CID__PK"; cboxQySupplier.DataSource = custList; }
public MStockOutForm() { InitializeComponent(); dtgvSOutGoods.AutoGenerateColumns = false; dtgvMOutOrders.AutoGenerateColumns = false; Usr usr = MainForm.usr; page = new PageVO(); page.PageNo = 1; if (null == custManager) { custManager = InterfaceProxyGenerator.CreateInterfaceProxy <ICustomerManager>(usr); } if (null == goodsManager) { goodsManager = InterfaceProxyGenerator.CreateInterfaceProxy <IGoodsManager>(usr); } if (null == stockOutManager) { stockOutManager = InterfaceProxyGenerator.CreateInterfaceProxy <IStockOutManager>(usr); } Customer cust = new Customer(); cust.Grade = GRADE.RESELLER; cust.St = ST.VALID; List <Customer> resellers = custManager.LoadData(cust, null); cboxNResellers.DisplayMember = "CName"; cboxNResellers.ValueMember = "CID__PK"; cboxNResellers.DataSource = resellers; List <Customer> qyResellers = new List <Customer>(); Customer reseller = new Customer(); reseller.CID__PK = 0; reseller.CName = "--全部--"; qyResellers.Add(reseller); qyResellers.AddRange(resellers); cboxQyReseller.DisplayMember = "CName"; cboxQyReseller.ValueMember = "CID__PK"; cboxQyReseller.DataSource = qyResellers; }
public SupplyGoodsForm(Customer supplier) { InitializeComponent(); Usr usr = MainForm.usr; page = new PageVO(); page.PageNo = 1; page.PageSize = 100; goodsMap = new Dictionary <int, Goods>(); if (null == goodsManager) { goodsManager = InterfaceProxyGenerator.CreateInterfaceProxy <IGoodsManager>(usr); } if (null == custManager) { custManager = InterfaceProxyGenerator.CreateInterfaceProxy <ICustomerManager>(usr); } if (null == catgManager) { catgManager = InterfaceProxyGenerator.CreateInterfaceProxy <ISubCatgManager>(usr); } List <SubCatgVO> subCatgs = catgManager.LoadData(false, null); List <SubCatgVO> list = new List <SubCatgVO>(); SubCatgVO subCatg = new SubCatgVO(); subCatg.CName = "全部"; subCatg.CId__PK = 0; list.Add(subCatg); list.AddRange(subCatgs); cboxCatg.DisplayMember = "CName"; cboxCatg.ValueMember = "CID__PK"; cboxCatg.DataSource = list; List <Customer> custs = new List <Customer>(); custs.Add(supplier); cboxSupplier.DisplayMember = "CName"; cboxSupplier.ValueMember = "CID__PK"; cboxSupplier.DataSource = custs; }
public MGoodsForm() { InitializeComponent(); page = new PageVO(); page.PageNo = 1; dtgvMGoods.AutoGenerateColumns = false; Usr usr = MainForm.usr; if (null == manager) { manager = InterfaceProxyGenerator.CreateInterfaceProxy <IGoodsManager>(usr); } if (null == subCatgManager) { subCatgManager = InterfaceProxyGenerator.CreateInterfaceProxy <ISubCatgManager>(usr); } BindingSource stBs = new BindingSource(); Dictionary <string, string> goodsMap = new Dictionary <string, string>(); goodsMap.Add("", "全部"); goodsMap.Add(ST.VALID, ST.GOODS_MAP[ST.VALID]); goodsMap.Add(ST.INVALID, ST.GOODS_MAP[ST.INVALID]); stBs.DataSource = goodsMap; cboxSt.DisplayMember = "Value"; cboxSt.ValueMember = "Key"; cboxSt.DataSource = stBs; List <SubCatgVO> subCatgs = subCatgManager.LoadData(false, null); List <SubCatgVO> list = new List <SubCatgVO>(); SubCatgVO subCatg = new SubCatgVO(); subCatg.CName = "全部"; subCatg.CId__PK = 0; list.Add(subCatg); list.AddRange(subCatgs); cboxCatg.DisplayMember = "CName"; cboxCatg.ValueMember = "CID__PK"; cboxCatg.DataSource = list; }
public AddGoods2CustForm(int custId, string custName) { InitializeComponent(); dtgvGoods.AutoGenerateColumns = false; Usr usr = MainForm.usr; supplyGoods = new Dictionary <int, SupplyInfo>(); page = new PageVO(); page.PageSize = 100; page.PageNo = 1; if (null == goodsManager) { goodsManager = InterfaceProxyGenerator.CreateInterfaceProxy <IGoodsManager>(usr); } if (null == subCatgManager) { subCatgManager = InterfaceProxyGenerator.CreateInterfaceProxy <ISubCatgManager>(usr); } if (null == custManager) { custManager = InterfaceProxyGenerator.CreateInterfaceProxy <ICustomerManager>(usr); } this.custId = custId; List <SubCatgVO> subCatgs = subCatgManager.LoadData(false, null); List <SubCatgVO> list = new List <SubCatgVO>(); SubCatgVO subCatg = new SubCatgVO(); subCatg.CName = "全部"; subCatg.CId__PK = 0; list.Add(subCatg); list.AddRange(subCatgs); cboxCatg.DisplayMember = "CName"; cboxCatg.ValueMember = "CID__PK"; cboxCatg.DataSource = list; this.Text = custName; }
public GoodsAppService(IGoodsManager goodsManager) { _goodsManager = goodsManager; }
public GoodsController(IGoodsManager goodsManager) => this.goodsManager = goodsManager;
public GoodController(ILogger <GoodController> logger, IGoodsManager goodsManager, IOrderManager orderManager) { _logger = logger; _goodsManager = goodsManager; _orderManager = orderManager; }
/// <summary> /// Initializes a new instance of the <see cref="BasketManager"/> class. /// </summary> /// <param name="goodsManager">The goods manager.</param> public BasketManager(IGoodsManager goodsManager) { this.goodsManager = goodsManager; this.BasketDetails = new BasketDetails(); AddHistory(HistoryStart); }
public GoodsForm(Goods mGoods, IGoodsManager goodsManager, ISubCatgManager subCatgManager) { InitializeComponent(); this.manager = goodsManager; this.subCatgManager = subCatgManager; if (null == custManager) { custManager = InterfaceProxyGenerator.CreateInterfaceProxy <ICustomerManager>(MainForm.usr); } BindingSource bs = new BindingSource(); bs.DataSource = TERM.TERM_MAP; cboxShelfLife.DataSource = bs; cboxShelfLife.DisplayMember = "Value"; cboxShelfLife.ValueMember = "Key"; if (null == mGoods) { this.Text = "添加商品"; rbtnInvalid.Enabled = false; rbtnValid.Enabled = false; rbtnValid.Checked = true; List <SubCatgVO> list = this.subCatgManager.LoadData(false, null); cboxCatg.DataSource = list; cboxCatg.DisplayMember = "CName"; cboxCatg.ValueMember = "CId__PK"; Customer cust = new Customer(); cust.Grade = GRADE.SUPPLIER; cust.St = ST.VALID; List <Customer> custs = custManager.LoadData(cust, null); List <Customer> ds = new List <Customer>(); cust.CID__PK = 0; cust.CName = "--选择--"; ds.Add(cust); ds.AddRange(custs); cboxSupplier.DisplayMember = "CName"; cboxSupplier.ValueMember = "CID__PK"; cboxSupplier.DataSource = ds; cboxSupplier.Enabled = true; } else { this.Text = "修改商品"; List <SubCatgVO> list = this.subCatgManager.LoadData(true, null); cboxCatg.DataSource = list; cboxCatg.DisplayMember = "CName"; cboxCatg.ValueMember = "CId__PK"; string shelfLifeStr = mGoods.ShelfLife; string num = shelfLifeStr.Substring(0, shelfLifeStr.Length - 1); string term = shelfLifeStr.Substring(shelfLifeStr.Length - 1); txtGId.Text = mGoods.GID__PK.ToString(); txtGName.Text = mGoods.GName; txtAbbr.Text = mGoods.Abbr; txtRemark.Text = mGoods.Remark; txtShelfLife.Text = num; cboxShelfLife.SelectedValue = term; txtSpecs.Text = mGoods.Specs; cboxCatg.SelectedValue = mGoods.SubCatgID; cboxSupplier.Enabled = false; } }