Example #1
0
 protected int PDInsertCHAMCONG(decimal chcongid, string manv, int thang, int nam, float luongcb, float bacluong, byte ngaycong, float thuclinh, float conlai, byte nghiphep, byte ngungviec, float tangca, float phucapkhac, float luongtangca, float phucapcv, DateTime ngaycn)
 {
     try
     {
         SqlCon     Scon   = new SqlCon();
         SqlCommand Sqlcom = new SqlCommand();
         Sqlcom.CommandType = CommandType.StoredProcedure;
         Sqlcom.CommandText = "spInsertCHAMCONG";
         Sqlcom.Parameters.AddWithValue("@chcongid", chcongid);
         Sqlcom.Parameters.AddWithValue("@manv", manv);
         Sqlcom.Parameters.AddWithValue("@thang", thang);
         Sqlcom.Parameters.AddWithValue("@nam", nam);
         Sqlcom.Parameters.AddWithValue("@luongcb", luongcb);
         Sqlcom.Parameters.AddWithValue("@bacluong", bacluong);
         Sqlcom.Parameters.AddWithValue("@ngaycong", ngaycong);
         Sqlcom.Parameters.AddWithValue("@thuclinh", thuclinh);
         Sqlcom.Parameters.AddWithValue("@conlai", conlai);
         Sqlcom.Parameters.AddWithValue("@nghiphep", nghiphep);
         Sqlcom.Parameters.AddWithValue("@ngungviec", ngungviec);
         Sqlcom.Parameters.AddWithValue("@tangca", tangca);
         Sqlcom.Parameters.AddWithValue("@phucapkhac", phucapkhac);
         Sqlcom.Parameters.AddWithValue("@luongtangca", luongtangca);
         Sqlcom.Parameters.AddWithValue("@phucapcv", phucapcv);
         Sqlcom.Parameters.AddWithValue("@ngaycn", ngaycn);
         Sqlcom.Connection = Scon.OpenCon();
         int R = 0;
         R = Sqlcom.ExecuteNonQuery();
         Scon.CloseCon();
         return(R);
     }
     catch
     {
         return(0);
     }
 }
Example #2
0
 protected int PDInsertKTKL(decimal ktklid, string soqd, DateTime ngayqd, decimal manv, decimal loaikt, decimal hinhthuc, float sotien, string noidung, DateTime ngaycn)
 {
     try
     {
         SqlCon     Scon   = new SqlCon();
         SqlCommand Sqlcom = new SqlCommand();
         Sqlcom.CommandType = CommandType.StoredProcedure;
         Sqlcom.CommandText = "spInsertKTKL";
         Sqlcom.Parameters.AddWithValue("@ktklid", ktklid);
         Sqlcom.Parameters.AddWithValue("@soqd", soqd);
         Sqlcom.Parameters.AddWithValue("@ngayqd", ngayqd);
         Sqlcom.Parameters.AddWithValue("@manv", manv);
         Sqlcom.Parameters.AddWithValue("@loaikt", loaikt);
         Sqlcom.Parameters.AddWithValue("@hinhthuc", hinhthuc);
         Sqlcom.Parameters.AddWithValue("@sotien", sotien);
         Sqlcom.Parameters.AddWithValue("@noidung", noidung);
         Sqlcom.Parameters.AddWithValue("@ngaycn", ngaycn);
         Sqlcom.Connection = Scon.OpenCon();
         int R = 0;
         R = Sqlcom.ExecuteNonQuery();
         Scon.CloseCon();
         return(R);
     }
     catch
     {
         return(0);
     }
 }
Example #3
0
        protected DataTable PDGetListNHANVIEN()
        {
            SqlCon         Scon   = new SqlCon();
            SqlDataAdapter Sqlda  = new SqlDataAdapter("spGetListNHANVIEN", Scon.OpenCon());
            DataTable      DTable = new DataTable();

            Sqlda.Fill(DTable);
            Scon.CloseCon();
            return(DTable);
        }
Example #4
0
        protected DataTable PDDetailsNHANVIEN(string manv)
        {
            SqlCon         Scon  = new SqlCon();
            SqlDataAdapter Sqlda = new SqlDataAdapter("spDetailsNHANVIEN", Scon.OpenCon());

            Sqlda.SelectCommand.CommandType = CommandType.StoredProcedure;
            DataTable DTable = new DataTable();

            Sqlda.SelectCommand.Parameters.AddWithValue("@manv", manv);
            Sqlda.Fill(DTable);
            Scon.CloseCon();
            return(DTable);
        }
Example #5
0
        protected DataTable PDDetailsMUCLUONG(float bacluong)
        {
            SqlCon         Scon  = new SqlCon();
            SqlDataAdapter Sqlda = new SqlDataAdapter("spDetailsMUCLUONG", Scon.OpenCon());

            Sqlda.SelectCommand.CommandType = CommandType.StoredProcedure;
            DataTable DTable = new DataTable();

            Sqlda.SelectCommand.Parameters.AddWithValue("@bacluong", bacluong);
            Sqlda.Fill(DTable);
            Scon.CloseCon();
            return(DTable);
        }
Example #6
0
        protected DataTable PDDetailsTAIKHOAN(string Taikhoan)
        {
            SqlCon         Scon  = new SqlCon();
            SqlDataAdapter Sqlda = new SqlDataAdapter("spDetailsTAIKHOAN", Scon.OpenCon());

            Sqlda.SelectCommand.CommandType = CommandType.StoredProcedure;
            DataTable DTable = new DataTable();

            Sqlda.SelectCommand.Parameters.AddWithValue("@Taikhoan", Taikhoan);
            Sqlda.Fill(DTable);
            Scon.CloseCon();
            return(DTable);
        }
Example #7
0
        protected DataTable PDDetailsDONVI(decimal donviid)
        {
            SqlCon         Scon  = new SqlCon();
            SqlDataAdapter Sqlda = new SqlDataAdapter("spDetailsDONVI", Scon.OpenCon());

            Sqlda.SelectCommand.CommandType = CommandType.StoredProcedure;
            DataTable DTable = new DataTable();

            Sqlda.SelectCommand.Parameters.AddWithValue("@donviid", donviid);
            Sqlda.Fill(DTable);
            Scon.CloseCon();
            return(DTable);
        }
Example #8
0
        protected DataTable PDDetailsByFieldNHANVIEN(string FieldName, string value)
        {
            SqlCon         Scon  = new SqlCon();
            SqlDataAdapter Sqlda = new SqlDataAdapter("spDetailsByFieldNHANVIEN", Scon.OpenCon());

            Sqlda.SelectCommand.CommandType = CommandType.StoredProcedure;
            Sqlda.SelectCommand.Parameters.AddWithValue("@FieldName", FieldName);
            Sqlda.SelectCommand.Parameters.AddWithValue("@Value", value);
            DataTable DTable = new DataTable();

            Sqlda.Fill(DTable);
            Scon.CloseCon();
            return(DTable);
        }
Example #9
0
 protected int PDInsertNHANVIEN(string manv, string honv, string tennv, decimal gioitinh, string noisinh, DateTime ngaysinh, string noiohientai, string socmnd, string hinh, string sodt, string email, decimal dantoc, decimal tongiao, decimal giadinh, string sohd, decimal loaihd, DateTime ngayhd, DateTime ngayct, DateTime ngaybd, decimal donviid, decimal phongid, decimal tdid, decimal cmid, decimal cvid, float bacluong, string bhxh, DateTime ngaykt, decimal trangthai)
 {
     try
     {
         SqlCon     Scon   = new SqlCon();
         SqlCommand Sqlcom = new SqlCommand();
         Sqlcom.CommandType = CommandType.StoredProcedure;
         Sqlcom.CommandText = "spInsertNHANVIEN";
         Sqlcom.Parameters.AddWithValue("@manv", manv);
         Sqlcom.Parameters.AddWithValue("@honv", honv);
         Sqlcom.Parameters.AddWithValue("@tennv", tennv);
         Sqlcom.Parameters.AddWithValue("@gioitinh", gioitinh);
         Sqlcom.Parameters.AddWithValue("@noisinh", noisinh);
         Sqlcom.Parameters.AddWithValue("@ngaysinh", ngaysinh);
         Sqlcom.Parameters.AddWithValue("@noiohientai", noiohientai);
         Sqlcom.Parameters.AddWithValue("@socmnd", socmnd);
         Sqlcom.Parameters.AddWithValue("@hinh", hinh);
         Sqlcom.Parameters.AddWithValue("@sodt", sodt);
         Sqlcom.Parameters.AddWithValue("@email", email);
         Sqlcom.Parameters.AddWithValue("@dantoc", dantoc);
         Sqlcom.Parameters.AddWithValue("@tongiao", tongiao);
         Sqlcom.Parameters.AddWithValue("@giadinh", giadinh);
         Sqlcom.Parameters.AddWithValue("@sohd", sohd);
         Sqlcom.Parameters.AddWithValue("@loaihd", loaihd);
         Sqlcom.Parameters.AddWithValue("@ngayhd", ngayhd);
         Sqlcom.Parameters.AddWithValue("@ngayct", ngayct);
         Sqlcom.Parameters.AddWithValue("@ngaybd", ngaybd);
         Sqlcom.Parameters.AddWithValue("@donviid", donviid);
         Sqlcom.Parameters.AddWithValue("@phongid", phongid);
         Sqlcom.Parameters.AddWithValue("@tdid", tdid);
         Sqlcom.Parameters.AddWithValue("@cmid", cmid);
         Sqlcom.Parameters.AddWithValue("@cvid", cvid);
         Sqlcom.Parameters.AddWithValue("@bacluong", bacluong);
         Sqlcom.Parameters.AddWithValue("@bhxh", bhxh);
         Sqlcom.Parameters.AddWithValue("@ngaykt", ngaykt);
         Sqlcom.Parameters.AddWithValue("@trangthai", trangthai);
         Sqlcom.Connection = Scon.OpenCon();
         int R = 0;
         R = Sqlcom.ExecuteNonQuery();
         Scon.CloseCon();
         return(R);
     }
     catch
     {
         return(0);
     }
 }
Example #10
0
 protected int PDDeleteDONVI(decimal donviid)
 {
     try
     {
         SqlCon     Scon   = new SqlCon();
         SqlCommand Sqlcom = new SqlCommand();
         Sqlcom.CommandType = CommandType.StoredProcedure;
         Sqlcom.CommandText = "spDeleteDONVI";
         Sqlcom.Parameters.AddWithValue("@donviid", donviid);
         Sqlcom.Connection = Scon.OpenCon();
         int R = Sqlcom.ExecuteNonQuery();
         Scon.CloseCon();
         return(R);
     }
     catch
     {
         return(0);
     }
 }
Example #11
0
 protected int PDDeleteMUCLUONG(float bacluong)
 {
     try
     {
         SqlCon     Scon   = new SqlCon();
         SqlCommand Sqlcom = new SqlCommand();
         Sqlcom.CommandType = CommandType.StoredProcedure;
         Sqlcom.CommandText = "spDeleteMUCLUONG";
         Sqlcom.Parameters.AddWithValue("@bacluong", bacluong);
         Sqlcom.Connection = Scon.OpenCon();
         int R = Sqlcom.ExecuteNonQuery();
         Scon.CloseCon();
         return(R);
     }
     catch
     {
         return(0);
     }
 }
Example #12
0
 protected int PDDeleteNHANVIEN(string manv)
 {
     try
     {
         SqlCon     Scon   = new SqlCon();
         SqlCommand Sqlcom = new SqlCommand();
         Sqlcom.CommandType = CommandType.StoredProcedure;
         Sqlcom.CommandText = "spDeleteNHANVIEN";
         Sqlcom.Parameters.AddWithValue("@manv", manv);
         Sqlcom.Connection = Scon.OpenCon();
         int R = Sqlcom.ExecuteNonQuery();
         Scon.CloseCon();
         return(R);
     }
     catch
     {
         return(0);
     }
 }
Example #13
0
 protected int PDUpdateGIOITINH(decimal gioitinhid, string gioitinh)
 {
     try
     {
         SqlCon     Scon   = new SqlCon();
         SqlCommand Sqlcom = new SqlCommand();
         Sqlcom.CommandType = CommandType.StoredProcedure;
         Sqlcom.CommandText = "spUpdateGIOITINH";
         Sqlcom.Parameters.AddWithValue("@gioitinhid", gioitinhid);
         Sqlcom.Parameters.AddWithValue("@gioitinh", gioitinh);
         Sqlcom.Connection = Scon.OpenCon();
         int R = Sqlcom.ExecuteNonQuery();
         Scon.CloseCon();
         return(R);
     }
     catch
     {
         return(0);
     }
 }
Example #14
0
 protected int PDUpdateCHUCVU(decimal cvid, string macv, string tencv)
 {
     try
     {
         SqlCon     Scon   = new SqlCon();
         SqlCommand Sqlcom = new SqlCommand();
         Sqlcom.CommandType = CommandType.StoredProcedure;
         Sqlcom.CommandText = "spUpdateCHUCVU";
         Sqlcom.Parameters.AddWithValue("@cvid", cvid);
         Sqlcom.Parameters.AddWithValue("@macv", macv);
         Sqlcom.Parameters.AddWithValue("@tencv", tencv);
         Sqlcom.Connection = Scon.OpenCon();
         int R = Sqlcom.ExecuteNonQuery();
         Scon.CloseCon();
         return(R);
     }
     catch
     {
         return(0);
     }
 }
Example #15
0
 protected int PDUpdateLOAIBD(decimal bdid, string loaibd, DateTime ngayps)
 {
     try
     {
         SqlCon     Scon   = new SqlCon();
         SqlCommand Sqlcom = new SqlCommand();
         Sqlcom.CommandType = CommandType.StoredProcedure;
         Sqlcom.CommandText = "spUpdateLOAIBD";
         Sqlcom.Parameters.AddWithValue("@bdid", bdid);
         Sqlcom.Parameters.AddWithValue("@loaibd", loaibd);
         Sqlcom.Parameters.AddWithValue("@ngayps", ngayps);
         Sqlcom.Connection = Scon.OpenCon();
         int R = Sqlcom.ExecuteNonQuery();
         Scon.CloseCon();
         return(R);
     }
     catch
     {
         return(0);
     }
 }
Example #16
0
 protected int PDUpdateTONGIAO(decimal tgid, string matg, string tentg)
 {
     try
     {
         SqlCon     Scon   = new SqlCon();
         SqlCommand Sqlcom = new SqlCommand();
         Sqlcom.CommandType = CommandType.StoredProcedure;
         Sqlcom.CommandText = "spUpdateTONGIAO";
         Sqlcom.Parameters.AddWithValue("@tgid", tgid);
         Sqlcom.Parameters.AddWithValue("@matg", matg);
         Sqlcom.Parameters.AddWithValue("@tentg", tentg);
         Sqlcom.Connection = Scon.OpenCon();
         int R = Sqlcom.ExecuteNonQuery();
         Scon.CloseCon();
         return(R);
     }
     catch
     {
         return(0);
     }
 }
Example #17
0
 protected int PDUpdateLOAIHOPDONG(decimal loaihdid, string mahd, string tenhd)
 {
     try
     {
         SqlCon     Scon   = new SqlCon();
         SqlCommand Sqlcom = new SqlCommand();
         Sqlcom.CommandType = CommandType.StoredProcedure;
         Sqlcom.CommandText = "spUpdateLOAIHOPDONG";
         Sqlcom.Parameters.AddWithValue("@loaihdid", loaihdid);
         Sqlcom.Parameters.AddWithValue("@mahd", mahd);
         Sqlcom.Parameters.AddWithValue("@tenhd", tenhd);
         Sqlcom.Connection = Scon.OpenCon();
         int R = Sqlcom.ExecuteNonQuery();
         Scon.CloseCon();
         return(R);
     }
     catch
     {
         return(0);
     }
 }
Example #18
0
 protected int PDUpdateDANTOC(decimal dantocid, string madt, string tendt)
 {
     try
     {
         SqlCon     Scon   = new SqlCon();
         SqlCommand Sqlcom = new SqlCommand();
         Sqlcom.CommandType = CommandType.StoredProcedure;
         Sqlcom.CommandText = "spUpdateDANTOC";
         Sqlcom.Parameters.AddWithValue("@dantocid", dantocid);
         Sqlcom.Parameters.AddWithValue("@madt", madt);
         Sqlcom.Parameters.AddWithValue("@tendt", tendt);
         Sqlcom.Connection = Scon.OpenCon();
         int R = Sqlcom.ExecuteNonQuery();
         Scon.CloseCon();
         return(R);
     }
     catch
     {
         return(0);
     }
 }
Example #19
0
 protected int PDInsertCHUYENMON(decimal cmid, string macm, string tencm)
 {
     try
     {
         SqlCon     Scon   = new SqlCon();
         SqlCommand Sqlcom = new SqlCommand();
         Sqlcom.CommandType = CommandType.StoredProcedure;
         Sqlcom.CommandText = "spInsertCHUYENMON";
         Sqlcom.Parameters.AddWithValue("@cmid", cmid);
         Sqlcom.Parameters.AddWithValue("@macm", macm);
         Sqlcom.Parameters.AddWithValue("@tencm", tencm);
         Sqlcom.Connection = Scon.OpenCon();
         int R = 0;
         R = Sqlcom.ExecuteNonQuery();
         Scon.CloseCon();
         return(R);
     }
     catch
     {
         return(0);
     }
 }
Example #20
0
 protected int PDUpdateTAIKHOAN(string Taikhoan, string matkhau, string quyen, DateTime ngaylap)
 {
     try
     {
         SqlCon     Scon   = new SqlCon();
         SqlCommand Sqlcom = new SqlCommand();
         Sqlcom.CommandType = CommandType.StoredProcedure;
         Sqlcom.CommandText = "spUpdateTAIKHOAN";
         Sqlcom.Parameters.AddWithValue("@Taikhoan", Taikhoan);
         Sqlcom.Parameters.AddWithValue("@matkhau", matkhau);
         Sqlcom.Parameters.AddWithValue("@quyen", quyen);
         Sqlcom.Parameters.AddWithValue("@ngaylap", ngaylap);
         Sqlcom.Connection = Scon.OpenCon();
         int R = Sqlcom.ExecuteNonQuery();
         Scon.CloseCon();
         return(R);
     }
     catch
     {
         return(0);
     }
 }
Example #21
0
 protected int PDInsertTRINHDO(decimal tdid, string matd, string tentd)
 {
     try
     {
         SqlCon     Scon   = new SqlCon();
         SqlCommand Sqlcom = new SqlCommand();
         Sqlcom.CommandType = CommandType.StoredProcedure;
         Sqlcom.CommandText = "spInsertTRINHDO";
         Sqlcom.Parameters.AddWithValue("@tdid", tdid);
         Sqlcom.Parameters.AddWithValue("@matd", matd);
         Sqlcom.Parameters.AddWithValue("@tentd", tentd);
         Sqlcom.Connection = Scon.OpenCon();
         int R = 0;
         R = Sqlcom.ExecuteNonQuery();
         Scon.CloseCon();
         return(R);
     }
     catch
     {
         return(0);
     }
 }
Example #22
0
 protected int PDUpdatePHONG(decimal phongid, string maphong, string tenphong, string Dienthoai)
 {
     try
     {
         SqlCon     Scon   = new SqlCon();
         SqlCommand Sqlcom = new SqlCommand();
         Sqlcom.CommandType = CommandType.StoredProcedure;
         Sqlcom.CommandText = "spUpdatePHONG";
         Sqlcom.Parameters.AddWithValue("@phongid", phongid);
         Sqlcom.Parameters.AddWithValue("@maphong", maphong);
         Sqlcom.Parameters.AddWithValue("@tenphong", tenphong);
         Sqlcom.Parameters.AddWithValue("@Dienthoai", Dienthoai);
         Sqlcom.Connection = Scon.OpenCon();
         int R = Sqlcom.ExecuteNonQuery();
         Scon.CloseCon();
         return(R);
     }
     catch
     {
         return(0);
     }
 }