Beispiel #1
0
        private void FileTransferProtocolShoukai_Load(object sender, EventArgs e)
        {
            InProgramID = "FileTransferProtocolShoukai";
            StartProgram();

            SetFunctionLabel(EProMode.SHOW);
            ftpsbl = new FileTransferProtocol_BL();

            SetEnableVisible();

            ExecSec();
        }
Beispiel #2
0
        protected override void ExecSec()
        {
            try
            {
                ftpsbl = new FileTransferProtocol_BL();

                //【取込履歴】for FTP type 1
                DataTable dt_Num1 = new DataTable();
                mmpe = new M_MultiPorpose_Entity
                {
                    ID  = "323",
                    Key = "1"
                };

                dt_Num1 = ftpsbl.M_MultiPorpose_SelectID(mmpe);
                if (dt_Num1.Rows.Count > 0)
                {
                    //[999日間の履歴を保持しています]
                    lblRireki1.Text = dt_Num1.Rows[0]["Num3"].ToString() + "日間の履歴を保持しています";

                    mFTPMode1 = dt_Num1.Rows[0]["Num1"].ToString();

                    if (mFTPMode1 == "1")
                    {
                        //汎用マスター.	数字型1=1なら、「処理実行中」として青色
                        lblFTPMode1.Text      = "処理実行中";
                        lblFTPMode1.BackColor = Color.DeepSkyBlue;
                    }
                    else
                    {
                        //汎用マスター.	数字型1=0なら、「処理停止中」として黄色
                        lblFTPMode1.Text      = "処理停止中";
                        lblFTPMode1.BackColor = Color.Yellow;
                    }
                }
                else
                {
                    //E101
                    ftpsbl.ShowMessage("E101");
                    EndSec();
                }

                //【取込履歴】for FTP type 2
                DataTable dt_Num2 = new DataTable();
                mmpe = new M_MultiPorpose_Entity
                {
                    ID  = "324",
                    Key = "1"
                };

                dt_Num2 = ftpsbl.M_MultiPorpose_SelectID(mmpe);
                if (dt_Num2.Rows.Count > 0)
                {
                    //[999日間の履歴を保持しています]
                    lblRireki2.Text = dt_Num2.Rows[0]["Num3"].ToString() + "日間の履歴を保持しています";

                    mFTPMode2 = dt_Num2.Rows[0]["Num1"].ToString();

                    if (mFTPMode2 == "1")
                    {
                        //汎用マスター.	数字型1=1なら、「処理実行中」として青色
                        lblFTPMode2.Text      = "処理実行中";
                        lblFTPMode2.BackColor = Color.DeepSkyBlue;
                    }
                    else
                    {
                        //汎用マスター.	数字型1=0なら、「処理停止中」として黄色
                        lblFTPMode2.Text      = "処理停止中";
                        lblFTPMode2.BackColor = Color.Yellow;
                    }
                }
                else
                {
                    //E101
                    ftpsbl.ShowMessage("E101");
                    EndSec();
                }

                //履歴データ取得処理 for FTP type 1
                DataTable dt = ftpsbl.D_FTP_SelectAll("1");

                gdvFTPType1.DataSource = dt;

                if (dt.Rows.Count > 0)
                {
                    gdvFTPType1.SelectionMode       = DataGridViewSelectionMode.RowHeaderSelect;
                    gdvFTPType1.CurrentRow.Selected = true;
                    gdvFTPType1.Enabled             = true;

                    gdvFTPType1.ReadOnly = false;
                }
                //else
                //{
                //    ftpsbl.ShowMessage("E128");
                //}

                //履歴データ取得処理 for FTP type 2
                DataTable dt1 = ftpsbl.D_FTP_SelectAll("2");

                gdvFTPType2.DataSource = dt1;

                if (dt1.Rows.Count > 0)
                {
                    gdvFTPType2.SelectionMode       = DataGridViewSelectionMode.RowHeaderSelect;
                    gdvFTPType2.CurrentRow.Selected = true;
                    gdvFTPType2.Enabled             = true;

                    gdvFTPType2.ReadOnly = false;
                }
                //else
                //{
                //    ftpsbl.ShowMessage("E128");
                //}
            }
            catch (Exception ex)
            {
                //エラー時共通処理
                MessageBox.Show(ex.Message);
                //EndSec();
            }
        }