Ejemplo n.º 1
0
        }//GetPersonList

        public string GetPersonList(string funcPara)
        {
            StringBuilder ret = new StringBuilder();

            ServiceREF.CoreService.CoreService service = new ServiceREF.CoreService.CoreService();

            string InputValue = CXmlPara.CreatePara(funcPara);

            ServiceREF.CoreService.COutputValue temp = new ServiceREF.CoreService.COutputValue();

            ServiceREF.CoreService.CPerson[] list = service.GetPersonList(funcPara, ref temp);

            foreach (var item in list)
            {
                if (item != null)
                {
                    if (item != null)
                    {
                        ret.AppendFormat("{0}|{1}|{2}\n",
                                         item.Code, item.Name, item.ID);
                    }
                }
            }
            return(ret.ToString());
        }//
Ejemplo n.º 2
0
        public string GetListGroup()
        {
            string InputValue = CXmlPara.CreatePara(new CPara[] { }, "");

            StringBuilder ret = new StringBuilder();

            ServiceREF.CoreService.COutputValue output = new ServiceREF.CoreService.COutputValue();
            CUserGroup[] list = service.GetUserGroupList(InputValue, ref output);
            ret.Append("[");
            foreach (CUserGroup cp in list)
            {
                ret.Append("{");
                ret.AppendFormat("'id':'{0}',", cp.ID);
                ret.AppendFormat("'text':'{0}',", cp.Name);
                ret.AppendFormat("'value':'{0}'", cp.ID);
                ret.Append("}");
                if (cp != list[list.Length - 1])
                {
                    ret.Append(",");
                }
            }
            ret.Append("]");
            return(ret.ToString());
        }