示例#1
0
        public ActionResult Index(string sid, string snam, string qid, string dlid, int pageIndex = 1, int pageSize = 20)
        {
            ViewBag.SID  = sid;
            ViewBag.SNAM = snam;

            var dlSerialList  = DaoDlserial.FindList();
            var queSerialList = DaoQueueserial.FindList();

            Page <SYS_DETAILSERIAL> data = dao.GetList(pageIndex, pageSize, "", "SERIALID", sid, "SERIALNAME like", snam, "SSQUEUESERIALID", qid
                                                       , "SSDLSERIALID", dlid);

            foreach (var item in data.Items)
            {
                item.SYS_QUEUESERIAL = queSerialList.SingleOrDefault(obj => obj.Q_SERIALID == item.SSQUEUESERIALID);
                item.SYS_DLSERIAL    = dlSerialList.SingleOrDefault(obj => obj.DLS_SERIALID == item.SSDLSERIALID);
            }

            var list1 = new SelectList(DaoDlserial.FindList(), "DLS_SERIALID", "DLS_SERIALNAME", dlid);

            ViewData["DLSERIAL"] = list1;

            var list2 = new SelectList(DaoQueueserial.FindList(), "Q_SERIALID", "Q_SERIALNAME", qid);

            ViewData["QUSERIAL"] = list2;

            return(View(data));
        }
示例#2
0
        private SYS_DETAILSERIAL GetEdtModel(string id)
        {
            try
            {
                var detailSerial = DaoDetailserial.GetEntity("SERIALID", id);

                var list1 = new SelectList(DaoDlserial.FindList(), "DLS_SERIALID", "DLS_SERIALNAME", detailSerial.SSDLSERIALID);
                ViewData["DLSERIAL"] = list1;

                var list2 = new SelectList(DaoQueueserial.FindList(), "Q_SERIALID", "Q_SERIALNAME", detailSerial.SSQUEUESERIALID);
                ViewData["QUSERIAL"] = list2;
                return(detailSerial);
            }
            catch (Exception ex)
            {
                LogHelper.ErrorLog("系统出错!", ex);
                return(null);
            }
        }
示例#3
0
 private void GetCreateDT()
 {
     ViewData["DLSERIAL"] = new SelectList(DaoDlserial.FindList(), "DLS_SERIALID", "DLS_SERIALNAME");
     ViewData["QUSERIAL"] = new SelectList(DaoQueueserial.FindList(), "Q_SERIALID", "Q_SERIALNAME");
 }