protected DataTable PDGetListCHAMCONG() { SqlCon Scon = new SqlCon(); SqlDataAdapter Sqlda = new SqlDataAdapter("spGetListCHAMCONG", Scon.OpenCon()); DataTable DTable = new DataTable(); Sqlda.Fill(DTable); Scon.CloseCon(); return(DTable); }
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); }
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); }
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); }
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); }
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); }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }