예제 #1
0
        public static int DeleteNhanVien(int nhanvienid)
        {
            string query = "DELETENHANVIEN @NHANVIENID ";

            try
            {
                return(SqlServerHelper.ExecuteNonQuery(query, new object[] { nhanvienid }));
            }
            catch
            {
                return(0);
            }
        }
예제 #2
0
        public static int DeleteTaiSan(int idtaisan)
        {
            string query = "DELETETAISAN @IDTAISAN ";

            try
            {
                return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idtaisan }));
            }
            catch
            {
                return(0);
            }
        }
예제 #3
0
        public static int DeleteHopDongLaoDong(int idhd)
        {
            string query = "DELETEHOPDONGLAODONG @IDHOPDONG ";

            try
            {
                return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idhd }));
            }
            catch
            {
                return(0);
            }
        }
예제 #4
0
        public static int DeletePhongBan(int idpb)
        {
            string query = "DELETEPHONGBAN @IDPB ";

            try
            {
                return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idpb }));
            }
            catch
            {
                return(0);
            }
        }
예제 #5
0
        public static int DeleteBangCap(int idbangcap)
        {
            string query = "DELETEBANGCAP @IDBANGCAP ";

            try
            {
                return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idbangcap }));
            }
            catch
            {
                return(0);
            }
        }
예제 #6
0
        public static int DeleteQTCT(int idqtct)
        {
            string query = "DELETEQUATRINHCONGTAC @IDQTCT ";

            try
            {
                return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idqtct }));
            }
            catch
            {
                return(0);
            }
        }
예제 #7
0
        public static int DeleteAccount(string username)
        {
            string query = "DELETE ACCOUNT WHERE USERNAME = '******'";

            try
            {
                return(SqlServerHelper.ExecuteNonQuery(query));
            }
            catch
            {
                return(0);
            }
        }
예제 #8
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 }));
        }
예제 #9
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 }));
        }
예제 #10
0
        public static int InsertQTCT(int idnv, DateTime tgbatdau, DateTime tgketthuc, string noidung)
        {
            string query = "INSERTQUATRINHCONGTAC @IDNV , @TGBATDAU , @TGKETTHUC , @NOIDUNG ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idnv, tgbatdau, tgketthuc, noidung }));
        }
예제 #11
0
        public static int UpdateChucVu(int idcv, string tencv)
        {
            string query = "UPDATECHUCVU @IDCV , @TENCV ";

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

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idcc }));
        }
예제 #13
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 }));
        }
예제 #14
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 }));
        }
예제 #15
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));
        }
예제 #16
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));
        }
예제 #17
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 }));
        }
예제 #18
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 }));
        }
예제 #19
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 }));
        }
예제 #20
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 }));
        }
예제 #21
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 }));
        }
예제 #22
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 }));
        }
예제 #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 int UpdatePhongBan(int idpb, string tenpb)
        {
            string query = "UPDATEPHONGBAN @IDPB , @TENPB ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idpb, tenpb }));
        }
예제 #25
0
        public static int InsertChucVu(string tenpb)
        {
            string query = "INSERTCHUCVU @TENCV ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { tenpb }));
        }
예제 #26
0
        public static int UpdateNhanVien(int nhanvienid, string hoten, string bidanh, string diachi, DateTime ngaysinh, string masothue, int gioitinh, string sotknganhang, string sdt, string email, int chucvuid, int phongbanid)
        {
            string query = "UPDATENHANVIEN @NHANVIENID , @HOTEN , @BIDANH , @DIACHI , @NGAYSINH , @MASOTHUE , @GIOITINH , @SOTKNGANHANG , @SDT , @EMAIL , @CHUCVUID , @PHONGBANID ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { nhanvienid, hoten, bidanh, diachi, ngaysinh, masothue, gioitinh, sotknganhang, sdt, email, chucvuid, phongbanid }));
        }
예제 #27
0
        public static int InsertPhongBan(string tenpb)
        {
            string query = "INSERTPHONGBAN @TENPB ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { tenpb }));
        }
예제 #28
0
        public static int InsertBangCap(int idnv, string trinhdohocvan, DateTime thoigian, string chitiet)
        {
            string query = "INSERTBANGCAP @IDNV , @TRINHDOHOCVAN , @THOIGIAN , @CHITIET ";

            return SqlServerHelper.ExecuteNonQuery(query, new object[] { idnv, trinhdohocvan, thoigian, chitiet });
        }
예제 #29
0
        public static int UpdateQTHT(int idQTHT, int idnv, DateTime tgbatdau, DateTime tgketthuc, string noidung)
        {
            string query = "UPDATEQUATRINHHOCTAP @IDQTHT , @IDNV , @TGBATDAU , @TGKETTHUC , @NOIDUNG ";

            return(SqlServerHelper.ExecuteNonQuery(query, new object[] { idQTHT, idnv, tgbatdau, tgketthuc, noidung }));
        }
예제 #30
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 }));
        }