Your SlideShare is downloading. ×
  • Like
Share Point
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply
Published

SetFocus SharePoint portfolio

SetFocus SharePoint portfolio

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
423
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
2
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. SharePoint Portfolio Jim Bello [email_address] 610-954-0443
  • 2. Table of Contents
    • Introduction
    • Project Specification Overview
    • Projects Tasks - SP Admin - SP Development - SP Business Processes - SP Portals
  • 3. Introduction
    • This project is for a fictitious towing services company called ACME, Inc.
    • The project will design and establish a SharePoint application to support the company’s towing providers.
  • 4. Project Specification Overview
    • ACME Inc. is a large towing services company.
    • On their intranet they would like the ability to share sales decks amongst their sales personnel where a sales person may modify a sales presentation based off existing content.
    • They would also like to establish a shared calendar on their intranet site that would integrate into Outlook.
    • They would like to establish an area to publish a monthly news letter. A newsletter should be readable by anyone in the organization; it’s contributed by authors and reviewed/published by editors.
    • Lastly ACME would like to establish a shared area for contacts. Establish a contacts list utilizing a custom list and utilizing the Microsoft Application template for contact management.
  • 5. Project Goals
    • Create an intranet solution based on SharePoint Server 2007.
    • Branded with a unique design.
    • Shared calendar with integration into Outlook.
    • Shared are for contacts list utilizing Microsoft Application template for contact management.
    • Share sales decks amongst their sales people where a sales person may customize a presentation based off of existing content.
    • Monthly Newsletter CMS site implementing out of box workflow for approval process
    • A dashboard to display the total dollar amount of un-invoiced Purchase orders, Total dollar amount of unpaid invoices, Total PO amount that have been submitted.
    • Extend the solution to the Internet with sub-site creation for each provider.
  • 6. SP Admin
    • Objectives
    • Create a new Site Collection for Acme Inc. Solution Portal
    • A Solution Site Template
    • A Developer Knowledge Base
    • Enable SharePoint features to provide additional functionality to a site collection
    • Content Deployment
    • Configure SharePoint Services
    • Configure user groups and permissions
  • 7. SP Development
    • Objectives
    • Create custom metadata to track information about a solution
    • Setup the development environment to create and deploy solutions to the farm
    • Change the look and feel of the solution site
    • Create a content query Web Part to view all Solution list items
    • Create a custom Web Part to allow managers to create new SharePoint solution sites
    • Create a custom web part to view all Solution sites using SharePoint’s versions of GridView and DataSource controls
    • Create a Search Center
    • Modify the Advanced Search page to search by SiteTemplate column.
    • Use Search Web Parts to display helpful information on Solutions elsewhere in the Solution Portal
  • 8. SP Business Processes
    • Objectives
    • Create custom workflows using Visual Studio 2008 and SharePoint Designer
  • 9. SP Portals
    • Objective
    • Create a form and list that managers can use to submit Change Management requests for a solution.
    • Manage portals using Document and Record Centers
    • Control the layout of the portal using publishing features
  • 10. Additional Project Content
    • Created custom content including master pages, page layouts and custom search
    • Worked with the Business Data Catalog, used Excel Services and Forms Services
    • Worked with the Reporting Center, Information Management Policies and Dashboard with KPIs
  • 11. Acme Branding Feature
  • 12. ACME Home Page
  • 13. Purchase Orders List
  • 14. ACME Purchase Order InfoPath Form
    • Custom form features
      • Required fields enforced
      • Document name based on Ref Number + date + Last Name
      • States pulled from db
      • Venders info pulled from Vender list
      • Charge field value calculated from distance and Vender towing rate
  • 15. Invoice Forms List
  • 16. ACME Invoice InfoPath Form
    • Acme Invoice Form
      • Required fields enforced
      • Document name based on Invoice Number + Invoice Date
      • Venders info pulled from Vender list
  • 17. Create Vender Webpart
    • Create Vender Webpart
      • Creates a new vender site using a custom site template
      • Creates an entry in the Vender list including a hyperlink to the site
      • Creates a table and controls through code behind
  • 18. Create Vender Webpart
    • private HtmlTable CreateFormTable()
    • {
    • HtmlTable table = new HtmlTable();
    • table.Width = "100%"; // width set on page through webpart
    • #region Site Name Row
    • HtmlTableCell SiteNameCell = new HtmlTableCell();
    • Literal SitetNameLiteral = new Literal();
    • SitetNameLiteral.ID = "SitetNameLiteral";
    • SiteNameCell.Width = "30%";
    • SiteNameCell.Align = "right";
    • SitetNameLiteral.Text = "Site Name: ";
    • SiteNameCell.Controls.Add(SitetNameLiteral);
    • HtmlTableCell SiteNameTextBoxCell = new HtmlTableCell();
    • SiteNameTextBoxCell.Controls.Add(SitetNameTextBox);
    • HtmlTableRow SitetNameRow = new HtmlTableRow();
    • SitetNameRow.Cells.Add(SiteNameCell);
    • SitetNameRow.Cells.Add(SiteNameTextBoxCell);
    • table.Rows.Add(SitetNameRow);
    • #endregion
    • #region Vender Description row
    • HtmlTableCell VenderDescriptionCell = new HtmlTableCell();
    • Literal VenderDescriptionLiteral = new Literal();
    • VenderDescriptionLiteral.ID = "SiteDescriptionLiteral";
    • VenderDescriptionLiteral.Text = "Descrtiption: ";
    • VenderDescriptionCell.Align = "right";
    • VenderDescriptionCell.Controls.Add(VenderDescriptionLiteral);
    • HtmlTableCell VenderDescriptionTextBoxCell = new HtmlTableCell();
    • VenderDescriptionTextBoxCell.Controls.Add(SiteDescriptionTextBox);
    • HtmlTableRow SiteDescriptionRow = new HtmlTableRow();
    • SiteDescriptionRow.Cells.Add(VenderDescriptionCell);
    • SiteDescriptionRow.Cells.Add(VenderDescriptionTextBoxCell);
    • table.Rows.Add(SiteDescriptionRow);
    • #endregion
    • #region Url Row
    • HtmlTableCell UrlCell = new HtmlTableCell();
    • Literal UrlLiteral = new Literal();
    • UrlLiteral.ID = "UrlLiteral";
    • UrlLiteral.Text = "Url: ";
    • UrlCell.Align = "right";
    • UrlCell.Controls.Add(UrlLiteral);
    • HtmlTableCell UrlTextBoxCell = new HtmlTableCell();
    • UrlTextBoxCell.Controls.Add(UrlTextBox);
    • HtmlTableRow UrlRow = new HtmlTableRow();
    • UrlRow.Cells.Add(UrlCell);
  • 19. Create Vender Webpart (continued)
    • #region Rate Row
    • HtmlTableCell RateCell = new HtmlTableCell();
    • Literal RateLiteral = new Literal();
    • RateLiteral.ID = "RateLiteral";
    • RateLiteral.Text = "Rate: ";
    • RateCell.Align = "right";
    • RateCell.Controls.Add(RateLiteral);
    • HtmlTableCell RateTextBoxCell = new HtmlTableCell();
    • RateTextBoxCell.Controls.Add(RateTextBox);
    • HtmlTableRow RateRow = new HtmlTableRow();
    • RateRow.Cells.Add(RateCell);
    • RateRow.Cells.Add(RateTextBoxCell);
    • table.Rows.Add(RateRow);
    • #endregion
    • #region Blank row
    • HtmlTableCell BlankCell1 = new HtmlTableCell();
    • BlankCell1.ColSpan = 2;
    • Literal BlankLiteral = new Literal();
    • BlankLiteral.ID = "BlankLiteral";
    • BlankLiteral.Text = " ";
    • BlankCell1.Controls.Add(BlankLiteral);
    • HtmlTableRow BlankRow = new HtmlTableRow();
    • BlankRow.Cells.Add(BlankCell1);
    • table.Rows.Add(BlankRow);
    • #endregion
    • #region Create Button
    • HtmlTableCell BlankCell2 = new HtmlTableCell();
    • Literal BlankLiteral2 = new Literal();
    • BlankLiteral2.ID = "BlankLiteral2";
    • BlankLiteral2.Text = " ";
    • BlankCell2.Controls.Add(BlankLiteral2);
    • HtmlTableCell CreateSiteButtonCell = new HtmlTableCell();
    • CreateSiteButtonCell.Controls.Add(CreateSiteButton);
    • HtmlTableRow CreateSiteButtonRow = new HtmlTableRow();
    • CreateSiteButtonRow.Cells.Add(BlankCell2);
    • CreateSiteButtonRow.Cells.Add(CreateSiteButtonCell);
    • table.Rows.Add(CreateSiteButtonRow);
    • #endregion
    • return table;
    • }
  • 20. Create Vender Webpart (continued)
    • protected void CreateSiteButton_Click(object sender, EventArgs e)
    • {
    • //// find our controls so we can work with them
    • TextBox SiteNameTextBox = (TextBox)FindControl("SiteNameTextBox");
    • TextBox SiteDescriptionTextBox = (TextBox)FindControl("SiteDescriptionTextBox");
    • TextBox UrlTextBox = (TextBox)FindControl("UrlTextBox");
    • DropDownList SiteTemplatesList = (DropDownList)FindControl("SiteTemplatesListBox");
    • CheckBox AllowUniquePermissionsCB = (CheckBox)FindControl("AllowUniquePermissionsCBBox");
    • Button CreateSiteButton = (Button)FindControl("CreateSiteButton");
    • if (SiteNameTextBox.Text == "")
    • return;
    • // finally add the new site
    • SPWeb web = SPContext.Current.Web;
    • SPSite site = SPContext.Current.Site;
    • SPSecurity.CatchAccessDeniedException = false;
    • ///* runs with admin privileges */
    • //1033 is For English Locale
    • try
    • {
    • // see what permissions a user has, normally we would check but we are running with
    • // an elevated permission set
    • // turn this off to test code below
    • SPWeb webInUserContext = SPContext.Current.Web;
    • SPSite SiteInUserContext = SPContext.Current.Site;
    • Guid webGuid = webInUserContext.ID;
    • Guid siteGuid = SiteInUserContext.ID;
    • SPWebTemplateCollection templates =
    • SiteInUserContext.GetCustomWebTemplates(1033);
    • SPWebTemplate template =
    • templates["vendersitetemplate.stp"];
    • SPSecurity.RunWithElevatedPrivileges(delegate()
    • {
    • // get the site in impersonated context
    • using (SPSite siteElevated = new SPSite(siteGuid))
    • {
    • siteElevated.AllowUnsafeUpdates = true;
    • // get the web in the impersonated context
    • SPWeb webElevated =
    • siteElevated.OpenWeb(webGuid);
  • 21. Create Vender Webpart (continued)
    • SPWebCollection spSiteCol = webElevated.Webs;
    • webElevated.AllowUnsafeUpdates = true;
    • SPWeb newWeb = spSiteCol.Add("SiteDirectory/" +
    • UrlTextBox.Text, SiteNameTextBox.Text, SiteDescriptionTextBox.Text, ((System.UInt32)(SPContext.Current.RegionalSettings.LocaleId)), "vendersitetemplate.stp", false, false);
    • webElevated.Dispose();
    • }
    • });
    • SPList list = web.Lists["Vender List"];
    • SPFieldUrlValue url = new SPFieldUrlValue();
    • url.Description = UrlTextBox.Text;
    • url.Url = SPContext.Current.Site + "/SiteDirectory/" + UrlTextBox.Text;
    • SPListItem item = list.Items.Add();
    • item["Title"] = SiteNameTextBox.Text;
    • item["Vender Name"] = SiteNameTextBox.Text;
    • item["Vender Site"] = "http://dell2003srv/SiteDirectory/" + UrlTextBox.Text + ", " + UrlTextBox.Text;
    • item["Towing Rate"] = RateTextBox.Text;
    • item["Vender Description"] =
    • SiteDescriptionTextBox.Text;
    • item.Update();
    • SiteCreationResult = "Success!";
    • }
    • catch (Exception ex)
    • {
    • SiteCreationResult = ex.Message;
    • }
    • finally
    • {
    • SPSecurity.CatchAccessDeniedException = true;
    • }
    • }
  • 22. Vender List
  • 23. Purchase Order Workflow
    • Simple Sequential Workflow
    • Visual Studio 2008 workflow
    • Copies the new PO to the PO list in the vender site PO list when form is submitted
  • 24. Workflow Code
    • public Guid workflowId = default(System.Guid);
    • public string errorMessage = string.Empty;
    • public SPWorkflowActivationProperties workflowProperties = new SPWorkflowActivationProperties();
    • private void codeCopyDocToLib_ExecuteCode(object sender, EventArgs e)
    • {
    • // Get the item the workflow is running on
    • SPListItem item = workflowProperties.Item;
    • string siteUrl = string.Empty;
    • try
    • {
    • //Get the field that contains the vender name.
    • string name = item["Vender"].ToString();
    • // Set the name of the document library and site
    • // where to copy the document to
    • SPSite sourceSite = workflowProperties.Site;
    • SPWeb sourceWeb = sourceSite.OpenWeb();
    • string[] urlArray = null;
    • SPList list = sourceWeb.Lists["Vender List"];
    • for (int i = 0; i < list.Items.Count; i++)
    • {
    • SPListItem venderItem = list.Items[i];
    • if (venderItem[&quot;Vender Name&quot;].ToString().Equals(name))
    • {
    • siteUrl = (String)venderItem[&quot;VenderRateURL&quot;];
    • urlArray = siteUrl.Split(',');
    • }
    • }
    • //string siteUrl = &quot;http://vm187:100/solutions/Test&quot;;
    • string libName = &quot;Purchase Orders&quot;;
    • if (siteUrl != null)
    • {
    • siteUrl = urlArray[1]; // Open the site
    • using (SPSite site = new SPSite(siteUrl))
    • {
    • using (SPWeb web = site.OpenWeb())
    • {
    • if (item.File != null)
    • {
    • // Copy the document to the library
    • SPFolder library = web.Folders[libName];
    • library.Files.Add(
    • item.Name, item.File.OpenBinary());
    • library.Update();
    • }
    • }
    • }
    • }
    • }
    • catch (Exception ex)
    • {
    • errorMessage = ex.Message;
    • }