Beispiel #1
0
        private void Valid_Load(object sender, EventArgs e)
        {
            try
            {
                clWork = new CValidData(config);

                this.WindowState = FormWindowState.Maximized;

                DateTime dt      = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1, 23, 59, 59, 0);
                DateTime dtend   = dt.AddDays(-1);
                DateTime dtbegin = new DateTime(dtend.Year, dtend.Month, 1, 0, 0, 0, 0);

                dateTimePickerDB.Value = dtbegin;
                dateTimePickerDE.Value = dtend;

                radioButton1.Checked = true;

                s_index = -1;
                dataGridViewValid.AllowUserToAddRows = false;

                iRow = 0;

                init_combo();
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }
        }
Beispiel #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(); }
        }