Exemple #1
0
        private void RCPViewData_Load(object sender, EventArgs e)
        {
            try
            {
                log         = new XLog();
                log.DirName = config.logpath;
                clWork      = new CRcpData(config);

                param = new STVPRCPData();

                param.dtbegin = new DateTime(2020, 07, 11, 1, 0, 0, 0);
                param.dtend   = DateTime.Now;
                OnPermit("MAINRCP");
            }
            catch (Exception ex) { MessageBox.Show(ex.TargetSite + " " + ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error); }
        }
Exemple #2
0
        private void Execute()
        {
            string msg;
            int    retcode;

            try
            {
                if (oClass is CValidData)
                {
                    CValidData g_clBook = (CValidData)oClass;
                    //      List<STValidData> g_listResult;

                    //  oData =  g_clBook.GetData((STValidDataParam)oParam);
                    DataTable table;
                    g_clBook.GetTable((STValidDataParam)oParam, out table, out msg);

                    oData = table;
                    bOper = true;
                    timer1.Stop();
                    bClose       = false;
                    DialogResult = DialogResult.OK;
                }

                if (oClass is CBelWebData)
                {
                    DataTable   table;
                    CBelWebData g_clBook = (CBelWebData)oClass;
                    //      List<STValidData> g_listResult;

                    retcode = g_clBook.GetTable((STVPBelWebData)oParam, out table, out msg);

                    if (retcode == 0)
                    {
                        oData = table;
                    }
                    else
                    {
                        MessageBox.Show(msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }

                    bOper = true;
                    timer1.Stop();
                    bClose       = false;
                    DialogResult = DialogResult.OK;
                }

                if (oClass is CAssistData)
                {
                    DataTable   table;
                    CAssistData g_clBook = (CAssistData)oClass;
                    //      List<STValidData> g_listResult;

                    retcode = g_clBook.GetTable((STVPAssistData)oParam, out table, out msg);

                    if (retcode == 0)
                    {
                        oData = table;
                    }
                    else
                    {
                        MessageBox.Show(msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }

                    bOper = true;
                    timer1.Stop();
                    bClose       = false;
                    DialogResult = DialogResult.OK;
                }

                if (oClass is CRcpData)
                {
                    DataTable table;
                    CRcpData  g_clBook = (CRcpData)oClass;
                    //      List<STValidData> g_listResult;

                    retcode = g_clBook.GetTable((STVPRCPData)oParam, out table, out msg);

                    if (retcode == 0)
                    {
                        oData = table;
                    }
                    else
                    {
                        MessageBox.Show(msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }

                    bOper = true;
                    timer1.Stop();
                    bClose       = false;
                    DialogResult = DialogResult.OK;
                }



                timer1.Stop();
                bClose       = false;
                DialogResult = DialogResult.OK;
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); timer1.Stop(); }
        }