public void GetOptItems() { //初始化select的option List <int> depotid = new List <int>(); List <int> drugid = new List <int>(); List <int> supid = new List <int>(); tb_depotinfos = depotBLL.GetList(e => true); tb_druginfos = drugBLL.GetList(e => true); tb_suppliers = supBLL.GetList(e => true); for (int i = 0; i < tb_depotinfos.Count; i++) { depotid.Add(tb_depotinfos[i].Id); } for (int i = 0; i < tb_druginfos.Count; i++) { drugid.Add(tb_druginfos[i].Id); } for (int i = 0; i < tb_suppliers.Count; i++) { supid.Add(tb_suppliers[i].Id); } ViewBag.DepotId = depotid; ViewBag.DrugId = drugid; ViewBag.SupId = supid; }
public dynamic GetSup() { var list = supplierBLL.GetList(en => true); List <dynamic> result = new List <dynamic>();; foreach (var l in list) { var r = new { Name = l.Name, Id = l.Id }; result.Add(r); } return(new { dataItem = result, count = list.Count }); }
public ActionResult SupplierInfo() { var da = supplierBLL.GetList(en => true); return(View(da)); }