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

窗口问题,麻烦高手帮我看看,急....
using   System;
using   System.Collections.Generic;
using   System.ComponentModel;
using   System.Data;
using   System.Drawing;
using   System.Text;
using   System.Windows.Forms;

namespace   Lg
{
        public   partial   class   Login   :   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 ";

                public   Login()
                {
                        InitializeComponent();

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

                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())