private void BindDrop() { int total = 0; List <Employee> list = EmployeeDAL.Getlist("采购部", 4, out total); list = list.Where(l => l.DepId == 2).ToList(); if (list != null && list.Count > 0) { cbxemployee.DataSource = list; cbxemployee.DisplayMember = "EmpName"; cbxemployee.ValueMember = "EmpId"; } //List<Dic> diclist = DicDAL.Getlist("", 0, out total); //if (diclist != null && diclist.Count > 0) //{ // this.cbxgoodsunit.DataSource = diclist; // cbxgoodsunit.DisplayMember = "KeyName"; // cbxgoodsunit.ValueMember = "KeyId"; //} List <Ware> warelist = WareDAL.Getlist(); if (warelist != null && warelist.Count > 0) { this.cmbDepotName.DataSource = warelist; cmbDepotName.DisplayMember = "Name"; cmbDepotName.ValueMember = "WareId"; } }
private void initKeylist() { List <Dic> dickeylist = DicDAL.Getlist("", 0, out total); if (dickeylist != null && dickeylist.Count > 0) { dickeys = dickeylist.ToDictionary(x => x.KeyId); } List <Goods> goodslist = GoodsDAL.Getlist("", 0, out total); if (goodslist.Count > 0) { diclist = goodslist.ToDictionary(x => x.GoodsId); } List <Ware> wlist = WareDAL.Getlist(); if (wlist.Count > 0) { warelist = wlist.ToDictionary(x => x.WareId); } }