Example #1
0
        //[HttpGet]
        //[HandlerAjaxOnly]
        public ActionResult GetDataItems(string enCode)
        {
            var itemId   = new ItemsApp().GetModelId(enCode);
            var itemdata = new ItemsDetailApp().GetList(itemId);
            var treeList = new List <ComboSelectModel>();

            foreach (var item in new ItemsApp().GetList())
            {
                if (item.F_EnCode.Equals(enCode))
                {
                    var dataItemList = itemdata.FindAll(t => t.F_ItemId.Equals(item.F_Id));
                    foreach (ItemsDetailEntity itemList in dataItemList)
                    {
                        ComboSelectModel comboModel = new ComboSelectModel();
                        comboModel.id       = itemList.F_ItemCode;
                        comboModel.text     = itemList.F_ItemName;
                        comboModel.value    = itemList.F_ItemName;
                        comboModel.parentid = itemList.F_ParentId == null ? "0" : itemList.F_ParentId;
                        treeList.Add(comboModel);
                    }
                    return(Content(treeList.ComboSelectJson()));
                }
            }
            return(Content(""));
        }
Example #2
0
        private object GetDataItemList()
        {
            var itemdata = new ItemsDetailApp().GetList();
            Dictionary <string, object> dictionaryItem = new Dictionary <string, object>();

            foreach (var item in new ItemsApp().GetList())
            {
                var dataItemList = itemdata.FindAll(t => t.ItemId.Equals(item.Id));
                Dictionary <string, string> dictionaryItemList = new Dictionary <string, string>();
                foreach (var itemList in dataItemList)
                {
                    dictionaryItemList.Add(itemList.ItemCode, itemList.ItemName);
                }
                dictionaryItem.Add(item.EnCode, dictionaryItemList);
            }
            return(dictionaryItem);
        }
Example #3
0
        private object GetDataItemList()
        {
            var itemdata = new ItemsDetailApp().GetList();
            Dictionary <string, object> dictionaryItem = new Dictionary <string, object>();

            foreach (var item in new ItemsApp().GetList(Convert.ToString(Session["F_Account"])))
            {
                var dataItemList = itemdata.FindAll(t => t.F_ItemId.Equals(item.F_Id));
                Dictionary <string, string> dictionaryItemList = new Dictionary <string, string>();
                foreach (var itemList in dataItemList)
                {
                    dictionaryItemList.Add(itemList.F_ItemCode, itemList.F_ItemName);
                }
                dictionaryItem.Add(item.F_EnCode, dictionaryItemList);
            }
            return(dictionaryItem);
        }
Example #4
0
        private object GetDataItemList()
        {
            var itemdata = new ItemsDetailApp().GetList();
            Dictionary <string, object> dictionaryItem = new Dictionary <string, object>();

            foreach (var item in new ItemsApp().GetList())
            {
                var dataItemList = itemdata.FindAll(t => t.F_ItemId.Equals(item.F_Id));
                Dictionary <string, string> dictionaryItemList = new Dictionary <string, string>();
                foreach (var itemList in dataItemList)
                {
                    dictionaryItemList.Add(itemList.F_ItemCode, itemList.F_ItemName);
                }
                dictionaryItem.Add(item.F_EnCode, dictionaryItemList);
            }
            //Common.BIBasicList.Add("dataItems", dictionaryItem);
            // Common.BIBasicList["dataItems"] = dictionaryItem;
            return(dictionaryItem);
        }