Пример #1
0
        private bool UserLogin(string userid)
        {
            this.CloseAllDialog();
            this.InitTimer();

            UploadInfo ui = new UploadInfo();
            Member m = ui.MemberAuth(userid);
            MyMsgBox mb = new MyMsgBox();

            if (m == null)
            {
                mb.ShowMsg("核对用户信息失败!", 1);
            }
            else
            {
                if (m.StrMobileNo.Length == 0)
                {
                    Login login = new Login(userid, this);
                    login.TopMost = true;
                    //         this.Controls.Add(login);
                    if (DialogResult.Yes == login.ShowDialog(this))
                    {
                        GlobalVariables.isUserLogin = true;
                        GlobalVariables.LoginUserId = userid;
                        GlobalVariables.M = m;
                        return true;
                    }
                    else
                    {
                        mb.ShowMsg("登录失败!\n请先绑定手机!", 1);
                    }
                }
                else
                {
                    GlobalVariables.isUserLogin = true;
                    GlobalVariables.LoginUserId = userid;
                    GlobalVariables.M = m;
                    return true;
                }
            }
            return false;
        }
Пример #2
0
 private void button4_Click(object sender, EventArgs e)
 {
     UploadInfo ui = new UploadInfo();
     ui.form1 = this;
     Member m = ui.MemberAuth(textBox2.Text);
     if (m == null)
     {
         textBox1.Text = "无效用户";
     }
     else
     {
         StringBuilder sb = new StringBuilder();
         sb.Append("卡号:").Append(m.StrCardNo).Append("\n");
         sb.Append("收藏:");
         for (int i = 0; i < m.AryFavourite.Length; i++)
         {
             sb.Append(m.AryFavourite[i]).Append(" ");
         }
         sb.Append("\n");
         sb.Append("历史:");
         for (int i = 0; i < m.AryHistory.Length; i++)
         {
             sb.Append(m.AryHistory[i]).Append(" ");
         }
         textBox1.Text = sb.ToString();
         if (m.StrMobileNo.Length == 0)
         {
             MessageBox.Show("未注册用户,请在下面文本框中输入手机号码进行注册!");
         }
         else
         {
             MessageBox.Show("已注册用户!");
         }
     }
 }
Пример #3
0
 private bool UserLogin(string userid)
 {
     UploadInfo ui = new UploadInfo();
     Member m = ui.MemberAuth(userid);
     MyMsgBox mb = new MyMsgBox();
     if (m == null)
     {
         mb.ShowMsg("无效的用户!", 2);
         return false;
     }
     else
     {
         if (m.StrMobileNo.Length == 0)
         {
             Login login = new Login(userid, null);
             login.Location = new Point(30, 50);
             login.TopMost = true;
             this.Visible = false;
             //         this.Controls.Add(login);
             if (DialogResult.Yes == login.ShowDialog(par))
             {
                 GlobalVariables.isUserLogin = true;
                 GlobalVariables.LoginUserId = userid;
                 GlobalVariables.M = m;
                 this.DialogResult = DialogResult.Yes;
                 return true;
             }
             else
             {
                 mb.ShowMsg("登录失败!\n请先绑定手机!", 2);
                 this.Visible = true;
                 return false;
             }
         }
         else
         {
             GlobalVariables.isUserLogin = true;
             GlobalVariables.LoginUserId = userid;
             GlobalVariables.M = m;
             this.DialogResult = DialogResult.Yes;
             return true;
         }
     }
 }