示例#1
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     try
     {
         string pass;
         string name;
         pass = sql.sqlExecuteScalarString("select pass from m_user where pic_id = '"
                                           + cmbUserID.Text + "'");
         name = sql.sqlExecuteScalarString("select user_name from m_user where pic_id = '"
                                           + cmbUserID.Text + "'");
         if (txtPass.Text == pass)
         {
             Storage sto = Storage.getStorage();
             sto.name     = name;
             sto.id       = cmbUserID.Text;
             txtPass.Text = "";
             frmJobList frmJob = new frmJobList();
             frmJob.ShowDialog();
         }
         else
         {
             MessageBox.Show("Sai password!!!");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
示例#2
0
        private void txtPIC_TextChanged(object sender, EventArgs e)
        {
            string cmd = "select user_name from public.m_user where pic_id ='" + txtPIC.Text + "'";

            lbname.Text = sql.sqlExecuteScalarString(cmd);
        }
示例#3
0
        private string getStt()
        {
            string cmd = "select stt_name from public.m_plan_status where stt_id ='" + numStt.Value + "'";

            return(sql.sqlExecuteScalarString(cmd));
        }