Esempio n. 1
0
 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();
 }
Esempio n. 2
0
 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";
 }
Esempio n. 3
0
        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";
        }
Esempio n. 4
0
 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;
 }
Esempio n. 5
0
 public TimKiem()
 {
     db = new QLLD_DBDataContext();
 }
Esempio n. 6
0
        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);
            }
        }
Esempio n. 7
0
 public Form_NhanLienHe()
 {
     InitializeComponent();
     db    = new QLLD_DBDataContext();
     lhbll = new LienHeBLL();
 }
Esempio n. 8
0
 public LienHeBLL()
 {
     db = new QLLD_DBDataContext();
 }
Esempio n. 9
0
 public PhongBanBLL()
 {
     db = new QLLD_DBDataContext();
 }
Esempio n. 10
0
 public NhanVienBLL()
 {
     db = new QLLD_DBDataContext();
 }
Esempio n. 11
0
 public ChamCongBLL()
 {
     db = new QLLD_DBDataContext();
 }