private void btn_quayve_Click(object sender, EventArgs e) { this.Close(); FrmQLNhanVien ql = new FrmQLNhanVien(); ql.MdiParent = FrmChinh.ActiveForm; ql.Dock = DockStyle.Fill; ql.FormBorderStyle = FormBorderStyle.None; ql.StartPosition = FormStartPosition.CenterScreen; ql.Show(); }
private void nHÂNVIÊNToolStripMenuItem_Click(object sender, EventArgs e) { lsNDDTO = new LichSuNguoiDungDTO() { MAND = nvDangNhap.MAND, MANV = nvDangNhap.MANV, THOIGIAN = DateTime.Parse(DateTime.Now.ToString("dd/MM/yyy HH:mm")), SUKIEN = "Quản Lý Nhân Viên" }; bool kt = lsNDBUS.ThemLichSuNguoiDung(lsNDDTO); DongFrmCon(); f1 = new FrmQLNhanVien(); f1.MdiParent = this; f1.Dock = DockStyle.Fill; f1.Show(); }
private void đĂNGXUÂTToolStripMenuItem_Click(object sender, EventArgs e) { DongFrmCon(); lsNDDTO = new LichSuNguoiDungDTO() { MAND = nvDangNhap.MAND, MANV = nvDangNhap.MANV, THOIGIAN = DateTime.Parse(DateTime.Now.ToString("dd/MM/yyy HH:mm")), SUKIEN = "Đăng Xuất Khỏi Hệ Thống" }; try { List <LichSuNguoiDungDTO> LichSuSauMotNgay = lsNDBUS.DSLichSuHoatDong().FindAll(o => o.THOIGIAN.Day < lsNDDTO.THOIGIAN.Day); if (LichSuSauMotNgay != null) { lsNDBUS.GhiFile(LichSuSauMotNgay, Utils.MaHoaMD5(LichSuSauMotNgay[LichSuSauMotNgay.Count() - 1].THOIGIAN.ToString())); } bool ktls = lsNDBUS.ThemLichSuNguoiDung(lsNDDTO); } catch { } dn = null; f1 = null; FrmDangNhap fdn = new FrmDangNhap(); fdn.MdiParent = this; fdn.Dock = DockStyle.Fill; fdn.FormBorderStyle = FormBorderStyle.None; fdn.StartPosition = FormStartPosition.CenterScreen; fdn.Show(); đĂNGXUÂTToolStripMenuItem.Visible = false; menuStrip1.Enabled = false; tAIKHOANCUATÔIToolStripMenuItem.Text = "TÀI KHOẢN CỦA TÔI"; }