Exemple #1
0
        public void updateControls(string model, string process, string inspect, string user, string ip)
        {
            txtModel.Text   = model;
            txtProcess.Text = process;
            txtInspect.Text = inspect;
            txtUser.Text    = user;
            _ip             = ip;
            string sql_line = "select line from tbl_model_line where model = '" + txtModel.Text + "' order by line";
            TfSQL  ln       = new TfSQL();

            ln.getComboBoxData(sql_line, ref cmbLine);
            //cmbLine.SelectedIndex = 0;
        }
Exemple #2
0
        // サブプロシージャ:型式コンボボックスへ候補を取り込む
        public void getComboListFromDB(ref ComboBox cmb)
        {
            string sql_model = "select model from tbl_model_dbplace order by model";

            System.Diagnostics.Debug.Print(sql_model);
            TfSQL tf = new TfSQL();

            tf.getComboBoxData(sql_model, ref cmb);

            if (cmbModel.Items.Count > 0)
            {
                cmbModel.SelectedIndex = 0;
            }
        }
Exemple #3
0
        // ロード時の処理(コンボボックスに、オートコンプリート機能の追加)
        private void Form5_Load(object sender, EventArgs e)
        {
            if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
            {
                Version deploy = System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion;

                StringBuilder version = new StringBuilder();
                version.Append("VERSION: ");
                //version.Append(applicationName + "_");
                version.Append(deploy.Major);
                version.Append("_");
                //version.Append(deploy.Minor);
                //version.Append("_");
                version.Append(deploy.Build);
                version.Append("_");
                version.Append(deploy.Revision);

                Version_lbl.Text = version.ToString();
            }

            txtPwd.Visible       = false;
            btnLogIn.Enabled     = false;
            grChangePass.Visible = false;
            string sql = "select DISTINCT qcuser FROM qc_user ORDER BY qcuser";
            TfSQL  tf  = new TfSQL();

            tf.getComboBoxData(sql, ref cmbUserName);
            tf.getComboBoxData(sql, ref cmbUserC);

            string      HostName = Dns.GetHostName();
            IPHostEntry ip       = Dns.GetHostByName(HostName);

            foreach (IPAddress ipadd in ip.AddressList)
            {
                lblIP.Text = lblIP.Text + ipadd.ToString();
            }
        }