Exemple #1
0
        public int GetPass(String pass)
        {
            DataRow dr = con.ExcuteDataRow("select MatKhau from QL_NguoiDung where MatKhau='" + pass + "'");

            if (dr != null)
            {
                return(int.Parse(dr[0].ToString()));
            }
            return(-1);
        }
Exemple #2
0
        public int LayMaPB(String MaPB)
        {
            DataRow dr = con.ExcuteDataRow("select MaPhongBan from QL_PhongBan where MaPhongBan='" + MaPB + "'");

            if (dr != null)
            {
                return(int.Parse(dr[0].ToString()));
            }
            return(-1);
        }
Exemple #3
0
        public int GetMaPhieu(String MaNV, int Nam, int Thang)
        {
            DataRow dr = con.ExcuteDataRow("select MaPhieu from QL_ChamCong where MaNhanVien='" + MaNV + "' and Nam=" + Nam + " and Thang=" + Thang);

            if (dr != null)
            {
                return(int.Parse(dr[0].ToString()));
            }
            return(-1);
        }