public bool KiemTraTaiKhoan(string MaTaiKhoan, out Danhsachtaikhoan tk) { string query = @" select [Mataikhoan] ,[Makhachhang] ,[MaMucThauChi] ,[MaGioiHanRut] ,[SoTienConLaiTrongTK] FROM [M_ATM].[dbo].[Danhsachtaikhoan] where Mataikhoan = @matk"; DataTable dt = DataProvider.Instance.ExcuteQuery(query, new object[] { MaTaiKhoan }); if (dt.Rows.Count > 0) { tk = new Danhsachtaikhoan(); tk.Mataikhoan = dt.Rows[0][0].ToString(); tk.Makhachhang = dt.Rows[0][1].ToString(); tk.MaMucThauChi = dt.Rows[0][2].ToString(); tk.MaGioiHanRut = dt.Rows[0][3].ToString(); tk.SoTienConLaiTrongTK = decimal.Parse(dt.Rows[0][4].ToString()); return(true); } else { tk = null; return(false); } }
public CheckBanlance(Danhsachtaikhoan tk, DanhsachKhachHang kh, string the, string maATM) { InitializeComponent(); this.kh = kh; this.tk = tk; this.the = the; this.maATM = maATM; }
public ViewHistory(Danhsachtaikhoan tk, DanhsachKhachHang kh, string mathe, string maATM) { InitializeComponent(); this.kh = kh; this.tk = tk; this.mathe = mathe; this.maATM = maATM; }
public MainUC(Danhsachtaikhoan tk, DanhsachKhachHang kh) { InitializeComponent(); this.kh = kh; this.tk = tk; helloPanel.BackColor = Color.FromArgb(255, 255, 204, 55); }
public void ResetData() { textBox1.Text = string.Empty; textBox2.Text = string.Empty; tkNhan = null; Cardpanel.Visible = true; PassPanel.Visible = false; IsVisible = false; btnOk.Text = "Kiểm tra"; }
public void loadData(Danhsachtaikhoan tk, DanhsachKhachHang kh, string the, string maATM) { this.kh = kh; this.tk = tk; this.the = the; this.maATM = maATM; string t = string.Format("Thông tin:\r\n-Chủ tài khoản: {0}\r\n- Số dư trong tài khoản: {1}", kh.Tenkhachhang, tk.SoTienConLaiTrongTK.ToString("c")); label1.Text = t; }
public CardTranfer(Danhsachtaikhoan tk, DanhsachKhachHang kh, string mathe, string maATM, MainForm main) { InitializeComponent(); this.tk = tk; this.kh = kh; this.mathe = mathe; this.maATM = maATM; this.main = main; main.btnChange += Main_btnChange; main.delete_Text += Main_delete_Text; main.btn_ok += Main_btn_ok; }
/// <summary> /// Bắt sự kiện đăng nhập và khởi tạo các use case có liên quan /// </summary> /// <param name="isSuccess"></param> /// <param name="ds"></param> /// <param name="mathe"></param> private void Validation_login(bool isSuccess, DanhsachtheATM ds, string mathe) { if (isSuccess) { this.ds = ds; tk = DanhSachTaiKhoan_BUL.Instance.LayThongTinTaiKhoan(ds.Mataikhoan); kh = KhachHang_BUL.Instance.LayThongTinKhachHang(tk.Makhachhang); main = new MainUC(tk, kh); this.mathe = mathe; main.rutten += Main_rutten; main.checkBalance += Main_checkBalance; main.history += Main_history; main.changePIN += Main_changePIN; main.exit += Main_exit; main.cardTranfer += Main_cardTranfer; viewHistory = new ViewHistory(tk, kh, mathe, thongTinMay.MaATM); checkBanlance = new CheckBanlance(tk, kh, mathe, thongTinMay.MaATM); changePIN = new ChangePIN(mathe, thongTinMay.MaATM, this); withDraw = new WithDraw(tk, kh); beingFinal = new BeingFinal_UC(tk, kh); cardTranfer = new CardTranfer(tk, kh, mathe, thongTinMay.MaATM, this); final_UC = new Final_UC(tk, kh); withDraw.SetMoney += WithDraw_SetMoney; viewHistory.click += ViewHistory_click; checkBanlance.click += CheckBanlance_click; changePIN.ok += ChangePIN_ok; cardTranfer.tranfer += CardTranfer_tranfer; final_UC.click_Finish += Final_UC_click_Finish; mainPanel.Controls.Clear(); mainPanel.Controls.Add(main); } }
public WithDraw(Danhsachtaikhoan tk, DanhsachKhachHang kh) { InitializeComponent(); this.tk = tk; this.kh = kh; }
public Final_UC(Danhsachtaikhoan tk, DanhsachKhachHang kh) { InitializeComponent(); this.kh = kh; this.tk = tk; }