Example #1
0
 public Form1()
 {
     InitializeComponent();
     FSTI = new FS4Amalgamma.AmalgammaFSTI(textConfig.Text, FS_User.Text, FS_Pass.Text);
     FSTI.AmalgammaFSTI_Initialization();
     FSTI.AmalgammaFSTI_Logon();
     timer1.Enabled = true;
 }
Example #2
0
        private string process()
        {
            string response = "";

            try
            {
                if (FSTI.AmalgammaFSTI_Initialization())
                {
                    if (FSTI.AmalgammaFSTI_Logon())
                    {
                        for (int i = 0; i < table.Rows.Count; i++)
                        {
                            proceed_Fields(i);
                        }
                    }
                    else
                    {
                        //MessageBox.Show(FSTI.ErrorMsg, "Error During Login");
                        ProcessingLog("FSTI-Error During Login - " + FSTI.FSTI_ErrorMsg, "error");
                        response        = "FSTI-Error During Login - " + FSTI.FSTI_ErrorMsg;
                        FSTI_Error_Flag = true;
                    }
                }
                else
                {
                    //MessageBox.Show(FSTI.ErrorMsg, "Error During FSTI Inicialitation");
                    ProcessingLog("FSTI-Error During FSTI Inicialitation - " + FSTI.FSTI_ErrorMsg, "error");
                    response        = "FSTI-Error During FSTI Inicialitation - " + FSTI.FSTI_ErrorMsg;
                    FSTI_Error_Flag = true;
                }
            }
            catch (Exception ex)
            {
                ProcessingLog("FSTI-Error During FSTI Inicialitation - " + FSTI.FSTI_ErrorMsg, "error");
                response        = "FSTI-Error During FSTI Inicialitation - " + FSTI.FSTI_ErrorMsg;
                FSTI_Error_Flag = true;
            }


            return(response);
        }
Example #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            string transaction = TransactionName.Text;

            try
            {
                if (FSTI.AmalgammaFSTI_Initialization())
                {
                    if (FSTI.AmalgammaFSTI_Logon())
                    {
                        switch (transaction)
                        {
                        // POMT11
                        case "POMT12":
                        {
                            if (FSTI.AmalgammaFSTI_POMT10(Fields.Text, "JadeInterface"))
                            {
                            }
                            else
                            {
                                string[] error = FSTI.DetailError.ToArray();
                                LogListBox.Items.AddRange(error);
                            }
                            break;
                        }
                            //POMT16
                            //PORV00
                            //PORV01
                            //MORV00
                            //ITMB03
                            //IMTR01
                        }
                    }
                }
            }
            catch
            { }
        }
Example #4
0
        private void ProcessTransaction()
        {
            string fields = "";
            string user   = "";

            if (FSTI.AmalgammaFSTI_Initialization())
            {
                if (FSTI.AmalgammaFSTI_Logon())
                {
                    #region Processing
                    for (int i = 0; i < dataGridView1.Rows.Count; i++)
                    {
                        switch (dataGridView1.Rows[0].Cells[1].Value.ToString())
                        {
                        case "MORV":
                        {
                            #region DoMorv
                            fields = dataGridView1.Rows[i].Cells[2].Value.ToString();
                            user   = dataGridView1.Rows[i].Cells[3].Value.ToString();
                            if (FSTI.AmalgammaFSTI_MORV00(fields, user))
                            {
                                listBox1.Items.Add("");
                                listBox1.Items.Add(">>" + DateTime.Now.ToString("MM/dd/yy hh:mm") + " Transaction precessed correctly - " + FSTI.CDFResponse.ToString());
                                string query = "UPDATE Amal_FSTI_Transactions " +
                                               " SET TransactionProcessedYN = 1 " +
                                               "    ,FSResponse = '" + FSTI.CDFResponse.ToString() + "'" +
                                               "    ,FSError = 0" +
                                               "    ,DateStampOut = GetDate()" +
                                               " WHERE (FSTI_Transaction_key=" + dataGridView1.Rows[i].Cells[0].Value.ToString() + ")";
                                DBMNG.Execute_Command(query);
                            }
                            else
                            {
                                listBox1.Items.Add("");
                                listBox1.Items.Add(">>" + DateTime.Now.ToString("MM/dd/yy hh:mm") + " Transaction Failed - Error:" + FSTI.Trans_Error_Msg + " Fields: " + fields);
                                listBox1.Items.AddRange(FSTI.DetailError.ToArray());
                                string error = FSTI.Trans_Error_Msg.Replace('\'', '"');
                                string query = "UPDATE Amal_FSTI_Transactions " +
                                               " SET TransactionProcessedYN = 1 " +
                                               "    ,FSResponse = '" + error + "'" +
                                               "    ,FSError = 1" +
                                               "    ,DateStampOut = GetDate()" +
                                               " WHERE (FSTI_Transaction_key=" + dataGridView1.Rows[i].Cells[0].Value.ToString() + ")";
                                DBMNG.Execute_Command(query);
                            }
                            #endregion
                            break;
                        }

                        default:
                        {
                            break;
                        }
                        }
                    }
                    #endregion
                    FSTI.AmalgammaFSTI_Stop();
                }
                else
                {
                    listBox1.Items.Add("");
                    listBox1.Items.Add(">>" + DateTime.Now.ToString("MM/dd/yy hh:mm") + " Error during Logon - " + FSTI.FSTI_ErrorMsg);
                    FSTI.AmalgammaFSTI_Stop();
                }
            }
            else
            {
                listBox1.Items.Add("");
                listBox1.Items.Add(">>" + DateTime.Now.ToString("MM/dd/yy hh:mm") + " Error during Initialization - " + FSTI.FSTI_ErrorMsg);
                FSTI.AmalgammaFSTI_Stop();
            }
            //FSTI.AmalgammaFSTI_Stop();
        }