public int GetTuoiNhoNhat() {
     try {
         connect = new ConnectionData();
         DataTable dt= connect.GetData("GETTUOINHONHAT");
         return int.Parse(dt.Rows[0][0].ToString());
     }catch(SqlException ex){
         throw ex;
     }
 }
 public DataTable LoadTenLoaiDG() {
     try
     {
         connect = new ConnectionData();
         return connect.GetData("LoadTenLoaiDG");
     }
     catch(SqlException ex) {
         throw ex;
     }
 }
 public DataTable TheLoai_GetByLast()
 {
     try
     {
         connect = new ConnectionData();
         return connect.GetData("TheLoai_GetByLast");
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }
Exemplo n.º 4
0
 public DataTable Load()
 {
     try
     {
         connect = new ConnectionData();
         return connect.GetData("NXB_Load");
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }
 public DataTable QuyDinh_LoadDuLieu()
 {
     try
     {
         connect = new ConnectionData();
         return connect.GetData("QuyDinh_LoadDuLieu");
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }
 public DataTable DauSach_LoadSach()
 {
     try
     {
         connect = new ConnectionData();
         return connect.GetData("DAUSACH_LOAD");
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }
        public DataTable LoadTL_CoTenTL()
        {
            try
            {
                connect = new ConnectionData();
                return connect.GetData("THELOAI_LoadDuLieuCoTenTL");

            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }
 public DataTable TheLoai_LoadTheLoai()
 {
     try
     {
         connect = new ConnectionData();
         return connect.GetData("TheLoai_LoadDuLieu");
     }
     catch (SqlException ex)
     {
         throw ex;
  
     }
 }
 public DataTable DauSach_TraCuu()
 {
     try
     {
         connect = new ConnectionData();
         return connect.GetData("DauSach_TraCuu");
     }
     catch (SqlException ex)
     {
         throw ex;
     }
     
 }
Exemplo n.º 10
0
        public DataTable LoaiDG_LoadDuLieu()
        {
            try
            {
                connect = new ConnectionData();
                return connect.GetData("[LoaiDG_LoadDuLieu]");
            }
            catch (SqlException ex)
            {
                throw ex;

            }
        }
 public DataTable timDauSachDayDu(DauSachDTO dsDTO)
 {
     try
     {
         connect = new ConnectionData();
         int Nparamater = 1;
         string[] name = new string[Nparamater];
         object[] value = new object[Nparamater];
         name[0] = "@search";
         value[0] = dsDTO.TenDS;
         return connect.GetData("DauSach_TimDayDu", name, value, Nparamater);
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }
 //Chưa dùng
 public DataTable DauSach_LoadMaDauSach(DauSachDTO p)
 {
     try
     {
         connect = new ConnectionData();
         int Nparamater = 1;
         string[] name = new string[Nparamater];
         object[] value = new object[Nparamater];
         name[0] = "@tends";
         value[0] = p.TenDS;
         return connect.GetData("DAUSACH_LOADMADAUSACH", name, value, Nparamater);
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }
Exemplo n.º 13
0
 public DataTable LoaiDG_LoadDuLieuCotMaLDG(LoaiDGDTO ldgDTO)
 {
     try
     {
         connect = new ConnectionData();
         int Nparamater = 1;
         string[] name = new string[Nparamater];
         object[] value = new object[Nparamater];
         name[0] = "@maldg";
         value[0] = ldgDTO.MaLDG;
         return connect.GetData("LoaiDocGia_LoadDuLieuCotMaLDG", name, value, Nparamater);
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }
Exemplo n.º 14
0
 public DataTable LoadMaTacGia(TacGiaDTO tgDTO)
 {
     try
     {
         connect = new ConnectionData();
         int Nparamater = 1;
         string[] name = new string[Nparamater];
         object[] value = new object[Nparamater];
         name[0] = "@matg";
         value[0] = tgDTO.MaTG;
         return connect.GetData("TacGia_LoadDuLieuCotMaTG", name, value, Nparamater);
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }
 public DataTable TheLoai_LoadDuLieuCotMaTL(TheLoaiDTO tlDTO)
 {
     try
     {
         connect = new ConnectionData();
         int Nparamater = 1;
         string[] name = new string[Nparamater];
         object[] value = new object[Nparamater];
         name[0] = "@matl";
         value[0] = tlDTO.MaTL;
         return connect.GetData("TheLoai_LoadDuLieuCotMaTL", name, value, Nparamater);
     }
     catch(SqlException ex)
     {
         throw ex;
     }
 }
 public DataTable timDauSachTheoTheLoai(DauSachDTO dsDTO)
 {
     try
     {
         connect = new ConnectionData();
         int Nparamater = 1;
         string[] name = new string[Nparamater];
         object[] value = new object[Nparamater];
         name[0] = "@theloai";
         value[0] = dsDTO.MaTL;
         return connect.GetData("DauSach_TimTheoTheLoai", name, value, Nparamater);
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }
 public DataTable PhieuMuonSach_ThemSach_MaSach(SachDTO p)
 {
     try
     {
         connect = new ConnectionData();
         int Nparamater = 1;
         string[] name = new string[Nparamater];
         object[] value = new object[Nparamater];
         name[0] = "@MaSach";
         value[0] = p.MaSach;
         return connect.GetData("PHIEUSACH_PhieuMuonSach_ThemSach_MaSach", name, value, Nparamater);
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }
 public DataTable LoadSach_TimSach(DauSachDTO p)
 {
     try
     {
         connect = new ConnectionData();
         int Nparamater = 1;
         string[] name = new string[Nparamater];
         object[] value = new object[Nparamater];
         name[0] = "@MaDS";
         value[0] = p.MaDS;
         return connect.GetData("PHIEUSACH_TIMSACH", name, value, Nparamater);
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }
Exemplo n.º 19
0
 public DataTable LoadDuLieuCotMaNXB(NXBDTO nxbDTO)
 {
     try
     {
         connect = new ConnectionData();
         int Nparamater = 1;
         string[] name = new string[Nparamater];
         object[] value = new object[Nparamater];
         name[0] = "@manxb";
         value[0] = nxbDTO.MaNXB;
         return connect.GetData("NXB_LoadDuLieuCotMaNXB", name, value, Nparamater);
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }
Exemplo n.º 20
0
 public DataTable TimTheoTen(NXBDTO nxbDTO)
 {
     try
     {
         connect = new ConnectionData();
         int Nparamater = 1;
         string[] name = new string[Nparamater];
         object[] value = new object[Nparamater];
         name[0] = "@search";
         value[0] = nxbDTO.TenNXB;
         return connect.GetData("NXB_TimTheoTen", name, value, Nparamater);
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }
        public DataTable CheckDangNhap(DangNhapDTO p)
        {
            try
            {
                connect = new ConnectionData();
                int Nparameter = 2;
                string[] name = new string[Nparameter];
                object[] value = new object[Nparameter];

                name[0] = "@TenDangNhap";
                value[0] = p.TenDangNhap;
                name[1] = "@MatKhau";
                value[1] = p.MatKhau;
                return connect.GetData("DANGNHAP_KiemTra", name, value, Nparameter);
            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }
Exemplo n.º 22
0
        public DataTable TimDG_HoTen(DocGiaDTO dgDTO)
        {
            try
            {
                connect = new ConnectionData();
                int Nparamater = 1;
                string[] name = new string[Nparamater];
                object[] values = new object[Nparamater];
                name[0] = "@HoVaTen";
                values[0] = dgDTO.HoVaTen;
                return connect.GetData("FindDocGia_GetByHoTen", name, values, Nparamater);

            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }
        public DataTable QuanLyMuonTra_LoadPhieuSachDaTra()
        {
            try
            {
                connect = new ConnectionData();

                return connect.GetData("PHIEUSACH_QuanLyMuonTra_LoadPhieuSachDaTra");
            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }
Exemplo n.º 24
0
 // Tim doc gia theo the loai
 public DataTable LoadDG_TimTheoLoaiDG(DocGiaDTO dgDTO) {
     try
     {
         connect = new ConnectionData();
         int Nparamater = 1;
         string[] name=new string[Nparamater];
         object[] values=new object[Nparamater];
         name[0] = "@loaidocgia";
         values[0] = dgDTO.MaLDG;
         return connect.GetData("DocGia_TimTheoLoaiDG",name,values,Nparamater);
     }
     catch(SqlException ex) {
         throw ex;
     }
 }
 public DataTable LoadDuLieuCotMaDS(DauSachDTO dsDTO)
 {
     try
     {
         connect = new ConnectionData();
         int Nparamater = 1;
         string[] name = new string[Nparamater];
         object[] value = new object[Nparamater];
         name[0] = "@mads";
         value[0] = dsDTO.MaDS;
         return connect.GetData("DauSach_LoadDuLieuCotMaDS", name, value, Nparamater);
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }
Exemplo n.º 26
0
        // tim doc gia theo loai doc gia
        /*public DataTable TimDG_LoaiDG(DocGiaDTO dgDTO) {
            try {
                connect = new ConnectionData();
                int Nparamater = 1;
                string[] name = new string[Nparamater];
                object[] values = new object[Nparamater];
                name[0] = "@loaidocgia";
                values[0] = dgDTO.MaLDG;
                return connect.GetData("FindDocGia_GetByLoaiDG",name,values,Nparamater);

            }catch(SqlException ex){
                throw ex;
            }
        }*/
        // tim doc gia theo ten
        public DataTable DocGia_TimTheoTen(DocGiaDTO dgDTO)
        {
            try
            {
                connect = new ConnectionData();
                int Nparamater = 1;
                string[] name = new string[Nparamater];
                object[] value = new object[Nparamater];
                name[0] = "@search";
                value[0] = dgDTO.MaDG;
                return connect.GetData("DocGia_TimTheoTen", name, value, Nparamater);
            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }