Exemplo n.º 1
1
 private void  button1_Click(object sender, EventArgs e)
 {
     
     bool check;
     Control.Control control= new Control.Control();
     Entity.Entity entity = new Entity.Entity();
     entity.setUsername(this.textBox1.Text);
     entity.setPassword(this.textBox2.Text);
     check = control.checkUsers(entity.getUsername(), entity.getPassword());
     dt = control.getCustomer(entity.getUsername());
     if (check)
     {
         check1 = true;
         mainForm main = new mainForm();
         main.ShowDialog();
         this.textBox1.Text = "";
         this.textBox2.Text = "";
     }
     else {
         this.textBox1.Text = "";
         this.textBox2.Text = "";
         MessageBox.Show("密码错误或用户名不存在");
     }
     
 }
 public void Inform(Control.AgentService.AgentPosition pos)
 {
     if (this.ClientCallback != null)
     {
         this.ClientCallback(this, pos);
     }
 }