예제 #1
0
        public static DataTable LoadBangCap(int idnv)
        {
            string query = "select * from bangcap where nhanvienid = " + idnv + "";

            return(SqlServerHelper.ExecuteQuery(query));
        }
예제 #2
0
        public static int UpdateChucVu(int idcv, string tencv)
        {
            string query = "UPDATECHUCVU @IDCV , @TENCV ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idcv, tencv }));
        }
예제 #3
0
        public static int UpdatePhongBan(int idpb, string tenpb)
        {
            string query = "UPDATEPHONGBAN @IDPB , @TENPB ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idpb, tenpb }));
        }
예제 #4
0
        public static int InsertChamCong(int idnv, DateTime ngay, int loai)
        {
            string query = "INSERTCHAMCONG @NHANVIENID , @NGAY , @LOAI ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idnv, ngay, loai }));
        }
예제 #5
0
        public static int DeleteChamCong(int idcc)
        {
            string query = "DELETECHAMCONG @CHAMCONGID ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idcc }));
        }
예제 #6
0
        public static DataTable ThongKeSinhNhat(int thang)
        {
            string query = "SELECT N.HOTEN, N.GIOITINH, N.CHUCVUID, N.PHONGBANID, C.TEN AS TENCV, P.TEN AS TENPB, G.TEN AS TENGIOITINH  FROM NHANVIEN N, GIOITINH G, CHUCVU C, PHONGBAN P WHERE MONTH(N.NGAYSINH) = " + thang + " AND N.CHUCVUID = C.CHUCVUID AND N.GIOITINH = G.GIOITINHID AND N.PHONGBANID = P.PHONGBANID";

            return(SqlServerHelper.ExecuteQuery(query));
        }
예제 #7
0
        public static DataTable ThongKeNVMoi(DateTime time)
        {
            string query = "THONGKE_NVMOI @NGAY ";

            return(SqlServerHelper.ExecuteQuery(query, new object[] { time }));
        }
예제 #8
0
        public static int InsertTaiSan(int idnv, string ten, string ghichu)
        {
            string query = "INSERTTAISAN @IDNV , @TEN , @GHICHU ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idnv, ten, ghichu }));
        }
예제 #9
0
        public static int UpdateTaiSan(int idtaisan, int idnv, string ten, string ghichu)
        {
            string query = "UPDATETAISAN @IDTAISAN , @IDNV , @TEN , @GHICHU ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idtaisan, idnv, ten, ghichu }));
        }
예제 #10
0
        public static int UpdateAccount(string username, string password, string type)
        {
            string query = "UPDATE ACCOUNT SET PASSWORD = '******', TYPE = '" + type + "' WHERE USERNAME = '******'";

            return(SqlServerHelper.ExecuteNonQuery(query));
        }
예제 #11
0
        public static DataTable LoadTaiSan(int idnv)
        {
            string query = "select * from taisan where nhanvienid = " + idnv + "";

            return(SqlServerHelper.ExecuteQuery(query));
        }
예제 #12
0
        public static int InsertAccount(string username, string password, string type)
        {
            string query = "INSERT INTO ACCOUNT(USERNAME,PASSWORD,TYPE) VALUES('" + username + "','" + password + "','" + type + "')";

            return(SqlServerHelper.ExecuteNonQuery(query));
        }
예제 #13
0
        public static DataTable LoadAccount()
        {
            string query = "SELECT * FROM ACCOUNT";

            return(SqlServerHelper.ExecuteQuery(query));
        }
예제 #14
0
        public static int UpdateBangCap(int idbangcap, int idnv, string trinhdohocvan, DateTime thoigian, string chitiet)
        {
            string query = "UPDATEBANGCAP @IDBANGCAP , @IDNV , @TRINHDOHOCVAN , @THOIGIAN , @CHITIET ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idbangcap, idnv, trinhdohocvan, thoigian, chitiet }));
        }
예제 #15
0
        public static int InsertBaoHiemYTe(int idnv, string sothe, DateTime ngaynop)
        {
            string query = "INSERTBAOHIEMYTE @IDNV , @SOTHE , @NGAYNOP ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idnv, sothe, ngaynop }));
        }
예제 #16
0
        public static int UpdateBaoHiemXaHoi(int idbh, int idnv, int sotien, DateTime ngaynop)
        {
            string query = "UPDATEBAOHIEMXAHOI @IDBAOHIEM , @IDNV , @SOTIEN , @NGAYNOP ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idbh, idnv, sotien, ngaynop }));
        }
예제 #17
0
        public static int UpdateBaoHiemYTe(int idbh, int idnv, string sothe, DateTime ngaynop)
        {
            string query = "UPDATEBAOHIEMYTE @IDBAOHIEM , @IDNV , @SOTHE , @NGAYNOP ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idbh, idnv, sothe, ngaynop }));
        }
예제 #18
0
        public static int UpdateKTKL(int idktkl, int idnv, int hinhthuc, string noidung, DateTime thoigian)
        {
            string query = "UPDATEKHENTHUONGKYLUAT @IDKTKL , @IDNV ,  @HINHTHUC , @NOIDUNG , @THOIGIAN ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idktkl, idnv, hinhthuc, noidung, thoigian }));
        }
예제 #19
0
        public static DataTable ThongKeDangVien()
        {
            string query = "SELECT N.HOTEN, N.GIOITINH, N.CHUCVUID, N.PHONGBANID, C.TEN AS TENCV, P.TEN AS TENPB, G.TEN AS TENGIOITINH FROM NHANVIEN N, GIOITINH G, CHUCVU C, PHONGBAN P, THONGTINDANG T WHERE T.NHANVIENID = N.NHANVIENID AND N.CHUCVUID = C.CHUCVUID AND N.GIOITINH = G.GIOITINHID AND N.PHONGBANID = P.PHONGBANID";

            return(SqlServerHelper.ExecuteQuery(query));
        }
예제 #20
0
        public static DataTable LoadThanNha(int idnv)
        {
            string query = "SELECT THANNHANID, HOTEN, GIOITINH, T.CHUCVUID, C.TEN AS TENCV, G.TEN AS TENGIOITINH  FROM THANNHAN T, GIOITINH G, CHUCVU C WHERE T.NHANVIENID = " + idnv + " AND T.CHUCVUID = C.CHUCVUID AND T.GIOITINH = G.GIOITINHID";

            return(SqlServerHelper.ExecuteQuery(query));
        }
예제 #21
0
        public static DataTable LoadChamCong(int idnv, int thang)
        {
            string query = "SELECT CHAMCONGID, C.NHANVIENID, HOTEN, C.NGAY, C.LOAI FROM NHANVIEN N, CHAMCONG C WHERE MONTH(NGAY) = " + thang + " AND C.NHANVIENID = " + idnv + " AND N.NHANVIENID = C.NHANVIENID";

            return(SqlServerHelper.ExecuteQuery(query));
        }
예제 #22
0
        public static int UpdateThanNhan(int idtn, int idnv, string hoten, int gioitinh, int chucvu)
        {
            string query = "UPDATETHANNHAN @IDTHANHNHAN , @IDNHANVIEN , @HOTEN , @GIOITINH , @CHUCVUID ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idtn, idnv, hoten, gioitinh, chucvu }));
        }
예제 #23
0
        public static int UpdateChamCong(int idcc, int idnv, DateTime ngay, int loai)
        {
            string query = "UPDATECHAMCONG @CHAMCONGID , @NHANVIENID , @NGAY , @LOAI ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idcc, idnv, ngay, loai }));
        }
예제 #24
0
        public static DataTable LoadDang()
        {
            string query = "SELECT THONGTINDANGID, NGAYKETNAP, NGAYRAKHOIDANG, T.NHANVIENID, HOTEN FROM THONGTINDANG T, NHANVIEN N WHERE N.NHANVIENID = T.NHANVIENID";

            return(SqlServerHelper.ExecuteQuery(query));
        }
예제 #25
0
        public static int InsertChucVu(string tenpb)
        {
            string query = "INSERTCHUCVU @TENCV ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { tenpb }));
        }
예제 #26
0
        public static int InsertDang(int idnv, DateTime ngayketnap, DateTime ngayroikhoi)
        {
            string query = "INSERTTHONGTINDANG @IDNV , @NGAYKETNAP , @NGAYROIKHOI ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idnv, ngayketnap, ngayroikhoi }));
        }
예제 #27
0
        public static int InsertPhongBan(string tenpb)
        {
            string query = "INSERTPHONGBAN @TENPB ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { tenpb }));
        }
예제 #28
0
        public static int UpdateDang(int iddang, int idnv, DateTime ngayketnap, DateTime ngayroikhoi)
        {
            string query = "UPDATETHONGTINDANG @THONGTINDANGID , @IDNV , @NGAYKETNAP , @NGAYROIKHOI ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { iddang, idnv, ngayketnap, ngayroikhoi }));
        }
예제 #29
0
        public static DataTable ThongKeNVTheoChucVu(int idcv)
        {
            string query = "SELECT N.HOTEN, N.GIOITINH, N.CHUCVUID, N.PHONGBANID, C.TEN AS TENCV, P.TEN AS TENPB, G.TEN AS TENGIOITINH  FROM NHANVIEN N, GIOITINH G, CHUCVU C, PHONGBAN P WHERE N.CHUCVUID = " + idcv + " AND N.CHUCVUID = C.CHUCVUID AND N.GIOITINH = G.GIOITINHID AND N.PHONGBANID = P.PHONGBANID";

            return(SqlServerHelper.ExecuteQuery(query));
        }
예제 #30
0
        public static int UpdateQTCT(int idqtct, int idnv, DateTime tgbatdau, DateTime tgketthuc, string noidung)
        {
            string query = "UPDATEQUATRINHCONGTAC @IDQTCT , @IDNV , @TGBATDAU , @TGKETTHUC , @NOIDUNG ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idqtct, idnv, tgbatdau, tgketthuc, noidung }));
        }