日期:2014-05-18  浏览次数:20993 次

检测到不能访问代码
public   partial   class   frmLogin   :   Form
        {
                //   public   static   bool   blCanLogin   =   false;
                  public   static   string   strUser   =   " ";
                  private   DataSet   ds   =   new   DataSet();
                  private   DataTable   myTable;
                  private   DataRow   myRow;
                  private   string   sendStrSQL   =   "select   *   from   LoginPwd ";//   where   Name= "+this.textBox1.Text();

                public   frmLogin()
                {
                        InitializeComponent();

                        DataBase   db   =   new   DataBase();
                        string   sendTableName   =   "LoginPwd ";
                        this.ds   =   db.SelectDataBase(sendStrSQL,sendTableName);
                        this.myTable   =   ds.Tables[0];
                        this.TopMost   =   true;
                }

                private   void   button2_Click(object   sender,   EventArgs   e)
                {
                        Application.Exit();
                }

                private   void   button1_Click(object   sender,   EventArgs   e)
                {
                        for   (int   i   =   0;   i   <   myTable.Rows.Count;   i++)       //这个提示检测到不能访问代码
                        {
                                this.myRow   =   myTable.Rows[i];
                                if   (myRow[0].ToString().Trim()   ==   this.textBox1.Text.ToString().Trim()   &&   myRow[1].ToString().Trim()   ==   this.textBox2.Text.ToString().Trim())
                                {
              &n