Esempio n. 1
0
        }//CurrencyType

        public string CurrencyType(string funcPara)
        {
            string _inputValue = string.Format("<InputValue UserID=\"{0}\" Session=\"{1}\"  />", session.UserID, session.Session);

            ServiceREF.Cash.CurrencyService objCurr  = new ServiceREF.Cash.CurrencyService();
            ServiceREF.Cash.COutputValue    pageinfo = new  ServiceREF.Cash.COutputValue();
            ServiceREF.Cash.CCurrency[]     lst      = objCurr.GetCurrencyList(_inputValue, ref pageinfo);
            StringBuilder ret = new StringBuilder();

            ret.Append("[");
            foreach (var cp in lst)
            {
                ret.Append("{");
                ret.AppendFormat("'ExchangeRate':'{0}',", cp.ExchangeRate);
                ret.AppendFormat("'text':'{0}',", cp.Code);
                ret.AppendFormat("'value':'{0}'", cp.ID);
                ret.Append("}");
                if (cp != lst[lst.Length - 1])
                {
                    ret.Append(",");
                }
            }
            ret.Append("]");
            return(ret.ToString());
        }//
Esempio n. 2
0
        public string GetGrid(int userId, string session, int currPage, int NumberRowOfPage, string funcPara)
        {
            string ret        = "";
            string InputValue = CXmlPara.CreatePara(new CPara[]
            {
                new CPara("PageIndex", currPage.ToString()),
                new CPara("RowsPerPage", NumberRowOfPage.ToString()),
            },
                                                    funcPara
                                                    );

            ServiceREF.Cash.COutputValue outputValue = new ServiceREF.Cash.COutputValue();
            ServiceREF.Cash.CCurrency[]  list        = service.GetCurrencyList(InputValue, ref outputValue);

            ret = CGrid.ToJsonForHandle <ServiceREF.Cash.CCurrency>(1, 10, list, currPage, outputValue.TotalPage, outputValue.TotalRow);
            return(ret);
        }
Esempio n. 3
0
        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());
        }