public string GetGrid(int currPage, int NumberRowOfPage, string exAttribute) { string InputValue = CXmlPara.CreatePara(new CPara[] { new CPara("PageIndex", currPage.ToString()), new CPara("NumberRowOfPage", NumberRowOfPage.ToString()) }, exAttribute ); ServiceREF.GeneralLedgerService.COutputValue outputValue = new ServiceREF.GeneralLedgerService.COutputValue(); ServiceREF.GeneralLedgerService.GeneralLedgerService service = new ServiceREF.GeneralLedgerService.GeneralLedgerService(); ServiceREF.GeneralLedgerService.CTransaction[] list = service.GetTransactionList(InputValue, ref outputValue); return(CGrid.ToJsonForHandle <ServiceREF.GeneralLedgerService.CTransaction>(0, 20, list, currPage, outputValue.TotalPage, outputValue.TotalRow)); }
private string LoadData(string InputValue) { CChartAccountUI obj = new CChartAccountUI(); ServiceREF.GeneralLedgerService.COutputValue cpi = new ServiceREF.GeneralLedgerService.COutputValue(); ServiceREF.GeneralLedgerService.GeneralLedgerService service = new ServiceREF.GeneralLedgerService.GeneralLedgerService(); string pInput = string.Format("<InputValue UserID=\"{0}\" Session=\"{1}\" ParentID=\"{2}\"/>", 1, "ED45A7F1-9FB8-4D82-9D48-1B2238DC666C", InputValue); ServiceREF.GeneralLedgerService.CAccountList[] list = service.GetAccountList(pInput, ref cpi); StringBuilder ret = new StringBuilder(); if (list.Length > 0) { ret.Append("["); foreach (var item in list) { string state = "open"; if (item.ChildCount != 0) { state = "closed"; } else { state = "open"; } ret.Append("{\n"); ret.AppendFormat("'id':'{0}',\n", item.ID); ret.AppendFormat("'text':'{0}',\n", item.Code + " - " + item.Name); ret.AppendFormat("'state':'{0}',\n", state); ret.Append("'attributes':{"); ret.AppendFormat("'url':'{0}',", "../Mods/Items/Service/ChartAccountTree.ashx?inputValue=" + item.ID); ret.AppendFormat("'isLoad':'{0}'", 1); ret.Append("}\n"); ret.Append("}"); if (item != list[list.Length - 1]) { ret.Append(",\n"); } } ret.Append("]"); } string jsonReturn = ""; if (ret.Length > 0) { jsonReturn = ret.ToString().Replace("'", "\""); } return(jsonReturn); }
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 GetAccountList(string Input) { ServiceREF.GeneralLedgerService.GeneralLedgerService GLS = new ServiceREF.GeneralLedgerService.GeneralLedgerService(); ServiceREF.GeneralLedgerService.COutputValue pageinfo = new ServiceREF.GeneralLedgerService.COutputValue(); ServiceREF.GeneralLedgerService.CAccountList[] list = GLS.GetAccountList(Input, ref pageinfo); StringBuilder ret = new StringBuilder(); if (list != null && list.Length > 0) { foreach (var item in list) { ret.AppendFormat("{0}|{1}|{2}\n", item.ID, item.Code, item.DisplayName); } } string result = string.Empty; if (ret.Length > 0) { result = ret.ToString(0, ret.Length - 1); } return(result); }
public string CreateTransaction(string Input) { ServiceREF.GeneralLedgerService.GeneralLedgerService GLS = new ServiceREF.GeneralLedgerService.GeneralLedgerService(); ServiceREF.GeneralLedgerService.CApplicationMessage message = GLS.CreateTransaction(Input); return(CJson.SerializeObject(message)); }