Exemplo n.º 1
0
        private void SelectRecharge_Load(object sender, EventArgs e)
        {
            //实例化创建BLL层的工厂
            FactoryBLL factBLL = new FactoryBLL();
            //调用查询充值记录业务层接口,和创建BLL层的工厂创建具体的BLL层类
            SelectRechargeIBLL selectRecharIBLL = (SelectRechargeIBLL)factBLL.CreateUser("SelectRechargeBLL");
            //接受返回的信息
            string Strmsg = "";
            //调用查询充值记录的方法
            DataTable SelectRecharTable = selectRecharIBLL.Selectrechar(UserLevel.UserIdall.ToString(), this, ref Strmsg);

            //显示数据
            #region 显示数据到DataGridView2上
            //创建表和填充数据
            for (int i = 0; i <= SelectRecharTable.Rows.Count - 1; i++)        //获取行数
            {
                int index = this.dataGridView2.Rows.Add();                     //添加一行
                for (int j = 0; j <= SelectRecharTable.Columns.Count - 1; j++) //获取列数
                {
                    //添加数据
                    dataGridView2.Rows[index].Cells[j].Value = SelectRecharTable.Rows[i][j].ToString();
                }
            }
            #endregion
            this.Text = Strmsg;
        }
Exemplo n.º 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            //实例化创建BLL层的工厂
            FactoryBLL factBLL = new FactoryBLL();
            //调用上机记录业务接口和创建BLL层工厂,实例化BLL层类
            LineStudentIBLL LinStudentIBLL = (LineStudentIBLL)factBLL.CreateUser("LineStudentBLL");
            //获取上机记录
            string    StrMsg           = "";//接受返信息
            DataTable LineStudentTable = LinStudentIBLL.SelectLineStudent(txtcardno.Text, this, ref StrMsg);

            #region 显示数据到DataGridView上
            //防止多次点击查询按钮显示相同内容
            if (txtcardno.Text == oldCardno)
            {
                MessageBox.Show("已经没有可查询信息!");
            }
            else
            {
                //创建表和填充数据
                for (int i = 0; i <= LineStudentTable.Rows.Count - 1; i++)        //获取行数
                {
                    int index = this.dataGridView2.Rows.Add();                    //添加一行
                    for (int j = 0; j <= LineStudentTable.Columns.Count - 1; j++) //获取列数
                    {
                        //添加数据
                        dataGridView2.Rows[index].Cells[j].Value = LineStudentTable.Rows[i][j].ToString();
                    }
                }
            }//end if
            //给oldCardno赋值
            oldCardno = txtcardno.Text;
            #endregion
            //提示,改变窗体标题栏内容
            this.Text = StrMsg;
        }
Exemplo n.º 3
0
        private void OK_Click(object sender, EventArgs e)
        {
            //实例化创建BLL层的工厂
            FactoryBLL     factBll          = new FactoryBLL();
            CancelCardIBLL cancelCardnoIBLL = (CancelCardIBLL)factBll.CreateUser("CancelCardBLL");
            string         str = cancelCardnoIBLL.CancelCard(txtCardno.Text, this);

            label1.Text = str;
        }
Exemplo n.º 4
0
        private void OK_Click(object sender, EventArgs e)
        {
            //实例化创建BLL层的工厂
            FactoryBLL factBll = new FactoryBLL();
            //调用修改密码的业务员接口和创建BLL层的工厂创建BLL层修改密码类
            RestUserInfoPwdIBLL ResuUserIBLL = (RestUserInfoPwdIBLL)factBll.CreateUser("RestUserInfoPwdBLL");
            string StrMesg = ResuUserIBLL.RestUserPwd(UserLevel.UserIdall.ToString(), txtOldPwd.Text, txtNewPwd.Text, txtNewPwdOk.Text, this);//修改密码

            MessageBox.Show(StrMesg);
        }
Exemplo n.º 5
0
        private void OK_Click(object sender, EventArgs e)
        {
            //实例化创建BLL层的工厂
            FactoryBLL factBll = new FactoryBLL();
            //调用学生注册接口与创建BLL层工厂实例化BLL层注册学生类
            RegistrationCardnoIBLL RegistIBLL = (RegistrationCardnoIBLL)factBll.CreateUser("RegistrationCardnoBLL");
            //注册
            string StrRegis = RegistIBLL.RegistartonCardno(txtCardno.Text, cmbType.Text, txtPwd.Text, txtCash.Text, txtBlne.Text, cmbState.Text, txtName.Text, cmbSex.Text, txtAge.Text, txtNumber.Text, txtAddes.Text, txtGrade.Text, txtWeixin.Text, this);

            MessageBox.Show(StrRegis);
        }
Exemplo n.º 6
0
        private void OK_Click(object sender, EventArgs e)
        {
            //实例化创建BLL层的工厂
            FactoryBLL factBLL = new FactoryBLL();
            //调用重置学生密码业务层接口和创建BLL层工厂创建具体的BLL层类
            StudentPwdOpertionIBLL studentpwdIBLL = (StudentPwdOpertionIBLL)factBLL.CreateUser("StudentPwdOpertionBLL");
            //调用具体的修改方法
            string StrMsg = studentpwdIBLL.StudentPwdOpertion(txtCardno.Text, txtNewPwd.Text, txtNewPwdOk.Text, this);

            MessageBox.Show(StrMsg);//提示信息
        }
Exemplo n.º 7
0
        private void OK_Click(object sender, EventArgs e)
        {
            //实例化创建BLL层的工厂
            FactoryBLL factBll = new FactoryBLL();
            //调用充值的业务接口,和创建BLL层的工厂实例化BLL层的具体类’
            RechargeIBLL RecarIBLL = (RechargeIBLL)factBll.CreateUser("RechargeBLL");
            //调用充值的方法
            string StrRecardno = RecarIBLL.Rechargebll(txtCardno.Text, this, txtCash.Text);

            MessageBox.Show(StrRecardno);//显示返回信息
        }
Exemplo n.º 8
0
        private void button1_Click(object sender, EventArgs e)
        {
            //实例化创建BLL层的工厂
            FactoryBLL factBLL = new FactoryBLL();
            //使用工厂创建登录接口
            LoginIBLL LoginIbll = (LoginIBLL)factBLL.CreateUser("LoginBLL");
            //登录
            string strMsg = LoginIbll.loginFacade(txtUserName.Text, txtUserPwd.Text, this);

            MessageBox.Show(strMsg);
        }
Exemplo n.º 9
0
        private void OK_Click(object sender, EventArgs e)
        {
            //实例化创建BLL层的工厂
            FactoryBLL factBll = new FactoryBLL();
            //调用查询余额的业务接口和实例化BLL层的工厂,实例化BLL层具体的类
            QueryCashIBLL querIBLL = (QueryCashIBLL)factBll.CreateUser("QueryCashBLL");
            //调用查询余额方法,获取当前用户余额
            string strMsg = querIBLL.SelectCash(txtCardno.Text, this);

            txtCash.Text = strMsg;//显示余额
        }
Exemplo n.º 10
0
        private void QueryCash_Load(object sender, EventArgs e)
        {
            //实例化创建BLL层的工厂
            FactoryBLL factBll = new FactoryBLL();
            //调用查询余额的业务接口和实例化BLL层的工厂,实例化BLL层具体的类
            QueryCashIBLL querIBLL = (QueryCashIBLL)factBll.CreateUser("QueryCashBLL");

            txtCardno.Text = UserLevel.UserIdall.ToString();//给卡号赋值,把当前用户的全局变量赋值给卡号。
            //调用查询余额方法,获取当前用户余额
            string strMsg = querIBLL.SelectCash(txtCardno.Text, this);

            txtCash.Text = strMsg;//显示余额
        }
Exemplo n.º 11
0
        private void ManIDcardno_Load(object sender, EventArgs e)
        {
            //实例化创建BLL层的工厂
            FactoryBLL factBLL = new FactoryBLL();
            //调用查询管理者信息,业务层接口
            ManIDcardnoIBLL manibll = (ManIDcardnoIBLL)factBLL.CreateUser("ManIDcardnoBLL");
            //调用方法
            DataTable manidIfnoTable = manibll.SelectManIDInfo(UserLevel.UserIdall.ToString());

            //显示
            txtCardno.Text = manidIfnoTable.Rows[0][0].ToString();
            txtNumber.Text = manidIfnoTable.Rows[0][1].ToString();
            txtAge.Text    = manidIfnoTable.Rows[0][3].ToString();
            cmbSex.Text    = manidIfnoTable.Rows[0][2].ToString();
        }
Exemplo n.º 12
0
        private void StudentInfo_Load(object sender, EventArgs e)
        {
            //实例化创建BLL层的工厂
            FactoryBLL factBLL = new FactoryBLL();
            //调用查询学生信息业务层接口,和创建BLL层工厂创建具体的BLL层类
            StudentInfoIBLL studentIBLL = (StudentInfoIBLL)factBLL.CreateUser("StudentInfoBLL");
            //调用查询学生信息方法
            DataTable StudentTable = studentIBLL.StudentInfo(UserLevel.UserIdall);

            txtCardno.Text = StudentTable.Rows[0][0].ToString(); //显示卡号
            txtName.Text   = StudentTable.Rows[0][1].ToString(); //姓名
            cmbSex.Text    = StudentTable.Rows[0][2].ToString(); //性别
            txtAge.Text    = StudentTable.Rows[0][3].ToString(); //年龄
            txtGrade.Text  = StudentTable.Rows[0][7].ToString(); //年级
            txtAddes.Text  = StudentTable.Rows[0][6].ToString(); //地址
            txtNumber.Text = StudentTable.Rows[0][4].ToString(); //手机号
            txtWeixin.Text = StudentTable.Rows[0][5].ToString(); //微信号
        }
Exemplo n.º 13
0
        private void button3_Click(object sender, EventArgs e)
        {
            //实例化创建BLL层的工厂
            FactoryBLL       factBLL   = new FactoryBLL();
            RechargeCashIBLL retuIBLL  = (RechargeCashIBLL)factBLL.CreateUser("RechargeCashBLL");
            string           Strmsg    = "";                                                                  //接受返回信息
            DataTable        retuTable = retuIBLL.SelectCardnoCash(dataStart.Text, dataEnd.Text, ref Strmsg); //接受返回的信息

            #region 显示数据到DataGridView2上
            //创建表和填充数据
            for (int i = 0; i <= retuTable.Rows.Count - 1; i++)        //获取行数
            {
                int index = this.dataGridView2.Rows.Add();             //添加一行
                for (int j = 0; j <= retuTable.Columns.Count - 1; j++) //获取列数
                {
                    //添加数据
                    dataGridView2.Rows[index].Cells[j].Value = retuTable.Rows[i][j].ToString();
                }
            }
            #endregion
            this.Text = Strmsg;//改变窗体标题栏
        }
Exemplo n.º 14
0
        private void LineStudent_Load_1(object sender, EventArgs e)
        {
            //实例化创建BLL层的工厂
            FactoryBLL factBLL = new FactoryBLL();
            //调用上机记录业务接口和创建BLL层工厂,实例化BLL层类
            LineStudentIBLL LinStudentIBLL = (LineStudentIBLL)factBLL.CreateUser("LineStudentBLL");
            //获取上机记录
            string    StrMsg           = "";//接受返信息
            DataTable LineStudentTable = LinStudentIBLL.SelectLineStudent(UserLevel.UserIdall.ToString(), this, ref StrMsg);

            #region 显示数据到DataGridView上
            #region 创建表
            //创建表
            //for (int i = 0; i <= LineStudentTable.Rows.Count - 1; i++)// 增加行数
            //{
            //    int index = this.dataGridView1.Rows.Add();
            //    for (int j = 0; j <= LineStudentTable.Columns.Count - 1; j++)// 增加列数
            //    {
            //        dataGridView1.Rows[index].Cells[j].Value = "";
            //    }

            //}
            #endregion
            //创建表和填充数据
            for (int i = 0; i <= LineStudentTable.Rows.Count - 1; i++)        //获取行数
            {
                int index = this.dataGridView2.Rows.Add();                    //添加一行
                for (int j = 0; j <= LineStudentTable.Columns.Count - 1; j++) //获取列数
                {
                    //添加数据
                    dataGridView2.Rows[index].Cells[j].Value = LineStudentTable.Rows[i][j].ToString();
                }
            }
            #endregion
            //提示,改变窗体标题栏内容
            this.Text = StrMsg;
        }
        string oldCardno = "";//储存上次输入的卡号
        private void button3_Click(object sender, EventArgs e)
        {
            //实例化创建BLL层的工厂
            FactoryBLL factBLL = new FactoryBLL();
            //调用查询充值记录业务层接口,和创建BLL层的工厂创建具体的BLL层类
            SelectRechargeIBLL selectRecharIBLL = (SelectRechargeIBLL)factBLL.CreateUser("SelectRechargeBLL");
            //接受返回的信息
            string Strmsg = "";
            //调用查询充值记录的方法
            DataTable SelectRecharTable = selectRecharIBLL.Selectrechar(txtCardno.Text, this, ref Strmsg);

            //显示数据
            #region 显示数据到DataGridView上
            //防止多次点击查询按钮显示相同内容
            if (txtCardno.Text == oldCardno)
            {
                MessageBox.Show("已经没有可查询信息!");
            }
            else
            {
                //创建表和填充数据
                for (int i = 0; i <= SelectRecharTable.Rows.Count - 1; i++)        //获取行数
                {
                    int index = this.dataGridView2.Rows.Add();                     //添加一行
                    for (int j = 0; j <= SelectRecharTable.Columns.Count - 1; j++) //获取列数
                    {
                        //添加数据
                        dataGridView2.Rows[index].Cells[j].Value = SelectRecharTable.Rows[i][j].ToString();
                    } //end for
                }     //end for
            }         //end if
            //给oldCardno赋值
            oldCardno = txtCardno.Text;
            #endregion
            this.Text = Strmsg;
        }