About Me
- Sivanandam
- System Analyst,Collaboration Servers Integrate,Enterprise setup planner.
Thursday, 15 September 2011
Sunday, 21 August 2011
using JQuery to call ASP.NET ajax page methods
Design:
========
jQuery(document).ready(function () {
jQuery.ImagePosition = {
'left': '0',
'top': '0',
'position': 'absolute',
'background-repeat': 'no-repeat'
}
jQuery.ajax({
type: "POST",
url: "DPrint.aspx/LoadFloors",
data: "{}",
dataType: "json",
contentType: "application/json; charset=utf-8",
success: loadFloors,
error: fnError
}); //End ajax request
jQuery('#ddlFloor').change(function (e) {
e.stopPropagation();
loadFloorPrinters(e.currentTarget.value);
}); //End change event
function loadFloors(result) {
jQuery('#imgFloor').append('').removeClass('success validation');
jQuery('#loadinggp').removeClass('loadinggp');
if (result != null && result.d != null && result.d.ErrorObject.UIFriendlyMessage != null) {
fnError(result.d.ErrorObject.UIFriendlyMessage);
return;
}
if (result == null || result.d == null || result.d.DataObject == null) {
jQuery('#imgFloor').html("There are no floor(s) available.").removeClass('success').addClass('validation');
return;
}
jQuery.each(result.d.DataObject, function (idx, floor) {
if (idx == 0) loadFloorPrinters(floor.FloorID);
jQuery("").appendTo("#ddlFloor");
});
}
function loadFloorPrinters(value) {
jQuery('#imgFloor').html("");
jQuery('#loadinggp').addClass('loadinggp');
jQuery.ajax({
type: "POST",
url: "DPrint.aspx/LoadFloorPrinters",
data: "{ 'floorID': '" + value + "' }",
dataType: "json",
contentType: "application/json; charset=utf-8",
success: setMappings,
error: fnError
}); //End ajax request
}
function setMappings(result) {
jQuery('#imgFloor').html("").removeClass('success validation');
if (result != null && result.d != null && result.d.ErrorObject.UIFriendlyMessage != null) {
fnError(result.d.ErrorObject.UIFriendlyMessage);
return;
}
if (result == null || result.d == null || result.d.DataObject == null) {
jQuery('#imgFloor').html("There are no printer(s) available for selected floor.").removeClass('success').addClass('validation');
return;
}
jQuery('#imgFloor').css('background-image', 'url(' + result.d.DataObject.FloorPlanUrl + ')')
.css('background-repeat', 'no-repeat')
.css('position', 'relative')
.css('width', result.d.DataObject.FloorPlanWidth + 'px')
.css('height', result.d.DataObject.FloorPlanHeight + 'px');
setTimeout(function () {
jQuery('#loadinggp').removeClass('loadinggp');
jQuery.each(result.d.DataObject.Printers, function (idx, printer) {
if (jQuery.trim(printer.EmailAddress) != "") {
jQuery.ImagePosition.left = printer.MapX + 'px';
jQuery.ImagePosition.top = printer.MapY + 'px';
jQuery('#imgFloor').append("
");
jQuery('#printicon' + idx).css(jQuery.ImagePosition);
jQuery('#printicon' + idx).click(function (e) {
e.preventDefault();
var oWnd = radopen('DPrintDialog.aspx?email=' + jQuery.trim(printer.EmailAddress), null);
oWnd.SetTitle('Print to ' + printer.PrinterName);
oWnd.SetSize(450, 250);
});
}
}); //End each
}, 500); //End Timeout
} //End setMappings
function fnError(error) {
jQuery('#loadinggp').removeClass('loadinggp');
jQuery('#imgFloor').append('Error occured while loading the data.').removeClass('success').addClass('validation');
}
}); //End document ready
Server:
=======
[WebMethod]
public static DUGenericEntity LoadFloorPrinters(string floorID)
{
DUGenericEntity duGenericEntity = new DUGenericEntity();
try
{
duGenericEntity.DataObject = Common.PrintManager.GetPrinterDetails(floorID);
}
catch (Exception ex)
{
ExceptionPolicy.HandleException(ex, ExceptionPolicyHelper.UI);
duGenericEntity.ErrorObject.UIFriendlyMessage = System.Web.HttpContext.Current.Server.HtmlEncode(ex.Message);
duGenericEntity.ErrorObject.ErrorStackTrace.Add(System.Web.HttpContext.Current.Server.HtmlEncode(ex.StackTrace));
}
return duGenericEntity;
}
========
jQuery(document).ready(function () {
jQuery.ImagePosition = {
'left': '0',
'top': '0',
'position': 'absolute',
'background-repeat': 'no-repeat'
}
jQuery.ajax({
type: "POST",
url: "DPrint.aspx/LoadFloors",
data: "{}",
dataType: "json",
contentType: "application/json; charset=utf-8",
success: loadFloors,
error: fnError
}); //End ajax request
jQuery('#ddlFloor').change(function (e) {
e.stopPropagation();
loadFloorPrinters(e.currentTarget.value);
}); //End change event
function loadFloors(result) {
jQuery('#imgFloor').append('').removeClass('success validation');
jQuery('#loadinggp').removeClass('loadinggp');
if (result != null && result.d != null && result.d.ErrorObject.UIFriendlyMessage != null) {
fnError(result.d.ErrorObject.UIFriendlyMessage);
return;
}
if (result == null || result.d == null || result.d.DataObject == null) {
jQuery('#imgFloor').html("There are no floor(s) available.").removeClass('success').addClass('validation');
return;
}
jQuery.each(result.d.DataObject, function (idx, floor) {
if (idx == 0) loadFloorPrinters(floor.FloorID);
jQuery("").appendTo("#ddlFloor");
});
}
function loadFloorPrinters(value) {
jQuery('#imgFloor').html("");
jQuery('#loadinggp').addClass('loadinggp');
jQuery.ajax({
type: "POST",
url: "DPrint.aspx/LoadFloorPrinters",
data: "{ 'floorID': '" + value + "' }",
dataType: "json",
contentType: "application/json; charset=utf-8",
success: setMappings,
error: fnError
}); //End ajax request
}
function setMappings(result) {
jQuery('#imgFloor').html("").removeClass('success validation');
if (result != null && result.d != null && result.d.ErrorObject.UIFriendlyMessage != null) {
fnError(result.d.ErrorObject.UIFriendlyMessage);
return;
}
if (result == null || result.d == null || result.d.DataObject == null) {
jQuery('#imgFloor').html("There are no printer(s) available for selected floor.").removeClass('success').addClass('validation');
return;
}
jQuery('#imgFloor').css('background-image', 'url(' + result.d.DataObject.FloorPlanUrl + ')')
.css('background-repeat', 'no-repeat')
.css('position', 'relative')
.css('width', result.d.DataObject.FloorPlanWidth + 'px')
.css('height', result.d.DataObject.FloorPlanHeight + 'px');
setTimeout(function () {
jQuery('#loadinggp').removeClass('loadinggp');
jQuery.each(result.d.DataObject.Printers, function (idx, printer) {
if (jQuery.trim(printer.EmailAddress) != "") {
jQuery.ImagePosition.left = printer.MapX + 'px';
jQuery.ImagePosition.top = printer.MapY + 'px';
jQuery('#imgFloor').append("
jQuery('#printicon' + idx).css(jQuery.ImagePosition);
jQuery('#printicon' + idx).click(function (e) {
e.preventDefault();
var oWnd = radopen('DPrintDialog.aspx?email=' + jQuery.trim(printer.EmailAddress), null);
oWnd.SetTitle('Print to ' + printer.PrinterName);
oWnd.SetSize(450, 250);
});
}
}); //End each
}, 500); //End Timeout
} //End setMappings
function fnError(error) {
jQuery('#loadinggp').removeClass('loadinggp');
jQuery('#imgFloor').append('Error occured while loading the data.').removeClass('success').addClass('validation');
}
}); //End document ready
Server:
=======
[WebMethod]
public static DUGenericEntity LoadFloorPrinters(string floorID)
{
DUGenericEntity duGenericEntity = new DUGenericEntity();
try
{
duGenericEntity.DataObject = Common.PrintManager.GetPrinterDetails(floorID);
}
catch (Exception ex)
{
ExceptionPolicy.HandleException(ex, ExceptionPolicyHelper.UI);
duGenericEntity.ErrorObject.UIFriendlyMessage = System.Web.HttpContext.Current.Server.HtmlEncode(ex.Message);
duGenericEntity.ErrorObject.ErrorStackTrace.Add(System.Web.HttpContext.Current.Server.HtmlEncode(ex.StackTrace));
}
return duGenericEntity;
}
Jquery Ajax ASP.NET Example
Design
==============
$(document).ready(function () {
// Add the page method call as an onclick handler for the div.
$("#Result").click(function () {
$.ajax({
type: "POST",
url: "JqueryAjax.aspx/GetDate",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
// Replace the div's content with the page method's return.
$("#Result").text(msg.d);
}
});
});
});
Code behind:
===========
[WebMethod]
public static string GetDate()
{
return DateTime.Now.ToString();
}
==============
$(document).ready(function () {
// Add the page method call as an onclick handler for the div.
$("#Result").click(function () {
$.ajax({
type: "POST",
url: "JqueryAjax.aspx/GetDate",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
// Replace the div's content with the page method's return.
$("#Result").text(msg.d);
}
});
});
});
Click here for the time.
Code behind:
===========
[WebMethod]
public static string GetDate()
{
return DateTime.Now.ToString();
}
How to: Add Client Script Events to ASP.NET Web Server Controls
http://msdn.microsoft.com/en-us/library/7ytf5t7k(v=VS.90).aspx
Simple Javascript Validation
Design Code:
===================
Server Code:
================
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("Hello i am from Server");
}
===================
Server Code:
================
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("Hello i am from Server");
}
Saturday, 20 August 2011
Javascript- ASP.NET Validations
http://www.dotnetspider.com/resources/15346-Client-Side-Validation-with-JavaScript-ASP-NET.aspx
Wednesday, 17 August 2011
Saturday, 6 August 2011
Saturday, 16 July 2011
SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\MSCRM_CONFIG.mdf". Operating system error 32: "32(failed to retrieve text for this error. Reason: 15105)".
CRM 2011 Installation Error: SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\MSCRM_CONFIG.mdf". Operating system error 32: "32(failed to retrieve text for this error. Reason: 15105)".
Resolution: Diplay name and Unique db name should be same.
Resolution: Diplay name and Unique db name should be same.
Monday, 18 April 2011
Assign or Set the values to Custom Fileds of Project Server 2010
Guid sessionGuid = Guid.NewGuid();
Guid jobGuid = Guid.NewGuid();
project.CheckOutProject(prjGuid, sessionGuid, "Checked-out:PSI");
System.Threading.Thread.Sleep(1000);
CSF_WS.CustomFieldDataSet CstmDS = CustF.ReadCustomFields(null, false);
Project_WS.ProjectDataSet tempProject;
tempProject = project.ReadProject(prjGuid, Project_WS.DataStoreEnum.WorkingStore);
// DateTime startdate = (DateTime)ds2.Tables[0].Rows[i1]["PlannedStartDate"];
DateTime startdate = DateTime.Now.AddDays(2);
tempProject.Project.Rows[0][tempProject.Project.PROJ_INFO_START_DATEColumn] = startdate;
//tempProject = ((Project_WS.ProjectDataSet)tempProject.GetChanges(DataRowState.Modified));
Project_WS.ProjectDataSet.ProjectCustomFieldsDataTable P_dt = new EPMSamples.Project_WS.ProjectDataSet.ProjectCustomFieldsDataTable();
P_dt = tempProject.ProjectCustomFields; //*****This Line Represents the Assigned fields are present in Project.
CstmDS = CustF.ReadCustomFieldsByEntity(new Guid(PSLibrary.EntityCollection.Entities.ProjectEntity.UniqueId.ToString()));
//// Code FOR NEWLY ASSIGN THE VALUES TO CUSTOM FIELD i.e SET THE VALUES TO CUSTOM FIELDS
foreach (DataRow row in CstmDS.CustomFields)
{
//This is Normal project Text field.
if ((String)row["MD_PROP_NAME"] == "Test")
{
Project_WS.ProjectDataSet.ProjectCustomFieldsRow rowProjCF = P_dt.NewProjectCustomFieldsRow();
rowProjCF.MD_PROP_UID = (Guid)row["MD_PROP_UID"];
rowProjCF.PROJ_UID = prjGuid;
rowProjCF.MD_PROP_ID = (int)row["MD_PROP_ID"];
rowProjCF.CUSTOM_FIELD_UID = Guid.NewGuid();
//rowProjCF.TEXT_VALUE = ds2.Tables[0].Rows[i1]["BusinessAreaLeader"].ToString();
rowProjCF.TEXT_VALUE = "Testing values1";
tempProject.ProjectCustomFields.AddProjectCustomFieldsRow(rowProjCF);
}
//This is field Lookup field which dont have Default value, it has Default value
if ((String)row["MD_PROP_NAME"] == "Sample Areas Impacted")
{
foreach (Project_WS.ProjectDataSet.ProjectCustomFieldsRow rowProjCF in P_dt)
{
if ((String)row["MD_PROP_NAME"] == "Sample Areas Impacted" && row["MD_PROP_UID"].ToString() == rowProjCF["MD_PROP_UID"].ToString())
{
rowProjCF.MD_PROP_UID = (Guid)rowProjCF["MD_PROP_UID"];
rowProjCF.PROJ_UID = prjGuid;
rowProjCF.MD_PROP_ID = (int)rowProjCF["MD_PROP_ID"];
rowProjCF.CODE_VALUE = GetLulupValueCode("Marketing");
}
}
}
//This is field Lookup field which dont have Default value.
if ((String)row["MD_PROP_NAME"] == "Office Division")
{
Project_WS.ProjectDataSet.ProjectCustomFieldsRow rowProjCF = P_dt.NewProjectCustomFieldsRow();
rowProjCF.MD_PROP_UID = (Guid)row["MD_PROP_UID"];
rowProjCF.PROJ_UID = prjGuid;
rowProjCF.MD_PROP_ID = (int)row["MD_PROP_ID"];
rowProjCF.CUSTOM_FIELD_UID = Guid.NewGuid();
//rowProjCF.TEXT_VALUE = ds2.Tables[0].Rows[i1]["BusinessAreaLeader"].ToString();
rowProjCF.CODE_VALUE = GetLulupValueCode("Development");
tempProject.ProjectCustomFields.AddProjectCustomFieldsRow(rowProjCF);
}
}
//END Code FOR NEWLY ASSIGN THE VALUES TO CUSTOM FIELD
trackLog(" Updating project property changes.");
MessageBox.Show("Row =" + tempProject.ProjectCustomFields.Rows.Count.ToString());
if (tempProject.ProjectCustomFields.Rows.Count > 0)
{
project.QueueUpdateProject(jobGuid, sessionGuid, tempProject, false);
Guid publishguid = Guid.NewGuid();
project.QueuePublish(publishguid, prjGuid, true, String.Empty);
this.UpdateStatus("Update In Queue.....");
//this.textBox1.Text = " Update in Queue....";
Jobstate = WaitForQueue(jobGuid);
if (Jobstate == false)
{
trackLog("Queue Job for Project Custom fields Update Failed.");
return Jobstate;
}
else
{
trackLog("Queue Job Project Custom Fields Update succeeded.");
}
//System.Threading.Thread.Sleep(9000);
}
MessageBox.Show("Updated");
trackLog(" Checking-in project.");
jobGuid = Guid.NewGuid();
project.QueueCheckInProject(jobGuid, prjGuid, true, sessionGuid, "Checking-in:PSI");
Jobstate = WaitForQueue(jobGuid);
if (Jobstate == false)
{
trackLog("Queue Job Failed to Checking-in Project .");
return Jobstate;
}
System.Threading.Thread.Sleep(9000);
}
Guid jobGuid = Guid.NewGuid();
project.CheckOutProject(prjGuid, sessionGuid, "Checked-out:PSI");
System.Threading.Thread.Sleep(1000);
CSF_WS.CustomFieldDataSet CstmDS = CustF.ReadCustomFields(null, false);
Project_WS.ProjectDataSet tempProject;
tempProject = project.ReadProject(prjGuid, Project_WS.DataStoreEnum.WorkingStore);
// DateTime startdate = (DateTime)ds2.Tables[0].Rows[i1]["PlannedStartDate"];
DateTime startdate = DateTime.Now.AddDays(2);
tempProject.Project.Rows[0][tempProject.Project.PROJ_INFO_START_DATEColumn] = startdate;
//tempProject = ((Project_WS.ProjectDataSet)tempProject.GetChanges(DataRowState.Modified));
Project_WS.ProjectDataSet.ProjectCustomFieldsDataTable P_dt = new EPMSamples.Project_WS.ProjectDataSet.ProjectCustomFieldsDataTable();
P_dt = tempProject.ProjectCustomFields; //*****This Line Represents the Assigned fields are present in Project.
CstmDS = CustF.ReadCustomFieldsByEntity(new Guid(PSLibrary.EntityCollection.Entities.ProjectEntity.UniqueId.ToString()));
//// Code FOR NEWLY ASSIGN THE VALUES TO CUSTOM FIELD i.e SET THE VALUES TO CUSTOM FIELDS
foreach (DataRow row in CstmDS.CustomFields)
{
//This is Normal project Text field.
if ((String)row["MD_PROP_NAME"] == "Test")
{
Project_WS.ProjectDataSet.ProjectCustomFieldsRow rowProjCF = P_dt.NewProjectCustomFieldsRow();
rowProjCF.MD_PROP_UID = (Guid)row["MD_PROP_UID"];
rowProjCF.PROJ_UID = prjGuid;
rowProjCF.MD_PROP_ID = (int)row["MD_PROP_ID"];
rowProjCF.CUSTOM_FIELD_UID = Guid.NewGuid();
//rowProjCF.TEXT_VALUE = ds2.Tables[0].Rows[i1]["BusinessAreaLeader"].ToString();
rowProjCF.TEXT_VALUE = "Testing values1";
tempProject.ProjectCustomFields.AddProjectCustomFieldsRow(rowProjCF);
}
//This is field Lookup field which dont have Default value, it has Default value
if ((String)row["MD_PROP_NAME"] == "Sample Areas Impacted")
{
foreach (Project_WS.ProjectDataSet.ProjectCustomFieldsRow rowProjCF in P_dt)
{
if ((String)row["MD_PROP_NAME"] == "Sample Areas Impacted" && row["MD_PROP_UID"].ToString() == rowProjCF["MD_PROP_UID"].ToString())
{
rowProjCF.MD_PROP_UID = (Guid)rowProjCF["MD_PROP_UID"];
rowProjCF.PROJ_UID = prjGuid;
rowProjCF.MD_PROP_ID = (int)rowProjCF["MD_PROP_ID"];
rowProjCF.CODE_VALUE = GetLulupValueCode("Marketing");
}
}
}
//This is field Lookup field which dont have Default value.
if ((String)row["MD_PROP_NAME"] == "Office Division")
{
Project_WS.ProjectDataSet.ProjectCustomFieldsRow rowProjCF = P_dt.NewProjectCustomFieldsRow();
rowProjCF.MD_PROP_UID = (Guid)row["MD_PROP_UID"];
rowProjCF.PROJ_UID = prjGuid;
rowProjCF.MD_PROP_ID = (int)row["MD_PROP_ID"];
rowProjCF.CUSTOM_FIELD_UID = Guid.NewGuid();
//rowProjCF.TEXT_VALUE = ds2.Tables[0].Rows[i1]["BusinessAreaLeader"].ToString();
rowProjCF.CODE_VALUE = GetLulupValueCode("Development");
tempProject.ProjectCustomFields.AddProjectCustomFieldsRow(rowProjCF);
}
}
//END Code FOR NEWLY ASSIGN THE VALUES TO CUSTOM FIELD
trackLog(" Updating project property changes.");
MessageBox.Show("Row =" + tempProject.ProjectCustomFields.Rows.Count.ToString());
if (tempProject.ProjectCustomFields.Rows.Count > 0)
{
project.QueueUpdateProject(jobGuid, sessionGuid, tempProject, false);
Guid publishguid = Guid.NewGuid();
project.QueuePublish(publishguid, prjGuid, true, String.Empty);
this.UpdateStatus("Update In Queue.....");
//this.textBox1.Text = " Update in Queue....";
Jobstate = WaitForQueue(jobGuid);
if (Jobstate == false)
{
trackLog("Queue Job for Project Custom fields Update Failed.");
return Jobstate;
}
else
{
trackLog("Queue Job Project Custom Fields Update succeeded.");
}
//System.Threading.Thread.Sleep(9000);
}
MessageBox.Show("Updated");
trackLog(" Checking-in project.");
jobGuid = Guid.NewGuid();
project.QueueCheckInProject(jobGuid, prjGuid, true, sessionGuid, "Checking-in:PSI");
Jobstate = WaitForQueue(jobGuid);
if (Jobstate == false)
{
trackLog("Queue Job Failed to Checking-in Project .");
return Jobstate;
}
System.Threading.Thread.Sleep(9000);
}
Wednesday, 13 April 2011
Steps for Assign the values to Custom Fields In Project Server 2010.
Step1:Create the Project
Step2:Edit the project
Step3:Checkout the project
Step4:Publish the project(Saves Drafts DB to Publish DB)
Step5: Check-in the Project
Step2:Edit the project
Step3:Checkout the project
Step4:Publish the project(Saves Drafts DB to Publish DB)
Step5: Check-in the Project
Monday, 11 April 2011
Friday, 8 April 2011
Project Server 2007 Queue System
The user makes a server request from a client application (for example, publishing a project from Project Professional). The user passes a Job ID (a unique identifier that tracks the request) as part of the request.
The Project Web service takes the request and puts it in the queue.
A Job ID is issued to the user as an acknowledgement.
The user queries to check the status of the request through the issued Job ID.
The Office Project Server 2007 Queuing System returns the status of the request to the user.
Project Server important Urls
http://msdn.microsoft.com/en-us/library/ff462061.aspx ==>SharePoint 2010 Class library & web Service URL
http://msdn.microsoft.com/en-us/library/ms734631(v=vs.85).aspx =>
WWF Basics
http://msdn.microsoft.com/en-us/library/ms734702(v=vs.85).aspx =>Programing WWF
http://msdn.microsoft.com/en-us/library/ms440519(v=office.12).aspx
http://msdn.microsoft.com/en-us/library/ff843379.aspx
Custom Fileds;
http://www.projectified.com/projectified/2007/10/programmatic-ac.html
http://msdn.microsoft.com/en-us/library/websvclookuptable.lookuptable.readlookuptables.aspx
Code Samples ProjectServer2010
http://207.46.16.248/en-us/library/websvcproject.project.readprojectlist_di_pj14mref.aspx
http://www.eggheadcafe.com/software/aspnet/35906199/how-to-save-project-custom-field-value-thru-psi.aspx
http://projectserverblogs.com/index.php?paged=3&s=sdk
http://msdn.microsoft.com/en-us/library/ms734631(v=vs.85).aspx =>
WWF Basics
http://msdn.microsoft.com/en-us/library/ms734702(v=vs.85).aspx =>Programing WWF
http://msdn.microsoft.com/en-us/library/ms440519(v=office.12).aspx
http://msdn.microsoft.com/en-us/library/ff843379.aspx
Custom Fileds;
http://www.projectified.com/projectified/2007/10/programmatic-ac.html
http://msdn.microsoft.com/en-us/library/websvclookuptable.lookuptable.readlookuptables.aspx
Code Samples ProjectServer2010
http://207.46.16.248/en-us/library/websvcproject.project.readprojectlist_di_pj14mref.aspx
http://www.eggheadcafe.com/software/aspnet/35906199/how-to-save-project-custom-field-value-thru-psi.aspx
http://projectserverblogs.com/index.php?paged=3&s=sdk
Thursday, 31 March 2011
unable to find Microsoft.Office.Project.Server.workflow.dll in Project Server 2010 for visual studio Workflow Development
you will the Microsoft.Office.Project.Server.workflow.dll in below location:
C:\windows\assembly\gac_msil\Microsoft.Office.Project.Server.Workflow\14.0.0.0__71e9bce111e9429c
C:\windows\assembly\gac_msil\Microsoft.Office.Project.Server.Workflow\14.0.0.0__71e9bce111e9429c
Saturday, 19 March 2011
Project Server 2010 Custom Workflow by Visual Studio 2010
Design:
==========
WorkflowBranching.cs file:
==========================
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Linq;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Workflow;
using Microsoft.SharePoint.WorkflowActions;
namespace BranchingWorkflow.BranchingWorkflow
{
public sealed partial class BranchingWorkflow : SequentialWorkflowActivity
{
public Guid workflowId = default(System.Guid);
// Stage 1: Initial Proposal Details stage. Replace GUIDs with your values.
public Guid stage1Guid = new Guid("4fd56302-cb51-4a81-958c-47d499456a61");
// Stage 2: Proposal Details stage.
public Guid stage2Guid = new Guid("400060e9-5f2b-4e60-82f6-451b83165190");
// Stage 3: Automated Rejection stage.
public Guid stage3Guid = new Guid("c39007f5-9338-4a0f-af99-761dc7a2e97c");
// Stage 4: Execution stage.
public Guid stage4Guid = new Guid("43a1eb7b-562d-42e8-9a96-88817ef74295");
// Custom field: Sample Proposal Cost.
public Guid proposedCostUid = new Guid("dc68b96a-965e-4b25-ac8a-15a5df729831");
public BranchingWorkflow()
{
wfContext = new Microsoft.SharePoint.WorkflowActions.WorkflowContext();
InitializeComponent();
}
// Class property for the workflow properties.
public SPWorkflowActivationProperties workflowProperties
{ get; set; }
// Class property for the workflow context.
public Microsoft.SharePoint.WorkflowActions.WorkflowContext wfContext
{ get; set; }
// Dispose the workflow properties and workflow context when disposing the workflow.
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (disposing)
{
wfContext.Dispose();
workflowProperties.Dispose();
}
}
// Event handler for the OnWorkflowActivated activity; initializes the workflow context.
private void onWorkflowActivated1_Invoked(object sender, ExternalDataEventArgs e)
{
wfContext.Initialize(workflowProperties);
}
// Property for comparing the budget cost result.
public bool CompareBudgetCostResult
{ get; set; }
// Method to compare the budget cost.
internal void CompareBudgetCost(object sender, ConditionalEventArgs args)
{
args.Result = CompareBudgetCostResult;
}
}
}
==========
WorkflowBranching.cs file:
==========================
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Linq;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Workflow;
using Microsoft.SharePoint.WorkflowActions;
namespace BranchingWorkflow.BranchingWorkflow
{
public sealed partial class BranchingWorkflow : SequentialWorkflowActivity
{
public Guid workflowId = default(System.Guid);
// Stage 1: Initial Proposal Details stage. Replace GUIDs with your values.
public Guid stage1Guid = new Guid("4fd56302-cb51-4a81-958c-47d499456a61");
// Stage 2: Proposal Details stage.
public Guid stage2Guid = new Guid("400060e9-5f2b-4e60-82f6-451b83165190");
// Stage 3: Automated Rejection stage.
public Guid stage3Guid = new Guid("c39007f5-9338-4a0f-af99-761dc7a2e97c");
// Stage 4: Execution stage.
public Guid stage4Guid = new Guid("43a1eb7b-562d-42e8-9a96-88817ef74295");
// Custom field: Sample Proposal Cost.
public Guid proposedCostUid = new Guid("dc68b96a-965e-4b25-ac8a-15a5df729831");
public BranchingWorkflow()
{
wfContext = new Microsoft.SharePoint.WorkflowActions.WorkflowContext();
InitializeComponent();
}
// Class property for the workflow properties.
public SPWorkflowActivationProperties workflowProperties
{ get; set; }
// Class property for the workflow context.
public Microsoft.SharePoint.WorkflowActions.WorkflowContext wfContext
{ get; set; }
// Dispose the workflow properties and workflow context when disposing the workflow.
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (disposing)
{
wfContext.Dispose();
workflowProperties.Dispose();
}
}
// Event handler for the OnWorkflowActivated activity; initializes the workflow context.
private void onWorkflowActivated1_Invoked(object sender, ExternalDataEventArgs e)
{
wfContext.Initialize(workflowProperties);
}
// Property for comparing the budget cost result.
public bool CompareBudgetCostResult
{ get; set; }
// Method to compare the budget cost.
internal void CompareBudgetCost(object sender, ConditionalEventArgs args)
{
args.Result = CompareBudgetCostResult;
}
}
}
Thursday, 17 March 2011
Proposal Workflow project server 2010
Proposal Workflow project server 2010 steps:
================================
Step1:
Add Business Drivers in drivers Library
step2:
CREATE PHASE(Fill proposal DATA) -->Related to Portfolio
step 3:
SELECT PHASE & PLAN PHASE(GO THOUGH THE Strategy links in quick launch and In portfolio analasys Analyze check the time-phased project resource requirements against organizational resource capacity) -->Related to Portfolio
step 4:
Manage Phase(Fill the project document with 100% completed tasks USING SCHEDULE PAGE & SAVE-->SUBMIT)--->Related to Project Management
step 5:
FINISHED PHASE(CLICK ON POST IMPLIMENTION LINK IN QUICK LAUNCH AND FILL)
Thursday, 10 March 2011
Project Server 2010 Proposal Workflow Phases
Steps for Proposal Workflow in Project Server 2010 :
=======================================
1.Proposal creation.
2.Proposal selection(Based on conditions).
3.Plan(Resource plan, scheduling).
4.Manage(Project Execution how much % completed changing the project work sheet by providing %).
5.Finish.
Note:
=====
1,2 =>Portfolio related.
3,4 =>Project Management related.
Each step is one Phase.
Workflow is collection of Phases
Phase is collection of stages
Each Stage is collection of site pages.
Subscribe to:
Comments (Atom)




