Cucuducoding's Blog

STORE PROCEDURE – Retrieve

Posted by: cucuducoding on: May 5, 2011

1. Buat sebuah table dengan design dibawah ini , lalu berinama table dengan nama Mahasiswa

Note :

  • Primary Key = ID & AutoNumber (Identify Specification = Yes)
  • Disini saya membuat table pada database ESS_HRSelfService_New

2. Lalu pilih ESS_HRSelfService_New -> Programmability -> New Stored Procedured

3. Buatlah Sebuah Procedure Seperti berikut :

USE [ESS_HRSelfService_New]

GO

/****** Object:  StoredProcedure [dbo].[up_MasterRegion_Retrieve]    Script Date: 04/01/2011 13:25:39 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER PROCEDURE [dbo].[up_Mahasiswa_Retrieve]

@ID int

AS

BEGIN

      SELECT

            ID,

            Nama,

            TahunLahir,

            Alamat,

            Phone

      FROM Mahasiswa

END

Note :

Diawal membuat store procedure, maka kita harus membuat syntax dengan nama CREATE PROCEDURE fungsinya agar store procedure tercreate di programmability

4.Dan copykan syntax berikut :

[up_MasterRegion_RetrieveList] 1000

Note : Jika syntax dijalankan maka akan menampilkan data 1000 row pertama



STORE PROCEDURE – Delete

Posted by: cucuducoding on: May 5, 2011

1. Buat sebuah table dengan design dibawah ini , lalu berinama table dengan nama Mahasiswa

Note :

  • Primary Key = ID & AutoNumber (Identify Specification = Yes)
  • Disini saya membuat table pada database ESS_HRSelfService_New

2. Lalu pilih ESS_HRSelfService_New -> Programmability -> New Stored Procedured

3. Buatlah Sebuah Procedure Seperti berikut :

USE [ESS_HRSelfService_New]

GO

/****** Create For Testing  ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE PROCEDURE [dbo].[up_Mahasiswa_Delete]

      @ID int

AS

BEGIN

      DELETE Mahasiswa

      WHERE ID = @ID

END

Note :

Diawal membuat store procedure, maka kita harus membuat syntax dengan nama CREATE PROCEDURE fungsinya agar store procedure tercreate di programmability

4. Setelah itu maka ubahlah ALTER PROCEDURE, Fungsinya adalah untuk menjalankan store procedure, dan setiap ada perubahan store procedure, maka dari store procedure harus di execute kembali.

USE [ESS_HRSelfService_New]

GO

/**** CREATE for Testing***/

USE [ESS_HRSelfService_New]

GO

/****** Create For Testing  ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER PROCEDURE [dbo].[up_Mahasiswa_Delete]

      @ID int

AS

BEGIN

      DELETE Mahasiswa

      WHERE ID = @ID

END

5. Untuk testing insert data (insert langsung ke database), Lalu pilih kembali  ESS_HRSelfService_New -> Programmability -> New Stored Procedured

6. Dan Copykan syntax berikut :

[up_Mahasiswa_Delete] 4

Keterangan : ID = 4 -> Row data yang di delete adalah data dengan ID 4

7. Jika syntax tersebut dijalankan maka, akan ditambahkan 1 row -> (1 row(s) affected), data nomor 4 terhapus

Download Document Here : STORE PROCEDURE-Delete


STORE PROCEDURE – Update

Posted by: cucuducoding on: May 5, 2011

1. Buat sebuah table dengan design dibawah ini , lalu berinama table dengan nama Mahasiswa

Note :

  • Primary Key = ID & AutoNumber (Identify Specification = Yes)
  • Disini saya membuat table pada database ESS_HRSelfService_New

2. Lalu pilih ESS_HRSelfService_New -> Programmability -> New Stored Procedured


3. Buatlah Sebuah Procedure Seperti berikut :

USE [ESS_HRSelfService_New]

GO

/**** CREATE for Testing***/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE PROCEDURE [dbo].[up_Mahasiswa_Update]

@ID int,

@Nama varchar(50),

@TahunLahir datetime,

@Alamat varchar(50),

@Phone varchar (50)

AS

BEGIN

Update Mahasiswa Set

      Nama = @Nama,

      TahunLahir = @TahunLahir,

      Alamat = @Alamat,

      Phone = @Phone

Where ID = @ID

End

Note :

Diawal membuat store procedure, maka kita harus membuat syntax dengan nama CREATE PROCEDURE fungsinya agar store procedure tercreate di programmability

4. Setelah itu maka ubahlah ALTER PROCEDURE, Fungsinya adalah untuk menjalankan store procedure, dan setiap ada perubahan store procedure, maka dari store procedure harus di execute kembali.

USE [ESS_HRSelfService_New]

GO

/**** CREATE for Testing***/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER PROCEDURE [dbo].[up_Mahasiswa_Update]

@ID int,

@Nama varchar(50),

@TahunLahir datetime,

@Alamat varchar(50),

@Phone varchar (50)

AS

BEGIN

Update Mahasiswa Set

      Nama = @Nama,

      TahunLahir = @TahunLahir,

      Alamat = @Alamat,

      Phone = @Phone

Where ID = @ID

End

5. Untuk testing insert data (insert langsung ke database), Lalu pilih kembali  ESS_HRSelfService_New -> Programmability -> New Stored Procedured

6. Dan copykan syntax berikut :

[up_Mahasiswa_Update] 1,’Syukrini Irfiyanda’,’1986/03/17′,’Depok Mulya I Blok D No.9′, ’0217754539′

Keterangan :

  • Semua field haru diisi, jika kosong maka isi dengan ‘null’
  • ID = 1 -> Pilih data dari ID mana yang akan kita edit
  • Nama = Syukrini Irfiyanda -> jika tipedata varchar maka harus diawali dan diakhiri dengan tanda kutip (‘’)
  • Tahun Lahir = 1986/0/17 -> jika tipedata datetime maka harus diawali dan diakhiri dengan tanda kutip (‘’), dan formatnya adalah tahun/bulan/tanggal
  • Alamat = Depok Mulya I Blok D No.9 -> -> jika tipedata varchar maka harus diawali dan diakhiri dengan tanda kutip (‘’)
  • Phone = -> jika tipedata varchar maka harus diawali dan diakhiri dengan tanda kutip (‘’)

7. Jika syntax tersebut dijalankan maka, akan ditambahkan 1 row -> (1 row(s) affected)

Download Document Here : STORE PROCEDURE-Update


STORE PROCEDURE – Insert

Posted by: cucuducoding on: May 5, 2011

1. Buat sebuah table dengan design dibawah ini , lalu berinama table dengan nama Mahasiswa

Note :

  • Primary Key = ID & AutoNumber (Identify Specification = Yes)
  • Disini saya membuat table pada database ESS_HRSelfService_New

2. Lalu pilih ESS_HRSelfService_New -> Programmability -> New Stored Procedure

3. Buatlah Sebuah Procedure Seperti berikut :

USE [ESS_HRSelfService_New]

GO

/****** Object:  StoredProcedure [dbo].[up_Mahasiswa_Insert]    Script Date: 03/29/2011 15:02:15 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE PROCEDURE [dbo].[up_Mahasiswa_Insert]

@ID bigint output,

@Nama VARCHAR(50),

@TahunLahir DATETIME,

@Alamat varchar(50),

@Phone varchar(50)

AS

BEGIN

      INSERT INTO Mahasiswa  (

            Nama,

            TahunLahir,

            Alamat,

            Phone

)     VALUES (

            @Nama,

            @TahunLahir,

            @Alamat,

            @Phone )

            SET @ID = @@IDENTITY

END

Note :

Diawal membuat store procedure, maka kita harus membuat syntax dengan nama CREATE PROCEDURE fungsinya agar store procedure tercreate di programmability

4. Setelah itu maka ubahlah ALTER PROCEDURE, Fungsinya adalah untuk menjalankan store procedure, dan setiap ada perubahan store procedure, maka dari store procedure harus di execute kembali.

USE [ESS_HRSelfService_New]

GO

/****** Object:  StoredProcedure [dbo].[up_Mahasiswa_Insert]    Script Date: 03/29/2011 15:02:15 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER PROCEDURE [dbo].[up_Mahasiswa_Insert]

@ID bigint output,

@Nama VARCHAR(50),

@TahunLahir DATETIME,

@Alamat varchar(50),

@Phone varchar(50)

AS

BEGIN

   INSERT INTO Mahasiswa  (

         Nama,

         TahunLahir,

         Alamat,

         Phone

)  VALUES (

         @Nama,

         @TahunLahir,

         @Alamat,

         @Phone )

         SET @ID = @@IDENTITY

END

5. Untuk testing insert data (insert langsung ke database), Lalu pilih kembali  ESS_HRSelfService_New -> Programmability -> New Stored Procedured

6. Dan copykan syntax berikut : [up_Mahasiswa_Insert] 0,’Syukrini Irfiyanda’,’1986/03/17′,’Depok Mulya I Blok D No.9′, ’0217754539′

Keterangan :

  • ID = 0 -> ID harus diisi karena primary key harus diisi
  • Nama = Syukrini Irfiyanda -> jika tipedata varchar maka harus diawali dan diakhiri dengan tanda kutip (‘’)
  • Tahun Lahir = 1986/0/17 -> jika tipedata datetime maka harus diawali dan diakhiri dengan tanda kutip (‘’), dan formatnya adalah tahun/bulan/tanggal
  • Alamat = Depok Mulya I Blok D No.9 -> -> jika tipedata varchar maka harus diawali dan diakhiri dengan tanda kutip (‘’)
  • Phone = -> jika tipedata varchar maka harus diawali dan diakhiri dengan tanda kutip (‘’)

7. Jika syntax tersebut dijalankan maka, akan ditambahkan 1 row -> (1 row(s) affected)

Download Document Here : STORE PROCEDURE-Insert

PLAN SHAREPOINT DEPLOYMENT [Modul 1 Part 1]

Posted by: cucuducoding on: June 28, 2010

Assalamu’alaikum ww, Allow cucudu, ogenki desu ka? kemaren baru dapet CD bagus nih dari bos, bentuknya video judulnya “Microsoft sharepoint 2007 for administrator by Application Developers Training Company” silahkan disimak dulu modul 1 part 1..!

Administration Basics

  • Hardware : Physical Topology
  • Software : Required Technologies
  • Skill Set : Administrative Roles

Physical Topology

  • A Typical LAN without Sharepoint

  • Sharepoint Server in LAN

  • Sharepoint Server Farm

Terms

  • Web Front End (WFE)
  • Server Farms
  • Service-Oriented Architecture (SOA)

Requires Technologies

  • Sharepoint Means :
    • Windows Sharepoint Services (WSS) 3.0
    • Microsoft Office Sharepoint Server (MOSS) 2007

ü  Standard Edition

ü  Enterprise Edition

  • Forms Server
  • Enterprise Search
  • Sharepoint Relies on These Windows Services :
    • WSS
    • ASP.NET 2.0
    • .NET 3.0 (Workflow)
    • Microsoft Internet Information Service (IIS)
    • SMTP Service
    • Active Directory
    • DNS
    • MMC/PerfMon/MOM
    • SQL Server
    • Internet Explorer (Client)
    • Microsoft Office (Client)

Administrative Roles

  • Deployment
  • Rollout
  • Server Support
  • Desktop Support

Aplication & Sevices  used by sharepoint

Writing a Deployment Plan

  • Deployment follows the software development lifecycle :
    • Planning
    • Development
    • Review
    • Testing
    • Rollout
    • Support

Planning Phase

  • Create a Project plan that includes
    • Stakeholders
    • Business Needs
    • Project Description

ü  Site Structure

ü  Security

ü  Search

ü  External Access

  • Software Requirements
  • Hardware Requirements
  • Schedule

Development Phase

  • Prepare the server
  • Install the software
  • Configure sharepoint features
  • Create the initial sute structure and branding
  • Set site security

Review  Phase

  • Meet with stakeholders
  • Gather feedback and change requests
  • Make the requested changes
  • Walk through the changes with stakeholders

Testing  Phase

  • Client software issues
  • Evaluate security
  • Assess usability
  • Watch for unexpected events (Errors)

Rollout  Phase

  • Identify site owners
  • Train users and setting user expectations
  • Handle initial support requests
  • Monitor the server

Support  Phase

  • Create templates
  • Mail-enabling lists
  • Manage Users’ My Sites
  • Create and manage Quotas
  • Use the STSADM Utility

Determining Software Requirements

  • Requirements are driven by business needs
  • Choosen between WSS/MOSS
    • WSS provide core services and templates
    • MOSS Std includes business templates, web parts, workflow
    • MOSS Ent includes forms server, Excel services, Bussiness data catalog
    • Key differences
      • Licensing
      • Search

WSS vs. MOSS

Need Feature WSS MOSS
Searchable Repository Search Site Collection Global
Publish Forms/policies Libraries Included Included
E-mail enabled repository E-mail enabled libraries Included Included
Automate Prosesses Workflow Three-state Additonal Workflows

Choosing WSS

  • Cost is an issue
  • Can always upgrade

SQL Editons

  • SQL 2005 Standard or better
  • SQL 2000 SP4 still supported
  • SQL 2005 embedded Editon
  • SQL 2005 Express Edition

Determining Hardware Requirements

  • Determined by :
    • User load
    • Amount of data
    • Availability
    • Use deployment sizing to estimate hardware
      • Extra-small: Stand alone WSS Server
      • Small : Under iK users , 30 GB data
      • Medium : ~1K users, 50 GB data
      • Large : ++1K users, ++50 GB data, high availability
      • Extra small : Stand-alone: 32 –bit Dual-Core 4 GB Memory
      • Small :
        • WFE: 32-bit dual-core, 2 GB memory
        • SQL: 32-bit dual-core, 4 GB memory
        • Medium :
          • WFE: 64-bit quad-core, 4 GB memory
          • SQL: 64-bit quad-core, 8 GB memory
          • Large :
            • Multiple WFEs: 64-bit quad-core, 4 GB memory
            • SQL: 64-bit quad-core, 16 GB memory

Calculating Storage Needs

  • Calculate user base :
    • 1 employee = 1 user
    • 1000 users = 1 RPS
    • Calculate storage needs
      • Existing file shares
      • Exchange public folders
      • Some data is redudant
      • Base on quotas/best-guess
        • # employees * 100 MB (MOSS)
        • # departements sites * 10 GB
        • Record center 10 GB

Example

  • 200 Employees , 8 departements, recods center:
    • 200 * 100 MB
    • + 8 * 10 GB
    • +1 * 10 GB
    • Total = 110 GB
    • First Year Estimate

Availability

  • Updates, Service packs
  • Hardware maintenance
  • Unforeseen problems
  • Accidental deletions / restore

Planning Network Configuration

  • Naming Sharepoint
    • http://subdomain.company.com
    • Determine bandwidth
      • LAN bandwidth, 1 ms latency
      • Monitor WAN, External
      • Internet access
        • VPN or through firewall
        • Authenticaton : Windows or FBA
        • Use SSL to secure traffic
    • Contoh Project Panning

    SharePoint Project Plan

    Author                  : Jeff Web

    Requestor           : Bill Barret

    Created                                : Friday, January 14, 2008

    Revised                                : Monday, February 25, 2008

    Stakeholders

    The Following team members will participate in the project

    Name Title/Role
    Jeff Webb SharePoint Admin
    Bill Barrett IT Manager
    Cindy Starks COO

    Business Needs

    Cindy Starks stated the following business needs :

    1. Provide a searchable repository for corporate documents
    2. Make common forms and policies easily accessible to employees from home in a secure way
    3. Build an email-enabled knowledge repository for access across technologies
    4. Automate common processes such us expense reporting and travel authorization
    5. Provide Limited access to vendors and other partners

    Software Requirements

    This Project requires the following software

    Server Software

    • Windows Server 2003 SP2
    • WSS 3.0
    • Microsoft SQL 2005
    • PDF I Filter

    Client Software

    • Window XP Professional Edition
    • Microsoft Office 2007 Professional
    • IE 7.0

    Hardware Requirements

    Server Hardware

    • Wombat0, 32-bit 4 GB (existing)
    • Wombat2, 32-bit dual-core 4 GB ((existing)

    Client Hardware

    • Desktops, 1.6 Ghz, 2 GB, 1024×768
    • Laptop, 1.6 Ghz, 2 GB, 800×600

    Complete the Est., Value column to estimate your hardware sizing. For unknown values; Put ?

    Threshold Values
    Metric Est. Value XS S M L
    User Base 200 < 200 200 – 1000 1000 – 10.000 > 10.000
    Content Database size 20 GB < 10 GB 10 – 30 GB 30 – 50 GB 50 – 100 GB
    Number of content databases Yes < 10 10 – 20 20     – 50 > 50
    Number of concurrent SQL sessions ? < 10 10 – 50 50 – 200 > 200
    Number of items in regularly accessed list ? < 2000 < 2000 < 2000 > 2000
    Number of columns in regularly accessed list ? < 20 < 20 < 20 > 20
    High availability No No No Yes Yes
    WSS-Only Yes Yes No No No

    Project Plan

    Milestone Date Done?
    Draft initial requirements agree to requirements
    Install WSS 3.0 review sites
    Go Live

    Project Description

    We will fill these needs by setting up Windows SharePoint Services (WSS) 3.0 on the existing Wombat0 server. We will use the existing Wombat2 server as the SQL Server.

    The SharePoint Server will provide these sub-domains :

    Access

    These sites will be available within the network (LAN) as well as externally via the internet. The employees site will be secure with Windows authentication and communication is unencrypted. The partners site will be secured with Forms-based authentication and so communications will be encrypted troughSSL.

Bikin User/Account Baru Di Active Directory & Sharepoint

Posted by: cucuducoding on: June 4, 2010

Jika anda memakai Virtual PC, Maka buka virtual PC anda terlebih dahulu

Setting Password

Klik Start – Administrative tools – Domain Security Policy

Klik Password Policy

Hilangkan tanda Ceklist pada “Define this policy setting”

Kalau Anda tidak ingin mensetting Maximum password age, maka hilangkan tanda ceklist, tapi kalau anda ingin mensetting, silahkan di ceklist dan tentukan waktu expirenya (dalam hitungan hari/days)

Kalau Anda tidak ingin mensetting Minimum password age, maka hilangkan tanda ceklist, tapi kalau anda ingin mensetting, silahkan di ceklist dan tentukan waktu expirenya (dalam hitungan hari/days)

Kalau Anda tidak ingin mensetting Panjang Password, maka hilangkan tanda ceklist, tapi kalau anda ingin mensetting, silahkan di ceklist dan tentukan panjang passwordnya  (dalam hitungan characters)

Klik enable jika ingin mensetting Password menjadi komplek (Kombinasi angka & huruf), Klik disable jika tidak ingin mensetting Password menjadi komplek

Klik enable jika ingin mensetting Password memakai enkripsi, Klik disable jika tidak ingin mensetting Password memakai enkripsi

Setelah semua setting Account Policies selesai, maka restart Virtual PC anda

Buat Active Directory yang baru :D

Klik Start – Administrative Tools – Active Directory Users and Computers

Klik Gambar/Icon “Create a New User in The Current Container”

Dan Akan Tampil Form Berikut ini :

Keterangan :

Field yang diisi adalah :

First name : Ketikkan nama depan anda

Full name : Akan terisi otomatis sama dengan first name and last name anda anda

User Logon Name : Ketikkan nama user yang diinginkan ketika hendak log in ke system

Setelah itu Klik Tombol Next.

Masukkan Password Anda

Lalu Klik Finish

Sekarang kita dah punya active directory dengan nama “cucudu” yeee, so it’s time masuk ke :

Sekarang masuk ke Central Administrative tools :

Klik Start – Administrative Tools – Sharepoint Central Administration

Klik Operation

Klik  Incoming e-mail settings

Beberapa field yang harus diisi :

Enable sites on this server to receive e-mail? : yes

Settings mode: Advance

Use the SharePoint Directory Management Service to create distribution groups and contacts? : No

E-mail server display address:  isikan alamat e-mail server anda

E-mail drop folder:  c:\inetpub\mailroot\drop

Setelah diisi semua klik OK

Sekarang Install SMTP

Klik Start – control Panel – Add or Remove Programs – Add/Remove Windows Components

Klik 2X Email Services

Centang POP 3 Berikut ini

Lalu klik OK – Next – Finish

Balik Lagi ke Start – Administrative Tools – Sharepoint Central Administration

Ke Operation Lagi – Klik  Outgoing e-mail settings

Ketik field2 berikut (Example) :

Lalu Klik Ok

Sekarang saatnya daftar di sharepoint Site

Buka sharepoint anda, Klik Home

Lalu Site Actions – Site Settings

Klik People & Groups

Dalam Sharepoint (by Default) ada 3 jenis members diantaranya :

Members, Visitors & Owners, Sekarang kita taro’ user cucudu tadi di kelompok Members saja berarti klik kelompok Members

Lalu Klik New

Lalu Masukkan nama user usercucudu tadi (Harus sama dengan Active Directory) di field User/Groups

Lalu Klik OK, maka usercucudu sudah terdaftar sebagai kelompok members

Untuk melakukan test Log – in maka klik Panel Welcome pada kanan atas

Sekarang Login Sebagai User usercucudu

Klik OK, dan sekarang Sharepoint anda sudah login sebagai usercucudu, gimana gampangkan :D

Klik File Tutorial Bikin UserAccount Baru Di Active Directory & Sharepoint

Change .rar become .rar.docx

Posted by: cucuducoding on: April 27, 2010

Allow para cucudu

Yeeeeeeee……senengnya…wkwkwkw gw ga’ bisa gambarin senengnya hati ini *Lebay mode on :P * yiheeee..gini ceritanya, gw dah susah payah download film kesukaan gw dari indowester itu tuh film jadul “Children of Heaven” nah file yg gw download ini ekstensionnya .rar pas gw mau buka eh ada tulisan error begini

The archive is either in unknown format or damaged

sumpah kesel :( padahal dah susah2 download, trus nanya sama temen kata dia

“iya itu korup, coba aja lu download ulang”

nah gw download ulang (Lama seharian) gw buka lagi & yg keluar pesan error yg sama :( trus gw googling2 ada perinta begini rename misal nama file asli COH.rar rename jadi COH.rar.txt dah gw coba trus dibuka yang keluar pesan

file is too large for notepad use another editor to edit the file

pokoknya ga’ mau, akhirnya gw iseng namain COH.rar.docx

gw buka di Office word juga ga’ bisa akhirnya gw buka di media player classic, u know what? BISAAA……..yeyyyyy [tau gak ternyata file2 upload tan di IDWS mang suka begitu di donlot .rar trus kalau dah downloaded harus di rename dulu, baca perintahnya baik2 jgn kek gw :P ] besok2 kalau punya file .rar yg kek begitu jgn lgsg di apus coba rename dulu.. :D

Oia atau diubah jadi ekstension COH.avi atau ekstension movie lainnya juga langsung bisa dibuka kok :D

How To Make Simple Webpart & Connect To Database

Posted by: cucuducoding on: April 19, 2010

Yeeeeeeeeee, Allow Para cucudu [Gw kali yg cucudu :P ], dah beberapa bulan ini gw belajar yg intinya sharepoint, asp.net, C# dsb, dan akhirnya otak gw berpikir dimana relasi dari semua itu dan gimana caranya?? Susah2 gw belajar coding tapi implement yg realnya gw gak dapet ckckckck :P , nah akhirnya gw baru menemukan MAIN KEY nya adalah WEB PARTS, feature di sharepoint yang menggabungkan semua element di atas [Analisis gw sih :P ] Nah ayo kita kupas semuanya disini hayoooo :P

Sekarang gw mau bikin Webparts yang nampilin data dari database

LANGKAH I : Buka SQL Management Studio

1. (Masuk Menggunakan Login sa)

2. Buat sebuah Database dengan nama “mahasiswa”

3. Buat sebuah Table dengan nama “Data_Personal”

Dengan Field Berikut ini :

Id_mahasiswa = int

Nama_mahasiswa = varchar(50)

Alamat_Mahasiswa = varchar(50)

4. Lalu isi table berikut sekitar 3 row (Agar hasilnya bias dilihat)

LANGKAH II: Sekarang Buka Visual studio Anda

  1. Klik File – new – Website
  2. Simpan Di My document Anda dengan folder “Website”
  3. Pada Windows “ Server Explorer” Pilih Add new Connection

4. Add connection Menggunakan SQL Server Authentication (Login : sa)

5. Lalu Pilih Nama Database “mahasiswa”

6. Sekarang alihkan halaman aspx ke tab Design

7. Lalu Pada Windows “ Server Explorer” anda akan muncul database mahasiswa dan klik lalu drag table Data_Personal ke dalam Halaman aspx anda

8. Lalu pada web config anda, tambahkan sintak connection string berikut ini, setelah tag <appSettings/>

<connectionStrings>

<add connectionString=”Data Source=.;Initial Catalog=mahasiswa;User; pwd=P@ssw0rd” providerName=”System.Data.SqlClient” />

</connectionStrings>

9. Dan Hasilnya sebagai berikut

10. Lalu Coba Test Dengan mengklik F5, jika sudah selesai maka tutup visual studio anda

LANGKAH III : Pembuatan Webparts

  1. Buka kembali Visual Studio anda
  2. Lalu pilih file –  new – project
  3. Pilih Template webpart pada menu sharepoint

4. Simpan Di My document Anda dengan folder “WebsitePart”

5. Pada jendela salution explorer akan terbuat project webpart anda dengan nama “WebsitePart”

6. Lalu Delete WebPart1 Folder dan Buat forder baru dengan mengklik kanan pada project webpart anda pilih add – new item lalu pilih template webpart pada menu sharepoint, beri nama “WebPartQu”

7. Lalu klik kanan kembali nama project webpart dan pilih properties, and pilih tab debug dan masukkan URL localhost Sharepoint anda

8. Lalu klik kanan kembali nama project webpart dan pilih add – new forder, beri nama folder anda dengan “Templates”  di dalam forder ini buat forder baru lagi dengan nama “CONTROLTEMPLATES”, sehingga hasilnya seperti ini :

9. Lalu tambahkan File aspx yang telah kita buat pada LANGKAH I tadi dengan cara klik kanan folder CONTROLTEMPLATES lalu pilih add – Existing Item, dan pilih file aspx tadi yaitu file : Default.aspx

10. Lalu Delete File Default.aspx.cs yang otomatis terinclude saat kita add existing item tadi

11. Skarang klik kanan Folder WebPartQu lalu pilih add – Existing Item, dan pilih file Default.aspx.cs. sehingga bentuknya seperti ini :

12. Rename File Default.aspx anda jadi Default.ascx dan file Default.aspx.cs jadi Default.ascx.cs

13. Sekarang buka folder Default.ascx

14. Hapus tag berikut ini :

<%@ Page AutoEventWireup=”true”  CodeFile=”Default.aspx.cs” Inherits=”_Default” %>

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

<html xmlns=”http://www.w3.org/1999/xhtml”>

<head runat=”server”>

<title></title>

</head>

<body>

<form id=”form1″ runat=”server”>

</form>

</body>

</html>

15. Lalu tambahkan tag berikut ini pada awal File :

<%@ Control AutoEventWireup=”true” Inherits=”WebsitePart.Default, WebsitePart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9f4da00116c38ec5″ %>

<%@ Register Tagprefix=”SharePoint” Namespace=”Microsoft.SharePoint.WebControls” Assembly=”Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %>

16. Sekarang Buka File Default.ascx.cs, lalu replace semua code dengan code berikut :

using System;

using System.Data;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using Microsoft.SharePoint;

using Microsoft.SharePoint.WebControls;

namespace WebsitePart

{

public partial class Default : System.Web.UI.UserControl

{

protected GridView GridViewWeb;

}

}

17. Sekarang Buka File WebPartQu.cs, lalu tambahkan tag berikut di bawah tag base.CreateChildControls();

base.CreateChildControls();

UserControl uc =

Page.LoadControl(“~/_controltemplates/Default.ascx”) as

UserControl;

Controls.Add(uc);

18. Sekarang masuk ke web.config folder URL sharepoint anda (Folder URL saya di :) C:\Inetpub\wwwroot\wss\VirtualDirectories\2000 Lalu  buka file we.config, dan tambahkan connectionstring yg tadi kita buat di LANGKAH II

<connectionStrings>

<add name=”mahasiswaConnectionString1″ connectionString=”Data Source=.;Initial Catalog=mahasiswa;User; pwd=P@ssw0rd” providerName=”System.Data.SqlClient” />

</connectionStrings>

19. Pada preject Webpart anda klik kanan lalu pilih add reference dan tambahkan reference system.data

20. Pada preject Webpart anda klik kanan lalu pilih Build, jika sudah sukses

21. Pada preject Webpart anda klik kanan lalu pilih Build, jika sudah sukses

22. Sekarang Buka IE anda dan ketikkan URL sharepoint anda

23. Lalu klik home – site action – edit page

24. Klik Add a Web Part

25. Sekarang Pilih Webparts Yang tadi kita buat, setelah di Add klik Exit Edit Mode

26. Nah Webparts yg terkoneksi ke database sudah jadi, Horeeeyyyyyyy, gampang bukan :D

By : Cucudu Coding Blog silahkan download simple webpart disini

and SPHOL Lab01_WebParts-CS

Cara Buat Simple Webparts “Hello World”

Posted by: cucuducoding on: April 15, 2010

1. Buka Visual Studio Anda
2. Lalu buka menu file — new — Project
3. Pilih Template Web Part pada menu SharePoint

4. Lalu..tampilan di salution Explorer anda akan menjadi seperti ini

5. Kilk Kana Name Solution Anda dan Pilih Properties, Pada Tab Debug masukkan URL anda

6. Klik Build Pada Name Project Anda

5. Setelah Sukses Klik Deploy Pada Name Project Anda Kembali

6. Sekarang Masuk Ke Sharepoint Anda klik Home — Site Action — Edit Page

7. Lalu Klik Add a web Part, dan pilih nama webparts yg tadi anda buat

8. Klik Exit Edit Mode

9. Dan anda akan melihat hasil webparts anda

Soo Just Try :)

How to Remove Webparts List yang sudah di Deploy

Posted by: cucuducoding on: April 15, 2010

cara delete list webparts yang sudah di deploy

klik start — command prompt

ketikkan dirictory file project kita ex : saya di my document

cd C:\Documents and Settings\Administrator\My Documents\helloRina\helloRina\bin\Debug

lalu ketikkan

setup.bat /u

Hingga muncul tulisan

Operation completed successfully.
Uninstalling feature WebPart1 …
Operation completed successfully.
Retracting solution helloRina.wsp …
Operation completed successfully.
Deleting solution helloRina.wsp from SharePoint …
Operation completed successfully.
Hit enter key to quit.

Gampang Bukan :D

Follow

Get every new post delivered to your Inbox.