}//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()); }//
public string GetParams(int userId, string sViewID) { StringBuilder ret = new StringBuilder(); string InputValue = CXmlPara.CreatePara(new CPara[] { new CPara("ViewID", sViewID) }, "" ); ServiceREF.CoreService.COutputValue outputValue = new ServiceREF.CoreService.COutputValue(); ServiceREF.CoreService.CDesignParameter[] list = CoreService.GetViewDesignParameter(InputValue, ref outputValue); ret.Append("{["); for (int i = 0; i < list.Length; i++) { ret.Append("{"); ret.AppendFormat("\"{0}\":\"{1}\",", "name", list[i].VariableName); ret.AppendFormat("\"{0}\":\"{1}\",", "type", list[i].VariableType); ret.AppendFormat("\"{0}\":\"{1}\",", "label", list[i].VariableLabel); ret.AppendFormat("\"{0}\":\"{1}\",", "fcode", list[i].FilterCode); ret.AppendFormat("\"{0}\":\"{1}\"", "dcode", list[i].DataCode); ret.Append("}"); if (i < list.Length - 1) { ret.Append(","); } } ret.Append("]}"); return(ret.ToString()); }
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()); }
}// public string GetNextRefNo(string pRefType) { pRefType = pRefType == "" ? "4" : pRefType; string InputValue = CXmlPara.CreatePara(new CPara[] { new CPara("RefDate", DateTime.Now.ToString("yyyy-MM-dd")), new CPara("RefType", pRefType) }, "" ); CRefNo refno = core_service.GetNextRefNo(InputValue); return(CJson.SerializeObject(refno)); }
public string GetViews(int userId, string sPageCode) { string ret = ""; string InputValue = CXmlPara.CreatePara(new CPara[] { new CPara("ViewCode", sPageCode) }, "" ); ServiceREF.CoreService.COutputValue outputValue = new ServiceREF.CoreService.COutputValue(); ServiceREF.CoreService.CViewList[] list = CoreService.GetViewList(InputValue, ref outputValue); ret = CGrid.ToJsonForHandle <ServiceREF.CoreService.CViewList>(userId, 28, list, 1, 1, 1000); return(ret); }
public string GetTransaction(string funcPara) { StringBuilder ret = new StringBuilder(); string InputValue = CXmlPara.CreatePara(funcPara); ServiceREF.GeneralLedgerService.GeneralLedgerService gl_service = new ServiceREF.GeneralLedgerService.GeneralLedgerService(); ServiceREF.GeneralLedgerService.CTransaction item = gl_service.GetTransaction(funcPara); if (item != null) { DateTime date = DateTime.Now; if (item.RefDate != null) { date = (DateTime)item.RefDate; } ret.AppendFormat("{0}|{1}|{2}|{3}|{4}|{5}|{6}|{7}|{8}|{9}|{10}\n", item.ID, item.RefNo, item.RefTypeName, date.ToString("yyyy-MM-dd"), item.PartnerName, item.Amount, item.PartnerID, item.RefID, item.IsPosted, item.IsCancel, item.IsBalance); } return(ret.ToString()); }//GetPersonList
public string GetTemplate(string funcPara)//GetObjectType { StringBuilder ret = new StringBuilder(); string InputValue = CXmlPara.CreatePara(funcPara); ServiceREF.CoreService.CControl[] lst = core_service.GetControls(InputValue); ret.Append("["); foreach (ServiceREF.CoreService.CControl cp in lst) { ret.Append("{"); ret.AppendFormat("'id':'{0}',", cp.ID); ret.AppendFormat("'text':'{0}',", cp.Caption); ret.AppendFormat("'value':'{0}'", cp.ID); ret.Append("}"); if (cp != lst[lst.Length - 1]) { ret.Append(","); } } ret.Append("]"); return(ret.ToString()); }
public string GetControlData(string pType, string pDataCode, string pFilterCode) { string ret = ""; string InputValue = CXmlPara.CreatePara(new CPara[] { new CPara("DataCode", pDataCode), new CPara("FilterCode", pFilterCode) }, "" ); ServiceREF.CoreService.CControlData[] list = CoreService.GetControlData(InputValue); switch (pType) { case "3": ret = BuildJsonAutoComplete(list); break; default: break; } return(ret); }
public string _GetCurrencyList() { StringBuilder ret = new StringBuilder(); string InputValue = CXmlPara.CreatePara(new CPara[] {}, ""); ServiceREF.Cash.COutputValue output = new ServiceREF.Cash.COutputValue(); ServiceREF.Cash.CCurrency[] lst = currencyService.GetCurrencyList(InputValue, ref output); ret.Append("["); foreach (ServiceREF.Cash.CCurrency obj in lst) { ret.Append("{"); ret.AppendFormat("'id':'{0}',", obj.ID); ret.AppendFormat("'text':'{0}',", obj.Name); ret.AppendFormat("'value':'{0}'", obj.ID); ret.Append("}"); if (obj != lst[lst.Length - 1]) { ret.Append(","); } } ret.Append("]"); return(ret.ToString()); }
public string CreatePara(string inputValue) { return(CXmlPara.CreatePara(inputValue)); }