示例#1
0
        public ActionResult FarthChannel()
        {
            Tdms_ChannelCollection daChannelColl = new Tdms_ChannelCollection();

            daChannelColl.listByChaneelName();
            var arrayList = ToArrayList(daChannelColl.DataTable);

            return(Json(arrayList));
        }
示例#2
0
        public ActionResult Index(FormCollection Form)
        {
            int?   channelId   = Form["ChannelId"].Safe().ToNullableInt32();
            string channelName = Form["ChannelName"].Safe().ToString();
            Tdms_ChannelCollection daChannelColl = new Tdms_ChannelCollection();

            daChannelColl.ChangePage = this.ChangePage();
            daChannelColl.ListByChaneel(channelId, channelName);
            return(ListViewResult(daChannelColl, ValueFormat));
        }
示例#3
0
        public JsonResult Tree(int?FatherId)
        {
            Tdms_ChannelCollection dachannelColl = new Tdms_ChannelCollection();

            dachannelColl.ListTreeByParentid(FatherId);

            List <VchannelTreeModel> list = new List <VchannelTreeModel>();

            foreach (Tdms_Channel item in dachannelColl)
            {
                VchannelTreeModel model = new VchannelTreeModel();
                model.ChannelId   = item.ChannelId;
                model.ChannelName = item.ChannelName;
                model.id          = item.ChannelId;
                model.text        = string.Format("[{0}]-{1} ({2})", item.ChannelId, item.ChannelName, item.Status);
                model.CreateTime  = item.CreateTime;
                model.FatherId    = item.FatherId;
                model.Remarks     = item.Remarks;
                model.Status      = item.Status;
                model.state       = item.DataRow["CHILD_COUNT"].Safe().ToInt32() > 0 ? "closed" : "open";
                list.Add(model);
            }
            return(Json(list));
        }