Beispiel #1
0
        /// <summary>
        /// 首页的按钮点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToIndex_ButtonClick(object sender, RoutedEventArgs e)
        {
            DocManagerIndex docManagerIndex = new DocManagerIndex(userId, userName);

            docManagerIndex.Show();
            this.Close();
        }
Beispiel #2
0
 /// <summary>
 /// 登陆按钮的点击事件
 /// 验证密码并跳转界面
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void login_ButtonClick(object sender, RoutedEventArgs e)
 {
     if (String.IsNullOrEmpty(passwordText.Text) || String.IsNullOrEmpty(userIdText.Text))
     {
         MessageBox.Show("用户名或密码不能为空!");
     }
     else if (db.IsLoginSucceed(userIdText.Text, passwordText.Text, ref userId, ref userName, ref limitType))
     {
         if (limitType == 1)
         {
             MessageBox.Show("团队文档审批系统登陆成功");
             TeamIndex teamIndex = new TeamIndex(userId, userName);
             teamIndex.Show();
         }
         if (limitType == 2)
         {
             MessageBox.Show("审批人员管理系统登陆成功");
             DocManagerIndex docManagerIndex = new DocManagerIndex(userId, userName);
             docManagerIndex.Show();
         }
         this.Close();
     }
     else
     {
         MessageBox.Show("用户名或密码错误");
     }
 }