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()); } }
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); }
private string getStt() { string cmd = "select stt_name from public.m_plan_status where stt_id ='" + numStt.Value + "'"; return(sql.sqlExecuteScalarString(cmd)); }