private void button1_Click(object sender, EventArgs e) { //调用管理者退出接口和创建BLL层的工厂实例化BLL层管理者退出类 LoginOutMangerIBLL ManageIBLL = (LoginOutMangerIBLL)factBll.CreateUser("LoginOutMangerBLL"); ManageIBLL.LoginOutManger(UserLevel.UserIdall.ToString());//管理者退出 }
/// <summary> /// 查询正在上机学生 /// </summary> /// <returns>以表形式返回,正在上机学生信息</returns> private DataTable SelectOnLineStudent(out string StrMsg) { OnLineStudentIBLL onlinestudentIBLL = (OnLineStudentIBLL)factBll.CreateUser("OnLineStudentBLL"); DataTable SelectOnLineStudentTable = onlinestudentIBLL.SelectOnlineStudent(out StrMsg); return(SelectOnLineStudentTable); }
private void StudentMain_Load(object sender, EventArgs e) { //获取学生信息 StudentInfoIBLL studentInfo = (StudentInfoIBLL)factBll.CreateUser("StudentInfoBLL"); StudentInfoTable = studentInfo.StudentInfo(UserLevel.UserIdall); lblName.Text = StudentInfoTable.Rows[0][1].ToString(); //显示学生姓名 OnLimeTime.Enabled = true; //启用闹钟 }
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; }
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; }
/// <summary> /// 显示具体内容 /// </summary> /// <param name="comf1">字段1</param> /// <param name="comf2">字段2</param> /// <param name="comf3">字段3</param> /// <param name="comoper1">操作符1</param> /// <param name="comoper2">操作符2</param> /// <param name="comoper3">操作符3</param> /// <param name="contetn1">内容1</param> /// <param name="content2">内容2</param> /// <param name="contetn3">内容3</param> /// <param name="rel1">组合关系1</param> /// <param name="rel2">组合关系2</param> /// <param name="form">组合查询窗体</param> /// <returns></returns> protected DataTable ToDgv(string comf1, string comf2, string comf3, string comoper1, string comoper2, string comoper3, string contetn1, string content2, string contetn3, string rel1, string rel2, string DbName, Form form) { GroupQuerIBLL groupQuerIBLL = (GroupQuerIBLL)factBLL.CreateUser("GroupQuerBLL"); DataTable dt = groupQuerIBLL.SelectGroupQuer(ToEnglish(comf1), ToEnglish(comf2), ToEnglish(comf3), comoper1, comoper2, comoper3, contetn1, content2, contetn3, rel1, rel2, DbName, this); return(dt); }
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; }
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); }
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); }
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);//提示信息 }
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);//显示返回信息 }
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); }
private void BasitDate_Load(object sender, EventArgs e) { BasitDateIBLL basitIBLL = (BasitDateIBLL)factBll.CreateUser("BasitDateBLL"); string Strmsg = "";//接受返回的提示信息 DataTable SelectBasitTable = basitIBLL.SelectBasitInfo(out Strmsg); if (SelectBasitTable.Rows.Count != 0) { txtLimeOnCash.Text = SelectBasitTable.Rows[0][0].ToString(); txtLimtRegCash.Text = SelectBasitTable.Rows[0][1].ToString(); txtPreOnCash.Text = SelectBasitTable.Rows[0][2].ToString(); txtFixtCash.Text = SelectBasitTable.Rows[0][3].ToString(); txtTimeCash.Text = SelectBasitTable.Rows[0][4].ToString(); txtge.Text = SelectBasitTable.Rows[0][5].ToString(); label6.Text = SelectBasitTable.Rows[0][6].ToString(); lblDate.Text = SelectBasitTable.Rows[0][7].ToString(); lblTime.Text = SelectBasitTable.Rows[0][8].ToString(); } this.Text = Strmsg;//改变标题状态 }
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;//显示余额 }
private void cmblevel_SelectedIndexChanged(object sender, EventArgs e) { AddandDeleteUserIBLL addanddeleteIBLL = (AddandDeleteUserIBLL)factBll.CreateUser("AddandDeleteUserBLL"); string strmsg = "";//接受返回信息 DataTable SelectLogin = addanddeleteIBLL.SelectLogin(cmblevel.Text, out strmsg); dataGridView2.Rows.Clear();//清空上次数据,在显示新数据。 #region 显示数据到DataGridView2上 //创建表和填充数据 for (int i = 0; i <= SelectLogin.Rows.Count - 1; i++) //获取行数 { int index = this.dataGridView2.Rows.Add(); //添加一行 for (int j = 0; j <= SelectLogin.Columns.Count - 1; j++) //获取列数 { //添加数据 dataGridView2.Rows[index].Cells[j].Value = SelectLogin.Rows[i][j].ToString(); } } #endregion this.Text = strmsg; }
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;//显示余额 }
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(); }
private void SettleAccounts_Load(object sender, EventArgs e) { SettleAccountsIBLL settleAccountIBLL = (SettleAccountsIBLL)factBLL.CreateUser("SettleAccountsBLL"); string Strm = ""; //接受返回信息 DataTable ManagerInfo = settleAccountIBLL.SelectOpertionInfo("操作员", out Strm); //获取信息 //初始化下拉框 cmbOPerID.Text = ManagerInfo.Rows[0][0].ToString(); //遍历给下拉框添加数据 for (int i = 0; i <= ManagerInfo.Rows.Count - 1; i++)//获取行数 { //添加数据 cmbOPerID.Items.Add(ManagerInfo.Rows[i][0].ToString()); }//end for SelectCarndoInfo(cmbOPerID.Text); //调用售卡信息方法,显示售卡信息。 SelectCanCardnoInfo(cmbOPerID.Text); //调用退卡信息查询方法,显示退卡信息 SelectRegChr(cmbOPerID.Text); //调用充值记录方法,显示充值记录 txtOpertion.Text = UserLevel.UserIdall.ToString(); //给管理员赋值 txtAcDate.Text = DateTime.Now.Date.ToString(); //给结账日期赋值 //当天余额=充值金额-退卡金额 txtNowCash.Text = ""; //先清楚,在显示 txtNowCash.Text = (double.Parse(txtRegchr.Text) - double.Parse(txtCanCarndo.Text)).ToString(); }
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(); //微信号 }
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;//改变窗体标题栏 }
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; }