public static DataTable LoadBangCap(int idnv) { string query = "select * from bangcap where nhanvienid = " + idnv + ""; return(SqlServerHelper.ExecuteQuery(query)); }
public static int UpdateChucVu(int idcv, string tencv) { string query = "UPDATECHUCVU @IDCV , @TENCV "; return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idcv, tencv })); }
public static int UpdatePhongBan(int idpb, string tenpb) { string query = "UPDATEPHONGBAN @IDPB , @TENPB "; return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idpb, tenpb })); }
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 })); }
public static int DeleteChamCong(int idcc) { string query = "DELETECHAMCONG @CHAMCONGID "; return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idcc })); }
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)); }
public static DataTable ThongKeNVMoi(DateTime time) { string query = "THONGKE_NVMOI @NGAY "; return(SqlServerHelper.ExecuteQuery(query, new object[] { time })); }
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 })); }
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 })); }
public static int UpdateAccount(string username, string password, string type) { string query = "UPDATE ACCOUNT SET PASSWORD = '******', TYPE = '" + type + "' WHERE USERNAME = '******'"; return(SqlServerHelper.ExecuteNonQuery(query)); }
public static DataTable LoadTaiSan(int idnv) { string query = "select * from taisan where nhanvienid = " + idnv + ""; return(SqlServerHelper.ExecuteQuery(query)); }
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)); }
public static DataTable LoadAccount() { string query = "SELECT * FROM ACCOUNT"; return(SqlServerHelper.ExecuteQuery(query)); }
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 })); }
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 })); }
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 })); }
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 })); }
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 })); }
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)); }
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)); }
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)); }
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 })); }
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 })); }
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)); }
public static int InsertChucVu(string tenpb) { string query = "INSERTCHUCVU @TENCV "; return(SqlServerHelper.ExecuteNonQuery(query, new object[] { tenpb })); }
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 })); }
public static int InsertPhongBan(string tenpb) { string query = "INSERTPHONGBAN @TENPB "; return(SqlServerHelper.ExecuteNonQuery(query, new object[] { tenpb })); }
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 })); }
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)); }
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 })); }