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; }
public MStocktakingForm() { InitializeComponent(); dtgvGoods.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 == manager) { manager = InterfaceProxyGenerator.CreateInterfaceProxy <IInventoryManager>(usr); } Customer cust = new Customer(); cust.Grade = GRADE.SUPPLIER; cust.St = ST.VALID; List <Customer> custs = custManager.LoadData(cust, null); List <Customer> custList = new List <Customer>(); Customer tmpCust = new Customer(); tmpCust.CID__PK = 0; tmpCust.CName = "---选择---"; custList.Add(tmpCust); custList.AddRange(custs); cboxSuppliers.DisplayMember = "CName"; cboxSuppliers.ValueMember = "CID__PK"; cboxSuppliers.DataSource = custList; List <SubCatgVO> scatgs = subCatgManager.LoadData(false, null); List <SubCatgVO> catgList = new List <SubCatgVO>(); SubCatgVO catgVO = new SubCatgVO(); catgVO.CName = "全部"; catgVO.CId__PK = 0; catgList.Add(catgVO); catgList.AddRange(scatgs); cboxCatgs.DisplayMember = "CName"; cboxCatgs.ValueMember = "CId__PK"; cboxCatgs.DataSource = catgList; }
private void BindData() { try { List <SubCatgVO> data = manager.LoadData(true, null); if (null != data && data.Count > 0) { dtgvSubCatg.DataSource = null; dtgvSubCatg.DataSource = data; } } catch { MainForm.Error("系统异常!"); } }
public SoldGoodsForm(Customer customer) { InitializeComponent(); dtgvSoldGoods.AutoGenerateColumns = false; Usr usr = MainForm.usr; goodsMap = new Dictionary <long, StockGoodsVO>(); page = new PageVO(); page.PageSize = 100; page.PageNo = 1; if (null == subCatgManager) { subCatgManager = InterfaceProxyGenerator.CreateInterfaceProxy <ISubCatgManager>(usr); } if (null == manager) { manager = InterfaceProxyGenerator.CreateInterfaceProxy <IInventoryManager>(usr); } this.customer = customer; this.Text = "【回收单】 " + customer.CName; List <SubCatgVO> scatgs = subCatgManager.LoadData(false, null); List <SubCatgVO> catgList = new List <SubCatgVO>(); SubCatgVO catgVO = new SubCatgVO(); catgVO.CName = "全部"; catgVO.CId__PK = 0; catgList.Add(catgVO); catgList.AddRange(scatgs); cboxCatgs.DisplayMember = "CName"; cboxCatgs.ValueMember = "CId__PK"; cboxCatgs.DataSource = catgList; List <Customer> custs = new List <Customer>(); custs.Add(customer); cboxResellers.DataSource = custs; cboxResellers.DisplayMember = "CName"; cboxResellers.ValueMember = "CID__PK"; }
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 GoodsInStockForm(Customer customer, string direct) { InitializeComponent(); dtgvGoodsInStock.AutoGenerateColumns = false; Usr usr = MainForm.usr; goodsMap = new Dictionary <long, StockGoodsVO>(); page = new PageVO(); page.PageSize = 100; page.PageNo = 1; if (null == custManager) { custManager = InterfaceProxyGenerator.CreateInterfaceProxy <ICustomerManager>(usr); } if (null == subCatgManager) { subCatgManager = InterfaceProxyGenerator.CreateInterfaceProxy <ISubCatgManager>(usr); } if (null == manager) { manager = InterfaceProxyGenerator.CreateInterfaceProxy <IInventoryManager>(usr); } this.customer = customer; string title = string.Empty; if (DIRECT.REFUND2SUPPLIER == direct) { title = "退货单"; } else if (DIRECT.STOCK_OUT == direct) { title = "出货单"; } else { return; } this.Text = "【" + title + "】" + " " + customer.CName; List <Customer> custList = new List <Customer>(); if (DIRECT.REFUND2SUPPLIER == direct) { custList.Add(customer); } else if (DIRECT.STOCK_OUT == direct) { Customer cust = new Customer(); cust.Grade = GRADE.SUPPLIER; cust.St = ST.VALID; List <Customer> custs = custManager.LoadData(cust, null); Customer tmpCust = new Customer(); tmpCust.CID__PK = 0; tmpCust.CName = "---选择---"; custList.Add(tmpCust); custList.AddRange(custs); } cboxSuppliers.DisplayMember = "CName"; cboxSuppliers.ValueMember = "CID__PK"; cboxSuppliers.DataSource = custList; List <SubCatgVO> scatgs = subCatgManager.LoadData(false, null); List <SubCatgVO> catgList = new List <SubCatgVO>(); SubCatgVO catgVO = new SubCatgVO(); catgVO.CName = "全部"; catgVO.CId__PK = 0; catgList.Add(catgVO); catgList.AddRange(scatgs); cboxCatgs.DisplayMember = "CName"; cboxCatgs.ValueMember = "CId__PK"; cboxCatgs.DataSource = catgList; }