Example #1
0
 //登陆事件
 private async void dengluUI_Click(object sender, RoutedEventArgs e)
 {
     using (Shujuku shujuku=new Shujuku())
     {
         var yonghu = shujuku.YonghuSet.Where(y => y.zhanghao.Equals(zhanghaoUI.Text) && y.mima.Equals(mimaUI.Password)).SingleOrDefault();
         if (yonghu!=null)
         {
             App.dangqianyonghu = yonghu;
             var ls = new Zhuchuangti();
             ls.Show();
             this.Close();
         }
         else
         {
             await DialogManager.ShowMessageAsync(this, "提示", "登录信息有误!");
         }
     }
 }
Example #2
0
 //登陆事件
 private async void dengluUI_Click(object sender, RoutedEventArgs e)
 {
     using (Shujuku shujuku = new Shujuku())
     {
         var yonghu = shujuku.YonghuSet.Where(y => y.zhanghao.Equals(zhanghaoUI.Text) && y.mima.Equals(mimaUI.Password)).SingleOrDefault();
         if (yonghu != null)
         {
             App.dangqianyonghu = yonghu;
             var ls = new Zhuchuangti();
             ls.Show();
             this.Close();
         }
         else
         {
             await DialogManager.ShowMessageAsync(this, "提示", "登录信息有误!");
         }
     }
 }