public Form_TPB_QuanLyLuong() { InitializeComponent(); cbbTK_NV.Text = "Theo Tên NV"; dataGridView1.Columns["Column1"].DefaultCellStyle.Format = "###,## VND"; db = new QLLD_DBDataContext(); pcbll = new PhanCongBLL(); ctbll = new CongTrinhBLL(); ckn = new ChuoiKetNoi(); }
public Form_TPB_QuanLyNhanVien() { InitializeComponent(); pbbll = new PhongBanBLL(); nvbll = new NhanVienBLL(); tkbll = new TaiKhoanBLL(); pcbll = new PhanCongBLL(); db = new QLLD_DBDataContext(); ckn = new ChuoiKetNoi(); dataGridView1.Columns[2].DefaultCellStyle.Format = "dd/MM/yyyy"; cbbTK_NV.Text = "Theo Tên NV"; _trangThaiTimKiem = "L"; }
public Form_NV_XemLichLamViec() { InitializeComponent(); db = new QLLD_DBDataContext(); ckn = new ChuoiKetNoi(); ctbll = new CongTrinhBLL(); cbbThang.Text = DateTime.Now.Month.ToString(); cbbNam.Text = DateTime.Now.Year.ToString(); //dataGridView1.Columns["luongCongTrinh"].DefaultCellStyle.Format = "###,## VND"; cbbTK_CT.Text = "Theo Tên CT"; cbbTrangThaiCT.Text = "CT Đang làm"; }
public Form_TPB_ChamCong() { InitializeComponent(); db = new QLLD_DBDataContext(); ckn = new ChuoiKetNoi(); ctbll = new CongTrinhBLL(); //tb = new DataTable(); cbbThang.Text = DateTime.Now.Month.ToString(); cbbNam.Text = DateTime.Now.Year.ToString(); cbbTK_NV.Text = "Theo Tên NV"; dataGridView1.Columns["luongThang"].DefaultCellStyle.Format = "###,## VND"; dataGridView1.Columns[3].ReadOnly = true; dataGridView1.Columns[4].ReadOnly = true; dataGridView1.Columns[5].ReadOnly = true; dataGridView1.Columns[6].ReadOnly = true; dataGridView1.Columns[7].ReadOnly = true; }
public TimKiem() { db = new QLLD_DBDataContext(); }
private void btnDangNhap_Click(object sender, EventArgs e) { QLLD_DBDataContext db = new QLLD_DBDataContext(); try { if (tbTaiKhoan.Text.Trim() == "" || tbMatKhau.Text.Trim() == "") { XtraMessageBox.Show("Bạn chưa nhập đủ thông tin !"); tbTaiKhoan.Focus(); } else if (tbTaiKhoan.Text.Trim() != "" || tbMatKhau.Text.Trim() != "") { /* //_mkMH = maHoaMK(tbMatKhau.Text); * _mkMH = Md5hash(tbMatKhau.Text).ToString(); #region Load dữ liệu * SqlConnection myCon = new SqlConnection(); * myCon.ConnectionString = @"Data Source=DESKTOP-PTT6BR4\SQLEXPRESS;Initial Catalog=QuanLiLaoDong;Integrated Security=True"; * myCon.Open();//không có dòng này thì adapter sẽ tự open * string tv = "abc"; * string sqlMK = @"select b.tenTaiKhoan, b.matKhau * from dbo.NhanVien a join dbo.TaiKhoan b on a.maNhanVien=b.maNhanVien * where b.tenTaiKhoan = '" + tbTaiKhoan.Text + "' and b.matKhau ='" +tbMatKhau.Text+ "'"; * * SqlCommand cmd = new SqlCommand(sqlMK, myCon); * SqlDataReader dta = cmd.ExecuteReader(); * if(dta.Read()==true) * { * //_tenDN = tbTaiKhoan.Text.Trim(); * // _MK = tbMatKhau.Text.Trim(); * Form_Main form = new Form_Main(); * this.Hide(); * // form.ShowDialog(); * form.ShowDialog(); * * this.Show(); * } * else * { * XtraMessageBox.Show("Tài khoản hoặc mật khẩu không đúng, vui lòng nhập lại !"); * tbTaiKhoan.Focus(); * } * * myCon.Close(); #endregion*/ //_mkMH = maHoaMK(tbMatKhau.Text); // tbHashCode.Text = _mkMH; //NhanVien nv = nvbll.kiemTraDangNhap(tbTaiKhoan.Text, "7165B6BA0908D1DA05F3B931A681A39B"); NhanVien nv = nvbll.kiemTraDangNhap(tbTaiKhoan.Text, tbMatKhau.Text); if (nv != null) { _MaPB = nvbll.layMaPhongBanNhanVien(tbTaiKhoan.Text); _maNhanVien = nvbll.layMaNhanVien(tbTaiKhoan.Text); _tenDN = tbTaiKhoan.Text.Trim(); _MK = tbMatKhau.Text.Trim(); Form_Main form = new Form_Main(); this.Hide(); // form.ShowDialog(); form.ShowDialog(); this.Show(); } else { XtraMessageBox.Show("Tài khoản hoặc mật khẩu không đúng, vui lòng nhập lại !"); tbTaiKhoan.Focus(); } } } catch (Exception ex) { XtraMessageBox.Show("Lỗi:fdgd " + ex); } }
public Form_NhanLienHe() { InitializeComponent(); db = new QLLD_DBDataContext(); lhbll = new LienHeBLL(); }
public LienHeBLL() { db = new QLLD_DBDataContext(); }
public PhongBanBLL() { db = new QLLD_DBDataContext(); }
public NhanVienBLL() { db = new QLLD_DBDataContext(); }
public ChamCongBLL() { db = new QLLD_DBDataContext(); }