예제 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text.Trim() == "" || textBox2.Text.Trim() == "")
     {
         MessageBox.Show("请填写完整!");
     }
     else
     {
         member_id = textBox1.Text.Trim();
         password  = textBox2.Text.Trim();
         if (dealmember.Login(member_id, password))
         {
             model = dealmember.GetOnemember(member_id);
             MemberHelper.Level = model.Level;
             MemberHelper.Use   = true;
             MemberHelper.Name  = member_id;
             MessageBox.Show("验证成功!");
             this.Close();
         }
         else
         {
             MessageBox.Show("验证失败!");
         }
     }
 }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string t_id     = textBox1.Text.Trim();
            string password = this.textBox2.Text.Trim();

            is_member = false;
            if (t_id == "" || password == "")
            {
                MessageBox.Show("用户名或密码不能为空!");
                textBox1.Focus();
                return;
            }
            else
            {
                BLL.Dealticketing_seller dealticketing_seller = new BLL.Dealticketing_seller();

                if (dealticketing_seller.Login(Convert.ToInt32(t_id), password)) //判断是否为管理员
                {
                    SellerHelper.Id       = textBox1.Text.Trim();                //用SellerHelper记录id与密码
                    SellerHelper.Password = textBox2.Text.Trim();
                    this.Hide();
                    main f = new main();
                    f.Show();
                }
                else
                {
                    BLL.Dealmember dealmember = new BLL.Dealmember();
                    Model.member   model      = new Model.member();

                    if (dealmember.Login(t_id, password)) //判断是否为会员
                    {
                        is_member          = true;
                        model              = dealmember.GetOnemember(t_id);
                        MemberHelper.Level = model.Level;
                        MemberHelper.Use   = true;
                        MemberHelper.Name  = t_id;
                        this.Hide();
                        film_booking film_b1 = new film_booking();
                        film_b1.Show();
                    }
                    else
                    {
                        MessageBox.Show("用户名或密码错误,请重新输入!", "错误");
                        textBox1.Text = "";
                        textBox2.Text = "";
                        textBox1.Focus();
                    }
                }
            }
        }
예제 #3
0
        private void UpdateButton_Click(object sender, EventArgs e)
        {
            string member_id;

            try
            {
                member_id = (String)dataGridView1.CurrentRow.Cells[0].Value;
            }
            catch (System.Exception ex)
            {
                MessageBox.Show("请选择有效数据行!");
                return;
            }

            Model.member model = new Model.member();
            model = dealmember.GetOnemember(member_id);
            if (model.Level == "白金会员")
            {
                MessageBox.Show("已经是白金会员!");
            }
            else if (model.Level == "黄金会员")
            {
                if (MessageBox.Show(" 要升级为白金会员吗?", "询问", MessageBoxButtons.YesNo,
                                    MessageBoxIcon.Warning) != DialogResult.Yes)
                {
                    return;
                }

                model.Level = "白金会员";
                if (dealmember.Updatemember_passwd(model))
                {
                    MessageBox.Show("升级成功!");
                    Fill();
                }
            }
        }