Beispiel #1
0
        private void update(string str)
        {
            TfSQL  tf   = new TfSQL();
            string appr = "update t_batch_no set approve_by = '" + txtLeaderName.Text + "' where batch_no = '" + str + "'";

            tf.sqlExecuteScalarString(appr);
        }
Beispiel #2
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            TfSQL tf = new TfSQL();

            // string mess = string.Empty;
            if (string.IsNullOrEmpty(txtNewPass.Text) || string.IsNullOrEmpty(txtConfirmPass.Text))
            {
                MessageBox.Show("Please fill password and confirm password!!", "Notice", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                if (txtConfirmPass.Text != txtNewPass.Text)
                {
                    MessageBox.Show("Confirm password does not match!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    txtConfirmPass.Clear();
                    txtNewPass.Clear();
                }
                else
                {
                    tf.sqlExecuteScalarString("update iqc_user set user_pass = '******' where user_name = '" + lbCode.Text + "' and  full_name = '" + lbUsername.Text + "'");
                    DialogResult result = MessageBox.Show("Your password has been changed!", "Notice", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    if (result == DialogResult.OK)
                    {
                        this.Close();
                    }
                }
            }
        }
Beispiel #3
0
        // ユーザーIDコンボボックス選択時、ユーザー名を表示し、パスワードテキストボックス・ログインボタンを有効にする
        private void cmbUserId_SelectedIndexChanged(object sender, EventArgs e)
        {
            TfSQL  tf  = new TfSQL();
            string sql = "select user_name from t_user where user_id = '" + cmbUserId.Text + "'";

            txtUserName.Text = tf.sqlExecuteScalarString(sql);

            txtPassword.Enabled = true;
        }
Beispiel #4
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     pass = sql.sqlExecuteScalarString("select password from user_tbl where userid ='" + id +
                                       "' and password='******'");
     if (!string.IsNullOrEmpty(pass))
     {
         txtPassword.Text = string.Empty;
         name             = sql.sqlExecuteScalarString("select username from user_tbl where userid='" + id + "'");
         locate           = sql.sqlExecuteScalarString("select location from user_tbl where userid='" + id + "'");
         Userdata.getUser().Username = name;
         Userdata.getUser().Location = locate;
         MainForm main = new MainForm();
         this.Hide();
         main.ShowDialog();
     }
     else
     {
         MessageBox.Show("Wrong password!!!");
     }
 }
Beispiel #5
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            if (txtPassword.Text.Length > 0)
            {
                EncryptDecrypt encrypt = new EncryptDecrypt();
                string         pass    = txtPassword.Text;
                pass = encrypt.Encrypt(pass);

                string usercd  = cmbUserCD.Text;
                string passcmd = "select password from m_login_password where user_cd ='" + usercd +
                                 "' and password ='******'";
                if (!string.IsNullOrEmpty(SQL.sqlExecuteScalarString(passcmd)))
                {
                    this.Hide();
                    txtPassword.Clear();
                    string cmd = "select user_name from m_mes_user where user_cd = '" + usercd + "'";
                    Userdata.GetData().userName = SQL.sqlExecuteScalarString(cmd);
                    cmd = "select registration_user_cd from m_login_password where user_cd = '" + usercd + "'";
                    Userdata.GetData().reg_user = SQL.sqlExecuteScalarString(cmd);
                    cmd = "select factory_cd from m_login_password where user_cd = '" + usercd + "'";
                    Userdata.GetData().factory = SQL.sqlExecuteScalarString(cmd);
                    MainMenuForm mainform      = new MainMenuForm();
                    mainform.ShowDialog();
                    this.Show();
                }
                else
                {
                    MessageBox.Show("Wrong password!!!");
                    txtPassword.Clear();
                    txtPassword.Focus();
                }
            }
            else
            {
                MessageBox.Show("Input password!!!");
                txtPassword.Focus();
            }
        }
Beispiel #6
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     if ((txtUserName.Text != "") && txtPassword.Text != "")
     {
         TfSQL  con    = new TfSQL();
         string sqladd = "insert into iqc_user (user_name, user_pass, full_name) values ( '" + txtUserName.Text + "','" + txtPassword.Text + "', '" + txtFullName.Text + "')";
         con.sqlExecuteScalarString(sqladd);
         MessageBox.Show("You have add account successfully ", "Notice", MessageBoxButtons.OK, MessageBoxIcon.Information);
         Close();
     }
     else
     {
         MessageBox.Show("Please fill user code and password ", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #7
0
        // コンボボックス項目選択時の処理(モデルNO)
        private void cmbModelNo_SelectedIndexChanged(object sender, EventArgs e)
        {
            string sql;
            TfSQL  tf = new TfSQL();

            string model = cmbModelNo.Text;

            sql = "select model_name FROM t_model_sub_assy where model_no ='" + model + "'";
            System.Diagnostics.Debug.Print(sql);
            txtModelName.Text = tf.sqlExecuteScalarString(sql);

            // コンボボックスへ候補をセットする(サブ組NO)
            sql = "select sub_assy_no FROM t_model_sub_assy where model_no ='" + model + "'";
            System.Diagnostics.Debug.Print(sql);
            tf.getComboBoxData(sql, ref cmbSubAssy);
            cmbSubAssy.Enabled = true;

            // コンボボックスへ候補をセットする(ライン)
            sql = "select line FROM t_model_line where model_no ='" + model + "'";
            System.Diagnostics.Debug.Print(sql);
            tf.getComboBoxData(sql, ref cmbLine);
            cmbLine.Enabled = true;
        }