public void QuocTich_Edit(int QuocTichID,string TenQuocTich)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@QuocTichID", QuocTichID);
     SQLDB.Addparameter("@TenQuocTich", TenQuocTich);
     SQLDB.executenonquery("sp_QuocTich_Edit", CommandType.StoredProcedure);
 }
 public void LoaiPhong_Edit(int LoaiPhongID,string LoaiPhongName)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@LoaiPhongID", LoaiPhongID);
     SQLDB.Addparameter("@LoaiPhongName", LoaiPhongName);
     SQLDB.executenonquery("sp_LoaiPhong_Edit", CommandType.StoredProcedure);
 }
 public void HoaDonDichVu_ChuyenPhong(int HoaDonID, int PhongID)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@HoaDonID", HoaDonID);
     SQLDB.Addparameter("@PhongID", PhongID);
     SQLDB.executenonquery("sp_HoaDonDichVu_ChuyenPhong", CommandType.StoredProcedure);
 }
Example #4
0
 public void DichVu_Add(string DichVuName,decimal GiaTien)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@DichVuName", DichVuName);
     SQLDB.Addparameter("@GiaTien", GiaTien);
     SQLDB.executenonquery("sp_DichVu_Add", CommandType.StoredProcedure);
 }
Example #5
0
 public void HoaDon_ThanhToan(int HoaDonID,decimal TongTien)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@HoaDonID", HoaDonID);
     SQLDB.Addparameter("@TongTien", TongTien);
     SQLDB.executenonquery("sp_HoaDon_ThanhToan", CommandType.StoredProcedure);
 }
Example #6
0
 public void ModulePermission_Add(int GroupID, string ListModulePermission)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@GroupID", GroupID);
     SQLDB.Addparameter("@ListModulePermission", ListModulePermission);
     SQLDB.executenonquery("sp_ModulePermission_Add", CommandType.StoredProcedure);
 }
Example #7
0
 public void DichVu_Edit_SL(int DichVuID, int SL)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@DichVuID", DichVuID);
     SQLDB.Addparameter("@SL", SL);
     SQLDB.executenonquery("sp_DichVu_Edit_SL", CommandType.StoredProcedure);
 }
 public KhachHangInfo KhachHang_GetItem(int KhachHangID)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@KhachHangID", KhachHangID);
     SqlDataReader rd = SQLDB.executereader("sp_KhachHang_GetItem", CommandType.StoredProcedure);
     KhachHangInfo item = null;
     while (rd.Read())
     {
         item = new KhachHangInfo();
         item.KhachHangID = int.Parse(rd["KhachHangID"].ToString());
         item.HoTen = rd["HoTen"].ToString();
         item.DiaChi = rd["DiaChi"].ToString();
         item.DienThoai = rd["DienThoai"].ToString();
         item.CMND = rd["CMND"].ToString();
         item.NgaySinh = rd["NgaySinh"].ToString();
         item.NoiSinh = rd["NoiSinh"].ToString();
         item.SoVisa = rd["SoVisa"].ToString();
         item.ThoiHanVisa = rd["ThoiHanVisa"].ToString();
         item.NguoiTiepNhan = rd["NguoiTiepNhan"].ToString();
         item.NgayNhapCanh = rd["NgayNhapCanh"].ToString();
         item.TamTruTuNgay = rd["TamTruTuNgay"].ToString();
         item.TamTruDenNgay = rd["TamTruDenNgay"].ToString();
         item.QuocTichID = int.Parse(rd["QuocTichID"].ToString());
         item.GioiTinh = int.Parse(rd["GioiTinh"].ToString());
     }
     return item;
 }
Example #9
0
 public HoaDonInfo HoaDon_GetItem(int HoaDonID)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@HoaDonID", HoaDonID);
     SqlDataReader rd = SQLDB.executereader("sp_HoaDon_GetItem", CommandType.StoredProcedure);
     HoaDonInfo item = null;
     while (rd.Read())
     {
         item = new HoaDonInfo();
         item.NgayVao = rd["NgayVao"].ToString();
         item.NgayVao_So = int.Parse(rd["NgayVao_So"].ToString());
         item.GioVao = int.Parse(rd["GioVao"].ToString());
         item.PhutVao = int.Parse(rd["PhutVao"].ToString());
         item.NgayRa = rd["NgayRa"].ToString();
         item.NgayRa_So = int.Parse(rd["NgayRa_So"].ToString());
         item.GioRa = int.Parse(rd["GioRa"].ToString());
         item.PhutRa = int.Parse(rd["PhutRa"].ToString());
         item.KhuyenMai = decimal.Parse(rd["KhuyenMai"].ToString());
         item.KhoanKhac = decimal.Parse(rd["KhoanKhac"].ToString());
         item.GhiChu = rd["GhiChu"].ToString();
         item.DaThanhToan = int.Parse(rd["DaThanhToan"].ToString());
         item.LoaiThue = int.Parse(rd["LoaiThue"].ToString());
         item.Ca = int.Parse(rd["Ca"].ToString());
         item.TenKhachHang = rd["TenKhachHang"].ToString();
     }
     return item;
 }
 public void Phong_KhachHang_Delete(int HoaDonID, int KhachHangID)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@HoaDonID", HoaDonID);
     SQLDB.Addparameter("@KhachHangID", KhachHangID);
     SQLDB.executenonquery("sp_Phong_KhachHang_Delete", CommandType.StoredProcedure);
 }
        public List<TKDoanhThuDichVuInfo> HoaDonDichVu_GetItems_TheoThang(int Thang, int Nam)
        {
            SQLDataHelper SQLDB = new SQLDataHelper();
            SQLDB.Addparameter("@Thang", Thang);
            SQLDB.Addparameter("@Nam", Nam);
            SqlDataReader rd = SQLDB.executereader("sp_HoaDonDichVu_GetItems_TheoThang", CommandType.StoredProcedure);
            List<TKDoanhThuDichVuInfo> list = new List<TKDoanhThuDichVuInfo>();
            TKDoanhThuDichVuInfo item = null;
            while (rd.Read())
            {
                item = new TKDoanhThuDichVuInfo();
                item.HoaDon_DichVuID = int.Parse(rd["HoaDon_DichVuID"].ToString());
                item.HoaDonID = int.Parse(rd["HoaDonID"].ToString());
                item.PhongID = int.Parse(rd["PhongID"].ToString());
                item.DichVuID = int.Parse(rd["DichVuID"].ToString());
                item.KhachHangID = int.Parse(rd["KhachHangID"].ToString());
                item.HoTen = rd["HoTen"].ToString();
                item.PhongName = rd["PhongName"].ToString();
                item.DichVuName = rd["DichVuName"].ToString();
                item.NgaySuDung = rd["NgaySuDung"].ToString();
                item.SoLuong = int.Parse(rd["SoLuong"].ToString());
                item.DonGia = decimal.Parse(rd["DonGia"].ToString());
                item.TongTien = decimal.Parse(rd["TongTien"].ToString());

                list.Add(item);
            }
            return list;
        }
 public void KhachHang_Delete(int KhachHangID, string DeletedByUser, string DeletedDate)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@KhachHangID", KhachHangID);
     SQLDB.Addparameter("@DeletedByUser", DeletedByUser);
     SQLDB.Addparameter("@DeletedDate", DeletedDate);
     SQLDB.executenonquery("sp_KhachHang_Delete", CommandType.StoredProcedure);
 }
 public int GroupIDByUserName(string UserName)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@UserName", UserName);
     object GroupID;
     GroupID = SQLDB.executesalar("sp_GroupIDByUserName", CommandType.StoredProcedure);
     return int.Parse(GroupID.ToString());
 }
 public void PhieuNhapKho_Delete(int PhieuNhapKhoID, string DeletedByUser, string DeletedDate)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@PhieuNhapKhoID", PhieuNhapKhoID);
     SQLDB.Addparameter("@DeletedByUser", DeletedByUser);
     SQLDB.Addparameter("@DeletedDate", DeletedDate);
     SQLDB.executenonquery("sp_PhieuNhapKho_Delete", CommandType.StoredProcedure);
 }
Example #15
0
 public int Users_Login( string UserName,string PassWord)
 {
     object result;
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@UserName", UserName);
     SQLDB.Addparameter("@PassWord", PassWord);
     result = SQLDB.executesalar("sp_Users_Login", CommandType.StoredProcedure);
     return int.Parse(result.ToString());
 }
 public void Ngay_Phong_Add(string ListPhongID, decimal GiaNgay, decimal GiaTuan, decimal GiaThang)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@ListPhongID", ListPhongID);
     SQLDB.Addparameter("@GiaNgay", GiaNgay);
     SQLDB.Addparameter("@GiaTuan", GiaTuan);
     SQLDB.Addparameter("@GiaThang", GiaThang);
     SQLDB.executenonquery("sp_Ngay_Phong_Add", CommandType.StoredProcedure);
 }
 public void Nguoi_Phong_Add(string ListPhongID, string ListNguoiPhongName, string ListCongThem, string CongThemTiepTheo)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@ListPhongID", ListPhongID);
     SQLDB.Addparameter("@ListNguoiPhongName", ListNguoiPhongName);
     SQLDB.Addparameter("@ListCongThem", ListCongThem);
     SQLDB.Addparameter("@CongThemTiepTheo", CongThemTiepTheo);
     SQLDB.executenonquery("sp_Nguoi_Phong_Add", CommandType.StoredProcedure);
 }
Example #18
0
 public void Group_Add(string GroupName, string Descriptions, int IsActived, int CreatedByUser, string CreatedDate)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@GroupName", GroupName);
     SQLDB.Addparameter("@Descriptions", Descriptions);
     SQLDB.Addparameter("@IsActived", IsActived);
     SQLDB.Addparameter("@CreatedByUser", CreatedByUser);
     SQLDB.Addparameter("@CreatedDate", CreatedDate);
     SQLDB.executenonquery("sp_Group_Add", CommandType.StoredProcedure);
 }
 public void ChiTietPhieuNhapKho_Add(int PhieuNhapKhoID, int SoLuong, decimal DonGia, decimal ThanhTien, int DichVuID)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@PhieuNhapKhoID", PhieuNhapKhoID);
     SQLDB.Addparameter("@SoLuong", SoLuong);
     SQLDB.Addparameter("@DonGia", DonGia);
     SQLDB.Addparameter("@ThanhTien", ThanhTien);
     SQLDB.Addparameter("@DichVuID", DichVuID);
     SQLDB.executenonquery("sp_ChiTietPhieuNhapKho_Add", CommandType.StoredProcedure);
 }
Example #20
0
 public void Phong_Add(int LoaiPhongId,string PhongName,int TienNghiID,int SoGiuong,int SoNguoi)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@LoaiPhongId", LoaiPhongId);
     SQLDB.Addparameter("@PhongName", PhongName);
     SQLDB.Addparameter("@TienNghiID", TienNghiID);
     SQLDB.Addparameter("@SoGiuong", SoGiuong);
     SQLDB.Addparameter("@SoNguoi", SoNguoi);
     SQLDB.executenonquery("sp_Phong_Add", CommandType.StoredProcedure);
 }
 public void Gio_Phong_Add(string ListPhongID, string ListGioPhongName, int PhanTram, string ListGiaTien, string Status)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@ListPhongID", ListPhongID);
     SQLDB.Addparameter("@ListGioPhongName", ListGioPhongName);
     SQLDB.Addparameter("@PhanTram", PhanTram);
     SQLDB.Addparameter("@ListGiaTien", ListGiaTien);
     SQLDB.Addparameter("@Status", Status);
     SQLDB.executenonquery("sp_Gio_Phong_Add", CommandType.StoredProcedure);
 }
Example #22
0
 public void Group_Edit(int GroupID, string GroupName, string Descriptions, int IsActived, int ModifiedByUser, string ModifiedDate)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@GroupID", GroupID);
     SQLDB.Addparameter("@GroupName", GroupName);
     SQLDB.Addparameter("@Descriptions", Descriptions);
     SQLDB.Addparameter("@IsActived", IsActived);
     SQLDB.Addparameter("@ModifiedByUser", ModifiedByUser);
     SQLDB.Addparameter("@ModifiedDate", ModifiedDate);
     SQLDB.executenonquery("sp_Group_Edit", CommandType.StoredProcedure);
 }
 public void UserGroup_Add(int UserID, string ListGroupID, string ExpiryDate, string EffectiveDate, int IsTrialUsed)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@UserID", UserID);
     SQLDB.Addparameter("@ListGroupID", ListGroupID);
     SQLDB.Addparameter("@ExpiryDate", ExpiryDate);
     SQLDB.Addparameter("@EffectiveDate", EffectiveDate);
     SQLDB.Addparameter("@IsTrialUsed", IsTrialUsed);
     //SQLDB.Addparameter("@CreatedByUser", CreatedByUser);
     //SQLDB.Addparameter("@CreatedDate", CreatedDate);
     SQLDB.executenonquery("sp_UserGroup_Add", CommandType.StoredProcedure);
 }
Example #24
0
 public void User_Add(string UserName, string PassWord, string FullName, string DisplayName, int IsActived, int CreatedByUser, string CreatedDate)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@UserName", UserName);
     SQLDB.Addparameter("@PassWord", PassWord);
     SQLDB.Addparameter("@FullName", FullName);
     SQLDB.Addparameter("@DisplayName", DisplayName);
     SQLDB.Addparameter("@IsActived", IsActived);
     SQLDB.Addparameter("@CreatedByUser", CreatedByUser);
     SQLDB.Addparameter("@CreatedDate", CreatedDate);
     SQLDB.executenonquery("sp_User_Add", CommandType.StoredProcedure);
 }
 public void PhieuNhapKho_Add(string NgayNhap, int ThangNhap, int NamNhap, int NgayNhapSo, string GhiChu,
     string CreatedByUser, string CreatedDate)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@NgayNhap", NgayNhap);
     SQLDB.Addparameter("@ThangNhap", ThangNhap);
     SQLDB.Addparameter("@NamNhap", NamNhap);
     SQLDB.Addparameter("@NgayNhapSo", NgayNhapSo);
     SQLDB.Addparameter("@GhiChu", GhiChu);
     SQLDB.Addparameter("@CreatedByUser", CreatedByUser);
     SQLDB.Addparameter("@CreatedDate", CreatedDate);
     SQLDB.executenonquery("sp_PhieuNhapKho_Add", CommandType.StoredProcedure);
 }
 public void PhieuNhapKho_Edit(int PhieuNhapKhoID, string NgayNhap, int ThangNhap, int NamNhap, int NgayNhapSo, string GhiChu,
     string ModifiedByUser, string ModifiedDate)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@PhieuNhapKhoID", PhieuNhapKhoID);
     SQLDB.Addparameter("@NgayNhap", NgayNhap);
     SQLDB.Addparameter("@ThangNhap", ThangNhap);
     SQLDB.Addparameter("@NamNhap", NamNhap);
     SQLDB.Addparameter("@NgayNhapSo", NgayNhapSo);
     SQLDB.Addparameter("@GhiChu", GhiChu);
     SQLDB.Addparameter("@ModifiedByUser", ModifiedByUser);
     SQLDB.Addparameter("@ModifiedDate", ModifiedDate);
     SQLDB.executenonquery("sp_PhieuNhapKho_Edit", CommandType.StoredProcedure);
 }
Example #27
0
 public QuocTichInfo QuocTich_GetItem(int QuocTichID)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@QuocTichID", QuocTichID);
      SqlDataReader rd = SQLDB.executereader("sp_QuocTich_GetItem", CommandType.StoredProcedure);
     QuocTichInfo item=null;
     while (rd.Read())
     {
         item = new QuocTichInfo();
         item.QuocTichID = int.Parse(rd["QuocTichID"].ToString());
         item.TenQuocTich = rd["TenQuocTich"].ToString();
     }
     return item;
 }
 public LoaiPhongInfo LoaiPhong_GetItem(int LoaiPhongID)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@LoaiPhongID", LoaiPhongID);
      SqlDataReader rd = SQLDB.executereader("sp_LoaiPhong_GetItem", CommandType.StoredProcedure);
     LoaiPhongInfo item=null;
     while (rd.Read())
     {
         item = new LoaiPhongInfo();
         item.LoaiPhongID = int.Parse(rd["LoaiPhongID"].ToString());
         item.LoaiPhongName = rd["LoaiPhongName"].ToString();
     }
     return item;
 }
 public List<LoaiPhongInfo> LoaiPhong_GetItems()
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SqlDataReader rd = SQLDB.executereader("sp_LoaiPhong_GetItems", CommandType.StoredProcedure);
     List<LoaiPhongInfo> list = new List<LoaiPhongInfo>();
     LoaiPhongInfo item = null;
     while (rd.Read())
     {
         item = new LoaiPhongInfo();
         item.LoaiPhongID = int.Parse(rd["LoaiPhongID"].ToString());
         item.LoaiPhongName = rd["LoaiPhongName"].ToString();
         list.Add(item);
     }
     return list;
 }
 public void HoaDon_KhachHang_Add(string LoaiHoaDon,int KhachHangId,int PhongID,string NgayBatDau,int GioBatDau,int PhutBatDau,int NgayBatDau_So,int ThangBatDau,int NamBatDau,string NgayKetThuc)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@LoaiHoaDon", LoaiHoaDon);
     SQLDB.Addparameter("@KhachHangId", KhachHangId);
     SQLDB.Addparameter("@PhongID", PhongID);
     SQLDB.Addparameter("@NgayBatDau", NgayBatDau);
     SQLDB.Addparameter("@GioBatDau", GioBatDau);
     SQLDB.Addparameter("@PhutBatDau", PhutBatDau);
     SQLDB.Addparameter("@NgayBatDau_So", NgayBatDau_So);
     SQLDB.Addparameter("@ThangBatDau", ThangBatDau);
     SQLDB.Addparameter("@NamBatDau", NamBatDau);
     SQLDB.Addparameter("@NgayKetThuc", NgayKetThuc);
     SQLDB.executenonquery("sp_HoaDon_KhachHang_Add", CommandType.StoredProcedure);
 }