© 2011 PLANET TECHNOLOGIES, INC. Using SPD and SQL Stored Procedures Patrick Curran, MCT AUGUST 12, 2011
© 2011 PLANET TECHNOLOGIES, INC. Patrick Curran MCT, MCITP, MCTS, MCP SharePoint Architect for Planet Technologies. Working with SharePoint since –Administrator / Developer –Architect / Implementer –Troubleshooting / Branding –Motto: Why code when SharePoint will do it OTB
Agenda 1.Review the SQL Tables and Stored Procedure. 2.Use SharePoint Designer 2010 to create a page, and add content. 3.Use SharePoint Designer 2010 create a database connection (Demo). 4.Insert a Data Source, add a GridView control and attach the data source to the GridView. 5.Clean up the Grid, and verify page (Demo).
© 2011 PLANET TECHNOLOGIES, INC. Objective Pass In and Out dates to a SQL stored procedure, review a list of free resources, then send selected resource an . Let’s get started!
© 2011 PLANET TECHNOLOGIES, INC. Quick Review of SQL… Let’s take a look at the databases.
© 2011 PLANET TECHNOLOGIES, INC. Quick Review of SQL… Our resources, roles, and addresses:
© 2011 PLANET TECHNOLOGIES, INC. Quick Review of SQL… The resource’s current schedule:
© 2011 PLANET TECHNOLOGIES, INC. Quick Review of SQL… The stored procedure:
© 2011 PLANET TECHNOLOGIES, INC. Let’s Get Started… Let’s open up Designer and create a page to hold our information. 1- Open your site. 2- Select Master Pages. 3- Select the v4.master 4- Right click and select New from Master Page.
© 2011 PLANET TECHNOLOGIES, INC. Create A Page… I hope these guys stop looking over my shoulder soon. 1- Save Page. 2- Ignore warning and click Yes
© 2011 PLANET TECHNOLOGIES, INC. Create A Page… 1- Within the PlaceHolderMain, select the Common Content Tasks. 2- Click Create Custom Content
© 2011 PLANET TECHNOLOGIES, INC. Organize Content… 1- Click inside of the PlaceHolderMain. 2- Insert a 2x4 Table.
© 2011 PLANET TECHNOLOGIES, INC. Insert Calendars… 1- Find the 1 st column, 2 nd row cell of the table. 2- Drag a Calendar control into the cell. 3- Drag another Calendar control into the 2 nd column, 2 nd row cell.
© 2011 PLANET TECHNOLOGIES, INC. Insert Calendars… Should look something like this:
© 2011 PLANET TECHNOLOGIES, INC. Rename The Calendars… 1- Rename Calendar1 to “indate” 2- Rename Calendar2 to “enddate”
© 2011 PLANET TECHNOLOGIES, INC. Create the Data Source… 1- Click Data Sources 2- Add a Database Connection.
© 2011 PLANET TECHNOLOGIES, INC. Create the Data Source… 12
© 2011 PLANET TECHNOLOGIES, INC. Create the Data Source… 34
© 2011 PLANET TECHNOLOGIES, INC. Create the Data Source… 56
© 2011 PLANET TECHNOLOGIES, INC. Create the Data Source… Connection Created!
© 2011 PLANET TECHNOLOGIES, INC. Create More Content… Insert our new Data Source!
© 2011 PLANET TECHNOLOGIES, INC. Configure Data Source…
© 2011 PLANET TECHNOLOGIES, INC. Configure Data Source… 1 2
© 2011 PLANET TECHNOLOGIES, INC. Configure Data Source… 3 4
© 2011 PLANET TECHNOLOGIES, INC. Configure Data Source… 5 6
© 2011 PLANET TECHNOLOGIES, INC. Configure Data Source… 7 8
© 2011 PLANET TECHNOLOGIES, INC. Configure Data Source… 9
© 2011 PLANET TECHNOLOGIES, INC. Configure GridView… Can you believe the cat is actually playing the piano? Let’s merge the 3 rd row of cells. 2- Ignore warning and click Yes
© 2011 PLANET TECHNOLOGIES, INC. Configure GridView… Grab the GridView data control and drag it into the 3 rd row of our table.
© 2011 PLANET TECHNOLOGIES, INC. Configure GridView… Select the appropriate Data Source
© 2011 PLANET TECHNOLOGIES, INC. Configure GridView… Our SQL stored procedure columns!
© 2011 PLANET TECHNOLOGIES, INC. Our GridView.aspx
© 2011 PLANET TECHNOLOGIES, INC. Tweak Our GridView… Enable Paging and Sorting PagingSorting
© 2011 PLANET TECHNOLOGIES, INC. Tweak Our GridView… 1- Edit GridView Columns 2- Remove Resource_ID Field
© 2011 PLANET TECHNOLOGIES, INC. Tweak Our GridView… 3- Clean up Header Text 4- Hide _address field
© 2011 PLANET TECHNOLOGIES, INC. Tweak Our GridView… Since we want Resource_Full_Name to be a Hyperlink for , we must convert it to a Template Field.
© 2011 PLANET TECHNOLOGIES, INC. Our Tweaked GridView.aspx
© 2011 PLANET TECHNOLOGIES, INC. Our Tweaked GridView.aspx Now we can !
© 2011 PLANET TECHNOLOGIES, INC. Tweak The Table…
© 2011 PLANET TECHNOLOGIES, INC. Tweak The Table…
© 2011 PLANET TECHNOLOGIES, INC. Thank You!!! Blog: PCfromDC.blogspot.com