示例#1
0
        //Hiển thị tất cả sinh viên

        /*  public DataTable showAll()
         * {
         *    return dalGeneric.selectAll("HoaDonBan");
         * }
         * //Thêm sinh viên
         * public bool Add(DTOHDBan hdb)
         * {
         *    string insert = string.Format("insert into HoaDonBan (SoHDB,MaNV,NgayBan,MaKH,TongTien) values ('{0}','{1}','{2}','{3}',{4})",
         *        hdb.SoHDB, hdb.MaNV, hdb.NgayBan, hdb.MaKH, hdb.TongTien);
         *    return dalGeneric.ExecuteNonQuery(insert);
         * }*/

        //dùng thủ tục
        public DataTable showAll()
        {
            return(dalGeneric.selectAllProc("showAllHDB"));
        }
        //Hiển thị tất cả sinh viên

        /*public DataTable showAll()
         * {
         *  return dalGeneric.selectAll("KhachHang");
         * }
         * //Thêm sinh viên
         * public bool Add(DTOKhachHang kh)
         * {
         *  string insert = string.Format("insert into KhachHang (MaKH,TenKH,DiaChi,DienThoai) values ('{0}','{1}','{2}','{3}')",
         *      kh.MaKH, kh.TenKH,kh.DiaChi,kh.DienThoai);
         *  return dalGeneric.ExecuteNonQuery(insert);
         * }
         * public bool Edit(DTOKhachHang kh)
         * {
         *  string update = string.Format("update  KhachHang set  TenKH = '{0}', DiaChi = '{1}', DienThoai = '{2}' where MaKH = '{3}'",
         *      kh.TenKH,kh.DiaChi,kh.DienThoai,kh.MaKH);
         *  return dalGeneric.ExecuteNonQuery(update);
         * }
         *
         * public bool Delete(string kh)
         * {
         *  string delete = string.Format("delete from  KhachHang where MaKH = '{0}'", kh);
         *  return dalGeneric.ExecuteNonQuery(delete);
         * }*/
        #endregion
        public DataTable showAll()
        {
            return(dalGeneric.selectAllProc("showAllKhachHang"));
        }