Esempio n. 1
0
        public static XElement  Agent(Session session, string email, string receive, string organizationName, string customerName, string reportDate, string accountCode, string previousAgentCode,
                                      string previousAgentName, string newAgentCode, string newAgentName, string newAgentICNo, string dateReply)
        {
            try
            {
                String reference    = "";
                String errorMessage = "";
                Token  token        = SessionManager.Default.GetToken(session);

                bool isSucceed = Application.Default.TradingConsoleServer.Agent(token, Application.Default.StateServer, FixBug.Fix(email), FixBug.Fix(receive),
                                                                                FixBug.Fix(organizationName), FixBug.Fix(customerName), FixBug.Fix(reportDate),
                                                                                FixBug.Fix(accountCode), FixBug.Fix(previousAgentCode), FixBug.Fix(previousAgentName),
                                                                                FixBug.Fix(newAgentCode), FixBug.Fix(newAgentName), FixBug.Fix(newAgentICNo), FixBug.Fix(dateReply),
                                                                                out reference, out errorMessage);
                if (isSucceed)
                {
                    return(XmlResultHelper.NewResult(reference));
                }
                else
                {
                    return(XmlResultHelper.NewResult(errorMessage));
                }
            }
            catch (System.Exception exception)
            {
                AppDebug.LogEvent("TradingConsole.Agent:", exception.ToString(), System.Diagnostics.EventLogEntryType.Error);
                return(XmlResultHelper.NewErrorResult());
            }
        }
Esempio n. 2
0
        public static XElement  FundTransfer(Session session, string email, string receive, string organizationName, string customerName, string reportDate, string currency, string currencyValue, string accountCode, string bankAccount, string beneficiaryName, string replyDate)
        {
            try
            {
                Token token = SessionManager.Default.GetToken(session);

                bool isSucceed = Application.Default.TradingConsoleServer.FundTransfer(token, Application.Default.StateServer, FixBug.Fix(email),
                                                                                       FixBug.Fix(receive), FixBug.Fix(organizationName), FixBug.Fix(customerName),
                                                                                       FixBug.Fix(reportDate), FixBug.Fix(currency), FixBug.Fix(currencyValue),
                                                                                       FixBug.Fix(accountCode), FixBug.Fix(bankAccount), FixBug.Fix(beneficiaryName),
                                                                                       FixBug.Fix(replyDate));
                return(XmlResultHelper.NewResult(isSucceed.ToPlainBitString()));
            }
            catch (System.Exception exception)
            {
                AppDebug.LogEvent("TradingConsole.FundTransfer:", exception.ToString(), System.Diagnostics.EventLogEntryType.Error);
                return(XmlResultHelper.NewErrorResult());
            }
        }
Esempio n. 3
0
        public static XElement  CallMarginExtension(Session session, string email, string receive, string organizationName, string customerName, string reportDate, string accountCode, string currency,
                                                    string currencyValue, string dueDate)
        {
            try
            {
                String reference = "";
                Token  token     = SessionManager.Default.GetToken(session);

                bool isSucceed = Application.Default.TradingConsoleServer.CallMarginExtension(token, Application.Default.StateServer, FixBug.Fix(email), FixBug.Fix(receive),
                                                                                              FixBug.Fix(organizationName), FixBug.Fix(customerName), FixBug.Fix(reportDate),
                                                                                              FixBug.Fix(accountCode), FixBug.Fix(currency), FixBug.Fix(currencyValue),
                                                                                              FixBug.Fix(dueDate), out reference);
                reference = isSucceed ? reference : string.Empty;
                return(XmlResultHelper.NewResult(reference));
            }
            catch (System.Exception exception)
            {
                AppDebug.LogEvent("TradingConsole.CallMarginExtension:", exception.ToString(), System.Diagnostics.EventLogEntryType.Error);
                return(XmlResultHelper.NewErrorResult());
            }
        }
Esempio n. 4
0
        public static XElement  PaymentInstructionCash(Session session, string email, string organizationName, string customerName, string reportDate,
                                                       string accountCode, string currency, string amount, string beneficiaryName, string beneficiaryAddress)
        {
            try
            {
                string reference = "";
                Token  token     = SessionManager.Default.GetToken(session);

                bool isSucceed = Application.Default.TradingConsoleServer.PaymentInstruction(token, "PICash", Application.Default.StateServer, FixBug.Fix(email),
                                                                                             null, FixBug.Fix(organizationName), FixBug.Fix(customerName), FixBug.Fix(reportDate),
                                                                                             FixBug.Fix(accountCode), FixBug.Fix(currency), FixBug.Fix(amount), FixBug.Fix(beneficiaryName),
                                                                                             null, null, null, null, null, null, FixBug.Fix(beneficiaryAddress), null, out reference);
                reference = isSucceed ? reference : "";
                return(XmlResultHelper.NewResult(reference));
            }
            catch (System.Exception exception)
            {
                AppDebug.LogEvent("TradingConsole.PaymentInstruction:", exception.ToString(), System.Diagnostics.EventLogEntryType.Error);
                return(XmlResultHelper.NewErrorResult());
            }
        }
Esempio n. 5
0
        public static XElement  AdditionalClient(Session session, string email, string receive, string organizationName, string customerName, string reportDate, string accountCode,
                                                 string correspondingAddress, string registratedEmailAddress, string tel, string mobile, string fax, string fillName1, string ICNo1,
                                                 string fillName2, string ICNo2, string fillName3, string ICNo3)
        {
            try
            {
                String reference;
                Token  token = SessionManager.Default.GetToken(session);

                bool isSucceed = Application.Default.TradingConsoleServer.AdditionalClient(token, Application.Default.StateServer, FixBug.Fix(email), FixBug.Fix(receive),
                                                                                           FixBug.Fix(organizationName), FixBug.Fix(customerName),
                                                                                           FixBug.Fix(reportDate), FixBug.Fix(accountCode),
                                                                                           FixBug.Fix(correspondingAddress), FixBug.Fix(registratedEmailAddress),
                                                                                           FixBug.Fix(tel), FixBug.Fix(mobile), FixBug.Fix(fax),
                                                                                           FixBug.Fix(fillName1), FixBug.Fix(ICNo1),
                                                                                           FixBug.Fix(fillName2), FixBug.Fix(ICNo2),
                                                                                           FixBug.Fix(fillName3), FixBug.Fix(ICNo3), out reference);
                reference = isSucceed ? reference : string.Empty;
                return(XmlResultHelper.NewResult(reference));
            }
            catch (System.Exception exception)
            {
                AppDebug.LogEvent("TradingConsole.AdditionalClient:", exception.ToString(), System.Diagnostics.EventLogEntryType.Error);
                return(XmlResultHelper.NewErrorResult());
            }
        }