英语翻译private void button1_Click(object sender,EventArgs e){if (textBox1.Text.Trim() == "" || textBox2.Text.Trim() == ""){MessageBox.Show("请输入用户名和密码","错误提示");}else{DB.cn.Open();OleDbCommand cmd = new OleDbCommand("",DB

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/12 05:02:32
英语翻译private void button1_Click(object sender,EventArgs e){if (textBox1.Text.Trim() ==

英语翻译private void button1_Click(object sender,EventArgs e){if (textBox1.Text.Trim() == "" || textBox2.Text.Trim() == ""){MessageBox.Show("请输入用户名和密码","错误提示");}else{DB.cn.Open();OleDbCommand cmd = new OleDbCommand("",DB
英语翻译
private void button1_Click(object sender,EventArgs e)
{
if (textBox1.Text.Trim() == "" || textBox2.Text.Trim() == "")
{
MessageBox.Show("请输入用户名和密码","错误提示");
}
else
{
DB.cn.Open();
OleDbCommand cmd = new OleDbCommand("",DB.cn);
string sql = "select RoleName from UserInfo where user='" + textBox1.Text.Trim() + "' and Password='" + textBox2.Text.Trim() + "'";
cmd.CommandText = sql;
string rolename;
if (null = cmd.ExecuteScalar())
{
rolename = cmd.ExecuteScalar().ToString();
this.Visible = false;
Main main = new Main();
main.Tag = this.FindForm();
sql = "select * from Roles where RoleName='" + rolename + "'";
cmd.CommandText = sql;
OleDbDataReader xq = cmd.ExecuteReader();
xq.Read();
main.XTMenuItem.Visible = (bool)(xq.GetValue(1));
main.CJMenuItem.Visible = (bool)(xq.GetValue(2));
main.BJMenuItem.Visible = (bool)(xq.GetValue(4));
main.KCMenuItem.Visible = (bool)(xq.GetValue(5));
main.DAMenuItem.Visible = (bool)(xq.GetValue(6));
main.StatusLabel2.Text = textBox1.Text.Trim();
main.ShowDialog();
DB.cn.Close();
}
else
{
MessageBox.Show("用户名或密码错误","登录失败");
DB.cn.Close();
}
}

英语翻译private void button1_Click(object sender,EventArgs e){if (textBox1.Text.Trim() == "" || textBox2.Text.Trim() == ""){MessageBox.Show("请输入用户名和密码","错误提示");}else{DB.cn.Open();OleDbCommand cmd = new OleDbCommand("",DB
这是一段登录的代码
private void button1_Click(object sender,EventArgs e)
{
if (textBox1.Text.Trim() == "" || textBox2.Text.Trim() == "")
{
MessageBox.Show("请输入用户名和密码","错误提示");
}
else //有帐号密码的情况下,去数据库验证
{
DB.cn.Open(); //打开数据库
OleDbCommand cmd = new OleDbCommand("",DB.cn);
string sql = "select RoleName from UserInfo where user='" + textBox1.Text.Trim() + "' and Password='" + textBox2.Text.Trim() + "'";//查询用户帐号的sql
cmd.CommandText = sql;
string rolename;
if (null != cmd.ExecuteScalar())//查询结果不为空,说明帐号登录成功
{
rolename = cmd.ExecuteScalar().ToString();//查询SQL返回了角色名
this.Visible = false;//隐藏登录窗
Main main = new Main();//初始化main窗体
main.Tag = this.FindForm();
sql = "select * from Roles where RoleName='" + rolename + "'";//拿当前角色的所有信息的sql,包括权限,下面用到
cmd.CommandText = sql;
OleDbDataReader xq = cmd.ExecuteReader();//执行sql
xq.Read();
main.XTMenuItem.Visible = (bool)(xq.GetValue(1));//用角色的配置权限,初始化菜单
main.CJMenuItem.Visible = (bool)(xq.GetValue(2));
main.BJMenuItem.Visible = (bool)(xq.GetValue(4));
main.KCMenuItem.Visible = (bool)(xq.GetValue(5));
main.DAMenuItem.Visible = (bool)(xq.GetValue(6));
main.StatusLabel2.Text = textBox1.Text.Trim();//当前用户的角色名放进label显示.
main.ShowDialog();//显示主窗口
DB.cn.Close();//关闭数据库连接
}
else//查询角色帐号密码的sql没有返回数据
{
MessageBox.Show("用户名或密码错误","登录失败");
DB.cn.Close();
}
}

public private和private区别?java中 private void walk(){}和 public private void talk(){}区别? 未处理的“System.ArgumentException”类型的异常出现在 system.windows.forms.dll 中.static void Main() {}private void Form1_Load(object sender,System.EventArgs e){}private void menuItem2_Click(object sender,System.EventArgs e){}private vo private void 和 private string 有什么区别刚学C#,看到有的函数是 private void XXX()有的函数是 private string XXX ()他们有什么区别呢,能用例子说明不同吗. private Private 英语翻译private void button1_Click(object sender,EventArgs e){if (textBox1.Text.Trim() == || textBox2.Text.Trim() == ){MessageBox.Show(请输入用户名和密码,错误提示);}else{DB.cn.Open();OleDbCommand cmd = new OleDbCommand(,DB 英语翻译The Act has also become associated with the perception of increased private provision of NHS services.In reality,the provision of NHS services by private companies long precedes this legislation,but there are concerns that the new role of private void love(){if(you love me){we.marry();}else{me.leave()}}什么意思? 英语翻译class Company //公司类{private:Person *Worker; //员工表void Clear(); //清除内存中数据public:Company(){Worker=0; Load();}Company(){Person *p;p=Worker;while(p){p=p->next;delete Worker;Worker=p;}Worker=0;}void Add(); //增加人 谁能帮忙看下这是啥意思~#include #include #include class MY{ private:char time[10]; char place[10]; public:char *heart; void feeling(char *feel); void course(char time[10],char place[10]); }; class MM{ private:int *heart; void feeling(); pu 英语翻译China Airlines 和 apply to private 英语翻译!private company constituents什么意思? 指出下面程序重点错误,在错误处说明出错原因#includeclass A{private:int a;public:void setA(int x){a=x;}void ShowA() const {cout 英语翻译Melody is still an enigma .She is obviously very clever but she hates to speak aloud in class.She is the one student that I wish I knew better ,but she is a very private person. private void button11_Click(object sender,EventArgs e){Button btn = (Button)sender;textBox1.Text = textBox1.Text + + btn.Text + ;}private void button12_Click(object sender,EventArgs e){Button btn = (Button)sender;textBox1.Text = textBox1.Text 英语翻译Private StoredValue As DoublePrivate Const opNone = 0Private Const opAdd = 1Private Const opSubtract = 2Private Const opMultiply = 3Private Const opDivide = 4Private Operator As IntegerPrivate NewEntry As Boolean' Remove the last characte C#得到一个5位随机数(位数可以重复)?private void SetID() { id=Random? }随机得到5位数id selection does not contain a main type的问题import java.util.Scanner;public class Population {private String name;private int population;private double growthRate;public void readInput(){Scanner keyboard = new Scanner(System.in);System.out.println