예제 #1
0
        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;
        }
예제 #2
0
        public dynamic GetDepot()
        {
            var            list   = depotBLL.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 });
        }
예제 #3
0
        public ActionResult Depot()
        {
            var da = depotBLL.GetList(en => true);

            return(View(da));
        }