Ejemplo n.º 1
0
 public EnrollWindow(UserWindow _useW)
 {
     InitializeComponent();
     useW = _useW;
     sex.Add("男");
     sex.Add("女");
     Sex.ItemsSource = sex;
 }
Ejemplo n.º 2
0
        private void Login_Click(object sender, RoutedEventArgs e)
        {
            string pass;

            if (this.username.Text == "" || this.passward.Password == "")
            {
                MessageBox.Show("用户名或者密码不能为空!", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
            }
            else
            {
                pass = this.passward.Password;

                //sql = "select count(*) from Account where username = "******" , password="******"SELECT Permission FROM Account WHERE username='******' AND password= '******'";
                ds  = con.Getds(sql);
                if (ds.Tables[0].Rows.Count == 0)
                {
                    MessageBox.Show("用户名或者密码错误!", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
                }
                else
                {
                    state = int.Parse(ds.Tables[0].Rows[0][0].ToString());
                }


                if (state == 0)
                {
                    Management.Management_Window manW = new Management.Management_Window();
                    manW.Show();
                    this.Close();
                }
                else if (state == 1)
                {
                    Register.UserWindow userW = new Register.UserWindow();
                    userW.Show();
                    this.Close();
                }
                else if (state == 2)
                {
                    Dotctor.WelcomWindow doctorW = new Dotctor.WelcomWindow(this.username.Text);
                    doctorW.Show();
                    this.Close();
                }
                else if (state == 3)
                {
                    Pharmacy.PharmacyWindow pharmacyW = new Pharmacy.PharmacyWindow();
                    pharmacyW.Show();
                    this.Close();
                }
            }
        }
 public PatientWindow(string no, UserWindow _UsW)
 {
     InitializeComponent();
     pno = no;
     UsW = _UsW;
 }