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()); }
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()); }
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]); }
public string GetInterfaceFunctionByParentIDInJson(string inputValue) { string ret = ""; ServiceREF.CoreService.CoreService service = new ServiceREF.CoreService.CoreService(); ret = service.GetInterfaceFunctionByParentIDInJson(inputValue); return(ret); }
public string GetModule(string inputValue) { string ret = ""; ServiceREF.CoreService.CoreService service = new ServiceREF.CoreService.CoreService(); ret = service.GetModule(inputValue); return(ret); }
public string GetApplication(string inputValue) { string ret = ""; ServiceREF.CoreService.CoreService service = new ServiceREF.CoreService.CoreService(); ret = service.GetApplication(inputValue); return(ret); }
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()); }
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"); } }
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()); }
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); }