Exemplo n.º 1
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.º 2
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;//显示余额
        }