Esempio n. 1
0
        public string GetTransactionListAutoComplete(string funcPara)
        {
            StringBuilder ret        = new StringBuilder();
            string        InputValue = CXmlPara.CreatePara(funcPara);

            ServiceREF.GeneralLedgerService.COutputValue   outputValue = new ServiceREF.GeneralLedgerService.COutputValue();
            ServiceREF.GeneralLedgerService.CTransaction[] list        = gl_service.GetTransactionList(InputValue, ref outputValue);
            if (list != null && list.Length > 0)
            {
                DateTime date = DateTime.Now;
                foreach (var item in list)
                {
                    if (item.RefDate != null)
                    {
                        date = (DateTime)item.RefDate;
                    }
                    ret.AppendFormat("{0}|{1}|{2}|{3}|{4}|{5}|{6}|{7}|{8}|{9}|{10}|{11}|{12}\n",
                                     item.ID, item.RefNo, item.PartnerName, item.PartnerID,
                                     date.ToString("yyyy-MM-dd"), item.RefID, item.TotalAmount, item.Amount,
                                     item.IsPosted, item.IsCancel, item.IsBalance,
                                     item.UnPayAmount, item.PayAmount);
                }
            }
            string result = string.Empty;

            if (ret.Length > 0)
            {
                result = ret.ToString(0, ret.Length - 1);
            }
            return(result);
        }
Esempio n. 2
0
        public string GetGrid(int gridID, 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.CTransactionDetail[] list        = gl_service.GetTransactionDetail(InputValue);
            return(CGrid.ToJsonForHandle <ServiceREF.GeneralLedgerService.CTransactionDetail>(0, gridID, list, currPage, outputValue.TotalPage, outputValue.TotalRow));
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        public string GetAccountAutoComplete(string funcPara)
        {
            StringBuilder ret        = new StringBuilder();
            string        InputValue = CXmlPara.CreatePara(funcPara);

            ServiceREF.GeneralLedgerService.COutputValue   outputValue = new ServiceREF.GeneralLedgerService.COutputValue();
            ServiceREF.GeneralLedgerService.CAccountList[] list        = gl_service.GetAccountList(InputValue, ref outputValue);
            if (list != null && list.Length > 0)
            {
                foreach (var item in list)
                {
                    ret.AppendFormat("{0}|{1}|{2}|{3}|{4}\n", item.Code, item.Name, item.ID, item.ChildCount, item.Level);
                }
            }
            string result = string.Empty;

            if (ret.Length > 0)
            {
                result = ret.ToString(0, ret.Length - 1);
            }
            return(result);
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        public string GetAccountList(string funcPara)
        {
            StringBuilder ret        = new StringBuilder();
            string        inputValue = CXmlPara.CreatePara(funcPara);

            ServiceREF.GeneralLedgerService.COutputValue   outputValue = new ServiceREF.GeneralLedgerService.COutputValue();
            ServiceREF.GeneralLedgerService.CAccountList[] lst         = gl_service.GetAccountList(inputValue, ref outputValue);
            ret.Append("[");
            foreach (ServiceREF.GeneralLedgerService.CAccountList cp in lst)
            {
                ret.Append("{");
                ret.AppendFormat("'id':'{0}',", cp.ID);
                ret.AppendFormat("'text':'{0}',", cp.DisplayName);
                ret.AppendFormat("'value':'{0}'", cp.ID);
                ret.Append("}");
                if (cp != lst[lst.Length - 1])
                {
                    ret.Append(",");
                }
            }
            ret.Append("]");
            return(ret.ToString());
        }