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; }
public SubCatgForm() { InitializeComponent(); dtgvSubCatg.AutoGenerateColumns = false; Usr usr = MainForm.usr; if (null == manager) { manager = InterfaceProxyGenerator.CreateInterfaceProxy <ISubCatgManager>(usr); } if (null == catgManager) { catgManager = InterfaceProxyGenerator.CreateInterfaceProxy <ICatgManager>(usr); } }
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 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; }
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; } }