Esempio n. 1
0
        public string GetContextData(string clientKey, string inputValue)
        {
            StringBuilder ret    = new StringBuilder();
            string        result = null;

            ServiceREF.CoreService.CoreService service = new ServiceREF.CoreService.CoreService();
            result = service.GetContextData(clientKey, inputValue);
            List <CResource> resList = CObjectMapper.FromCSV <CResource>(result, 1);

            ret.Append("[");
            foreach (var item in resList)
            {
                ret.Append("{");
                ret.AppendFormat("'id':'{0}',", item.ID);
                ret.AppendFormat("'text':'{0}',", item.Name);
                ret.AppendFormat("'value':'{0}'", item.ID);
                ret.Append("}");
                if (item != resList[resList.Count - 1])
                {
                    ret.Append(",");
                }
            }
            ret.Append("]");

            return(ret.ToString());
        }
Esempio n. 2
0
 public string GetLanguageList(string inputValue)
 {
     System.Text.StringBuilder           ret         = new System.Text.StringBuilder();
     ServiceREF.CoreService.CoreService  service     = new ServiceREF.CoreService.CoreService();
     ServiceREF.CoreService.COutputValue outputValue = new ServiceREF.CoreService.COutputValue();
     ServiceREF.CoreService.CLanguage[]  list        = service.GetLanguageList(inputValue, ref outputValue);
     if (list != null && list.Length > 0)
     {
         ret.Append("[");
         foreach (ServiceREF.CoreService.CLanguage item in list)
         {
             ret.Append("{");
             ret.AppendFormat("ID:'{0}',\n", item.ID);
             ret.AppendFormat("Code:'{0}',\n", item.Code);
             ret.AppendFormat("Name:'{0}'\n", item.Name);
             ret.Append("}");
             if (item != list[list.Length - 1])
             {
                 ret.Append(",");
             }
         }
         ret.Append("]");
     }
     return(ret.ToString());
 }
Esempio n. 3
0
        private ServiceREF.Asset.CApplicationMessage SaveTransaction(string ClientKey, string inputValue)
        {
            ServiceREF.CoreService.CoreService service = new ServiceREF.CoreService.CoreService();
            string result = service.ExecuteAction(ClientKey, inputValue);
            List <ServiceREF.Asset.CApplicationMessage> message = CObjectMapper.FromCSV <ServiceREF.Asset.CApplicationMessage>(result);

            return(message[1]);
        }
Esempio n. 4
0
        public string GetInterfaceFunctionByParentIDInJson(string inputValue)
        {
            string ret = "";

            ServiceREF.CoreService.CoreService service = new ServiceREF.CoreService.CoreService();
            ret = service.GetInterfaceFunctionByParentIDInJson(inputValue);
            return(ret);
        }
Esempio n. 5
0
        public string GetModule(string inputValue)
        {
            string ret = "";

            ServiceREF.CoreService.CoreService service = new ServiceREF.CoreService.CoreService();
            ret = service.GetModule(inputValue);
            return(ret);
        }
Esempio n. 6
0
        public string GetApplication(string inputValue)
        {
            string ret = "";

            ServiceREF.CoreService.CoreService service = new ServiceREF.CoreService.CoreService();
            ret = service.GetApplication(inputValue);
            return(ret);
        }
Esempio n. 7
0
        protected static string GetControls(string customControl)
        {
            StringBuilder ret        = new StringBuilder();
            string        InputValue = CXmlPara.CreatePara(new KeyValuePair <string, string>[]
            {
                new KeyValuePair <string, string>("CustomControl", customControl)
            });

            ServiceREF.CoreService.CoreService service = new ServiceREF.CoreService.CoreService();
            ServiceREF.CoreService.CControl[]  arrCtr  = service.GetControls(InputValue);
            ret.Append(CJson.SerializeObject(arrCtr));
            return(ret.ToString());
        }
Esempio n. 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ServiceREF.CoreService.CoreService  service = new ServiceREF.CoreService.CoreService();
            ServiceREF.CoreService.COutputValue output  = new ServiceREF.CoreService.COutputValue();
            ServiceREF.CoreService.CUserList    messs   = service.Login("<InputValue UserLogin=\"qc\" Password=\"123456\" />", ref output);

            if (output.IsSuccessfull)
            {
                Response.Write(messs.FullName);
            }
            else
            {
                Response.Write("Invalid login info");
            }
        }
Esempio n. 9
0
        public string GetContextDataAutoComplete(string clientKey, string inputValue)
        {
            StringBuilder ret       = new StringBuilder();
            string        _template = "{0}|{1}|{2}|{3}|{4}\n";
            string        result    = null;

            ServiceREF.CoreService.CoreService service = new ServiceREF.CoreService.CoreService();
            result = service.GetContextData(clientKey, inputValue);
            List <CResource> resList = CObjectMapper.FromCSV <CResource>(result, 1);

            if (resList != null)
            {
                foreach (var item in resList)
                {
                    ret.AppendFormat(_template, item.ID, item.Code, item.Name, item.Value, item.Value1);
                }
            }
            return(ret.ToString());
        }
Esempio n. 10
0
        public string GetInfo(string ClientKey, string inputValue)
        {
            //  CSession session = new CSession();
            //   string _inputValue = string.Format("<InputValue UserID=\"{0}\" Session=\"{1}\"  />", session.UserID, session.Session);
            ServiceREF.CoreService.CoreService service = new ServiceREF.CoreService.CoreService();
            string result = service.GetContextData(ClientKey, inputValue);

            //List<ServiceREF.Asset.CApplicationMessage> message = CObjectMapper.FromCSV<ServiceREF.Asset.CApplicationMessage>(result);

            //StringBuilder ret = new StringBuilder();
            //if (message != null && message.Count > 0)
            //{
            //    ret.Append("{");
            //    ret.AppendFormat("ID:'{0}',\n", message[0].ID);
            //    ret.AppendFormat("Code:'{0}',\n", message[0].Code);
            //    ret.AppendFormat("Name:'{0}',\n", message[0].Name);
            //    ret.AppendFormat("Description:'{0}',\n", message[0].Description);
            //    ret.AppendFormat("Result:'{0}',\n", message[0].Result);
            //    ret.AppendFormat("IsSuccessfull:'{0}'\n", message[0].IsSuccessfull);
            //    ret.Append("}");
            //}
            return(result);
        }