Ejemplo n.º 1
0
        private List <KeyValueModel> getUserBu(string userId, string def)
        {
            List <KeyValueModel> data = new List <KeyValueModel>();

            ORG_INFOTableAdapter ad = new ORG_INFOTableAdapter();
            var table = ad.GetKINDData();

            foreach (var row in table)
            {
                if (row.MANAGE_ORG_CODE.Equals(def))
                {
                    data.Add(new KeyValueModel()
                    {
                        key = row.MANAGE_ORG_CODE, keyValue = row.MANAGE_ORG_NAME, isSelected = true
                    });
                }
                else
                {
                    data.Add(new KeyValueModel()
                    {
                        key = row.MANAGE_ORG_CODE, keyValue = row.MANAGE_ORG_NAME
                    });
                }
            }
            return(data);
        }
Ejemplo n.º 2
0
        public JsonResult GetTBuData(string kind, string userId)
        {
            ORG_INFOTableAdapter ad = new ORG_INFOTableAdapter();
            var ents = getTbus(kind);

            if (ents.Count > 0)
            {
                ents[0].isSelected = true;
            }
            return(Json(ents, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 3
0
        private List <KeyValueModel> getUserTBu(string userId, string kind)
        {
            ORG_INFOTableAdapter ad = new ORG_INFOTableAdapter();

            var ents = getTbus(kind);

            if (ents.Count > 0)
            {
                ents[0].isSelected = true;
            }
            return(ents);
        }