Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ Page Language="C#" EnableViewState="true" Debug="true" Inherits="ProjectDoxWorkflowLib.Core.PDWorkflowPage"
- MasterPageFile="~/WorkflowEForms/Masters/MasterFormUI.Master" %>
- <%@ MasterType TypeName="ProjectDoxNET.WorkflowEForms.Masters.MasterFormUI" %>
- <%@ Import Namespace="System.Data" %>
- <%@ Import Namespace="System.Collections.Generic" %>
- <%@ Import Namespace="ProjectDoxLib.Core" %>
- <%@ Assembly Name="DataActiveLibrary" %>
- <%@ Import Namespace="DataActiveLibrary" %>
- <%@ Import Namespace="ProjectDoxWorkflowLib" %>
- <%@ Import Namespace="ProjectDoxWorkflowLib.Core" %>
- <%@ Import Namespace="ProjectDoxWorkflow.Activities" %>
- <%@ Import Namespace="Avolve.Utilities" %>
- <%@ Import Namespace="System.Reflection" %>
- <%@ Import Namespace="System.Xml" %>
- <%@ Import Namespace="System.IO" %>
- <%@ Import Namespace="ProjectDoxNET.WebSvcAPI" %>
- <%--
- // ================================================================================
- //
- // Config and Running Variables
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server" enableviewstate="true">
- //
- // Debugging
- //
- public bool DebugEForm = false;
- public bool ResetDataSets = false; // setting this to true will rebuild datasets
- //
- // Datasets
- //
- public DataSet ReviewConfigData = null;
- public DataSet ReviewGroupsData = null;
- public DataSet ReviewCycleData = null;
- public DataSet PermitData = null;
- //
- // Structures
- //
- public struct MarkUp
- {
- public string URL;
- public string Name;
- public string ID;
- public string GroupName;
- }
- //
- // PDOX Review Variables
- //
- public string ReviewConfigName = "PlanReview";
- // this static class holds enums and
- // and values needed for the review workflow
- public static class PDOX
- {
- public enum AssignmentTypes
- {
- Unknown,
- FirstInGroup, // means the first person in the project dox group to accept a review task will be assigned to the review
- Individual // this specific person is assigned to the review
- }
- public enum ReviewStatuses
- {
- Unknown,
- Assigned, // reviewer is assigned (if first in group email & name assigned also)
- InReview, // for this user review is started
- QACorrection, //
- OnHold,
- PendingResubmit,
- Authorized,
- AuthorizedWithConditions,
- Denied
- }
- public enum StandardActivities
- {
- Unknown = 0,
- DepartmentReview = 1,
- ReviewQA = 2,
- BeginReview = 3,
- ResubmitReceived = 4
- }
- public static Dictionary<string, string> ActivityCodes = new Dictionary<string, string>();
- public static Dictionary<string, string> GroupCodes = new Dictionary<string, string>();
- public static Dictionary<string, string> StatusCodes = new Dictionary<string, string>();
- public static List<string> DropDownStatuses = new List<string>();
- public static ProjectDoxLib.Core.PDProject CurrentProject;
- //
- // Current Logged On User
- //
- public static class CurrentUser
- {
- public static PDGroups ProjectGroups = null;
- public static string Group = "";
- public static string GroupName = "";
- public static string SuperGroupName = "";
- public static PDUser User = null;
- public static string AssignmentType = "";
- public static int Depth = 0;
- public static string Lineage = "";
- public static bool CanAssignReviewers = false;
- public static bool CanPerformReview = false;
- public static bool IsReviewCoordinator = false;
- public static bool IsSuper = false;
- public static bool IsAncestor = false;
- public static bool IsDescendant = false;
- }
- public static string ReviewCoordinatorGroupName = "Router Clerk";
- public static class Review
- {
- public static int SelectedCycle = 0;
- public static int CycleCount = 0;
- public static int CurrentCycle = 0;
- }
- }
- </script>
- <%--
- // ================================================================================
- //
- // Helper Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server" enableviewstate="true">
- public void DebugMessage(string Message)
- {
- if (DebugEForm)
- this.Master.AddHeaderMessage(Message);
- }
- public void AddDataSetField(string FieldName)
- {
- // hidden, not required, not editable
- FlowContext.Workflow.AddField(FieldName, "", ConfigManager.FieldTypes.Text, false, false, false);
- FlowContext.Workflow.AddField(FieldName + ".Schema", "", ConfigManager.FieldTypes.Text, false, false, false);
- }
- public DataSet LoadFromDataSetField(string FieldName)
- {
- DataSet ds = null;
- XmlReader DSReader = null;
- if (FlowContext.Workflow.FieldExists(FieldName))
- {
- ds = new DataSet();
- if (IsDataSetFieldEmpty(FieldName))
- {
- if (FlowContext.Workflow.FieldExists(FieldName + ".Schema"))
- {
- DSReader = new XmlTextReader(new StringReader(FlowContext.Workflow[FieldName + ".Schema"]));
- ds.ReadXmlSchema(DSReader);
- }
- }
- else
- {
- DSReader = new XmlTextReader(new StringReader(FlowContext.Workflow[FieldName]));
- ds.ReadXml(DSReader);
- }
- }
- return ds;
- }
- public void SaveToDataSetField(string FieldName, DataSet ExistingDataSet)
- {
- if (FlowContext.Workflow.FieldExists(FieldName + ".Schema"))
- FlowContext.Workflow[FieldName + ".Schema"] = ExistingDataSet.GetXmlSchema();
- if (FlowContext.Workflow.FieldExists(FieldName))
- FlowContext.Workflow[FieldName] = ExistingDataSet.GetXml();
- }
- public bool IsDataSetFieldEmpty(string FieldName)
- {
- if (FlowContext.Workflow.FieldExists(FieldName))
- {
- if (FlowContext.Workflow[FieldName].Length == 0 || FlowContext.Workflow[FieldName] == "<NewDataSet />")
- return true;
- else
- {
- string Val = FlowContext.Workflow[FieldName];
- return false;
- }
- }
- else
- return true;
- }
- public DataSet BuildDataSet(string FieldName)
- {
- DataSet ds = null;
- switch (FieldName)
- {
- case "PDOX.ReviewConfigData":
- // ADMIN NOTE: this query usually results in less than 100 records
- ds = GetReviewConfigData();
- break;
- case "PDOX.ReviewGroupsData":
- ds = GetReviewGroupsData();
- break;
- case "PDOX.PermitData":
- ds = GetPermitData();
- break;
- case "PDOX.ReviewCycleData":
- ds = GetReviewCycleData();
- break;
- }
- return ds;
- }
- public void BuildDataSetField(string FieldName)
- {
- DataSet ds = BuildDataSet(FieldName);
- if (ds == null)
- {
- throw new System.Exception("Could not retrieve " + FieldName);
- }
- FlowContext.Workflow[FieldName] = ds.GetXml();
- FlowContext.Workflow[FieldName + ".Schema"] = ds.GetXmlSchema();
- }
- protected bool IsActivity(Object ActivityNameToTest)
- {
- bool MatchingActivity = false;
- //DebugMessage("IsActivity: ActivityNameToTest.GetType() = " + ActivityNameToTest.GetType().ToString());
- //DebugMessage("IsActivity: typeof(PDOX.StandardActivities) = " + typeof(PDOX.StandardActivities).ToString());
- //DebugMessage("IsActivity: typeof(string) = " + typeof(string).ToString());
- if (ActivityNameToTest.GetType() == typeof(PDOX.StandardActivities))
- {
- PDOX.StandardActivities StandardName = (PDOX.StandardActivities)ActivityNameToTest;
- //DebugMessage("IsActivity: (FlowContext.Activity.ActivityName == StandardName.ToString()) = " + (FlowContext.Activity.ActivityName == StandardName.ToString()).ToString());
- MatchingActivity = (FlowContext.Activity.ActivityName == StandardName.ToString());
- }
- else if (ActivityNameToTest.GetType() == typeof(string))
- {
- //DebugMessage("IsActivity: (FlowContext.Activity.ActivityName == (string)ActivityNameToTest) = " + (FlowContext.Activity.ActivityName == (string)ActivityNameToTest));
- MatchingActivity = (FlowContext.Activity.ActivityName.Contains((string)ActivityNameToTest));
- }
- else
- {
- foreach (string ActivityName in Enum.GetNames(typeof(PDOX.StandardActivities)))
- {
- if (((string)ActivityNameToTest).Contains(ActivityName))
- MatchingActivity = true;
- }
- }
- return MatchingActivity;
- }
- protected bool IsItemRow(RepeaterItem RepeaterItemToTest)
- {
- return ((RepeaterItemToTest.ItemType == ListItemType.AlternatingItem) || (RepeaterItemToTest.ItemType == ListItemType.Item));
- }
- protected void VoidReview()
- {
- PDUsers RevCoordUsers = FlowContext.GetGroupUsers(PDOX.ReviewCoordinatorGroupName, Req.SessionUser);
- List<string> RevCoordEmails = new List<string>();
- foreach (PDUser RevCoordUser in RevCoordUsers)
- RevCoordEmails.Add(RevCoordUser.Email);
- // notify email for rev coord
- // update project status to void
- FlowContext.Project.UpdateStatus("void", FlowContext.GetUser(PDUser.GetFirstSysAdmin()));
- // terminate workflow
- FlowContext.StopWorkflow();
- }
- </script>
- <%--
- // ================================================================================
- //
- // User Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void InitReviewCoordinator()
- {
- FlowContext.Workflow.AddField("PDOX.ReviewCoordinator", "", ConfigManager.FieldTypes.Text, false, false, true);
- PDUser RevCoordUser;
- // show rev coord / WF starter
- if (FlowContext.Workflow["PDOX.ReviewCoordinator"] == "")
- {
- PDUser StartingUser = FlowContext.GetUser(FlowContext.Workflow.StarterID);
- FlowContext.Workflow["PDOX.ReviewCoordinator"] = StartingUser.Email;
- RevCoordUser = StartingUser;
- }
- else
- RevCoordUser = FlowContext.GetUser(FlowContext.Workflow["PDOX.ReviewCoordinator"].ToString());
- PDOXReviewCoordinator.Text = RevCoordUser.Email;
- ReviewCoordinator.Text = RevCoordUser.LocalizedName + " ( " + RevCoordUser.Email + " )";
- FlowContext.EForm["PDOXReviewCoordinator"] = RevCoordUser.Email;
- FlowContext.EForm.SaveField("PDOXReviewCoordinator");
- }
- protected void InitCurrentUser(DataRow ConfigRow)
- {
- PDOX.CurrentUser.GroupName = ConfigRow["GroupName"].ToString();
- PDOX.CurrentUser.SuperGroupName = ConfigRow["SuperGroupName"].ToString();
- PDOX.CurrentUser.IsAncestor = PDUtility.ConversionUtility.CBOOL2(ConfigRow["IsAncestor"]);
- PDOX.CurrentUser.IsDescendant = PDUtility.ConversionUtility.CBOOL2(ConfigRow["IsDescendant"]);
- int.TryParse(ConfigRow["Depth"].ToString(), out PDOX.CurrentUser.Depth);
- PDOX.CurrentUser.Lineage = ConfigRow["Lineage"].ToString();
- PDOX.CurrentUser.CanAssignReviewers = PDUtility.ConversionUtility.CBOOL2(ConfigRow["AssignReviewers"]);
- PDOX.CurrentUser.CanPerformReview = PDUtility.ConversionUtility.CBOOL2(ConfigRow["PerformReview"]);
- if (PDOX.CurrentUser.GroupName == PDOX.ReviewCoordinatorGroupName)
- PDOX.CurrentUser.IsReviewCoordinator = true;
- else
- PDOX.CurrentUser.IsReviewCoordinator = false;
- if (!PDOX.CurrentUser.IsReviewCoordinator)
- {
- if (PDOX.CurrentUser.IsAncestor)
- PDOX.CurrentUser.IsSuper = true;
- }
- PDOX.CurrentUser.AssignmentType = PDUtility.ConversionUtility.BlankNull(ConfigRow["HowAssigned"]);
- }
- </script>
- <%--
- // ================================================================================
- //
- // Review Config Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected DataSet GetReviewConfigData()
- {
- DataSet ds = null;
- using (DataActiveLibrary.Query Qry = new DataActiveLibrary.Query(GlobalVariables.DSN))
- {
- Qry.QueryText = @"
- SELECT
- ReviewConfigName
- ,GroupName
- ,SuperGroupName
- ,Node
- ,ParentNode
- ,Depth
- ,Lineage
- ,HowAssigned
- ,PermitTypes
- ,AssignReviewers
- ,PerformReview
- ,CAST((CASE WHEN DscCount > 0 THEN 1 ELSE 0 END) AS BIT) IsAncestor
- ,CAST((CASE WHEN AncCount > 0 THEN 1 ELSE 0 END) AS BIT) IsDescendant
- FROM
- (
- SELECT
- ISNULL(rc.ReviewConfigName,'') ReviewConfigName
- ,ISNULL(rc.GroupName,'') GroupName
- ,ISNULL(rc.SuperGroupName,'') SuperGroupName
- ,ISNULL(rc.Node,0) Node
- ,ISNULL(rc.ParentNode,0) ParentNode
- ,ISNULL(rc.Depth,0) Depth
- ,ISNULL(rc.Lineage,'') Lineage
- ,ISNULL(rc.HowAssigned,'') HowAssigned
- ,ISNULL(rc.PermitTypes,'') PermitTypes
- ,ISNULL(rc.AssignReviewers,0) AssignReviewers
- ,ISNULL(rc.PerformReview,0) PerformReview
- ,(
- SELECT COUNT(*)
- FROM ReviewConfig rcd
- WHERE rcd.ReviewConfigName = @ReviewConfigName
- AND rcd.Lineage LIKE '%/' + CAST(rc.Node AS VARCHAR(15)) + '%'
- AND rcd.Depth > rc.Depth
- ) DscCount
- ,(
- SELECT COUNT(*)
- FROM ReviewConfig rca
- WHERE rca.ReviewConfigName = @ReviewConfigName
- AND rca.Lineage LIKE '%/' + CAST(rc.ParentNode AS VARCHAR(15)) + '%'
- AND rca.Depth < rc.Depth
- ) AncCount
- FROM ReviewConfig rc
- WHERE ReviewConfigName = @ReviewConfigName
- ) hrc
- ORDER BY Lineage";
- Qry.AddSQLParam("@ReviewConfigName", ReviewConfigName, SqlDbType.VarChar);
- ds = Qry.GetDataSet();
- }
- return ds;
- }
- protected void InitReviewConfigData()
- {
- AddDataSetField("PDOX.ReviewConfigData");
- if (ResetDataSets)
- FlowContext.Workflow["PDOX.ReviewConfigData"] = "";
- if (IsDataSetFieldEmpty("PDOX.ReviewConfigData"))
- BuildDataSetField("PDOX.ReviewConfigData");
- ReviewConfigData = LoadFromDataSetField("PDOX.ReviewConfigData");
- }
- public DataRow FindConfigGroup()
- {
- DataRow[] ConfigRow = null;
- foreach (PDGroup ProjectGroup in PDOX.CurrentUser.ProjectGroups)
- {
- DebugMessage("FindConfigGroup: Searching for ProjectGroup.Name " + ProjectGroup.Name);
- ConfigRow = ReviewConfigData.Tables[0].Select("GroupName = '" + ProjectGroup.Name + "'");
- if (ConfigRow.Length > 0)
- break;
- }
- return ((ConfigRow.Length > 0) ? ConfigRow[0] : null);
- }
- </script>
- <%--
- // ================================================================================
- //
- // Reviewer Group Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected DataSet GetReviewGroupsData()
- {
- // initial build of the Reviewer Groups DataSet
- DataSet ds = new DataSet();
- DataTable ReviewGroupsTable = new DataTable();
- ReviewGroupsTable.Columns.Add("ReviewCycle", typeof(int));
- ReviewGroupsTable.Columns.Add("Depth", typeof(int));
- ReviewGroupsTable.Columns.Add("Lineage", typeof(string));
- ReviewGroupsTable.Columns.Add("IsAncestor", typeof(bool));
- ReviewGroupsTable.Columns.Add("IsDescendant", typeof(bool));
- ReviewGroupsTable.Columns.Add("GroupSelect", typeof(bool));
- ReviewGroupsTable.Columns.Add("GroupName", typeof(string));
- ReviewGroupsTable.Columns.Add("PerformReview", typeof(bool));
- ReviewGroupsTable.Columns.Add("HowAssigned", typeof(string));
- ReviewGroupsTable.Columns.Add("IndividualReviewers", typeof(string));
- // don't add the review coord to the groups since the group should never be assigned as a reviewer (per SA 9-16-09)
- DataRow[] ConfigRows = ReviewConfigData.Tables[0].Select("GroupName <> '" + PDOX.ReviewCoordinatorGroupName + "'", "Lineage ASC");
- for (int ConfigRowIndex = 0; ConfigRowIndex < ConfigRows.Length; ConfigRowIndex++)
- {
- DataRow ConfigRow = ConfigRows[ConfigRowIndex];
- DataRow RG_Row = ReviewGroupsTable.NewRow();
- RG_Row["ReviewCycle"] = 1;
- RG_Row["Depth"] = ConfigRow["Depth"];
- RG_Row["Lineage"] = ConfigRow["Lineage"];
- RG_Row["IsAncestor"] = ConfigRow["IsAncestor"];
- RG_Row["IsDescendant"] = ConfigRow["IsDescendant"];
- RG_Row["GroupSelect"] = false;
- RG_Row["GroupName"] = ConfigRow["GroupName"];
- RG_Row["PerformReview"] = false;
- RG_Row["HowAssigned"] = ConfigRow["HowAssigned"];
- RG_Row["IndividualReviewers"] = "";
- ReviewGroupsTable.Rows.Add(RG_Row);
- }
- ds.Tables.Add(ReviewGroupsTable);
- return ds;
- }
- protected void InitReviewGroupsData()
- {
- // Reviewer Groups Data
- AddDataSetField("PDOX.ReviewGroupsData");
- if (ResetDataSets) FlowContext.Workflow["PDOX.ReviewGroupsData"] = "";
- if (IsDataSetFieldEmpty("PDOX.ReviewGroupsData"))
- BuildDataSetField("PDOX.ReviewGroupsData");
- ReviewGroupsData = LoadFromDataSetField("PDOX.ReviewGroupsData");
- }
- public DataRow FindReviewGroup(int ReviewCycle, string GroupName)
- {
- return ReviewGroupsData.Tables[0].Select("ReviewCycle = " + ReviewCycle.ToString() + " AND GroupName = '" + GroupName + "'")[0];
- }
- protected void UpdateReviewGroups()
- {
- // ----------------------------------------------------------------------------------------
- // Update Reviewer Groups Data from Repeater
- // ----------------------------------------------------------------------------------------
- foreach (RepeaterItem ReviewGroupItem in ReviewGroupsRepeater.Items)
- {
- if (IsItemRow(ReviewGroupItem))
- {
- // get controls for this repeater row
- CheckBox GroupSelect = (CheckBox)ReviewGroupItem.FindControl("RG_GroupSelect");
- CheckBox PerformReview = (CheckBox)ReviewGroupItem.FindControl("RG_PerformReview");
- Label GroupNameLabel = (Label)ReviewGroupItem.FindControl("RG_GroupName");
- DropDownList GroupAssignmentType = (DropDownList)ReviewGroupItem.FindControl("RG_AssignmentType");
- CheckBoxList GroupUsersList = (CheckBoxList)ReviewGroupItem.FindControl("RG_GroupUsers");
- // get matching row in dataset for this repeater row and update it
- // this is not the same as the repeater data item
- DataRow GroupRow = FindReviewGroup(PDOX.Review.CurrentCycle, GroupNameLabel.Text);
- GroupRow["GroupSelect"] = (GroupSelect.Checked == true) ? "true" : "false";
- if (GroupAssignmentType.SelectedItem != null)
- GroupRow["HowAssigned"] = GroupAssignmentType.SelectedItem.Value;
- else
- GroupRow["HowAssigned"] = PDOX.AssignmentTypes.FirstInGroup.ToString();
- List<string> IndividualReviewers = new List<string>();
- foreach (ListItem GroupUserItem in GroupUsersList.Items)
- {
- if (GroupUserItem.Selected == true)
- {
- IndividualReviewers.Add(GroupUserItem.Value);
- }
- }
- if (IndividualReviewers.Count > 0)
- GroupRow["IndividualReviewers"] = string.Join(",", IndividualReviewers.ToArray());
- else
- GroupRow["IndividualReviewers"] = "";
- GroupRow["PerformReview"] = (PerformReview.Checked == true) ? "true" : "false";
- // apply changes
- GroupRow.AcceptChanges();
- ReviewGroupsData.Tables[0].AcceptChanges();
- }
- }
- SaveToDataSetField("PDOX.ReviewGroupsData", ReviewGroupsData);
- FlowContext.Workflow.SaveField("PDOX.ReviewGroupsData");
- // NOTE: SaveFields() gets called once on postback - everytime it is called potentially hundreds of qrys are called making it extremely inefficient to call multiple times
- //FlowContext.Workflow.SaveFields();
- }
- protected void ReviewGroupsRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
- {
- DataRow GroupRow = (DataRow)e.Item.DataItem;
- // PlaceHolder
- PlaceHolder GroupRowPlaceHolder = (PlaceHolder)e.Item.FindControl("RG_GroupRowPlaceHolder");
- // Review Cycle
- Label ReviewCycleLabel = (Label)e.Item.FindControl("RG_ReviewCycle");
- ReviewCycleLabel.Text = GroupRow["ReviewCycle"].ToString();
- // Group Selection
- CheckBox GroupSelect = (CheckBox)e.Item.FindControl("RG_GroupSelect");
- GroupSelect.Checked = PDUtility.ConversionUtility.CBOOL2(GroupRow["GroupSelect"]);
- // Group Name
- Label GroupNameLabel = (Label)e.Item.FindControl("RG_GroupName");
- GroupNameLabel.Text = GroupRow["GroupName"].ToString();
- // Perform Review (for supers)
- CheckBox PerformReview = (CheckBox)e.Item.FindControl("RG_PerformReview");
- // HowAssigned - default any previous "how assigned" selection
- DropDownList GroupAssignmentType = (DropDownList)e.Item.FindControl("RG_AssignmentType");
- ListItem AssignmentItem = GroupAssignmentType.Items.FindByValue(GroupRow["HowAssigned"].ToString());
- AssignmentItem.Selected = true;
- // GroupUsersList - add the group users as individual checkboxes so each user can be selected individually
- CheckBoxList GroupUsersList = (CheckBoxList)e.Item.FindControl("RG_GroupUsers");
- List<string> SelectedUsers = PDUtility.ConversionUtility.ConvertStringToStringList(GroupRow["IndividualReviewers"].ToString(), ",");
- // access the group members for the specific group and add all users
- ListItem li;
- foreach (PDUser GroupUser in FlowContext.GetGroupUsers(GroupNameLabel.Text, Req.SessionUser))
- {
- li = new ListItem(GroupUser.LocalizedName, GroupUser.Email);
- if (SelectedUsers.Contains(GroupUser.Email)) // check box if this user was previously selected
- li.Selected = true;
- GroupUsersList.Items.Add(li);
- }
- // enable select parts of row
- int GroupDepth = Convert.ToInt32(GroupRow["Depth"]);
- bool EnableGroupSelect = false;
- bool EnableGroup = false;
- bool DisplayGroup = false;
- bool DisplayPerformReview = false;
- bool UserIsSuper = PDOX.CurrentUser.IsSuper;
- bool RowIsUser = (GroupRow["Lineage"].ToString() == PDOX.CurrentUser.Lineage);
- bool RowIsSubordinateToUser = (GroupRow["Lineage"].ToString().Contains(PDOX.CurrentUser.Lineage)) && !RowIsUser;
- bool RowIsDirectSubordinate = (RowIsSubordinateToUser && (Math.Abs(GroupDepth - PDOX.CurrentUser.Depth) < 2));
- bool RowCanPerformReview = PDUtility.ConversionUtility.CBOOL2(GroupRow["PerformReview"]);
- bool RowIsSuperGroup = PDUtility.ConversionUtility.CBOOL2(GroupRow["IsAncestor"]);
- DebugMessage("ReviewGroupsRepeater_ItemDataBound: RowIsSubordinateToUser = " + RowIsSubordinateToUser.ToString());
- DebugMessage("ReviewGroupsRepeater_ItemDataBound: GroupDepth = " + GroupDepth.ToString() + " : PDOX.CurrentUser.Depth = " + PDOX.CurrentUser.Depth.ToString());
- DebugMessage("ReviewGroupsRepeater_ItemDataBound: RowIsDirectSubordinate = " + RowIsDirectSubordinate.ToString());
- if (IsActivity(PDOX.StandardActivities.BeginReview))
- {
- // only review coordinator should be here
- if (PDOX.CurrentUser.IsReviewCoordinator)
- {
- // enable for top groups and top super groups
- if (GroupDepth < 2)
- {
- EnableGroupSelect = true;
- EnableGroup = true;
- DisplayGroup = true;
- if (RowIsSuperGroup)
- {
- // this is a super group (i.e. this group is ancestor and so has descendants)
- DisplayPerformReview = true;
- }
- }
- }
- }
- else if (IsActivity(PDOX.StandardActivities.DepartmentReview))
- {
- if (UserIsSuper)
- {
- if (RowIsUser)
- {
- // this is the super group
- EnableGroupSelect = false;
- EnableGroup = false;
- DisplayGroup = false;
- }
- else if (RowIsDirectSubordinate)
- {
- // this is a descendant group of the logged on super
- EnableGroupSelect = true;
- EnableGroup = true;
- DisplayGroup = true;
- }
- }
- if (PDOX.CurrentUser.IsReviewCoordinator)
- {
- // enable for top groups and top super groups
- if (GroupDepth < 2)
- {
- EnableGroupSelect = true;
- EnableGroup = true;
- DisplayGroup = true;
- if (RowIsSuperGroup)
- {
- // this is a super group (i.e. this group is ancestor and so has descendants)
- DisplayPerformReview = true;
- }
- }
- }
- }
- else if (IsActivity(PDOX.StandardActivities.ResubmitReceived))
- {
- // only review coordinator should be here
- if (PDOX.CurrentUser.IsReviewCoordinator)
- {
- // enable for top groups and top super groups
- if (GroupDepth < 2)
- {
- EnableGroupSelect = true;
- EnableGroup = true;
- DisplayGroup = true;
- }
- }
- }
- //DebugMessage(GroupNameLabel.Text + " UIS:" + UserIsSuper.ToString() + " RISTU:" + RowIsSubordinateToUser.ToString() + " RIU:" + RowIsUser.ToString() + " EG:" + EnableGroup.ToString() + " DG: " + DisplayGroup.ToString());
- if (PDOX.Review.SelectedCycle != PDOX.Review.CurrentCycle)
- {
- EnableGroupSelect = false;
- EnableGroup = false;
- }
- GroupSelect.Enabled = EnableGroupSelect;
- if (EnableGroup)
- {
- GroupAssignmentType.Enabled = true;
- GroupUsersList.Enabled = true;
- }
- else
- {
- GroupAssignmentType.Enabled = false;
- GroupUsersList.Enabled = false;
- }
- if (DisplayPerformReview)
- PerformReview.Visible = false;
- GroupRowPlaceHolder.Visible = DisplayGroup;
- }
- protected void BindReviewGroupsData(int ReviewCycle)
- {
- if (ReviewGroupsData != null)
- {
- if (ReviewGroupsData.Tables.Count > 0)
- {
- DataRow[] SelectedReviewGroups = ReviewGroupsData.Tables[0].Select("ReviewCycle = " + ReviewCycle.ToString());
- ReviewGroupsRepeater.DataSource = SelectedReviewGroups;
- ReviewGroupsRepeater.DataBind();
- }
- }
- }
- </script>
- <%--
- // ================================================================================
- //
- // Review Cycle Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected DataSet GetReviewCycleData()
- {
- DataSet ds = new DataSet();
- DataTable ReviewCycleTable = new DataTable();
- ReviewCycleTable.Columns.Add("ReviewCycle", typeof(int));
- ReviewCycleTable.Columns.Add("GroupSelect", typeof(bool));
- ReviewCycleTable.Columns.Add("GroupName", typeof(string));
- ReviewCycleTable.Columns.Add("Depth", typeof(int));
- ReviewCycleTable.Columns.Add("Lineage", typeof(string));
- ReviewCycleTable.Columns.Add("ReviewerName", typeof(string));
- ReviewCycleTable.Columns.Add("ReviewerEmail", typeof(string));
- ReviewCycleTable.Columns.Add("PerformReview", typeof(bool));
- ReviewCycleTable.Columns.Add("HowAssigned", typeof(string));
- ReviewCycleTable.Columns.Add("AssignedBy", typeof(string));
- ReviewCycleTable.Columns.Add("ReviewStatus", typeof(string));
- ReviewCycleTable.Columns.Add("ReviewComments", typeof(string));
- ReviewCycleTable.Columns.Add("QARequest", typeof(string));
- ReviewCycleTable.Columns.Add("QAResponse", typeof(string));
- ReviewCycleTable.Columns.Add("AssignCorrections", typeof(bool));
- ReviewCycleTable.Columns.Add("TaskID", typeof(int));
- ds.Tables.Add(ReviewCycleTable);
- return ds;
- }
- protected void InitReviewCycleData()
- {
- // determine cycles
- FlowContext.Workflow.AddField("PDOX.Review.CurrentCycle", "", ConfigManager.FieldTypes.Text, false, false, false);
- int.TryParse(FlowContext.Workflow["PDOX.Review.CurrentCycle"], out PDOX.Review.CurrentCycle);
- if (PDOX.Review.CurrentCycle == 0)
- {
- PDOX.Review.CurrentCycle = 1;
- FlowContext.Workflow["PDOX.Review.CurrentCycle"] = PDOX.Review.CurrentCycle.ToString();
- }
- DebugMessage("InitReviewCycleData: PDOX.Review.CurrentCycle = " + PDOX.Review.CurrentCycle);
- FlowContext.Workflow.AddField("PDOX.Review.CycleCount", "", ConfigManager.FieldTypes.Text, false, false, false);
- int.TryParse(FlowContext.Workflow["PDOX.Review.CycleCount"], out PDOX.Review.CycleCount);
- if (PDOX.Review.CycleCount == 0) // default CycleCount to 1
- {
- PDOX.Review.CycleCount = 1;
- FlowContext.Workflow["PDOX.Review.CycleCount"] = PDOX.Review.CycleCount.ToString();
- }
- FlowContext.Workflow.AddField("PDOX.Review.SelectedCycle", "", ConfigManager.FieldTypes.Text, false, false, false);
- if (!IsPostBack)
- {
- int.TryParse(FlowContext.Workflow["PDOX.Review.SelectedCycle"], out PDOX.Review.SelectedCycle);
- if (PDOX.Review.SelectedCycle == 0)
- {
- PDOX.Review.SelectedCycle = 1;
- FlowContext.Workflow["PDOX.Review.SelectedCycle"] = PDOX.Review.SelectedCycle.ToString();
- }
- }
- else
- {
- PDOX.Review.SelectedCycle = SelectedReviewCycle.SelectedIndex + 1;
- }
- FlowContext.Workflow["PDOX.Review.SelectedCycle"] = PDOX.Review.SelectedCycle.ToString();
- FlowContext.Workflow.SaveField("PDOX.Review.SelectedCycle");
- DebugMessage("InitReviewCycleData: PDOX.Review.SelectedCycle = " + PDOX.Review.SelectedCycle);
- // cycle data
- AddDataSetField("PDOX.ReviewCycleData");
- if (ResetDataSets)
- FlowContext.Workflow["PDOX.ReviewCycleData"] = "";
- if (IsDataSetFieldEmpty("PDOX.ReviewCycleData"))
- BuildDataSetField("PDOX.ReviewCycleData");
- ReviewCycleData = LoadFromDataSetField("PDOX.ReviewCycleData");
- }
- protected void FillReviewCycleFields()
- {
- if (!IsPostBack)
- {
- // fill review cycle dropdown
- SelectedReviewCycle.Items.Clear();
- for (int CycleIndex = 0; CycleIndex < PDOX.Review.CycleCount; CycleIndex++)
- SelectedReviewCycle.Items.Add(new ListItem((CycleIndex + 1).ToString(), (CycleIndex + 1).ToString()));
- // select the correct review cycle on the drop down
- ListItem SelectedCycleItem = SelectedReviewCycle.Items.FindByValue(PDOX.Review.SelectedCycle.ToString());
- if (SelectedCycleItem != null)
- SelectedCycleItem.Selected = true;
- }
- ReviewCycleText.Text = PDOX.Review.CurrentCycle.ToString();
- }
- public DataRow FindCycleGroup(int ReviewCycle, string GroupName, string ReviewerEmail)
- {
- DataRow[] CycleRow = null;
- if (ReviewerEmail != "")
- CycleRow = ReviewCycleData.Tables[0].Select("ReviewCycle = " + ReviewCycle.ToString() + " AND GroupName = '" + GroupName + "' AND ReviewerEmail = '" + ReviewerEmail + "'");
- else
- CycleRow = ReviewCycleData.Tables[0].Select("ReviewCycle = " + ReviewCycle.ToString() + " AND GroupName = '" + GroupName + "'");
- return (CycleRow.Length > 0) ? CycleRow[0] : null;
- }
- protected string GetChecklistURL(string Mode, string GroupName, int ReviewCycle, string PermitSubType)
- {
- string ChecklistURL = "Checklist.aspx"
- + "?WID=" + FlowContext.Workflow.FlowInstanceID.ToString()
- + "&AID=" + FlowContext.Activity.FlowInstanceActivityID.ToString()
- + "&PID=" + FlowContext.Project.ProjectID.ToString()
- + "&GroupName=" + GroupName
- + "&ReviewCycle=" + ReviewCycle.ToString();
- if (IsActivity("GroupPreScreen"))
- ChecklistURL += "&Mode=Edit" + "&Cat1=" + PermitSubType + "&Cat2=Submissions";
- else if (IsActivity("PreScreenReview"))
- ChecklistURL += "&Cat1=" + PermitSubType + "&Cat2=Submissions";
- else if (IsActivity(PDOX.StandardActivities.DepartmentReview.ToString()))
- ChecklistURL += "&Mode=Edit" + "&Cat1=" + PermitSubType + "&Cat2=Review";
- else if (IsActivity("ApplicantResubmit"))
- ChecklistURL += "&Cat1=" + PermitSubType + "&Cat2=Review";
- return ChecklistURL;
- }
- protected void ReviewCycleRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
- {
- ListItem li;
- DataRow CycleRow = (DataRow)e.Item.DataItem;
- // PlaceHolder
- PlaceHolder CycleRowPlaceHolder = (PlaceHolder)e.Item.FindControl("RC_CycleRowPlaceHolder");
- // Review Cycle
- Label ReviewCycleLabel = (Label)e.Item.FindControl("RC_ReviewCycle");
- ReviewCycleLabel.Text = CycleRow["ReviewCycle"].ToString();
- // Group Select
- CheckBox GroupSelect = (CheckBox)e.Item.FindControl("RC_GroupSelect");
- GroupSelect.Checked = PDUtility.ConversionUtility.CBOOL2(CycleRow["GroupSelect"]);
- // Group Name
- Label GroupNameLabel = (Label)e.Item.FindControl("RC_GroupName");
- GroupNameLabel.Text = CycleRow["GroupName"].ToString();
- // Reviewer Name
- Label ReviewerNameLabel = (Label)e.Item.FindControl("RC_ReviewerName");
- ReviewerNameLabel.Text = CycleRow["ReviewerName"].ToString();
- // Reviewer Email
- Label ReviewerEmailLabel = (Label)e.Item.FindControl("RC_ReviewerEmail");
- string ReviewerEmail = CycleRow["ReviewerEmail"].ToString();
- ReviewerEmailLabel.Text = ReviewerEmail;
- // AssignedBy Label
- Label AssignedByLabel = (Label)e.Item.FindControl("RC_AssignedBy");
- AssignedByLabel.Text = CycleRow["AssignedBy"].ToString();
- // Assignment Type Label
- Label AssignmentTypeLabel = (Label)e.Item.FindControl("RC_AssignmentType");
- AssignmentTypeLabel.Text = CycleRow["HowAssigned"].ToString();
- // ReviewStatus Label
- Label ReviewStatusLabel = (Label)e.Item.FindControl("RC_ReviewStatus");
- ReviewStatusLabel.Text = CycleRow["ReviewStatus"].ToString();
- // Review Comments
- TextBox ReviewComments = (TextBox)e.Item.FindControl("RC_ReviewComments");
- ReviewComments.Text = CycleRow["ReviewComments"].ToString();
- // setup checklist link
- HtmlAnchor ChecklistLink = (HtmlAnchor)e.Item.FindControl("ChecklistLink");
- ChecklistLink.HRef = GetChecklistURL("Edit", Utility.URL.Encode(CycleRow["GroupName"].ToString()), PDOX.Review.SelectedCycle, PermitSubType.Text);
- // Review Panel
- CheckBox PerformReview = (CheckBox)e.Item.FindControl("RC_PerformReview");
- Panel PerformReviewPanel = (Panel)e.Item.FindControl("RC_ReviewPanel");
- CheckBox PerformReviewComplete = (CheckBox)e.Item.FindControl("DeptReviewChk");
- // Group Select
- CheckBox AssignCorrectionsCheckBox = (CheckBox)e.Item.FindControl("RC_AssignCorrections");
- AssignCorrectionsCheckBox.Checked = PDUtility.ConversionUtility.CBOOL2(CycleRow["AssignCorrections"]);
- // QA Panel
- Panel QAPanel = (Panel)e.Item.FindControl("RC_QAFieldSet");
- TextBox QARequestTextBox = (TextBox)e.Item.FindControl("RC_QARequest");
- TextBox QAResponseTextBox = (TextBox)e.Item.FindControl("RC_QAResponse");
- //
- // fill status drop down
- //
- DropDownList ChangeStatusDropDown = (DropDownList)e.Item.FindControl("RC_ChangeStatus");
- string StatusValue = "";
- ChangeStatusDropDown.Items.Clear();
- ChangeStatusDropDown.Items.Add(new ListItem("-select status-", ""));
- foreach (string StatusText in PDOX.DropDownStatuses)
- {
- if (PDOX.StatusCodes.ContainsKey(StatusText))
- {
- StatusValue = PDOX.StatusCodes[StatusText];
- li = new ListItem(StatusValue, StatusText);
- if (li.Value == CycleRow["ReviewStatus"].ToString())
- li.Selected = true;
- ChangeStatusDropDown.Items.Add(li);
- }
- }
- GroupSelect.Visible = true;
- PerformReview.Checked = PDUtility.ConversionUtility.CBOOL2(CycleRow["PerformReview"]);
- int RowDepth = Convert.ToInt32(CycleRow["Depth"].ToString());
- bool CorrectionsNeeded = PDUtility.ConversionUtility.CBOOL2(FlowContext.Workflow["ReviewQA.CorrectionsNeeded"]);
- bool ShowQAPanel = false;
- bool EnableRow = false;
- bool EnableGroupSelect = false;
- bool DisplayRow = false;
- bool UserIsSuper = PDOX.CurrentUser.IsSuper;
- bool RowIsUser = (CycleRow["Lineage"].ToString() == PDOX.CurrentUser.Lineage);
- bool RowIsSubordinateToUser = (CycleRow["Lineage"].ToString().Contains(PDOX.CurrentUser.Lineage)) && !RowIsUser;
- bool RowIsDirectSubordinate = (RowIsSubordinateToUser && (Math.Abs(RowDepth - PDOX.CurrentUser.Depth) < 2));
- bool RowCanPerformReview = PDUtility.ConversionUtility.CBOOL2(CycleRow["PerformReview"]);
- AssignCorrectionsCheckBox.Visible = false;
- PerformReviewComplete.Visible = false;
- //DebugMessage("RowLineage = " + CycleRow["Lineage"].ToString() + " : UserLineage = " + PDOX.CurrentUser.Lineage);
- if (IsActivity(PDOX.StandardActivities.DepartmentReview))
- {
- ShowQAPanel = CorrectionsNeeded;
- PerformReview.Enabled = false;
- PerformReview.Visible = false;
- PerformReviewPanel.Visible = true;
- PerformReviewComplete.Visible = true;
- if (UserIsSuper)
- {
- // if this row is the super
- if (RowIsUser)
- {
- if (RowCanPerformReview)
- {
- PerformReview.Visible = false;
- PerformReviewPanel.Visible = true;
- DisplayRow = true;
- EnableRow = true;
- }
- }
- else if (RowIsDirectSubordinate)
- {
- PerformReviewPanel.Visible = true;
- DisplayRow = true;
- EnableRow = false;
- PerformReviewComplete.Enabled = false;
- }
- else
- {
- DisplayRow = false;
- EnableRow = false;
- }
- }
- else
- {
- if (RowIsUser)
- {
- DisplayRow = true;
- EnableRow = true;
- }
- else
- {
- if (GroupSelect.Checked)
- {
- DisplayRow = true;
- EnableRow = false;
- }
- }
- }
- GroupSelect.Visible = false;
- if (CorrectionsNeeded)
- {
- AssignCorrectionsCheckBox.Visible = true;
- AssignCorrectionsCheckBox.Enabled = false;
- }
- if (PDOX.CurrentUser.IsReviewCoordinator)
- {
- DisplayRow = true;
- EnableRow = false;
- PerformReviewPanel.Visible = true;
- PerformReviewComplete.Visible = false;
- }
- }
- else if (IsActivity(PDOX.StandardActivities.ReviewQA))
- {
- PerformReview.Visible = false;
- PerformReviewPanel.Visible = true;
- ShowQAPanel = GroupSelect.Checked;
- DisplayRow = GroupSelect.Checked;
- AssignCorrectionsCheckBox.Checked = false;
- AssignCorrectionsCheckBox.Visible = true;
- }
- else if (IsActivity("ReviewComplete"))
- {
- PerformReview.Visible = false;
- PerformReviewPanel.Visible = true;
- ShowQAPanel = false;
- EnableRow = false;
- DisplayRow = GroupSelect.Checked;
- }
- else if (IsActivity("ApplicantResubmit"))
- {
- PerformReview.Visible = false;
- PerformReviewPanel.Visible = true;
- ShowQAPanel = false;
- EnableRow = false;
- DisplayRow = GroupSelect.Checked;
- }
- else if (IsActivity("ResubmitReceived"))
- {
- PerformReview.Visible = false;
- PerformReviewPanel.Visible = true;
- ShowQAPanel = false;
- EnableRow = false;
- DisplayRow = GroupSelect.Checked;
- }
- //DebugMessage(GroupNameLabel.Text + " UIS:" + UserIsSuper.ToString() + " RISTU:" + RowIsSubordinateToUser.ToString() + " RIU:" + RowIsUser.ToString() + " ER:" + EnableRow.ToString() + " DR: " + DisplayRow.ToString());
- // check which elements should be disabled if the current user is not the assigned reviewer
- if (PDOX.Review.SelectedCycle != PDOX.Review.CurrentCycle)
- {
- EnableGroupSelect = false;
- EnableRow = false;
- }
- GroupSelect.Enabled = EnableGroupSelect;
- if (EnableRow)
- {
- ChangeStatusDropDown.Enabled = true;
- if (ShowQAPanel)
- {
- QAResponseTextBox.Enabled = true;
- ReviewComments.Enabled = true;
- }
- }
- else
- {
- ChangeStatusDropDown.Enabled = false;
- if (ShowQAPanel)
- {
- QAResponseTextBox.Enabled = false;
- }
- ReviewComments.Enabled = false;
- }
- // QA Panel
- if (IsActivity(PDOX.StandardActivities.DepartmentReview))
- {
- QAPanel.Visible = ShowQAPanel && AssignCorrectionsCheckBox.Checked;
- }
- else if (IsActivity(PDOX.StandardActivities.ReviewQA))
- {
- QAPanel.Visible = ShowQAPanel;
- }
- else if (IsActivity("ReviewComplete"))
- {
- QAPanel.Visible = false;
- }
- else if (IsActivity("ApplicantResubmit"))
- {
- QAPanel.Visible = ShowQAPanel;
- }
- if (QAPanel.Visible)
- {
- QARequestTextBox.Text = CycleRow["QARequest"].ToString();
- QAResponseTextBox.Text = CycleRow["QAResponse"].ToString();
- if (IsActivity(PDOX.StandardActivities.DepartmentReview.ToString()))
- {
- QARequestTextBox.Enabled = false;
- }
- }
- if (PDOX.CurrentUser.GroupName != PDOX.ReviewCoordinatorGroupName) // if not a review coord then disallow the request box from edits
- {
- QARequestTextBox.ReadOnly = true;
- }
- else
- {
- //QARequestTextBox.Attributes.Add("onchange", "document.aspnetForm." + GroupSelect.UniqueID + ".checked=true");
- }
- if (PDOX.Review.SelectedCycle != PDOX.Review.CurrentCycle)
- {
- QARequestTextBox.Enabled = false;
- QAResponseTextBox.Enabled = false;
- PerformReviewComplete.Enabled = false;
- }
- CycleRowPlaceHolder.Visible = DisplayRow;
- }
- protected void UpdateReviewCycle()
- {
- // ----------------------------------------------------------------------------------------
- // Fill Out Review Cycle Data Based on ReviewGroups
- // ----------------------------------------------------------------------------------------
- // delete current reviewcycle (we're replacing it)
- /*
- bool FoundToDelete = true;
- while (FoundToDelete)
- {
- FoundToDelete = false;
- foreach (DataRow CycleRow in ReviewCycleData.Tables[0].Rows)
- {
- if (Convert.ToInt32(CycleRow["ReviewCycle"]) == PDOX.Review.CurrentCycle)
- {
- CycleRow.Delete();
- FoundToDelete = true;
- break;
- }
- }
- }
- */
- /*
- DataRow[] RowsToDelete = ReviewCycleData.Tables[0].Select("ReviewCycle = " + PDOX.Review.CurrentCycle.ToString());
- foreach (DataRow RowToDelete in RowsToDelete)
- RowToDelete.Delete();
- ReviewCycleData.Tables[0].AcceptChanges();
- ReviewCycleData.AcceptChanges();
- */
- bool DeleteOld = false;
- bool AddNew = false;
- bool UpdateExisting = false;
- DataRow GroupRow = null;
- DataRow[] CycleRows = null;
- bool IsSuper = false;
- string GroupName = "";
- PDOX.AssignmentTypes HowAssigned = PDOX.AssignmentTypes.Unknown;
- bool CanPerformReview = false;
- bool IsSelected = false;
- ListItemCollection GroupUsers = null;
- Dictionary<string, string> IndividualReviewers = new Dictionary<string, string>();
- StringBuilder IndividualReviewerEmails = new StringBuilder();
- // update rows for current review cycle based on group data
- // this is a variation of the parade algo
- foreach (RepeaterItem ReviewGroupItem in ReviewGroupsRepeater.Items)
- {
- if (IsItemRow(ReviewGroupItem))
- {
- PlaceHolder GroupRowPlaceHolder = (PlaceHolder)ReviewGroupItem.FindControl("RG_GroupRowPlaceHolder");
- if (GroupRowPlaceHolder.Visible == true)
- {
- // get control values
- IsSelected = ((CheckBox)ReviewGroupItem.FindControl("RG_GroupSelect")).Checked;
- CanPerformReview = ((CheckBox)ReviewGroupItem.FindControl("RG_PerformReview")).Checked;
- GroupName = ((Label)ReviewGroupItem.FindControl("RG_GroupName")).Text;
- HowAssigned = (((DropDownList)ReviewGroupItem.FindControl("RG_AssignmentType")).SelectedItem.Value == PDOX.AssignmentTypes.FirstInGroup.ToString()) ? PDOX.AssignmentTypes.FirstInGroup : PDOX.AssignmentTypes.Individual;
- GroupUsers = ((CheckBoxList)ReviewGroupItem.FindControl("RG_GroupUsers")).Items;
- // find group row in ReviewGroupsData
- GroupRow = FindReviewGroup(PDOX.Review.CurrentCycle, GroupName);
- IsSuper = PDUtility.ConversionUtility.CBOOL2(GroupRow["IsAncestor"]);
- UpdateExisting = false;
- DeleteOld = false;
- AddNew = false;
- // get the rc row that matches these reviewers
- CycleRows = ReviewCycleData.Tables[0].Select(
- "ReviewCycle = " + PDOX.Review.CurrentCycle.ToString()
- + " AND GroupName = '" + GroupName + "'"
- );
- // if it exists in rc data
- if (CycleRows.Length > 0)
- {
- // if how assigned is the same
- if (CycleRows[0]["HowAssigned"].ToString() == HowAssigned.ToString())
- {
- // if the group is selected
- if (IsSelected)
- UpdateExisting = true;
- else
- DeleteOld = true;
- }
- else
- {
- // if the group is selected
- if (IsSelected)
- {
- // delete old individual records
- DeleteOld = true;
- // add new one as first in group
- AddNew = true;
- }
- else
- DeleteOld = true;
- }
- }
- else
- {
- // doesn't exist in rc data
- if (IsSelected)
- AddNew = true;
- }
- IndividualReviewers.Clear();
- IndividualReviewerEmails.Remove(0, IndividualReviewerEmails.Length);
- // these are individual reviewers
- foreach (ListItem GroupUser in GroupUsers)
- {
- if (GroupUser.Selected)
- {
- IndividualReviewers.Add(GroupUser.Value, GroupUser.Text);
- if (IndividualReviewerEmails.Length > 0)
- IndividualReviewerEmails.Append(",");
- IndividualReviewerEmails.Append("'");
- IndividualReviewerEmails.Append(GroupUser.Value);
- IndividualReviewerEmails.Append("'");
- }
- }
- if (DeleteOld)
- {
- foreach (DataRow CycleRow in CycleRows)
- CycleRow.Delete();
- }
- switch (HowAssigned)
- {
- case PDOX.AssignmentTypes.FirstInGroup:
- if (UpdateExisting)
- {
- // don't change anything
- }
- if (AddNew)
- {
- DataRow RC_Row = ReviewCycleData.Tables[0].NewRow();
- RC_Row["GroupSelect"] = IsSelected;
- RC_Row["ReviewCycle"] = PDOX.Review.CurrentCycle;
- RC_Row["Depth"] = GroupRow["Depth"];
- RC_Row["Lineage"] = GroupRow["Lineage"];
- RC_Row["GroupName"] = GroupName;
- RC_Row["HowAssigned"] = HowAssigned.ToString();
- RC_Row["AssignedBy"] = Req.SessionUser.Email;
- RC_Row["PerformReview"] = (IsSuper && CanPerformReview) || IsSelected;
- RC_Row["ReviewerEmail"] = "";
- RC_Row["ReviewerName"] = "";
- RC_Row["ReviewStatus"] = PDOX.ReviewStatuses.Assigned.ToString();
- RC_Row["ReviewComments"] = "";
- RC_Row["QARequest"] = "";
- RC_Row["QAResponse"] = "";
- RC_Row["AssignCorrections"] = "false";
- RC_Row["TaskID"] = FlowContext.Task.FlowTaskID;
- ReviewCycleData.Tables[0].Rows.Add(RC_Row);
- }
- break;
- case PDOX.AssignmentTypes.Individual:
- if (UpdateExisting)
- {
- DataRow[] ReviewerRows = null;
- // add any individual reviewers selected in group
- // that are not in rc data
- foreach (string ReviewerEmail in IndividualReviewers.Keys)
- {
- ReviewerRows = ReviewCycleData.Tables[0].Select(
- "ReviewCycle = " + PDOX.Review.CurrentCycle.ToString()
- + " AND GroupName = '" + GroupName + "'"
- + " AND ReviewerEmail = '" + ReviewerEmail + "'"
- );
- // is it in rc data
- if (ReviewerRows.Length < 1)
- {
- // add the row
- DataRow RC_Row = ReviewCycleData.Tables[0].NewRow();
- RC_Row["GroupSelect"] = IsSelected;
- RC_Row["ReviewCycle"] = PDOX.Review.CurrentCycle;
- RC_Row["Depth"] = GroupRow["Depth"];
- RC_Row["Lineage"] = GroupRow["Lineage"];
- RC_Row["GroupName"] = GroupName;
- RC_Row["HowAssigned"] = HowAssigned.ToString();
- RC_Row["AssignedBy"] = Req.SessionUser.Email;
- RC_Row["PerformReview"] = (IsSuper && CanPerformReview) || IsSelected;
- RC_Row["ReviewerEmail"] = ReviewerEmail;
- RC_Row["ReviewerName"] = IndividualReviewers[ReviewerEmail];
- RC_Row["ReviewStatus"] = PDOX.ReviewStatuses.Assigned.ToString();
- RC_Row["ReviewComments"] = "";
- RC_Row["QARequest"] = "";
- RC_Row["QAResponse"] = "";
- RC_Row["AssignCorrections"] = "false";
- RC_Row["TaskID"] = FlowContext.Task.FlowTaskID;
- ReviewCycleData.Tables[0].Rows.Add(RC_Row);
- }
- }
- // remove any individual reviewers existing in rc data
- // not selected in group
- if (IndividualReviewers.Count > 0)
- {
- ReviewerRows = ReviewCycleData.Tables[0].Select(
- "ReviewCycle = " + PDOX.Review.CurrentCycle.ToString()
- + " AND GroupName = '" + GroupName + "'"
- + " AND ReviewerEmail NOT IN (" + IndividualReviewerEmails.ToString() + ")"
- );
- foreach (DataRow ReviewerRow in ReviewerRows)
- ReviewerRow.Delete();
- }
- else
- {
- // all ind rev were unchecked. delete all
- ReviewerRows = ReviewCycleData.Tables[0].Select(
- "ReviewCycle = " + PDOX.Review.CurrentCycle.ToString()
- + " AND GroupName = '" + GroupName + "'"
- );
- foreach (DataRow ReviewerRow in ReviewerRows)
- ReviewerRow.Delete();
- }
- }
- if (AddNew)
- {
- // just add the reviewers
- foreach (string ReviewerEmail in IndividualReviewers.Keys)
- {
- DataRow RC_Row = ReviewCycleData.Tables[0].NewRow();
- RC_Row["GroupSelect"] = IsSelected;
- RC_Row["ReviewCycle"] = PDOX.Review.CurrentCycle;
- RC_Row["Depth"] = GroupRow["Depth"];
- RC_Row["Lineage"] = GroupRow["Lineage"];
- RC_Row["GroupName"] = GroupName;
- RC_Row["HowAssigned"] = HowAssigned.ToString();
- RC_Row["AssignedBy"] = Req.SessionUser.Email;
- RC_Row["PerformReview"] = (IsSuper && CanPerformReview) || IsSelected;
- RC_Row["ReviewerEmail"] = ReviewerEmail;
- RC_Row["ReviewerName"] = IndividualReviewers[ReviewerEmail];
- RC_Row["ReviewStatus"] = PDOX.ReviewStatuses.Assigned.ToString();
- RC_Row["ReviewComments"] = "";
- RC_Row["QARequest"] = "";
- RC_Row["QAResponse"] = "";
- RC_Row["AssignCorrections"] = "false";
- RC_Row["TaskID"] = FlowContext.Task.FlowTaskID;
- ReviewCycleData.Tables[0].Rows.Add(RC_Row);
- }
- }
- break;
- }
- }
- }
- ReviewCycleData.Tables[0].AcceptChanges();
- ReviewCycleData.AcceptChanges();
- }
- // save cycle data
- SaveToDataSetField("PDOX.ReviewCycleData", ReviewCycleData);
- FlowContext.Workflow.SaveField("PDOX.ReviewCycleData");
- // NOTE: SaveFields() gets called once on postback - everytime it is called potentially hundreds of qrys are called making it extremely inefficient to call multiple times
- //FlowContext.Workflow.SaveFields();
- }
- protected void AddNewReviewCycle()
- {
- // increment PDOX.Review.CurrentCycle before calling this method
- //ReviewGroupsTable.Columns.Add("ReviewCycle", typeof(int));
- //ReviewGroupsTable.Columns.Add("GroupSelect", typeof(bool));
- //ReviewGroupsTable.Columns.Add("GroupName", typeof(string));
- //ReviewGroupsTable.Columns.Add("HowAssigned", typeof(string));
- //ReviewGroupsTable.Columns.Add("IndividualReviewers", typeof(string));
- if (ReviewGroupsData == null)
- ReviewGroupsData = LoadFromDataSetField("PDOX.ReviewGroupsData");
- if (ReviewCycleData == null)
- ReviewCycleData = LoadFromDataSetField("PDOX.ReviewCycleData");
- DataTable ReviewCycleTable = ReviewCycleData.Tables[0];
- DataTable ReviewGroupsTable = ReviewGroupsData.Tables[0];
- DataTable GroupsCopy = ReviewGroupsTable.Clone();
- DataTable CycleCopy = ReviewCycleTable.Clone();
- int PreviousCycle = PDOX.Review.CurrentCycle - 1;
- //
- // create a new set of reviewer groups for new review cycle
- //
- // select previous review groups rows and put them in copy table
- DataRow[] PreviousGroupRows = ReviewGroupsTable.Select("ReviewCycle = " + PreviousCycle.ToString());
- foreach (DataRow PreviousGroupRow in PreviousGroupRows)
- GroupsCopy.ImportRow(PreviousGroupRow);
- // update copied groups with new review cycle info
- // TODO: change groups for the new review cycle here
- foreach (DataRow CopiedGroupRow in GroupsCopy.Rows)
- CopiedGroupRow["ReviewCycle"] = PDOX.Review.CurrentCycle;
- GroupsCopy.AcceptChanges();
- // append these rows back into Reviewer Groups Data
- foreach (DataRow CopiedGroupRow in GroupsCopy.Rows)
- ReviewGroupsTable.ImportRow(CopiedGroupRow);
- ReviewGroupsTable.AcceptChanges();
- ReviewGroupsData.AcceptChanges();
- SaveToDataSetField("PDOX.ReviewGroupsData", ReviewGroupsData);
- FlowContext.Workflow.SaveField("PDOX.ReviewGroupsData");
- // select current review cycle rows and put them in copy table
- DataRow[] CurrentGroupRows = ReviewGroupsTable.Select("ReviewCycle = " + PreviousCycle.ToString());
- foreach (DataRow PreviousGroupRow in PreviousGroupRows)
- GroupsCopy.ImportRow(PreviousGroupRow);
- //
- // create new set of review cycle data
- //
- DataRow[] PreviousCycleRows = ReviewCycleTable.Select("ReviewCycle = " + PreviousCycle.ToString());
- foreach (DataRow PreviousCycleRow in PreviousCycleRows)
- CycleCopy.ImportRow(PreviousCycleRow);
- // update copied cycle data with new review cycle info
- // TODO: change cycle data for the new review cycle here
- foreach (DataRow CopiedCycleRow in CycleCopy.Rows)
- {
- CopiedCycleRow["ReviewComments"] = "";
- CopiedCycleRow["QARequest"] = "";
- CopiedCycleRow["QAResponse"] = "";
- CopiedCycleRow["ReviewCycle"] = PDOX.Review.CurrentCycle;
- CopiedCycleRow["ReviewStatus"] = PDOX.ReviewStatuses.Assigned.ToString();
- CopiedCycleRow["AssignCorrections"] = "false";
- CopiedCycleRow["TaskID"] = FlowContext.Task.FlowTaskID;
- }
- CycleCopy.AcceptChanges();
- // append these rows back into Review cycle Data
- foreach (DataRow CopiedCycleRow in CycleCopy.Rows)
- ReviewCycleTable.ImportRow(CopiedCycleRow);
- ReviewCycleTable.AcceptChanges();
- ReviewCycleData.AcceptChanges();
- SaveToDataSetField("PDOX.ReviewCycleData", ReviewCycleData);
- FlowContext.Workflow.SaveField("PDOX.ReviewCycleData");
- FlowContext.Workflow["PDOX.Review.CurrentCycle"] = PDOX.Review.CurrentCycle.ToString();
- FlowContext.Workflow["PDOX.Review.CycleCount"] = PDOX.Review.CurrentCycle.ToString();
- FlowContext.Workflow["PDOX.Review.SelectedCycle"] = PDOX.Review.CurrentCycle.ToString();
- FlowContext.Workflow.SaveField("PDOX.Review.CurrentCycle");
- FlowContext.Workflow.SaveField("PDOX.Review.CycleCount");
- FlowContext.Workflow.SaveField("PDOX.Review.SelectedCycle");
- }
- protected void BindReviewCycleData(int ReviewCycle)
- {
- if (ReviewCycleData != null)
- {
- DebugMessage("BindReviewCycleData: ReviewCycleData != null");
- if (ReviewCycleData.Tables.Count > 0)
- {
- DebugMessage("BindReviewCycleData: ReviewCycleData.Tables.Count > 0");
- DataRow[] SelectedReviewCycleRows = ReviewCycleData.Tables[0].Select("ReviewCycle = " + ReviewCycle.ToString());
- DebugMessage("BindReviewCycleData: Binding " + SelectedReviewCycleRows.Length.ToString() + " Rows");
- ReviewCycleRepeater.DataSource = SelectedReviewCycleRows;
- ReviewCycleRepeater.DataBind();
- }
- }
- else
- DebugMessage("BindReviewCycleData: ReviewCycleData == null");
- }
- </script>
- <%--
- // ================================================================================
- //
- // Permitting Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected DataSet GetPermitData()
- {
- DataSet ds = null;
- string PPlusPermitNumber = FlowContext.Project.Name;
- //"server=MIAMIBEACH330;database=PermDB;uid=pdox-sql;pwd=projectdox"
- using (DataActiveLibrary.Query Qry = new DataActiveLibrary.Query("server=MIAMIBEACH330;database=PermDB;uid=pdox-sql;pwd=projectdox"))
- {
- Qry.QueryText = @"
- SELECT TOP 1
- ISNULL(Permit_No,'') Permit_No
- ,ISNULL(Permit_Description,'') Permit_Description
- ,ISNULL(Permit_Type,'') Permit_Type
- ,ISNULL(Permit_Sub_Type,'') Permit_Sub_Type
- ,ISNULL(Permit_Sub_Type_Description,'') Permit_Sub_Type_Description
- ,ISNULL(Permit_Street_No,'') Permit_Street_No
- ,ISNULL(Permit_Street_Direction,'') Permit_Street_Direction
- ,ISNULL(Permit_Street_Name,'') Permit_Street_Name
- ,ISNULL(Permit_Full_Address,'') Permit_Full_Address
- ,ISNULL(Permit_Parcel_No,'') Permit_Parcel_No
- ,ISNULL(Permit_Location,'') Permit_Location
- ,ISNULL(Permit_Occupancy_Class,'') Permit_Occupancy_Class
- ,ISNULL(Permit_Title,'') Permit_Title
- ,ISNULL(Permit_Applied_Date,'') Permit_Applied_Date
- ,ISNULL(Permit_Entered_Date,'') Permit_Entered_Date
- ,ISNULL(Permit_Status,'') Permit_Status
- ,ISNULL(Permit_Substantial_Improvements,'') Permit_Substantial_Improvements
- ,ISNULL(Permit_Number_Buildings,'') Permit_Number_Buildings
- ,ISNULL(Permit_Number_Units,'') Permit_Number_Units
- ,ISNULL(Permit_Public_Owned,'') Permit_Public_Owned
- ,ISNULL(Permit_OwnerName,'') Permit_OwnerName
- ,ISNULL(Permit_OwnerAddress_1,'') Permit_OwnerAddress_1
- ,ISNULL(Permit_OwnerAddress_2,'') Permit_OwnerAddress_2
- ,ISNULL(Permit_OwnerAddress_3,'') Permit_OwnerAddress_3
- ,ISNULL(Permit_OwnerZip,'') Permit_OwnerZip
- ,ISNULL(Permit_Owner_Full_Address,'') Permit_Owner_Full_Address
- ,ISNULL(Permit_OwnerPhone1,'') Permit_OwnerPhone1
- ,ISNULL(Permit_ArchitectName,'') Permit_ArchitectName
- ,ISNULL(Permit_ArchitectAddress_2,'') Permit_ArchitectAddress_2
- ,ISNULL(Permit_ArchitectAddress_2,'') Permit_ArchitectAddress_2
- ,ISNULL(Permit_ArchitectAddress_3,'') Permit_ArchitectAddress_3
- ,ISNULL(Permit_ArchitectZip,'') Permit_ArchitectZip
- ,ISNULL(Permit_Architect_Full_Address,'') Permit_Architect_Full_Address
- ,ISNULL(Permit_ArchitectPhone_1,'' ) Permit_ArchitectPhone_1
- ,ISNULL(Permit_EngineerName,'') Permit_EngineerName
- ,ISNULL(Permit_EngineerAddress_1,'') Permit_EngineerAddress_1
- ,ISNULL(Permit_EngineerAddress_2,'') Permit_EngineerAddress_2
- ,ISNULL(Permit_EngineerAddress_3,'') Permit_EngineerAddress_3
- ,ISNULL(Permit_EngineerZip,'') Permit_EngineerZip
- ,ISNULL(Permit_Engineer_Full_Address,'') Permit_Engineer_Full_Address
- ,ISNULL(Permit_EngineerPhone_1,'') Permit_EngineerPhone_1
- ,ISNULL(Permit_ContractorName,'') Permit_ContractorName
- ,ISNULL(Permit_ContractorAddress_1,'') Permit_ContractorAddress_1
- ,ISNULL(Permit_ContractorAddress_2,'') Permit_ContractorAddress_2
- ,ISNULL(Permit_ContractorAddress_3,'') Permit_ContractorAddress_3
- ,ISNULL(Permit_ContractorZip,'') Permit_ContractorZip
- ,ISNULL(Permit_Contractor_Full_Address,'') Permit_Contractor_Full_Address
- ,ISNULL(Permit_ContractorPhone_1,'') Permit_ContractorPhone_1
- ,ISNULL(Permit_ApplicantName,'') Permit_ApplicantName
- ,ISNULL(Permit_ApplicantAddress_1,'') Permit_ApplicantAddress_1
- ,ISNULL(Permit_ApplicantAddress_2,'') Permit_ApplicantAddress_2
- ,ISNULL(Permit_ApplicantAddress_3,'') Permit_ApplicantAddress_3
- ,ISNULL(Permit_ApplicantZip,'') Permit_ApplicantZip
- ,ISNULL(Permit_Applicant_Full_Address,'') Permit_Applicant_Full_Address
- ,ISNULL(Permit_ApplicantPhone_1,'') Permit_ApplicantPhone_1
- ,ISNULL(CONVERT(VARCHAR(25),Permit_Valuation),'') Permit_Valuation
- ,ISNULL(Permit_TotalSQFT,'') Permit_TotalSQFT
- ,ISNULL(Permit_Area_Under_Roof,'') Permit_Area_Under_Roof
- ,ISNULL(Permit_Zoning,'') Permit_Zoning
- ,ISNULL(Permit_Parking,'') Permit_Parking
- ,ISNULL(Permit_Building_Construction_Type,'') Permit_Building_Construction_Type
- ,ISNULL(Permit_Historic_District,'') Permit_Historic_District
- ,ISNULL(Permit_Special_Projects,'') Permit_Special_Projects
- ,ISNULL(Permit_HUD,'') Permit_HUD
- ,ISNULL(Permit_Private_Provider,'') Permit_Private_Provider
- ,ISNULL(Permit_LEED,'') Permit_LEED
- ,ISNULL(Permit_City_Projects,'') Permit_City_Projects
- ,ISNULL(Permit_Building_Stories,'') Permit_Building_Stories
- ,ISNULL(Permit_Building_Height,'') Permit_Building_Height
- ,ISNULL(Permit_Building_Assembly_Occupancy,'') Permit_Building_Assembly_Occupancy
- ,ISNULL(Permit_Occupant_Content,'') Permit_Occupant_Content
- ,ISNULL(Permit_Large_Unusual,'') Permit_Large_Unusual
- ,ISNULL(Permit_Electronic_Plan_Review,'') Permit_Electronic_Plan_Review
- ,ISNULL(Permit_Legal_Description,'') Permit_Legal_Description
- FROM VIEW_APP_PDOXINFO
- WHERE Permit_No = @PermitNo";
- Qry.AddSQLParam("@PermitNo", PPlusPermitNumber, SqlDbType.VarChar);
- ds = Qry.GetDataSet();
- }
- return ds;
- }
- protected void InitPermitData()
- {
- // permit info
- AddDataSetField("PDOX.PermitData");
- if (ResetDataSets) FlowContext.Workflow["PDOX.PermitData"] = "";
- if (PermitNumber.Text == "")
- {
- if (IsDataSetFieldEmpty("PDOX.PermitData"))
- BuildDataSetField("PDOX.PermitData");
- PermitData = LoadFromDataSetField("PDOX.PermitData");
- }
- }
- protected void FillPermitFields()
- {
- // ----------------------------------------------------------------------------------------
- // Permit Information
- // ----------------------------------------------------------------------------------------
- if (PermitNumber.Text.Length == 0) //only load up default values IF there are no values yet loaded - this would normally come from an external permitting system
- {
- foreach (DataRow PermitRow in PermitData.Tables[0].Rows)
- {
- PermitNumber.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_No"]); ;
- PermitDescription.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Description"]);
- PermitType.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Type"]);
- PermitSubType.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Sub_Type"]);
- SubtypeDescription.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Sub_Type_Description"]);
- PermitParcelNumber.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Parcel_No"]);
- PermitLocation.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Location"]);
- PermitStatus.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Status"]);
- PermitTitle.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Title"]);
- SubstantialImprovements.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Substantial_Improvements"]);
- BuildingCount.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Number_Buildings"]);
- UnitCount.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Number_Units"]);
- PermitValuation.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Valuation"]);
- PermitAUR.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Area_Under_Roof"]);
- BuildingConsType.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Building_Construction_Type"]);
- SpecialProjects.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Special_Projects"]);
- PrivateProvider.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Private_Provider"]);
- CityProjects.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_City_Projects"]);
- BuildingHeight.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Building_Height"]);
- OccupancyContent.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Occupant_Content"]);
- ApplicantName.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ApplicantName"]);
- ApplicantPhone.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ApplicantPhone_1"]);
- ApplicantEmail.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ApplicantName"]);
- PermitOccClass.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Occupancy_Class"]);
- ApplicantCell.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ApplicantName"]);
- ApplicantFax.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ApplicantName"]);
- AppliedDate.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Applied_Date"]);
- EnteredDate.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Entered_Date"]);
- TotalSqft.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_TotalSQFT"]);
- Zoning.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Zoning"]);
- HUD.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_HUD"]);
- LEED.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_LEED"]);
- BuildingStories.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Building_Stories"]);
- BuildingAssmemblyOccupancy.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Building_Assembly_Occupancy"]);
- ArchitectName.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ArchitectName"]);
- ArchitectPhone.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ArchitectPhone_1"]);
- ArchitectCell.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ArchitectName"]);
- ArchitectFax.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ArchitectName"]);
- ArchitectEmail.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ArchitectName"]);
- ContractorName.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ContractorName"]);
- ContractorPhone.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ContractorPhone_1"]);
- ContractorCell.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ContractorName"]);
- ContractorFax.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ContractorName"]);
- ContractorEmail.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ContractorName"]);
- EngineerName.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_EngineerName"]);
- EngineerPhone.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_EngineerPhone_1"]);
- EngineerCell.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_EngineerName"]);
- EngineerFax.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_EngineerName"]);
- EngineerEmail.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_EngineerName"]);
- }
- }
- }
- </script>
- <%--
- // ================================================================================
- //
- // GroupPreScreen Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void InitGroupPreScreenView()
- {
- // configure buttons
- this.Master.GetButton("SaveButton").Visible = false;
- this.Master.GetButton("SaveCloseButton").Visible = true;
- this.Master.GetButton("CancelButton").Visible = false;
- this.Master.GetButton("CancelButton").Text = "Close";
- this.Master.GetButton("CompleteButton").Attributes.Add("disabled", "disabled");
- this.Master.GetButton("CompleteButton").Text = "Prescreen Complete";
- // configure form panels
- // configure panels
- PermitPanel.Visible = true;
- ReviewInfoPanel.Visible = true;
- ReviewGroupsPanel.Visible = false;
- ReviewCyclePanel.Visible = false;
- InstructionsPanel.Visible = false;
- GroupPreScreenPanel.Visible = true;
- GroupPreScreenFieldSet1.Visible = false;
- GroupPreScreenFieldSet2.Visible = false;
- GroupPreScreenFieldSet3.Visible = false;
- PreScreenChecklistLink1.HRef = GetChecklistURL("Edit", Utility.URL.Encode("Router Clerk"), PDOX.Review.SelectedCycle, PermitSubType.Text);
- PreScreenChecklistLink2.HRef = GetChecklistURL("Edit", Utility.URL.Encode("B Building"), PDOX.Review.SelectedCycle, PermitSubType.Text);
- PreScreenChecklistLink3.HRef = GetChecklistURL("Edit", Utility.URL.Encode("B Governmental Compliance"), PDOX.Review.SelectedCycle, PermitSubType.Text);
- PreScreenToolTip.Visible = true;
- switch (PDOX.CurrentUser.GroupName)
- {
- case "Router Clerk":
- GroupPreScreenFieldSet1.Visible = true;
- break;
- case "B Building":
- GroupPreScreenFieldSet2.Visible = true;
- break;
- case "B Governmental Compliance":
- GroupPreScreenFieldSet3.Visible = true;
- break;
- }
- }
- </script>
- <%--
- // ================================================================================
- //
- // PreScreenReview Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void InitPreScreenReviewView()
- {
- // configure buttons
- this.Master.GetButton("SaveButton").Visible = false;
- this.Master.GetButton("SaveCloseButton").Visible = false;
- this.Master.GetButton("CancelButton").Visible = true;
- this.Master.GetButton("CancelButton").Text = "Close";
- this.Master.AddButton("VoidReviewButton", "Void Revew");
- this.Master.GetButton("VoidReviewButton").CssClass = "EFormButton";
- //this.Master.AddButton("ProjectExportButton", "Project Export");
- //this.Master.GetButton("ProjectExportButton").CssClass = "EFormButton";
- // configure form panels
- // configure panels
- PermitPanel.Visible = true;
- ReviewInfoPanel.Visible = true;
- ReviewGroupsPanel.Visible = false;
- ReviewCyclePanel.Visible = false;
- InstructionsPanel.Visible = true;
- PreReviewInstructions.Visible = true;
- PreRevAppInstructions.Visible = false;
- AppResubmitInstructions.Visible = false;
- PreScreenChecklistLink1.HRef = GetChecklistURL("", Utility.URL.Encode("Router Clerk"), PDOX.Review.SelectedCycle, PermitSubType.Text);
- PreScreenChecklistLink2.HRef = GetChecklistURL("", Utility.URL.Encode("B Building"), PDOX.Review.SelectedCycle, PermitSubType.Text);
- PreScreenChecklistLink3.HRef = GetChecklistURL("", Utility.URL.Encode("B Governmental Compliance"), PDOX.Review.SelectedCycle, PermitSubType.Text);
- PreScreenReviewToolTip.Visible = true;
- //PreNotesApp.Text = PreNotes.Text;
- PreNotes.Visible = true;
- GroupPreScreenPanel.Visible = true;
- GroupPreScreenFieldSet1.Visible = true;
- GroupPreScreenFieldSet2.Visible = true;
- GroupPreScreenFieldSet3.Visible = true;
- // make group pre screen read only / disabled
- GroupPreScreenComments1.ReadOnly = true;
- GroupPreScreenComments2.ReadOnly = true;
- GroupPreScreenComments3.ReadOnly = true;
- GroupPreScreenAD1.Enabled = false;
- GroupPreScreenAD2.Enabled = false;
- GroupPreScreenAD3.Enabled = false;
- //make checkboxs disabled
- PreScreenChecklistRC.Enabled = false;
- PreScreenChecklistBLD.Enabled = false;
- PreScreenChecklistGC.Enabled = false;
- }
- </script>
- <%--
- // ================================================================================
- //
- // CorrectionComplete Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void InitCorrectionCompleteView()
- {
- // configure buttons
- this.Master.GetButton("SaveButton").Visible = true;
- this.Master.GetButton("SaveCloseButton").Visible = true;
- this.Master.GetButton("CancelButton").Visible = true;
- this.Master.GetButton("CompleteButton").Attributes.Add("disabled", "disabled");
- this.Master.GetButton("CompleteButton").Text = "Corrections Complete";
- this.Master.GetButton("CompleteButton").CssClass = "button";
- // configure panels
- PermitPanel.Visible = true;
- ReviewInfoPanel.Visible = false;
- ReviewGroupsPanel.Visible = false;
- ReviewCyclePanel.Visible = false;
- InstructionsPanel.Visible = true;
- PreReviewInstructions.Visible = false;
- PreRevAppInstructions.Visible = true;
- AppResubmitInstructions.Visible = false;
- PreNotesApp.Text = PreNotes.Text;
- PreNotesApp.ReadOnly = true;
- PreScreenAppToolTip.Visible = true;
- }
- </script>
- <%--
- // ================================================================================
- //
- // BeginReview Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void InitBeginReviewView()
- {
- FlowContext.Workflow["DepartmentReview.ReviewersRequested"] = "false";
- FlowContext.Workflow.SaveField("DepartmentReview.ReviewersRequested");
- // configure buttons
- this.Master.GetButton("SaveButton").Visible = false;
- this.Master.GetButton("SaveCloseButton").Visible = true;
- this.Master.GetButton("CancelButton").Visible = false;
- this.Master.GetButton("CompleteButton").Text = "Begin Review";
- //this.Master.GetButton("CompleteButton").Attributes.Add("disabled","disabled");
- // add client event to verify the user has selected at least one reviewer
- this.Master.GetButton("CompleteButton").OnClientClick = "return ShowWorkingPanel(CheckReviewers());";
- // handler for an eform event
- //this.EFormEvent += new EventHandler<PDWorkflowEformEventArgs>(this.AssignReviewers_Click);
- // configure panels
- PermitPanel.Visible = true;
- ReviewInfoPanel.Visible = true;
- ReviewGroupsPanel.Visible = true;
- ReviewCyclePanel.Visible = false;
- InstructionsPanel.Visible = false;
- BeginReviewToolTip.Visible = true;
- // PLAN REVIEW GUIDE
- // initialize Review Groups selection
- string SelectedGroups = "";
- switch (PermitSubType.Text)
- {
- case "ALTRMD": SelectedGroups = "B Building,B Governmental Compliance,B Electrical,B Mechanical,B Plumbing,Fire"; break;
- case "NCONST": SelectedGroups = "B Governmental Compliance,B Building,B Structural,B Elevator,B Mechanical,B Plumbing,Fire,Public Works"; break;
- case "POOL": SelectedGroups = "B Building,B Structural,B Plumbing,Fire,Public Works,Planning-Zoning Chief"; break;
- }
- string[] SelectedGroupList = SelectedGroups.Split(',');
- foreach (string SelectedGroup in SelectedGroupList)
- {
- if (SelectedGroup.Trim().Length > 0)
- {
- DataRow SelectedGroupRow = FindReviewGroup(PDOX.Review.CurrentCycle, SelectedGroup.Trim());
- if (SelectedGroupRow != null)
- {
- SelectedGroupRow["GroupSelect"] = true;
- }
- }
- }
- }
- protected DataRow[] GetSelectedReviewParticipants(DataTable ReviewTable, int ReviewCycle)
- {
- return ReviewTable.Select("ReviewCycle = " + ReviewCycle.ToString() + " AND GroupSelect = 'true'");
- }
- protected void AssignDepartmentReviewParticipants()
- {
- //FlowContext.Workflow["AssignReviewers.UserAssignees"] = PDOXReviewCoordinator.Text;
- List<string> ActivityGroupNames = PDUtility.ConversionUtility.ConvertStringToStringList(FlowContext.Workflow["DepartmentReview.GroupNames"], ",");
- List<string> ActivityUserEmails = PDUtility.ConversionUtility.ConvertStringToStringList(FlowContext.Workflow["DepartmentReview.UserEmails"], ",");
- DataRow[] ReviewerRows = GetSelectedReviewParticipants(ReviewGroupsData.Tables[0], PDOX.Review.CurrentCycle);
- foreach (DataRow ReviewerRow in ReviewerRows)
- {
- if (ReviewerRow["HowAssigned"].ToString() == PDOX.AssignmentTypes.FirstInGroup.ToString())
- {
- if (!ActivityGroupNames.Contains(ReviewerRow["GroupName"].ToString()))
- ActivityGroupNames.Add(ReviewerRow["GroupName"].ToString());
- }
- else if (ReviewerRow["HowAssigned"].ToString() == PDOX.AssignmentTypes.Individual.ToString())
- {
- string[] IndividualReviewers = ReviewerRow["IndividualReviewers"].ToString().Split(',');
- foreach (string IndividualReviewer in IndividualReviewers)
- if (!ActivityUserEmails.Contains(IndividualReviewer))
- ActivityUserEmails.Add(IndividualReviewer);
- }
- }
- FlowContext.Workflow["DepartmentReview.GroupNames"] = String.Join(",", ActivityGroupNames.ToArray());
- FlowContext.Workflow.SaveField("DepartmentReview.GroupNames");
- FlowContext.Workflow["DepartmentReview.UserEmails"] = String.Join(",", ActivityUserEmails.ToArray());
- FlowContext.Workflow.SaveField("DepartmentReview.UserEmails");
- // NOTE: SaveFields() gets called once on postback - everytime it is called potentially hundreds of qrys are called making it extremely inefficient to call multiple times
- //FlowContext.Workflow.SaveFields();
- }
- protected void RequestAdditionalReviewParticipants()
- {
- if (FlowContext.Workflow["DepartmentReview.ReviewersRequested"].ToString() == "false")
- {
- // get rev coord group
- PDGroup RevCoordGroup = new PDGroup(PDOX.ReviewCoordinatorGroupName, FlowContext.Project.Name);
- // add task for rev coord group
- int TaskID = PDFlowTask.AddFlowInstanceTask(
- FlowContext.Workflow.FlowInstanceID
- , FlowContext.Activity.FlowInstanceActivityID
- , PDEntity.EntityTypes.Group
- , RevCoordGroup.GroupID
- , FlowContext.Activity.ActivityName
- , PDEntity.EntityTypes.Project
- , FlowContext.Project.ProjectID);
- // make sure they are listed in the participant list
- List<string> ActivityGroupNames = PDUtility.ConversionUtility.ConvertStringToStringList(FlowContext.Workflow["DepartmentReview.GroupNames"], ",");
- if (!ActivityGroupNames.Contains(PDOX.ReviewCoordinatorGroupName))
- ActivityGroupNames.Add(PDOX.ReviewCoordinatorGroupName);
- FlowContext.Workflow["DepartmentReview.GroupNames"] = String.Join(",", ActivityGroupNames.ToArray());
- FlowContext.Workflow.SaveField("DepartmentReview.GroupNames");
- FlowContext.Workflow["DepartmentReview.ReviewersRequested"] = "true";
- FlowContext.Workflow.SaveField("DepartmentReview.ReviewersRequested");
- }
- }
- protected void AssignAdditionalReviewParticipants()
- {
- DebugMessage("AssignAdditionalReviewParticipants: DepartmentReview.GroupNames: " + FlowContext.Workflow["DepartmentReview.GroupNames"].ToString());
- DebugMessage("AssignAdditionalReviewParticipants: DepartmentReview.UserEmails: " + FlowContext.Workflow["DepartmentReview.UserEmails"].ToString());
- List<string> ActivityGroupNames = PDUtility.ConversionUtility.ConvertStringToStringList(FlowContext.Workflow["DepartmentReview.GroupNames"], ",");
- List<string> ActivityUserEmails = PDUtility.ConversionUtility.ConvertStringToStringList(FlowContext.Workflow["DepartmentReview.UserEmails"], ",");
- List<string> PossibleGroupNames = new List<string>();
- List<string> PossibleUserEmails = new List<string>();
- List<string> SelectedGroupNames = new List<string>();
- List<string> SelectedUserEmails = new List<string>();
- List<string> UnSelectedGroupNames = new List<string>();
- List<string> UnSelectedUserEmails = new List<string>();
- DataRow[] PossibleReviewerRows = ReviewGroupsData.Tables[0].Select("ReviewCycle = " + PDOX.Review.CurrentCycle.ToString());
- bool UserIsSuper = PDOX.CurrentUser.IsSuper;
- foreach (DataRow ReviewerRow in PossibleReviewerRows)
- {
- // is this a subordinate user
- int GroupDepth = Convert.ToInt32(ReviewerRow["Depth"]);
- bool RowIsUser = (ReviewerRow["Lineage"].ToString() == PDOX.CurrentUser.Lineage);
- bool RowIsSubordinateToUser = (ReviewerRow["Lineage"].ToString().Contains(PDOX.CurrentUser.Lineage)) && !RowIsUser;
- bool RowIsDirectSubordinate = (RowIsSubordinateToUser && (Math.Abs(GroupDepth - PDOX.CurrentUser.Depth) < 2));
- bool RowSelected = PDUtility.ConversionUtility.CBOOL2(ReviewerRow["GroupSelect"]);
- if (RowIsDirectSubordinate)
- {
- if (ReviewerRow["HowAssigned"].ToString() == PDOX.AssignmentTypes.FirstInGroup.ToString())
- {
- if (!PossibleGroupNames.Contains(ReviewerRow["GroupName"].ToString()))
- PossibleGroupNames.Add(ReviewerRow["GroupName"].ToString());
- if (RowSelected)
- if (!SelectedGroupNames.Contains(ReviewerRow["GroupName"].ToString()))
- SelectedGroupNames.Add(ReviewerRow["GroupName"].ToString());
- }
- else if (ReviewerRow["HowAssigned"].ToString() == PDOX.AssignmentTypes.Individual.ToString())
- {
- string[] IndividualReviewers = ReviewerRow["IndividualReviewers"].ToString().Split(',');
- foreach (string IndividualReviewer in IndividualReviewers)
- {
- if (!PossibleUserEmails.Contains(IndividualReviewer))
- PossibleUserEmails.Add(IndividualReviewer);
- if (RowSelected)
- if (!SelectedUserEmails.Contains(IndividualReviewer))
- SelectedUserEmails.Add(IndividualReviewer);
- }
- }
- }
- }
- DebugMessage("AssignAdditionalReviewParticipants: PossibleGroupNames: " + String.Join(",", PossibleGroupNames.ToArray()));
- DebugMessage("AssignAdditionalReviewParticipants: PossibleUserEmails: " + String.Join(",", PossibleUserEmails.ToArray()));
- // need the least hits to the db as possible here
- // this will need to be rolled out to the lib
- DataSet ExistingTasks = null;
- StringBuilder PossibleGroupNameCSL = new StringBuilder();
- StringBuilder PossibleUserEmailCSL = new StringBuilder();
- foreach (string GroupName in PossibleGroupNames)
- {
- if (GroupName.Length > 0)
- {
- if (PossibleGroupNameCSL.Length > 0)
- PossibleGroupNameCSL.Append(",");
- PossibleGroupNameCSL.Append("'");
- PossibleGroupNameCSL.Append(Avolve.Data.Query.SafeSQL(GroupName));
- PossibleGroupNameCSL.Append("'");
- }
- }
- foreach (string UserEmail in PossibleUserEmails)
- {
- if (UserEmail.Length > 0)
- {
- if (PossibleUserEmailCSL.Length > 0)
- PossibleUserEmailCSL.Append(",");
- PossibleUserEmailCSL.Append("'");
- PossibleUserEmailCSL.Append(Avolve.Data.Query.SafeSQL(UserEmail));
- PossibleUserEmailCSL.Append("'");
- }
- }
- DebugMessage("AssignAdditionalReviewParticipants: Getting Existing Tasks for Groups and Users");
- using (DataActiveLibrary.Query Qry = new DataActiveLibrary.Query(GlobalVariables.DSN))
- {
- Qry.QueryText = @"
- SELECT FilteredTasks.FlowInstanceID
- ,FilteredTasks.FlowInstanceActivityID
- ,FilteredTasks.EntityTypeID
- ,FilteredTasks.EntityID
- ,FilteredTasks.EntityName
- FROM
- (
- SELECT
- AllTasks.FlowInstanceID
- ,AllTasks.FlowInstanceActivityID
- ,AllTasks.EntityTypeID
- ,AllTasks.EntityID
- ,(CASE AllTasks.EntityTypeID
- WHEN " + Convert.ToInt32(PDEntity.EntityTypes.Group).ToString() + @" THEN ISNULL(Groups.Name,'')
- WHEN " + Convert.ToInt32(PDEntity.EntityTypes.User).ToString() + @" THEN ISNULL(Users.Email,'')
- ELSE ''
- END) EntityName
- FROM FlowTasks AllTasks
- JOIN (
- SELECT DISTINCT FlowInstanceID,FlowInstanceActivityID,EntityTypeID,EntityID,MAX(DateUpdated) MaxDateUpdated
- FROM FlowTasks
- WHERE FlowInstanceActivityID = @FlowInstanceActivityID
- AND FlowInstanceID = @FlowInstanceID
- AND TaskStatus IN (''
- ,'" + PDFlowTask.TaskStatuses.Pending.ToString() + @"'
- ,'" + PDFlowTask.TaskStatuses.Accepted.ToString() + @"'
- )
- GROUP BY FlowInstanceID,FlowInstanceActivityID,EntityTypeID,EntityID
- ) LatestTasks ON AllTasks.FlowInstanceID = LatestTasks.FlowInstanceID
- AND AllTasks.FlowInstanceActivityID = LatestTasks.FlowInstanceActivityID
- AND AllTasks.EntityTypeID = LatestTasks.EntityTypeID
- AND AllTasks.EntityID = LatestTasks.EntityID
- AND AllTasks.DateUpdated >= LatestTasks.MaxDateUpdated
- LEFT JOIN Groups ON Groups.GroupID = AllTasks.EntityID AND AllTasks.EntityTypeID = " + Convert.ToInt32(PDEntity.EntityTypes.Group).ToString() + @"
- ";
- if (PossibleGroupNameCSL.Length > 0)
- Qry.QueryText += @"
- AND Groups.Name IN (" + PossibleGroupNameCSL + ")";
- Qry.QueryText += @"
- LEFT JOIN Users ON Users.UserID = AllTasks.EntityID AND AllTasks.EntityTypeID = " + Convert.ToInt32(PDEntity.EntityTypes.User).ToString() + @"
- ";
- if (PossibleUserEmailCSL.Length > 0)
- Qry.QueryText += @"
- AND Users.Email IN (" + PossibleUserEmailCSL + ")";
- Qry.QueryText += @"
- ) FilteredTasks
- WHERE LEN(EntityName) >0
- ";
- Qry.AddSQLParam("@FlowInstanceActivityID", FlowContext.Activity.FlowInstanceActivityID, SqlDbType.VarChar);
- Qry.AddSQLParam("@FlowInstanceID", FlowContext.Workflow.FlowInstanceID, SqlDbType.VarChar);
- ExistingTasks = Qry.GetDataSet();
- }
- if (ExistingTasks.Tables.Count > 0 && ExistingTasks.Tables[0].Rows.Count > 0)
- {
- DebugMessage(ExistingTasks.GetXml());
- PDEntity.EntityTypes TaskEntityType = PDEntity.EntityTypes.Unknown;
- int TaskEntityID = 0;
- string TaskEntityName = "";
- // remove any tasks for entities that should not have them
- foreach (DataRow ExistingTask in ExistingTasks.Tables[0].Rows)
- {
- TaskEntityType = PDEntity.EntityTypes.Unknown;
- TaskEntityID = 0;
- TaskEntityName = "";
- TaskEntityType = (PDEntity.EntityTypes)Enum.Parse(typeof(PDEntity.EntityTypes), ExistingTask["EntityTypeID"].ToString());
- int.TryParse(ExistingTask["EntityID"].ToString(), out TaskEntityID);
- TaskEntityName = ExistingTask["EntityName"].ToString();
- DebugMessage("AssignAdditionalReviewParticipants: "
- + "<br>" + TaskEntityType.ToString()
- + "<br>" + TaskEntityID.ToString()
- + "<br>" + TaskEntityName);
- switch (TaskEntityType)
- {
- case PDEntity.EntityTypes.Group:
- DebugMessage("AssignAdditionalReviewParticipants: Checking Group " + TaskEntityName);
- if (TaskEntityName.Trim().Length > 0)
- {
- // if this group not in selected groups
- if (!SelectedGroupNames.Contains(TaskEntityName))
- {
- DebugMessage("AssignAdditionalReviewParticipants: " + TaskEntityName + " not in selected groups. removing task for this group");
- // remove group task
- using (DataActiveLibrary.Query Qry = new DataActiveLibrary.Query(GlobalVariables.DSN))
- {
- Qry.AddSQLBuilderParam("FlowInstanceActivityID", FlowContext.Activity.FlowInstanceActivityID, SqlDbType.Int);
- Qry.AddSQLBuilderParam("FlowInstanceID", FlowContext.Workflow.FlowInstanceID, SqlDbType.Int);
- Qry.AddSQLBuilderParam("EntityTypeID", Convert.ToInt32(TaskEntityType), SqlDbType.Int);
- Qry.AddSQLBuilderParam("EntityID", TaskEntityID, SqlDbType.Int);
- Qry.Delete("FlowTasks");
- Qry.ReinitializeForNewQuery();
- }
- if (!UnSelectedGroupNames.Contains(TaskEntityName))
- UnSelectedGroupNames.Add(TaskEntityName);
- }
- }
- break;
- case PDEntity.EntityTypes.User:
- DebugMessage("AssignAdditionalReviewParticipants: Checking User " + TaskEntityName);
- if (TaskEntityName.Trim().Length > 0)
- {
- // if this user not in selected user
- if (!SelectedUserEmails.Contains(TaskEntityName))
- {
- DebugMessage("AssignAdditionalReviewParticipants: " + TaskEntityName + " not in selected users. removing task for this users");
- // remove user task
- using (DataActiveLibrary.Query Qry = new DataActiveLibrary.Query(GlobalVariables.DSN))
- {
- Qry.AddSQLBuilderParam("FlowInstanceActivityID", FlowContext.Activity.FlowInstanceActivityID, SqlDbType.Int);
- Qry.AddSQLBuilderParam("FlowInstanceID", FlowContext.Workflow.FlowInstanceID, SqlDbType.Int);
- Qry.AddSQLBuilderParam("EntityTypeID", Convert.ToInt32(TaskEntityType), SqlDbType.Int);
- Qry.AddSQLBuilderParam("EntityID", TaskEntityID, SqlDbType.Int);
- Qry.Delete("FlowTasks");
- Qry.ReinitializeForNewQuery();
- }
- if (!UnSelectedUserEmails.Contains(TaskEntityName))
- UnSelectedUserEmails.Add(TaskEntityName);
- }
- }
- break;
- }
- }
- // add any tasks for groups that should have them
- foreach (string GroupName in SelectedGroupNames)
- {
- DataRow[] GroupRows = ExistingTasks.Tables[0].Select("EntityTypeID = " + Convert.ToInt32(PDEntity.EntityTypes.Group).ToString() + " AND EntityName = '" + GroupName + "'");
- // its not in the dataset so lets add it
- if (GroupRows.Length == 0)
- {
- DebugMessage("AssignAdditionalReviewParticipants: " + GroupName + " in selected groups with no exisiting task. adding task for this group");
- PDGroup UntaskedGroup = new PDGroup(GroupName, FlowContext.Project.Name);
- int TaskID = PDFlowTask.AddFlowInstanceTask(
- FlowContext.Workflow.FlowInstanceID
- , FlowContext.Activity.FlowInstanceActivityID
- , PDEntity.EntityTypes.Group
- , UntaskedGroup.GroupID
- , FlowContext.Activity.ActivityName
- , PDEntity.EntityTypes.Project
- , FlowContext.Project.ProjectID);
- }
- }
- // add any tasks for users that should have them
- foreach (string UserEmail in SelectedUserEmails)
- {
- DataRow[] UserRows = ExistingTasks.Tables[0].Select("EntityTypeID = " + Convert.ToInt32(PDEntity.EntityTypes.User).ToString() + " AND EntityName = '" + UserEmail + "'");
- // its not in the dataset so lets add it
- if (UserRows.Length == 0)
- {
- DebugMessage("AssignAdditionalReviewParticipants: " + UserEmail + " in selected users with no exisiting task. adding task for this user");
- if (UserEmail.Trim().Length > 0)
- {
- PDUser UntaskedUser = new PDUser(UserEmail);
- int TaskID = PDFlowTask.AddFlowInstanceTask(
- FlowContext.Workflow.FlowInstanceID
- , FlowContext.Activity.FlowInstanceActivityID
- , PDEntity.EntityTypes.User
- , UntaskedUser.UserID
- , FlowContext.Activity.ActivityName
- , PDEntity.EntityTypes.Project
- , FlowContext.Project.ProjectID);
- }
- }
- }
- // remove or add from DeptReview ParticipantList
- foreach (string GroupName in UnSelectedGroupNames)
- if (ActivityGroupNames.Contains(GroupName))
- ActivityGroupNames.Remove(GroupName);
- foreach (string GroupName in SelectedGroupNames)
- if (!ActivityGroupNames.Contains(GroupName))
- ActivityGroupNames.Add(GroupName);
- foreach (string UserEmail in UnSelectedUserEmails)
- if (ActivityUserEmails.Contains(UserEmail))
- ActivityUserEmails.Remove(UserEmail);
- foreach (string UserEmail in SelectedUserEmails)
- if (!ActivityUserEmails.Contains(UserEmail))
- ActivityUserEmails.Add(UserEmail);
- FlowContext.Workflow["DepartmentReview.GroupNames"] = String.Join(",", ActivityGroupNames.ToArray());
- FlowContext.Workflow.SaveField("DepartmentReview.GroupNames");
- FlowContext.Workflow["DepartmentReview.UserEmails"] = String.Join(",", ActivityUserEmails.ToArray());
- FlowContext.Workflow.SaveField("DepartmentReview.UserEmails");
- DebugMessage("AssignAdditionalReviewParticipants: DepartmentReview.GroupNames: " + FlowContext.Workflow["DepartmentReview.GroupNames"].ToString());
- DebugMessage("AssignAdditionalReviewParticipants: DepartmentReview.UserEmails: " + FlowContext.Workflow["DepartmentReview.UserEmails"].ToString());
- }
- }
- </script>
- <%--
- // ================================================================================
- //
- // DepartmentReview Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void InitDepartmentReviewView()
- {
- // there are different views for department review
- // configure buttons
- this.Master.GetButton("SaveButton").Visible = false;
- this.Master.GetButton("SaveCloseButton").Visible = true;
- this.Master.GetButton("CancelButton").Visible = false;
- this.Master.GetButton("CancelButton").Text = "Close";
- this.Master.GetButton("CompleteButton").Attributes.Add("disabled", "disabled");
- this.Master.GetButton("CompleteButton").Text = "Complete Review";
- AppResubStep1.Checked = false;
- AppResubStep2.Checked = false;
- AppResubStep3.Checked = false;
- PEDDSCorrect.Checked = false;
- bool ShowAssignRemoveButton = false;
- if (PDOX.CurrentUser.CanAssignReviewers)
- ShowAssignRemoveButton = true;
- DebugMessage("InitDepartmentReviewView: PDOX.CurrentUser.IsReviewCoordinator = " + PDOX.CurrentUser.IsReviewCoordinator.ToString());
- if (!PDOX.CurrentUser.IsReviewCoordinator)
- {
- this.Master.AddButton("RequestReviewersButton", "Request Additional Group");
- this.Master.GetButton("RequestReviewersButton").CssClass = "EFormButton";
- this.Master.GetButton("RequestReviewersButton").Visible = true;
- if (FlowContext.Workflow["DepartmentReview.ReviewersRequested"].ToString() == "true")
- {
- this.Master.GetButton("RequestReviewersButton").Attributes.Add("disabled", "disabled");
- }
- }
- // add check to make sure that a status has been selected
- this.Master.GetButton("CompleteButton").OnClientClick = "return ShowWorkingPanel(CheckDepartmentReview());";
- DataRow CycleRow = null;
- int SearchReviewCycle = PDOX.Review.CurrentCycle;
- string SearchGroupName = PDOX.CurrentUser.GroupName;
- string SearchReviewerEmail = "";
- if (PDOX.CurrentUser.AssignmentType == PDOX.AssignmentTypes.FirstInGroup.ToString())
- SearchReviewerEmail = "";
- else if (PDOX.CurrentUser.AssignmentType == PDOX.AssignmentTypes.Individual.ToString())
- SearchReviewerEmail = Req.SessionUser.Email;
- DebugMessage(
- @"InitDepartmentReviewView: ReviewCycleData.Tables.Count = " + ReviewCycleData.Tables.Count.ToString()
- + @"<br>InitDepartmentReviewView: SearchReviewCycle = " + SearchReviewCycle.ToString()
- + @"<br>InitDepartmentReviewView: " + SearchGroupName.ToString()
- + @"<br>InitDepartmentReviewView: " + SearchReviewerEmail.ToString()
- );
- CycleRow = FindCycleGroup(SearchReviewCycle, SearchGroupName, SearchReviewerEmail);
- if (CycleRow != null)
- {
- if (PDOX.CurrentUser.AssignmentType == PDOX.AssignmentTypes.FirstInGroup.ToString())
- {
- CycleRow["ReviewerEmail"] = Req.SessionUser.Email;
- CycleRow["ReviewerName"] = Req.SessionUser.LocalizedName;
- }
- if (CycleRow["ReviewStatus"].ToString() == PDOX.ReviewStatuses.Assigned.ToString())
- {
- CycleRow["ReviewStatus"] = PDOX.ReviewStatuses.InReview.ToString();
- }
- // configure panels
- PermitPanel.Visible = true;
- ReviewInfoPanel.Visible = true;
- InstructionsPanel.Visible = false;
- ReviewMarkupsPanel.Visible = true;
- ReviewerToolTip.Visible = true;
- MarkupToolTip.Visible = true;
- DebugMessage("PDOX.CurrentUser.CanPerformReview : " + PDOX.CurrentUser.CanPerformReview.ToString());
- if (PDOX.CurrentUser.CanAssignReviewers)
- ReviewGroupsPanel.Visible = true;
- if (PDOX.CurrentUser.CanPerformReview || PDOX.CurrentUser.IsSuper)
- ReviewCyclePanel.Visible = true;
- CycleRow.AcceptChanges();
- ReviewCycleData.Tables[0].AcceptChanges();
- ReviewCycleData.AcceptChanges();
- SaveToDataSetField("PDOX.ReviewCycleData", ReviewCycleData);
- //FlowContext.Workflow["ReviewQA.CorrectionsNeeded"] = "false";
- //FlowContext.Workflow.SaveField("ReviewQA.CorrectionsNeeded");
- // NOTE: cannot call SaveFields() in because it will occur before other control values get loaded and will negate any changes made in the previous post
- // FlowContext.Workflow.SaveFields();
- }
- else
- {
- // this is not a group that is listed as a reviewer
- // if they are the the rev coord then this is the request
- // additional group function
- if (PDOX.CurrentUser.IsReviewCoordinator)
- {
- PermitPanel.Visible = true;
- ReviewInfoPanel.Visible = true;
- InstructionsPanel.Visible = false;
- ReviewGroupsPanel.Visible = true;
- ReviewCyclePanel.Visible = true;
- ReviewerToolTip.Visible = false;
- MarkupToolTip.Visible = false;
- ShowAssignRemoveButton = true;
- this.Master.GetButton("CompleteButton").Visible = false;
- this.Master.AddButton("CompleteReqestButton", "Complete Group Request");
- this.Master.GetButton("CompleteReqestButton").CssClass = "EFormButton";
- this.Master.GetButton("CompleteReqestButton").Visible = true;
- }
- else
- {
- // put up message that user can't do this activity
- // turn off fielded sections
- PermitPanel.Visible = false;
- ReviewInfoPanel.Visible = false;
- InstructionsPanel.Visible = false;
- ReviewGroupsPanel.Visible = false;
- ReviewCyclePanel.Visible = false;
- }
- }
- if (ShowAssignRemoveButton)
- {
- this.Master.AddButton("AssignReviewersButton", "Assign / Remove Reviewers");
- this.Master.GetButton("AssignReviewersButton").CssClass = "EFormButton";
- this.Master.GetButton("AssignReviewersButton").Visible = true;
- this.Master.GetButton("AssignReviewersButton").OnClientClick = "return ShowWorkingPanel(true);";
- }
- }
- protected void UpdateReview()
- {
- // save review for current user
- SaveReview(PDOX.Review.CurrentCycle, PDOX.CurrentUser.AssignmentType, PDOX.CurrentUser.GroupName, Req.SessionUser.Email);
- }
- protected void SaveReview(int SelectedCycle, string SelectedAssignmentType, string SelectedGroupName, string SelectedUserEmail)
- {
- DebugMessage("SaveReview: Starting SaveReview");
- bool GetItemData = false;
- int SearchReviewCycle = SelectedCycle;
- string SearchGroupName = SelectedGroupName;
- string SearchUserEmail = SelectedUserEmail;
- string NewReviewComments = "";
- string NewReviewStatus = "";
- string NewQARequest = "";
- string NewQAResponse = "";
- List<string> PostReviewActivityUsers = new List<string>();
- List<string> PostReviewActivityGroups = new List<string>();
- DebugMessage("SaveReview: ReviewCycleRepeater.Items.Count.ToString() = " + ReviewCycleRepeater.Items.Count.ToString());
- foreach (RepeaterItem RepeaterCycleItem in ReviewCycleRepeater.Items)
- {
- if (IsItemRow(RepeaterCycleItem))
- {
- DataRow CycleRow = null;
- Label ReviewCycleLabel = (Label)RepeaterCycleItem.FindControl("RC_ReviewCycle");
- Label GroupNameLabel = (Label)RepeaterCycleItem.FindControl("RC_GroupName");
- Label ReviewerEmailLabel = (Label)RepeaterCycleItem.FindControl("RC_ReviewerEmail");
- CheckBox GroupSelect = (CheckBox)RepeaterCycleItem.FindControl("RC_GroupSelect");
- Label AssignmentTypeLabel = (Label)RepeaterCycleItem.FindControl("RC_AssignmentType");
- GetItemData = false;
- if (SelectedAssignmentType == PDOX.AssignmentTypes.Unknown.ToString())
- {
- // save review data for any assignment type
- SearchGroupName = GroupNameLabel.Text;
- SearchUserEmail = "";
- GetItemData = true;
- }
- else if (SelectedAssignmentType == PDOX.AssignmentTypes.FirstInGroup.ToString())
- {
- // save review data a first in group user
- SearchGroupName = SelectedGroupName;
- SearchUserEmail = "";
- if (ReviewCycleLabel.Text == SelectedCycle.ToString()
- && GroupNameLabel.Text == SelectedGroupName)
- GetItemData = true;
- }
- else if (SelectedAssignmentType == PDOX.AssignmentTypes.Individual.ToString())
- {
- SearchGroupName = SelectedGroupName;
- SearchUserEmail = SelectedUserEmail;
- if (ReviewCycleLabel.Text == SelectedCycle.ToString()
- && GroupNameLabel.Text == SelectedGroupName
- && ReviewerEmailLabel.Text == SelectedUserEmail
- )
- GetItemData = true;
- }
- if (GetItemData)
- {
- DebugMessage("SaveReview: Getting " + GroupNameLabel.Text + " " + ReviewerEmailLabel.Text);
- NewReviewStatus = "";
- NewReviewComments = "";
- NewQARequest = "";
- NewQAResponse = "";
- TextBox ReviewCommentsTextBox = (TextBox)RepeaterCycleItem.FindControl("RC_ReviewComments");
- DropDownList ChangeStatusDropDown = (DropDownList)RepeaterCycleItem.FindControl("RC_ChangeStatus");
- TextBox QARequestTextBox = (TextBox)RepeaterCycleItem.FindControl("RC_QARequest");
- TextBox QAResponseTextBox = (TextBox)RepeaterCycleItem.FindControl("RC_QAResponse");
- CheckBox AssignCorrections = (CheckBox)RepeaterCycleItem.FindControl("RC_AssignCorrections");
- NewReviewComments = ReviewCommentsTextBox.Text;
- if (ChangeStatusDropDown != null)
- {
- if (ChangeStatusDropDown.SelectedItem != null)
- {
- if (ChangeStatusDropDown.SelectedItem.Text != "-select status-")
- NewReviewStatus = ChangeStatusDropDown.SelectedItem.Value;
- }
- }
- NewQARequest = QARequestTextBox.Text;
- NewQAResponse = QAResponseTextBox.Text;
- DebugMessage("SaveReview: Review Comments = " + "<br><pre>" + NewReviewComments + "</br></pre>");
- DebugMessage("SaveReview: Review Status = " + NewReviewStatus);
- DebugMessage("SaveReview: QA Request = " + "<br><pre>" + NewQARequest + "</br></pre>");
- DebugMessage("SaveReview: QA Response = " + "<br><pre>" + NewQAResponse + "</br></pre>");
- CycleRow = FindCycleGroup(SearchReviewCycle, SearchGroupName, SearchUserEmail);
- if (CycleRow != null)
- {
- CycleRow["ReviewComments"] = NewReviewComments;
- if (NewReviewStatus != "")
- CycleRow["ReviewStatus"] = NewReviewStatus;
- //if (PDUtility.ConversionUtility.CBOOL2(FlowContext.Workflow["ReviewQA.CorrectionsNeeded"]))
- //{
- CycleRow["QARequest"] = PDUtility.ConversionUtility.BlankNull(NewQARequest);
- CycleRow["QAResponse"] = PDUtility.ConversionUtility.BlankNull(NewQAResponse);
- CycleRow["AssignCorrections"] = PDUtility.ConversionUtility.CBOOL2(AssignCorrections.Checked);
- //}
- CycleRow.AcceptChanges();
- }
- }
- // update group select for all rows
- if (AssignmentTypeLabel.Text == PDOX.AssignmentTypes.FirstInGroup.ToString())
- {
- CycleRow = FindCycleGroup(SearchReviewCycle, GroupNameLabel.Text, "");
- }
- else if (AssignmentTypeLabel.Text == PDOX.AssignmentTypes.Individual.ToString())
- {
- CycleRow = FindCycleGroup(SearchReviewCycle, GroupNameLabel.Text, ReviewerEmailLabel.Text);
- }
- if (CycleRow != null)
- {
- CycleRow["GroupSelect"] = GroupSelect.Checked;
- }
- }
- }
- ReviewCycleData.Tables[0].AcceptChanges();
- ReviewCycleData.AcceptChanges();
- SaveToDataSetField("PDOX.ReviewCycleData", ReviewCycleData);
- FlowContext.Workflow.SaveField("PDOX.ReviewCycleData");
- }
- protected void UpdatePostReviewActivityParticipants(int SelectedReviewCycle)
- {
- // assign for reviewer stamps
- List<string> ActivityNames = new List<string>();
- List<string> ActivityUsers = new List<string>();
- ActivityNames.Add("ReviewerStamps");
- DataRow[] CycleRows = ReviewCycleData.Tables[0].Select("ReviewCycle = " + SelectedReviewCycle.ToString() + " AND GroupSelect = 'true' AND ReviewStatus <> 'AssignOnly'");
- if (CycleRows != null && CycleRows.Length > 0)
- {
- foreach (DataRow CycleRow in CycleRows)
- {
- ActivityUsers.Add(CycleRow["ReviewerEmail"].ToString());
- }
- }
- DebugMessage("UpdatePostReviewActivityParticipants: ActivityUsers =" + String.Join(",",ActivityUsers.ToArray()));
- foreach (string ActivityName in ActivityNames)
- {
- if (ActivityUsers.Count > 0)
- FlowContext.Workflow[ActivityName + ".UserEmails"] = String.Join(",", ActivityUsers.ToArray());
- else
- FlowContext.Workflow[ActivityName + ".UserEmails"] = "";
- FlowContext.Workflow.SaveField(ActivityName + ".UserEmails");
- }
- }
- </script>
- <%--
- // ================================================================================
- //
- // ReviewQA Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void InitReviewQAView()
- {
- // configure buttons
- this.Master.GetButton("SaveButton").Visible = false;
- this.Master.GetButton("SaveCloseButton").Visible = false;
- this.Master.GetButton("CancelButton").Visible = false;
- this.Master.GetButton("CancelButton").Text = "close";
- this.Master.GetButton("CompleteButton").Text = "Continue";
- this.Master.AddButton("AssignCorrectionsButton", "Assign Corrections");
- this.Master.GetButton("AssignCorrectionsButton").CssClass = "EFormButton";
- this.Master.GetButton("AssignCorrectionsButton").OnClientClick = "return ShowWorkingPanel(true);";
- PermitPanel.Visible = true;
- ReviewInfoPanel.Visible = true;
- ReviewGroupsPanel.Visible = false;
- InstructionsPanel.Visible = false;
- ReviewCyclePanel.Visible = true;
- QAToolTip.Visible = true;
- ReviewMarkupsPanel.Visible = true;
- MarkupListing.Visible = false;
- //AssignCorrectionsButton.Visible = true;
- // handler for an eform event - assign corrections to be called as ane event on the eform save
- //this.EFormEvent += new EventHandler<PDWorkflowEformEventArgs>(this.AssignCorrections_Click);
- }
- protected void AssignCorrectors()
- {
- // ----------------------------------------------------------------------------------------
- // Save Reviewer Groups Data
- // ----------------------------------------------------------------------------------------
- bool CorrectionsNeeded = false;
- List<string> CorrectorEmails = new List<string>();
- foreach (RepeaterItem ReviewCycleItem in ReviewCycleRepeater.Items)
- {
- bool UpdateRow = false;
- if (IsItemRow(ReviewCycleItem))
- {
- Label ReviewCycleLabel = (Label)ReviewCycleItem.FindControl("RC_ReviewCycle");
- CheckBox GroupSelect = (CheckBox)ReviewCycleItem.FindControl("RC_GroupSelect");
- CheckBox AssignCorrections = (CheckBox)ReviewCycleItem.FindControl("RC_AssignCorrections");
- Label GroupNameLabel = (Label)ReviewCycleItem.FindControl("RC_GroupName");
- Label AssignmentTypeLabel = (Label)ReviewCycleItem.FindControl("RC_AssignmentType");
- TextBox QARequestTextBox = (TextBox)ReviewCycleItem.FindControl("RC_QARequest");
- TextBox QAResponseTextBox = (TextBox)ReviewCycleItem.FindControl("RC_QAResponse");
- Label ReviewerEmailLabel = (Label)ReviewCycleItem.FindControl("RC_ReviewerEmail");
- DropDownList ChangeStatusDropDownList = (DropDownList)ReviewCycleItem.FindControl("RC_ChangeStatus");
- if (AssignCorrections.Checked)
- {
- CorrectorEmails.Add(ReviewerEmailLabel.Text);
- CorrectionsNeeded = true;
- }
- }
- }
- if (CorrectionsNeeded)
- {
- // tell while loop in workflow to loop again
- FlowContext.Workflow["ReviewQA.CorrectionsNeeded"] = "true";
- FlowContext.Workflow.SaveField("ReviewQA.CorrectionsNeeded");
- FlowContext.Workflow["ReviewQA.CorrectionsWereRequested"] = "true";
- FlowContext.Workflow.SaveField("ReviewQA.CorrectionsWereRequested");
- // tell DepartmentReview which reviewers should get task.
- FlowContext.Workflow["DepartmentReview.UserEmails"] = String.Join(",", CorrectorEmails.ToArray());
- FlowContext.Workflow.SaveField("DepartmentReview.UserEmails");
- FlowContext.Workflow["DepartmentReview.GroupNames"] = "";
- FlowContext.Workflow.SaveField("DepartmentReview.GroupNames");
- }
- else
- {
- FlowContext.Workflow["ReviewQA.CorrectionsNeeded"] = "false";
- FlowContext.Workflow.SaveField("ReviewQA.CorrectionsNeeded");
- }
- }
- </script>
- <%--
- // ================================================================================
- //
- // ReviewComplete Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void InitReviewCompleteView()
- {
- this.Master.GetButton("SaveButton").Visible = false;
- this.Master.GetButton("SaveCloseButton").Visible = false;
- this.Master.GetButton("CancelButton").Visible = false;
- DataRow[] ReviewerRows = GetSelectedReviewParticipants(ReviewCycleData.Tables[0], PDOX.Review.CurrentCycle);
- foreach (DataRow ReviewerRow in ReviewerRows)
- {
- if (ReviewerRow["ReviewStatus"].ToString() != PDOX.ReviewStatuses.Authorized.ToString())
- this.Master.GetButton("ApproveButton").Visible = false;
- }
- if (this.Master.GetButton("ApproveButton").Visible == true)
- this.Master.GetButton("RejectButton").Visible = false;
- // just display the form for the review coordinator to approve or reject
- // since we arent saving anything on this step, masterpage is taking
- // care of showing correct buttons and sending approve or reject (via WCF)
- // to workflow server
- PermitPanel.Visible = true;
- ReviewInfoPanel.Visible = true;
- ReviewGroupsPanel.Visible = false;
- PreReviewInstructions.Visible = false;
- PreRevAppInstructions.Visible = false;
- ReviewCompletePanel.Visible = true;
- ReviewCyclePanel.Visible = true;
- ReviewCompletePanel.Visible = false;
- InstructionsPanel.Visible = false;
- ReviewCompleteToolTip.Visible = true;
- }
- protected void PrepareReviewCompletion()
- {
- FlowContext.Workflow["PDOX.Review.CurrentCycle"] = PDOX.Review.CurrentCycle.ToString();
- // reset flags here so that while activities do not drop through
- FlowContext.Workflow["ReviewQA.CorrectionsNeeded"] = "true";
- FlowContext.Workflow.SaveField("ReviewQA.CorrectionsNeeded");
- FlowContext.Workflow["ResubmitReceived.Approved"] = "false";
- FlowContext.Workflow.SaveField("ResubmitReceived.Approved");
- FlowContext.Workflow["ReviewComplete.Approved"] = "false";
- FlowContext.Workflow.SaveField("ReviewComplete.Approved");
- }
- protected void AcceptReview()
- {
- FlowContext.Workflow["ReviewComplete.Approved"] = "true";
- FlowContext.Workflow.SaveField("ReviewComplete.Approved");
- }
- protected void RejectReview()
- {
- // reset flags here so that while activities do not drop through
- FlowContext.Workflow["ReviewQA.CorrectionsNeeded"] = "true";
- FlowContext.Workflow.SaveField("ReviewQA.CorrectionsNeeded");
- FlowContext.Workflow["ResubmitReceived.Approved"] = "false";
- FlowContext.Workflow.SaveField("ResubmitReceived.Approved");
- FlowContext.Workflow["ReviewComplete.Approved"] = "false";
- FlowContext.Workflow.SaveField("ReviewComplete.Approved");
- FlowContext.Workflow["AdditionalFees.FeeRequired"] = "false";
- FlowContext.Workflow.SaveField("AdditionalFees.FeeRequired");
- FlowContext.Workflow["ApplicantResubmit.SwitchToPaper"] = "false";
- FlowContext.Workflow.SaveField("ApplicantResubmit.SwitchToPaper");
- FlowContext.Workflow["ResubmitRecieved.PEDDSCorrect"] = "false";
- FlowContext.Workflow.SaveField("ResubmitRecieved.PEDDSCorrect");
- }
- </script>
- <%--
- // ================================================================================
- //
- // AwaitingFinalPayment Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void InitAwaitingFinalPaymentView()
- {
- this.Master.GetButton("SaveButton").Visible = false;
- this.Master.GetButton("SaveCloseButton").Visible = false;
- this.Master.GetButton("CancelButton").Visible = false;
- PermitPanel.Visible = true;
- ReviewInfoPanel.Visible = true;
- ReviewGroupsPanel.Visible = false;
- InstructionsPanel.Visible = true;
- AwaitingFinalPaymentPanel.Visible = true;
- PreReviewInstructions.Visible = false;
- PreRevAppInstructions.Visible = false;
- // add javascript verification to make sure the user checks the receive payment button
- this.Master.GetButton("CompleteButton").OnClientClick = "return ShowWorkingPanel(CheckAwaitingPayment());";
- //TODO/DONE: add 'I have recieved payment' checkbox box in instructions panel for the user
- //TODO/DONE: add instructions in instructions panel to let the user know to check the 'I have recieved payment' checkbox
- }
- </script>
- <%--
- // ================================================================================
- //
- // ApplicantResubmit Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void InitApplicantResubmitView()
- {
- // configure buttons
- this.Master.GetButton("SaveButton").Visible = false;
- this.Master.GetButton("CancelButton").Visible = false;
- this.Master.GetButton("CompleteButton").Attributes.Add("disabled", "disabled");
- // configure panels
- PermitPanel.Visible = true;
- ReviewInfoPanel.Visible = true;
- ReviewGroupsPanel.Visible = false;
- InstructionsPanel.Visible = true;
- ReviewCyclePanel.Visible = true;
- AppResubmitInstructions.Visible = true;
- PreReviewInstructions.Visible = false;
- ReviewMarkupsPanel.Visible = true;
- MarkupListing.Visible = false;
- ApplicantToolTip.Visible = true;
- // applicant is just checking off checkboxes in instructions section
- // then clicking complete task button
- }
- </script>
- <%--
- // ================================================================================
- //
- // ResubmitReceived Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void InitResubmitReceivedView()
- {
- // configure buttons
- this.Master.GetButton("SaveButton").Visible = false;
- this.Master.GetButton("SaveCloseButton").Visible = false;
- this.Master.GetButton("CancelButton").Visible = false;
- this.Master.GetButton("RejectButton").Visible = false;
- this.Master.GetButton("ApproveButton").Text = "Begin ReReview";
- this.Master.GetButton("RejectButton").Text = "Return to Applicant";
- // display reviewer groups so reviewer coordinator can add different reviewers to new review cycle
- PermitPanel.Visible = true;
- ReviewInfoPanel.Visible = true;
- ReviewGroupsPanel.Visible = true;
- InstructionsPanel.Visible = true;
- ResubmitReceivedInstructions.Visible = true;
- AppResubmitInstructions.Visible = true;
- AppResubStep1Panel.Enabled = false;
- AppResubStep2Panel.Enabled = false;
- AppResubStep3Panel.Enabled = false;
- SwitchToPaperPanel.Enabled = true;
- ReReviewToolTip.Visible = true;
- }
- </script>
- <%--
- // ================================================================================
- //
- // ReviewerStamps Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void InitReviewerStampsView()
- {
- // configure buttons
- this.Master.GetButton("SaveButton").Visible = false;
- this.Master.GetButton("SaveCloseButton").Visible = false;
- this.Master.GetButton("CancelButton").Visible = false;
- // display reviewer groups so reviewer coordinator can add different reviewers to new review cycle
- PermitPanel.Visible = true;
- ReviewInfoPanel.Visible = true;
- ReviewGroupsPanel.Visible = false;
- InstructionsPanel.Visible = true;
- ReviewerStampsPanel.Visible = true;
- }
- </script>
- <%--
- // ================================================================================
- //
- // BatchStamps Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void InitBatchStampsView()
- {
- // configure buttons
- this.Master.GetButton("SaveButton").Visible = false;
- this.Master.GetButton("SaveCloseButton").Visible = false;
- this.Master.GetButton("CancelButton").Visible = false;
- this.Master.GetButton("CompleteButton").Attributes.Add("disabled", "disabled");
- this.Master.AddButton("ProjectExportButton", "Project Export");
- this.Master.GetButton("ProjectExportButton").CssClass = "EFormButton";
- this.Master.GetButton("ProjectExportButton").OnClientClick = "return ShowWorkingPanel(true);";
- //this.Master.GetButton("ProjectExportButton").Attributes.Add("disabled","disabled");
- // display reviewer groups so reviewer coordinator can add different reviewers to new review cycle
- PermitPanel.Visible = true;
- ReviewInfoPanel.Visible = true;
- ReviewGroupsPanel.Visible = false;
- InstructionsPanel.Visible = true;
- BatchStampsPanel.Visible = true;
- BatchStampToolTip.Visible = true;
- }
- </script>
- <%--
- // ================================================================================
- //
- // Additional Fees Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void InitAdditionalFeesView()
- {
- // configure buttons
- this.Master.GetButton("SaveButton").Visible = false;
- this.Master.GetButton("SaveCloseButton").Visible = false;
- this.Master.GetButton("CancelButton").Visible = false;
- // display reviewer groups so reviewer coordinator can add different reviewers to new review cycle
- PermitPanel.Visible = true;
- ReviewInfoPanel.Visible = true;
- ReviewGroupsPanel.Visible = false;
- InstructionsPanel.Visible = true;
- AdditionalFeesPanel.Visible = true;
- }
- </script>
- <%--
- // ================================================================================
- //
- // Additional Fees Methods
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void InitApplicantPEDDSView()
- {
- // configure buttons
- this.Master.GetButton("SaveButton").Visible = false;
- this.Master.GetButton("SaveCloseButton").Visible = false;
- this.Master.GetButton("CancelButton").Visible = false;
- // display reviewer groups so reviewer coordinator can add different reviewers to new review cycle
- PermitPanel.Visible = true;
- ReviewInfoPanel.Visible = true;
- ReviewGroupsPanel.Visible = false;
- InstructionsPanel.Visible = true;
- ApplicantPEDDSPanel.Visible = true;
- ApplicantPEDDSToolTip.Visible = true;
- AppPEDDSNotes.Text = PEDDSNotes.Text;
- AppPEDDSNotes.ReadOnly = true;
- }
- </script>
- <%--
- // ================================================================================
- //
- // Page Init
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void Page_Init(object sender, EventArgs e)
- {
- // this.Master.GetButton("CompleteButton").Click += new EventHandler(AssignReviewers_Click); // additional event to assign all the reviewers to the WF
- if (PDOX.ActivityCodes.Count == 0)
- {
- // CUSTOMIZATION NOTE: map review activities to step codes in permit system
- PDOX.ActivityCodes.Add(PDOX.StandardActivities.BeginReview.ToString(), "");
- PDOX.ActivityCodes.Add(PDOX.StandardActivities.DepartmentReview.ToString(), "");
- PDOX.ActivityCodes.Add(PDOX.StandardActivities.ReviewQA.ToString(), "");
- PDOX.ActivityCodes.Add(PDOX.StandardActivities.ResubmitReceived.ToString(), "");
- }
- if (PDOX.GroupCodes.Count == 0)
- {
- // map review groups to groups/depts/agencies in permit system
- PDOX.GroupCodes.Add("Router Clerk", "");
- PDOX.GroupCodes.Add("B Building", "");
- PDOX.GroupCodes.Add("B Electrical", "");
- PDOX.GroupCodes.Add("B Mechanical", "");
- PDOX.GroupCodes.Add("B Plumbing", "");
- PDOX.GroupCodes.Add("B Governmental Compliance", "");
- PDOX.GroupCodes.Add("B Structural", "");
- PDOX.GroupCodes.Add("B Elevator", "");
- PDOX.GroupCodes.Add("Planning-Zoning", "");
- PDOX.GroupCodes.Add("Public Works", "");
- PDOX.GroupCodes.Add("Fire", "");
- PDOX.GroupCodes.Add("DERM", "");
- PDOX.GroupCodes.Add("WASD", "");
- PDOX.GroupCodes.Add("IMPACTFEE", "");
- PDOX.GroupCodes.Add("FDOH(POOL)", "");
- PDOX.GroupCodes.Add("FBPR(HOTEL AND RESTAURANTS)", "");
- PDOX.GroupCodes.Add("DERM Chief", "");
- PDOX.GroupCodes.Add("Planning-Zoning Chief", "");
- PDOX.GroupCodes.Add("Coastal", "");
- }
- if (PDOX.StatusCodes.Count == 0)
- {
- // CUSTOMIZATION NOTE: map review statuses to status codes in permit system
- PDOX.StatusCodes.Add(PDOX.ReviewStatuses.Assigned.ToString(), PDOX.ReviewStatuses.Assigned.ToString());
- PDOX.StatusCodes.Add(PDOX.ReviewStatuses.InReview.ToString(), PDOX.ReviewStatuses.InReview.ToString());
- PDOX.StatusCodes.Add(PDOX.ReviewStatuses.QACorrection.ToString(), PDOX.ReviewStatuses.QACorrection.ToString());
- PDOX.StatusCodes.Add(PDOX.ReviewStatuses.OnHold.ToString(), "Corrections Needed");
- PDOX.StatusCodes.Add(PDOX.ReviewStatuses.PendingResubmit.ToString(), PDOX.ReviewStatuses.PendingResubmit.ToString());
- PDOX.StatusCodes.Add(PDOX.ReviewStatuses.Authorized.ToString(), "Plans Approved");
- PDOX.StatusCodes.Add(PDOX.ReviewStatuses.AuthorizedWithConditions.ToString(), PDOX.ReviewStatuses.AuthorizedWithConditions.ToString());
- PDOX.StatusCodes.Add(PDOX.ReviewStatuses.Denied.ToString(), PDOX.ReviewStatuses.Denied.ToString());
- PDOX.StatusCodes.Add("AssignOnly", "Assign Only");
- }
- if (PDOX.DropDownStatuses.Count == 0)
- {
- // CUSTOMIZATION NOTE: add the value part of selected statues from StatusCodes above
- // only these statuses will show in change status drop down
- PDOX.DropDownStatuses.Add(PDOX.ReviewStatuses.InReview.ToString());
- PDOX.DropDownStatuses.Add(PDOX.ReviewStatuses.OnHold.ToString());
- PDOX.DropDownStatuses.Add(PDOX.ReviewStatuses.Authorized.ToString());
- PDOX.DropDownStatuses.Add("AssignOnly");
- //PDOX.DropDownStatuses.Add(PDOX.ReviewStatuses.AuthorizedWithConditions.ToString());
- //PDOX.DropDownStatuses.Add(PDOX.ReviewStatuses.Denied.ToString());
- }
- // the PD group that designates review coordinators
- PDOX.ReviewCoordinatorGroupName = "Router Clerk";
- }
- </script>
- <%--
- // ================================================================================
- //
- // Page Load
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- protected void LinkedMarkupsRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
- {
- if (IsItemRow(e.Item))
- {
- ASP.workfloweforms_planreview_aspx.MarkUp LinkedMarkup = (ASP.workfloweforms_planreview_aspx.MarkUp)e.Item.DataItem;
- LinkButton RemoveAnchor = (LinkButton)e.Item.FindControl("RemoveWF");
- if (LinkedMarkup.GroupName != PDOX.CurrentUser.GroupName)
- {
- RemoveAnchor.Visible = false;
- }
- }
- }
- protected void Page_Load(object sender, EventArgs e)
- {
- this.Master.GetButton("OKButton").OnClientClick = "return ShowWorkingPanel(true);";
- this.Master.GetButton("ApproveButton").OnClientClick = "return ShowWorkingPanel(true);";
- this.Master.GetButton("RejectButton").OnClientClick = "return ShowWorkingPanel(true);";
- this.Master.GetButton("CompleteButton").OnClientClick = "return ShowWorkingPanel(true);";
- this.Master.GetButton("CancelButton").OnClientClick = "return ShowWorkingPanel(true);";
- this.Master.GetButton("SaveButton").OnClientClick = "return ShowWorkingPanel(true);";
- this.Master.GetButton("SaveCloseButton").OnClientClick = "return ShowWorkingPanel(true);";
- // fields for
- FlowContext.Workflow.AddField("PDOX.PermitStatus", "", ConfigManager.FieldTypes.Text, false, false, true);
- FlowContext.Workflow.AddField("DepartmentReview.ReviewersRequested", "", ConfigManager.FieldTypes.Text, false, false, true);
- FlowContext.Workflow.AddField("AdditionalFees.FeeRequired", "", ConfigManager.FieldTypes.Text, false, false, true);
- FlowContext.Workflow.AddField("ResubmitReceived.PEDDSCorrect", "", ConfigManager.FieldTypes.Text, false, false, true);
- FlowContext.Workflow.AddField("ApplicantResubmit.SwitchToPaper", "", ConfigManager.FieldTypes.Text, false, false, true);
- // make sure we have the MD key added before accessing later
- FlowContext.Workflow.AddField("ReviewQA.CorrectionsNeeded", "", ConfigManager.FieldTypes.Text, false, false, false);
- FlowContext.Workflow.AddField("ReviewQA.CorrectionsWereRequested", "", ConfigManager.FieldTypes.Text, false, false, false);
- // NOTE: Access FlowContext in Page_Load or later in page lifecycle
- // ----------------------------------------------------------------------------------------
- // Attach Handlers
- // ----------------------------------------------------------------------------------------
- DebugMessage("Page_Load: Init Handlers");
- //SelectedReviewCycle.SelectedIndexChanged += new EventHandler(SelectedReviewCycle_SelectedIndexChanged);
- this.EFormEvent += new EventHandler<PDWorkflowEformEventArgs>(Page_EFormEvent);
- // ----------------------------------------------------------------------------------------
- // Init Data
- // ----------------------------------------------------------------------------------------
- DebugMessage("Page_Load: Init Project");
- // Init current project
- PDOX.CurrentUser.ProjectGroups = PDGroups.GetProjectGroupsForUser(FlowContext.Project.ProjectID, Req.SessionUser.UserID);
- PDOX.CurrentProject = this.FlowContext.Project;
- DebugMessage("Page_Load: Init Data");
- InitReviewConfigData();
- DataRow CurrentConfigRow = FindConfigGroup();
- if (CurrentConfigRow == null)
- {
- CurrentConfigRow = ReviewConfigData.Tables[0].NewRow();
- if (PDOX.CurrentUser.ProjectGroups != null && PDOX.CurrentUser.ProjectGroups.Count > 0)
- {
- // get first one
- foreach (PDGroup UserProjectGroup in PDOX.CurrentUser.ProjectGroups)
- {
- CurrentConfigRow["GroupName"] = UserProjectGroup.Name;
- break;
- }
- CurrentConfigRow["SuperGroupName"] = "";
- CurrentConfigRow["IsAncestor"] = false;
- CurrentConfigRow["IsDescendant"] = false;
- CurrentConfigRow["Depth"] = 1;
- CurrentConfigRow["AssignReviewers"] = false;
- CurrentConfigRow["PerformReview"] = false;
- CurrentConfigRow["Lineage"] = "";
- CurrentConfigRow["HowAssigned"] = "";
- }
- }
- InitCurrentUser(CurrentConfigRow);
- DebugMessage("Page_Load: PDOX.CurrentUser.GroupName = " + PDOX.CurrentUser.GroupName);
- InitReviewGroupsData();
- InitPermitData();
- InitReviewCycleData();
- InitReviewCoordinator();
- // ----------------------------------------------------------------------------------------
- // Fill Fields (manually for the first time, second and later through eform load)
- // ----------------------------------------------------------------------------------------
- DebugMessage("Page_Load: Fill fields");
- FillPermitFields();
- FillReviewCycleFields();
- // fill activity fields
- PDFlowDef WorkflowDef = new PDFlowDef(FlowContext.Workflow.FlowDefID);
- WorkflowPath.Text = WorkflowDef.FlowDefName + " / " + FlowContext.Activity.ActivityName;
- CurrentUserLogon.Text = Req.SessionUser.LocalizedName + " ( " + Req.SessionUser.Email + ") ";
- // ----------------------------------------------------------------------------------------
- // Configure EForm View
- // ----------------------------------------------------------------------------------------
- // default generic panels to the off state - then turn on corresponding panels individually in each step
- // turn this off for Miami Beach
- AwaitingFinalPaymentPanel.Visible = false;
- DebugMessage("Page_Load: ActivityName = " + FlowContext.Activity.ActivityName);
- if (IsActivity("GroupPreScreen"))
- {
- DebugMessage("Page_Load: Init PreScreenReview");
- InitGroupPreScreenView();
- }
- if (IsActivity("PreScreenReview"))
- {
- DebugMessage("Page_Load: Init PreScreenReview");
- InitPreScreenReviewView();
- }
- else if (IsActivity("CorrectionComplete"))
- {
- DebugMessage("Page_Load: Init CorrectionComplete");
- InitCorrectionCompleteView();
- }
- else if (IsActivity(PDOX.StandardActivities.BeginReview))
- {
- DebugMessage("Page_Load: Init BeginReview");
- InitBeginReviewView();
- }
- else if (IsActivity(PDOX.StandardActivities.DepartmentReview))
- {
- DebugMessage("Page_Load: Init DepartmentReview");
- InitDepartmentReviewView();
- }
- else if (IsActivity(PDOX.StandardActivities.ReviewQA))
- {
- DebugMessage("Page_Load: Init ReviewQA");
- InitReviewQAView();
- }
- else if (IsActivity("ReviewComplete"))
- {
- DebugMessage("Page_Load: Init ReviewComplete");
- InitReviewCompleteView();
- }
- else if (IsActivity("AwaitingFinalPayment"))
- {
- // this is turned off for Miami Beach
- DebugMessage("Page_Load: Init AwaitingFinalPayment");
- InitAwaitingFinalPaymentView();
- }
- else if (IsActivity("ApplicantResubmit"))
- {
- DebugMessage("Page_Load: Init ApplicantResubmit");
- InitApplicantResubmitView();
- }
- else if (IsActivity(PDOX.StandardActivities.ResubmitReceived))
- {
- DebugMessage("Page_Load: Init ResubmitReceived");
- InitResubmitReceivedView();
- }
- else if (IsActivity("ReviewerStamps"))
- {
- DebugMessage("Page_Load: Init ReviewerStamps");
- InitReviewerStampsView();
- }
- else if (IsActivity("BatchStamps"))
- {
- DebugMessage("Page_Load: Init BatchStamps");
- InitBatchStampsView();
- }
- else if (IsActivity("AdditionalFees"))
- {
- DebugMessage("Page_Load: Init AdditionalFees");
- InitAdditionalFeesView();
- }
- else if (IsActivity("ApplicantPEDDS"))
- {
- DebugMessage("Page_Load: Init ApplicantPEDDS");
- InitApplicantPEDDSView();
- }
- if (MarkupsPanel.Visible == true)
- {
- //show the linked markups
- List<MarkUp> MarkupList = new List<MarkUp>();
- string[] MarkupRecords = AttachedMarkups.Value.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
- foreach (string MarkupRecord in MarkupRecords)
- {
- //Response.Write("<br>MarkupRecord: " + MarkupRecord);
- string[] MarkupFields = MarkupRecord.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
- if (!String.IsNullOrEmpty(MarkupFields[0]) && !String.IsNullOrEmpty(MarkupFields[1]))
- {
- if (PDOX.Review.SelectedCycle.ToString() == MarkupFields[5])
- {
- MarkUp NewMarkup = new MarkUp();
- NewMarkup.URL = MarkupFields[0];
- NewMarkup.Name = MarkupFields[1];
- NewMarkup.ID = MarkupFields[2];
- NewMarkup.GroupName = MarkupFields[4];
- MarkupList.Add(NewMarkup);
- }
- }
- }
- LinkedMarkupsRepeater.DataSource = MarkupList;
- LinkedMarkupsRepeater.DataBind();
- }
- if (MarkupListing.Visible == true)
- {
- MarkupListing.Attributes.Add("src", "../ViewFolders.aspx?Mode=AttachMarkup&ProjectName=" + FlowContext.Project.Name);
- }
- //
- // Bind Repeater DataSets
- //
- if (!IsPostBack)
- {
- BindReviewGroupsData(PDOX.Review.SelectedCycle);
- BindReviewCycleData(PDOX.Review.SelectedCycle);
- }
- // wouldn't normally do it this way
- // but event order causes problems.
- // is the control that caused the postback the Review Cycle DropDown
- // if so then rebind the data with the selected cycle
- if ((Request.Params.Get("__EVENTTARGET") == SelectedReviewCycle.ClientID.Replace("_", "$")))
- {
- BindReviewGroupsData(PDOX.Review.SelectedCycle);
- BindReviewCycleData(PDOX.Review.SelectedCycle);
- }
- }
- </script>
- <%--
- // ================================================================================
- //
- // Page EFormEvent
- //
- // ================================================================================
- --%>
- <script language="C#" runat="server">
- // event called on all buttons defined in the master page
- protected void Page_EFormEvent(object sender, PDWorkflowEformEventArgs e)
- {
- DebugMessage("Page_EFormEvent: " + e.EventName);
- InitReviewGroupsData();
- if (IsActivity("PreScreenReview"))
- {
- switch (e.EventName)
- {
- case "VoidReviewButton":
- VoidReview();
- break;
- }
- }
- if (IsActivity(PDOX.StandardActivities.BeginReview))
- {
- switch (e.EventName)
- {
- case "CompleteButton":
- UpdateReviewGroups();
- InitReviewCycleData();
- AssignDepartmentReviewParticipants();
- UpdateReviewCycle();
- // reset this before review cycles start
- FlowContext.Workflow["ReviewQA.CorrectionsWereRequested"] = "false";
- FlowContext.Workflow.SaveField("ReviewQA.CorrectionsWereRequested");
- break;
- }
- }
- else if (IsActivity(PDOX.StandardActivities.DepartmentReview))
- {
- switch (e.EventName)
- {
- case "CompleteButton":
- UpdateReview();
- FlowContext.Workflow["ReviewQA.CorrectionsNeeded"] = "false";
- FlowContext.Workflow.SaveField("ReviewQA.CorrectionsNeeded");
- if (PDOX.CurrentUser.IsReviewCoordinator)
- {
- FlowContext.Workflow["DepartmentReview.ReviewersRequested"] = "false";
- FlowContext.Workflow.SaveField("DepartmentReview.ReviewersRequested");
- }
- break;
- case "SaveButton":
- UpdateReview();
- break;
- case "SaveCloseButton":
- UpdateReview();
- break;
- case "RequestReviewersButton":
- UpdateReview();
- RequestAdditionalReviewParticipants();
- this.Master.ClosePage();
- break;
- case "AssignReviewersButton":
- UpdateReviewGroups();
- AssignAdditionalReviewParticipants();
- UpdateReview();
- UpdateReviewCycle();
- //this.Master.ClosePage();
- break;
- case "CompleteReqestButton":
- FlowContext.CompleteTask();
- this.Master.ClosePage();
- break;
- }
- }
- else if (IsActivity(PDOX.StandardActivities.ReviewQA))
- {
- switch (e.EventName)
- {
- case "CompleteButton":
- UpdateReview();
- if (PDOX.Review.CycleCount > 2 && FlowContext.Workflow["ReviewQA.CorrectionsWereRequested"] == "true")
- {
- FlowContext.Workflow["AdditionalFees.FeeRequired"] = "true";
- FlowContext.Workflow.SaveField("AdditionalFees.FeeRequired");
- }
- FlowContext.Workflow["ReviewQA.CorrectionsNeeded"] = "false";
- FlowContext.Workflow.SaveField("ReviewQA.CorrectionsNeeded");
- break;
- case "SaveButton":
- UpdateReview();
- break;
- case "SaveCloseButton":
- UpdateReview();
- break;
- case "AssignCorrectionsButton":
- AssignCorrectors();
- // save everybody
- SaveReview(PDOX.Review.CurrentCycle, PDOX.AssignmentTypes.Unknown.ToString(), "", "");
- FlowContext.CompleteTask();
- this.Master.ClosePage();
- break;
- }
- }
- else if (IsActivity("ReviewComplete"))
- {
- // if the review is rejected then we have to go through another cycle
- // so increment the CurrentCycle and update the dataset which will be persisted in MD
- PrepareReviewCompletion();
- switch (e.EventName)
- {
- case "RejectButton":
- RejectReview();
- break;
- case "ApproveButton":
- UpdateReview();
- UpdatePostReviewActivityParticipants(PDOX.Review.CurrentCycle);
- AcceptReview();
- break;
- }
- }
- else if (IsActivity("AdditionalFees"))
- {
- if (FeesRequired.Checked)
- FlowContext.Workflow["AdditionalFees.FeeRequired"] = "true";
- else
- FlowContext.Workflow["AdditionalFees.FeeRequired"] = "false";
- FlowContext.Workflow.SaveField("AdditionalFees.FeeRequired");
- }
- else if (IsActivity("ApplicantResubmit"))
- {
- switch (e.EventName)
- {
- case "CompleteButton":
- PDOX.Review.CurrentCycle++;
- AddNewReviewCycle();
- break;
- }
- if (SwitchToPaper.Checked)
- FlowContext.Workflow["ApplicantResubmit.SwitchToPaper"] = "true";
- else
- FlowContext.Workflow["ApplicantResubmit.SwitchToPaper"] = "false";
- FlowContext.Workflow.SaveField("ApplicantResubmit.SwitchToPaper");
- FlowContext.Workflow["ResubmitReceived.PEDDSCorrect"] = "false";
- FlowContext.Workflow.SaveField("ResubmitReceived.PEDDSCorrect");
- }
- else if (IsActivity("ResubmitReceived"))
- {
- if (PEDDSCorrect.Checked)
- FlowContext.Workflow["ResubmitReceived.PEDDSCorrect"] = "true";
- else
- FlowContext.Workflow["ResubmitReceived.PEDDSCorrect"] = "false";
- FlowContext.Workflow.SaveField("ResubmitReceived.PEDDSCorrect");
- switch (e.EventName)
- {
- case "ApproveButton":
- UpdateReviewGroups();
- UpdateReviewCycle();
- // clear DepartmentReview Participants first
- // so we only get selected groups
- FlowContext.Workflow["DepartmentReview.GroupNames"] = "";
- FlowContext.Workflow.SaveField("DepartmentReview.GroupNames");
- FlowContext.Workflow["DepartmentReview.UserEmails"] = "";
- FlowContext.Workflow.SaveField("DepartmentReview.UserEmails");
- // now assign selected groups
- AssignDepartmentReviewParticipants();
- // reset this flag to true so WhileReviewIncorrect loop
- // will run when workflow comes around to department review
- FlowContext.Workflow["ReviewQA.CorrectionsNeeded"] = "true";
- FlowContext.Workflow.SaveField("ReviewQA.CorrectionsNeeded");
- break;
- }
- }
- else if (IsActivity("ApplicantPEDDS"))
- {
- switch (e.EventName)
- {
- case "CompleteButton":
- if (PEDDSCorrect.Checked)
- FlowContext.Workflow["ResubmitReceived.PEDDSCorrect"] = "true";
- else
- FlowContext.Workflow["ResubmitReceived.PEDDSCorrect"] = "false";
- FlowContext.Workflow.SaveField("ResubmitReceived.PEDDSCorrect");
- break;
- }
- }
- else if (IsActivity("BatchStamps"))
- {
- switch (e.EventName)
- {
- case "ProjectExportButton":
- string DestinationFolderPath = @"\\miamibeach1275\ProjectExportFolder";
- Export(DestinationFolderPath);
- break;
- }
- }
- else if (IsActivity("GroupPreScreen"))
- {
- switch (e.EventName)
- {
- case "VoidReviewButton":
- VoidReview();
- break;
- }
- }
- //FlowContext.Workflow.SaveFields();
- //
- // Bind Repeater DataSets
- //
- BindReviewGroupsData(PDOX.Review.SelectedCycle);
- BindReviewCycleData(PDOX.Review.SelectedCycle);
- }
- //TODO: Need the 3rd folder name!!!!
- //Export the Drawings, Documents and ??? folders and all files contained in these folders to DestinationFolderPath
- private void Export(string DestinationFolderPath)
- {
- StringBuilder folderIDs = new StringBuilder(); //all folder IDs
- StringBuilder fileIdList = new StringBuilder(); //all file IDs
- GetFolderFileIDs(FlowContext, "Approved DERM - WASD", folderIDs, fileIdList);
- GetFolderFileIDs(FlowContext, "Approved Copy", folderIDs, fileIdList);
- GetFolderFileIDs(FlowContext, "Approved Supporting Documents,", folderIDs, fileIdList);
- DebugMessage("FolderID List: " + folderIDs.ToString());
- DebugMessage("FileID List: " + fileIdList.ToString());
- bool ArchiveEntireProject = false; //only export the files and folds who's IDs were returned from GetFolderFileIDs()
- bool IncludeMetadata = true;
- bool IncludeIncoming = false; //TODO: Once the bug in PDProject.ProjectExport concerning IncludeIncoming (which throws an exception if true) is fixed, then flip that param to true.
- bool IncludeTopicNotes = true;
- bool IncludeAllVersions = true;
- bool OutputZip = true;
- bool OutputFileSystem = true;
- string Output3rdParty = String.Empty;
- ProjectDoxProject PDProjectWebService = new ProjectDoxProject();
- PDProjectWebService.ProcessExport(FlowContext.Project.Name, fileIdList.ToString(), folderIDs.ToString(), ArchiveEntireProject, DestinationFolderPath, IncludeMetadata, IncludeIncoming,
- IncludeTopicNotes, IncludeAllVersions, OutputZip, OutputFileSystem, Output3rdParty, Req.SessionUser.Email, GlobalVariables.SecurityToken);
- }
- //Gets the folder and file IDs and returns them in the StringBuilder parmas
- private static void GetFolderFileIDs(WorkflowContext FlowContext, string folderName, StringBuilder folderIDs, StringBuilder fileIdList)
- {
- PDFolder pdFolder = new PDFolder(FlowContext.Project.ProjectID, 0, folderName);
- folderIDs.Append(pdFolder.FolderID);
- folderIDs.Append(",");
- PDFiles files = pdFolder.GetLatestFiles(PDFiles.FileOrderBy.FileRank);
- foreach (PDFile file in files.ItemList)
- {
- fileIdList.Append(file.FileID);
- fileIdList.Append(",");
- }
- }
- </script>
- <asp:Content ID="HeadContent" runat="server" EnableViewState="true" ContentPlaceHolderID="HeadContentPlaceHolder">
- <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
- <title>Plan Review Request Form</title>
- <style type="text/css">
- .CheckBoxList
- {
- height: 64px;
- overflow: auto;
- }
- .RepeaterTable td
- {
- padding: 5px;
- margin: 0;
- border-left: solid 1px #AAAACC;
- border-bottom: solid 1px #CCCCFF;
- }
- .QAField
- {
- width: 45%;
- }
- </style>
- <script language="javascript" src="../JavaScripts.js" type="text/javascript"></script>
- <script language="javascript" src="tooltip.js" type="text/javascript"></script>
- <script type="text/javascript">
- CompleteButtonClientID = '<%=this.Master.GetButton("CompleteButton").ClientID%>';
- function ShowWorkingPanel(Bubble)
- {
- // only show if bubbling up
- if (Bubble)
- {
- var IFrame = document.getElementById("WorkingFrame");
- IFrame.src = "Loader.htm";
- IFrame.style.display = "inline";
- }
- return Bubble;
- }
- function HideWorkingPanel(Bubble)
- {
- // always hide
- var WorkingPanel = document.getElementById("WorkingPanel");
- WorkingPanel.style.display = "none";
- WorkingPanel.style.visibility = "hidden";
- return Bubble;
- }
- // gets a specific kind of ElementType (i.e. checkbox) in a ParentID object (i.e. <div id="myDiv">)
- function GetFormElementsInParent(ParentID, ElementType)
- {
- var container = document.getElementById(ParentID); // get the main target element
- var Elems = new Array();
- if (container) // if the object is found then get the nodes in it
- {
- var FormElemType = '';
- if (ElementType.toLowerCase() == 'text' || ElementType.toLowerCase() == 'checkbox' || ElementType.toLowerCase() == 'radio' || ElementType.toLowerCase() == 'button' || ElementType.toLowerCase() == 'submit' || ElementType.toLowerCase() == 'reset' || ElementType.toLowerCase() == 'file' || ElementType.toLowerCase() == 'image' || ElementType.toLowerCase() == 'hidden' || ElementType.toLowerCase() == 'password')
- FormElemType = 'input';
- else if (ElementType.toLowerCase() == 'select-one' || ElementType.toLowerCase() == 'select-multiple')
- FormElemType = 'select';
- else
- FoemElemType = ElemType;
- // Get all the form elements within the container elements
- var sub_elements = container.getElementsByTagName(FormElemType);
- // Loop through all the elements within the target element
- for (var i = 0; i < sub_elements.length; i++)
- {
- if (sub_elements[i].type == ElementType.toLowerCase())
- {
- Elems[Elems.length] = sub_elements[i];
- }
- }
- }
- return Elems;
- }
- // verify the user has selected at least one reviewer
- function CheckReviewers()
- {
- var Found = false;
- var Objs = GetFormElementsInParent('<%=ReviewGroupsPanel.ClientID%>', 'checkbox');
- for (var i = 0; i < Objs.length; i++)
- {
- if (Objs[i].id.endsWith('RG_GroupSelect') && Objs[i].checked) // look for the main "select group" checkbox
- {
- Found = true;
- break;
- }
- }
- if (Found)
- {
- return CompleteConfirm();
- }
- else
- {
- alert("You must choose at least one reviewer");
- return false;
- }
- }
- function CheckDepartmentReview()
- {
- var Found = false;
- var Objs = GetFormElementsInParent('<%=ReviewFieldSet.ClientID%>', 'select-one');
- // look for the changestatus dropdown that is enabled (i.e. our current group)
- for (var i = 0; i < Objs.length; i++)
- {
- if (
- Objs[i].id.endsWith('RC_ChangeStatus')
- && Objs[i].selectedIndex == 0
- && Objs[i].enabled == true
- )
- {
- Found = true;
- break;
- }
- }
- if (!Found)
- {
- return CompleteConfirm();
- }
- else
- {
- alert("You must choose a status for the review");
- return false;
- }
- }
- // confirms user has checked the recevied payment box
- function CheckAwaitingPayment()
- {
- if (!document.aspnetForm.elements['<%=AwaitingFinalPaymentReceived.UniqueID%>'].checked)
- {
- alert("You must verify that you have received payment");
- return false;
- }
- else
- return true;
- }
- //Validte CHeckbox Prescreen
- function ShowHideByCheckbox(chkBoxID, elementID)
- {
- if (document.aspnetForm.elements[chkBoxID].checked)
- {
- document.getElementById(elementID).disabled = false;
- }
- else
- {
- document.getElementById(elementID).disabled = true;
- }
- }
- //Validte CHeckbox DepartmentReview
- function ShowHideByCheckboxDeptReview(chkBoxID, elementID)
- {
- //alert(chkBoxID + "-" + elementID);
- if (document.aspnetForm.elements[chkBoxID].checked)
- {
- document.getElementById(elementID).disabled = false;
- }
- else
- {
- document.getElementById(elementID).disabled = true;
- }
- }
- //Validate checkbox on ApplicantResubmit
- function ShowHideByCheckboxApp(elementID)
- {
- //alert(chkBoxID + "-" + elementID);
- if (document.aspnetForm.elements['<%=AppResubStep1.UniqueID%>'].checked && document.aspnetForm.elements['<%=AppResubStep2.UniqueID%>'].checked && document.aspnetForm.elements['<%=AppResubStep3.UniqueID%>'].checked)
- {
- document.getElementById(elementID).disabled = false;
- }
- else
- {
- document.getElementById(elementID).disabled = true;
- }
- }
- //Validate checkbox on Batch Stamp
- function ShowHideByCheckboxBatch(elementID)
- {
- //alert(chkBoxID + "-" + elementID);
- if (document.aspnetForm.elements['<%=Batch1.UniqueID%>'].checked && document.aspnetForm.elements['<%=Batch2.UniqueID%>'].checked)
- {
- document.getElementById(elementID).disabled = false;
- }
- else
- {
- document.getElementById(elementID).disabled = true;
- }
- }
- function FinalizeMarkup(MarkupArray)
- {
- var markups = document.aspnetForm.elements['<%=AttachedMarkups.ClientID%>'].value;
- for (var i = 0; i < MarkupArray.length; i++)
- {
- if (markups != "")
- {
- markups += ";";
- }
- markups +=
- MarkupArray[i].URL
- + "," + MarkupArray[i].Name
- + "," + MarkupArray[i].ID
- + "," + MarkupArray[i].File
- + "," + '<%=PDOX.CurrentUser.GroupName%>'
- + "," + '<%=PDOX.Review.CurrentCycle%>';
- }
- document.aspnetForm.elements['<%=AttachedMarkups.ClientID%>'].value = markups;
- __doPostBack('<%=AttachedMarkups.UniqueID%>', '');
- }
- function RemoveMarkupLink_Click(id)
- {
- //make sure there are no spaces
- var ID = trim(id);
- //get the current markups
- var markups = document.aspnetForm.elements['<%=AttachedMarkups.ClientID%>'].value;
- var splitMarkups = markups.split(";");
- var newMarkupList = "";
- //loop through all markups and remove the selected markup
- for (var i = 0; i < splitMarkups.length; i++)
- {
- if (trim(splitMarkups[i]) !== "")
- {
- var markup = splitMarkups[i].split(",");
- var found = false;
- //IDs match so remove it
- if (ID === trim(markup[2]))
- {
- found = true;
- }
- //only add the non-selected markups on a component by component bases
- if (found === false)
- {
- for (var j = 0; j < markup.length; j++)
- {
- newMarkupList = newMarkupList + markup[j] + ",";
- }
- newMarkupList = newMarkupList + ";";
- }
- }
- }
- //populate the hidden field with all the correct markups
- document.aspnetForm.elements['<%=AttachedMarkups.ClientID%>'].value = newMarkupList;
- __doPostBack('<%=AttachedMarkups.UniqueID%>', '');
- }
- </script>
- </asp:Content>
- <asp:Content ID="BodyContent" runat="server" EnableViewState="true" ContentPlaceHolderID="BodyContentPlaceHolder">
- <asp:Panel ID="LogoPanel" runat="server" EnableViewState="true" CssClass="SectionPanel"
- Width="100%">
- <asp:Panel ID="LogoPanelImage" runat="server" EnableViewState="true" CssClass="LogoImage" />
- </asp:Panel>
- <asp:Panel ID="PermitPanel" runat="server" EnableViewState="true" CssClass="SectionPanel"
- Visible="false" Style="left: 0px; top: 0px" Width="100%">
- <asp:Panel ID="PermitHeader" runat="server" EnableViewState="true" CssClass="SectionPanelHeader"
- Width="100%">
- Permit Overview
- </asp:Panel>
- <asp:Panel ID="PermitFieldSet1" runat="server" EnableViewState="true" CssClass="TwoColumnFieldSet"
- Width="48%">
- <span class="WideFieldLabel">Permit #</span>
- <asp:TextBox ID="PermitNumber" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Permit Description</span>
- <asp:TextBox ID="PermitDescription" TextMode="multiline" rows="4" Wrap="true" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Permit Type</span>
- <asp:TextBox ID="PermitType" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Permit Subtype</span>
- <asp:TextBox ID="PermitSubType" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Subtype Description</span>
- <asp:TextBox ID="SubtypeDescription" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Permit Parcel #</span>
- <asp:TextBox ID="PermitParcelNumber" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Permit Location</span>
- <asp:TextBox ID="PermitLocation" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Permit Title</span>
- <asp:TextBox ID="PermitTitle" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Permit Status</span>
- <asp:TextBox ID="PermitStatus" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Substantial Improvements</span>
- <asp:TextBox ID="SubstantialImprovements" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel"># of Buildings</span>
- <asp:TextBox ID="BuildingCount" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel"># of Units</span>
- <asp:TextBox ID="UnitCount" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Permit Valuation</span>
- <asp:TextBox ID="PermitValuation" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Permit Area Under Roof</span>
- <asp:TextBox ID="PermitAUR" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Building Construction Type</span>
- <asp:TextBox ID="BuildingConsType" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Special Projects</span>
- <asp:TextBox ID="SpecialProjects" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Private Provider</span>
- <asp:TextBox ID="PrivateProvider" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">City Projects</span>
- <asp:TextBox ID="CityProjects" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Building Height</span>
- <asp:TextBox ID="BuildingHeight" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Occupancy Content</span>
- <asp:TextBox ID="OccupancyContent" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- </asp:Panel>
- <asp:Panel ID="PermitFieldSet2" runat="server" EnableViewState="true" CssClass="TwoColumnFieldSet"
- Width="48%">
- <span class="WideFieldLabel">Applicant Name</span>
- <asp:TextBox ID="ApplicantName" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Applicant Phone</span>
- <asp:TextBox ID="ApplicantPhone" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Applicant Email Address</span>
- <asp:TextBox ID="ApplicantEmail" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Permit Occupancy Class</span>
- <asp:TextBox ID="PermitOccClass" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Applicant Cell</span>
- <asp:TextBox ID="ApplicantCell" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Applicant Fax</span>
- <asp:TextBox ID="ApplicantFax" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Applied Date</span>
- <asp:TextBox ID="AppliedDate" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Entered Date</span>
- <asp:TextBox ID="EnteredDate" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Total SQFT</span>
- <asp:TextBox ID="TotalSqft" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Zoning</span>
- <asp:TextBox ID="Zoning" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">HUD</span>
- <asp:TextBox ID="HUD" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">LEED</span>
- <asp:TextBox ID="LEED" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Building Stories</span>
- <asp:TextBox ID="BuildingStories" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- <span class="WideFieldLabel">Building Asbly Occupancy</span>
- <asp:TextBox ID="BuildingAssmemblyOccupancy" runat="server" EnableViewState="true"
- CssClass="WideField"></asp:TextBox>
- <br class="Clear" />
- </asp:Panel>
- <br class="Clear" />
- <br />
- <asp:Panel ID="ArchitectFieldSet" runat="server" EnableViewState="true" CssClass="ThreeColumnFieldSet"
- Width="32%">
- <asp:Panel ID="ArchitectFieldSetHeader" runat="server" EnableViewState="true" CssClass="FieldSetHeader"
- Width="100%">
- Architect
- </asp:Panel>
- <span class="NarrowFieldLabel">Name</span>
- <asp:TextBox ID="ArchitectName" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
- <br class="Clear" />
- <span class="NarrowFieldLabel">Phone #</span>
- <asp:TextBox ID="ArchitectPhone" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
- <br class="Clear" />
- <span class="NarrowFieldLabel">Cell #</span>
- <asp:TextBox ID="ArchitectCell" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
- <br class="Clear" />
- <span class="NarrowFieldLabel">Fax #</span>
- <asp:TextBox ID="ArchitectFax" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
- <br class="Clear" />
- <span class="NarrowFieldLabel">Email</span>
- <asp:TextBox ID="ArchitectEmail" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
- <br class="Clear" />
- </asp:Panel>
- <asp:Panel ID="ContractorFieldSet" runat="server" EnableViewState="true" CssClass="ThreeColumnFieldSet"
- Width="32%">
- <asp:Panel ID="ContractorFieldSetHeader" runat="server" EnableViewState="true" CssClass="FieldSetHeader"
- Width="100%">
- Contractor
- </asp:Panel>
- <span class="NarrowFieldLabel">Name</span>
- <asp:TextBox ID="ContractorName" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
- <br class="Clear" />
- <span class="NarrowFieldLabel">Phone #</span>
- <asp:TextBox ID="ContractorPhone" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
- <br class="Clear" />
- <span class="NarrowFieldLabel">Cell #</span>
- <asp:TextBox ID="ContractorCell" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
- <br class="Clear" />
- <span class="NarrowFieldLabel">Fax #</span>
- <asp:TextBox ID="ContractorFax" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
- <br class="Clear" />
- <span class="NarrowFieldLabel">Email</span>
- <asp:TextBox ID="ContractorEmail" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
- <br class="Clear" />
- </asp:Panel>
- <asp:Panel ID="EngineerFieldSet" runat="server" EnableViewState="true" CssClass="ThreeColumnFieldSet"
- Width="32%">
- <asp:Panel ID="EngineerFieldSetHeader" runat="server" EnableViewState="true" CssClass="FieldSetHeader"
- Width="100%">
- Engineer
- </asp:Panel>
- <span class="NarrowFieldLabel">Name</span>
- <asp:TextBox ID="EngineerName" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
- <br class="Clear" />
- <span class="NarrowFieldLabel">Phone #</span>
- <asp:TextBox ID="EngineerPhone" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
- <br class="Clear" />
- <span class="NarrowFieldLabel">Cell #</span>
- <asp:TextBox ID="EngineerCell" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
- <br class="Clear" />
- <span class="NarrowFieldLabel">Fax #</span>
- <asp:TextBox ID="EngineerFax" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
- <br class="Clear" />
- <span class="NarrowFieldLabel">Email</span>
- <asp:TextBox ID="EngineerEmail" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
- <br class="Clear" />
- </asp:Panel>
- <br class="Clear" />
- </asp:Panel>
- <asp:Panel ID="ReviewInfoPanel" runat="server" EnableViewState="true" CssClass="SectionPanel"
- Visible="false" Width="100%">
- <asp:Panel ID="ReviewInfoHeader" runat="server" EnableViewState="true" CssClass="SectionPanelHeader"
- Width="100%">
- Review Information
- </asp:Panel>
- <asp:Panel ID="ReviewInfoFieldSet" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
- Width="100%">
- <span class="LineFieldLabel">Review Coordinator</span>
- <asp:TextBox ID="ReviewCoordinator" runat="server" EnableViewState="true" CssClass="LineField"
- ReadOnly="true"></asp:TextBox>
- <br class="Clear" />
- <span class="LineFieldLabel">Review Cycle</span>
- <asp:TextBox ID="ReviewCycleText" runat="server" EnableViewState="true" CssClass="LineField"
- ReadOnly="true"></asp:TextBox>
- <br class="Clear" />
- <span class="LineFieldLabel">Workflow Name / Activity Name</span>
- <asp:TextBox ID="WorkflowPath" runat="server" EnableViewState="true" CssClass="LineField"
- ReadOnly="true"></asp:TextBox>
- <br class="Clear" />
- <span class="LineFieldLabel">Activity Instructions</span>
- <asp:TextBox ID="ActivityInstructions" runat="server" EnableViewState="true" CssClass="LineField"
- ReadOnly="true"></asp:TextBox>
- <br class="Clear" />
- <span class="LineFieldLabel">Current User Logon</span>
- <asp:TextBox ID="CurrentUserLogon" runat="server" EnableViewState="true" CssClass="LineField"
- ReadOnly="true"></asp:TextBox>
- <br class="Clear" />
- </asp:Panel>
- </asp:Panel>
- <asp:Panel ID="GroupPreScreenPanel" runat="server" EnableViewState="true" CssClass="SectionPanel"
- Visible="false" Style="left: 0px; top: 0px" Width="100%">
- <asp:Panel ID="GroupPreScreenHeader" runat="server" EnableViewState="true" CssClass="SectionPanelHeader" Width="100%">Pre Screen</asp:Panel>
- <asp:Panel ID="PreScreenReviewToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
- <table class="LineFieldAppTableSwitch">
- <tr align="left">
- <td align="left" bgcolor="" width="98%">
- <span class="hotspot"
- onmouseover="tooltip.show('Please review pre-screening notes and checklist in order to determine if a correction is need from the applicant');"
- onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img> Pre-Screen Review Instructions</span>
- </td>
- </tr>
- </table>
- </asp:panel>
- <asp:Panel ID="PreScreenToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
- <table class="LineFieldAppTableSwitch">
- <tr align="left">
- <td align="left" bgcolor="" width="98%">
- <span class="hotspot"
- onmouseover="tooltip.show('Please review the applicant drawings for completness and accuracy');"
- onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img> Pre-Screen Instructions</span>
- </td>
- </tr>
- </table>
- </asp:panel>
- <asp:Panel ID="PreScreenAppToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
- <table class="LineFieldAppTableSwitch">
- <tr align="left">
- <td align="left" bgcolor="" width="98%">
- <span class="hotspot"
- onmouseover="tooltip.show('Please review the notes in order to correct your drawings or documents for plan review');"
- onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img> Applicant Instructions</span>
- </td>
- </tr>
- </table>
- </asp:panel>
- <asp:Panel ID="GroupPreScreenFieldSet1" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
- Width="100%">
- <table class="PreScreenTable">
- <tr>
- <td width="30%"><span class="LineField">Router Clerk</span></td>
- <td width="75%">
- <div class="LineField">
- <a runat="server" id="PreScreenChecklistLink1" target="_blank">View Checklist</a>
- <br />
- <asp:TextBox ID="GroupPreScreenComments1" runat="server" EnableViewState="true" CssClass="LineField"
- TextMode="MultiLine" Rows="5"></asp:TextBox>
- <asp:DropDownList ID="GroupPreScreenAD1" runat="server" EnableViewState="true" CssClass="LineField">
- <asp:ListItem Text="Approved" Value="Approved" />
- <asp:ListItem Text="Denied" Value="Denied" />
- </asp:DropDownList><br />
- <asp:CheckBox ID="PreScreenChecklistRC" runat="server" OnClick="ShowHideByCheckbox(this.id ,CompleteButtonClientID)" Visible="true" EnableViewState="true"
- Text="Complete" />
- </div>
- </td>
- </tr>
- </table>
- <hr/>
- </asp:Panel>
- <asp:Panel ID="GroupPreScreenFieldSet2" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
- Width="100%">
- <table class="PreScreenTable">
- <tr>
- <td width="30%"><span class="LineField">B Building</span></td>
- <td width="75%">
- <div class="LineField">
- <a runat="server" id="PreScreenChecklistLink2" target="_blank">View Checklist</a><br />
- <asp:TextBox ID="GroupPreScreenComments2" runat="server" EnableViewState="true" CssClass="LineField"
- TextMode="MultiLine" Rows="5"></asp:TextBox>
- <asp:DropDownList ID="GroupPreScreenAD2" runat="server" EnableViewState="true" CssClass="LineField">
- <asp:ListItem Text="Approved" Value="Approved" />
- <asp:ListItem Text="Denied" Value="Denied" />
- </asp:DropDownList><br />
- <asp:CheckBox ID="PreScreenChecklistBLD" runat="server" OnClick="ShowHideByCheckbox(this.id ,CompleteButtonClientID)" Visible="true" EnableViewState="true"
- Text="Complete" />
- </div>
- </td>
- </tr>
- </table>
- <hr/>
- </asp:Panel>
- <asp:Panel ID="GroupPreScreenFieldSet3" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
- Width="100%">
- <table class="PreScreenTable">
- <tr>
- <td width="30%"><span class="LineField">B Governmental Compliance</span></td>
- <td width="75%">
- <div class="LineField">
- <a runat="server" id="PreScreenChecklistLink3" target="_blank">View Checklist</a><br />
- <asp:TextBox ID="GroupPreScreenComments3" runat="server" EnableViewState="true" CssClass="LineField"
- TextMode="MultiLine" Rows="5"></asp:TextBox>
- <asp:DropDownList ID="GroupPreScreenAD3" runat="server" EnableViewState="true" CssClass="LineField">
- <asp:ListItem Text="Approved" Value="Approved" />
- <asp:ListItem Text="Denied" Value="Denied" />
- </asp:DropDownList><br />
- <asp:CheckBox ID="PreScreenChecklistGC" runat="server" OnClick="ShowHideByCheckbox(this.id ,CompleteButtonClientID)" Visible="true" EnableViewState="true"
- Text="Complete" />
- </div>
- </td>
- </tr>
- </table>
- <hr/>
- </asp:Panel>
- </asp:Panel>
- <asp:Panel ID="ReviewGroupsPanel" runat="server" EnableViewState="true" CssClass="SectionPanel"
- Visible="false" Width="100%">
- <asp:Panel ID="ReviewersHeader" runat="server" EnableViewState="true" CssClass="SectionPanelHeader"
- Width="100%">Select Reviewers
- </asp:Panel>
- <asp:Panel ID="BeginReviewToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
- <table class="LineFieldAppTableSwitch">
- <tr align="left">
- <td align="left" bgcolor="" width="98%">
- <span class="hotspot"
- onmouseover="tooltip.show('Please select the necessary departments below and click the Begin Review button at the bottom of the form.');"
- onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img> Begin Review Instructions</span>
- </td>
- </tr>
- </table>
- </asp:panel>
- <asp:Panel ID="ReReviewToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
- <table class="LineFieldAppTableSwitch">
- <tr align="left">
- <td align="left" bgcolor="" width="98%">
- <span class="hotspot"
- onmouseover="tooltip.show('Please identify if PEDDS is correct before compelting the task. In additon, if Switch to Paper has been selected you can remove the request if needed.');"
- onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img> ReReview Instructions</span>
- </td>
- </tr>
- </table>
- </asp:panel>
- <table style="width: 100%" class="RepeaterHeaderTable">
- <tr>
- <td style="width: 10%">
- <div style="width: 100%; text-align: center">Cycle</div>
- </td>
- <td style="width: 12%">
- <div style="width: 100%; text-align: center">Select</div>
- </td>
- <td style="width: 25%">
- <div style="width: 100%; text-align: center">Department</div>
- </td>
- <td style="width: 20%">
- <div style="width: 100%; text-align: center">Assignment</div>
- </td>
- <td style="width: 35%">
- <div style="width: 100%; text-align: center">Reviewer</div>
- </td>
- </tr>
- </table>
- <div style="width:100%; height:auto; overflow:auto;">
- <table style="width: 98%" class="RepeaterTable">
- <asp:Repeater ID="ReviewGroupsRepeater" runat="server" EnableViewState="true" OnItemDataBound="ReviewGroupsRepeater_ItemDataBound">
- <ItemTemplate>
- <asp:PlaceHolder ID="RG_GroupRowPlaceHolder" runat="server">
- <tr style="background-color: #d3d9e9">
- <td style="width: 10%">
- <asp:Label ID="RG_ReviewCycle" runat="server" EnableViewState="true"></asp:Label>
- </td>
- <td style="width: 10%">
- <asp:CheckBox ID="RG_GroupSelect" runat="server" EnableViewState="true"></asp:CheckBox>
- </td>
- <td style="width: 25%" class="RepeaterTableLeft" >
- <asp:Label ID="RG_GroupName" runat="server" EnableViewState="true"></asp:Label>
- </td>
- <td style="width: 20%">
- <asp:DropDownList ID="RG_AssignmentType" runat="server" EnableViewState="true">
- <asp:ListItem Text="First In Group" Value="FirstInGroup" />
- <asp:ListItem Text="Individual" Value="Individual" />
- </asp:DropDownList>
- </br>
- <asp:CheckBox ID="RG_PerformReview" runat="server" Visible="false" EnableViewState="true"
- Text="Perform Review" />
- </td>
- <td style="width: 28%">
- <div style="width:85%; height:45px; overflow:auto;" class="CheckBoxList">
- <asp:CheckBoxList ID="RG_GroupUsers" runat="server" EnableViewState="true">
- </asp:CheckBoxList>
- </div>
- </td>
- </tr>
- </asp:PlaceHolder>
- </ItemTemplate>
- <AlternatingItemTemplate>
- <asp:PlaceHolder ID="RG_GroupRowPlaceHolder" runat="server">
- <tr style="background-color: #9daace">
- <td style="width: 10%">
- <asp:Label ID="RG_ReviewCycle" runat="server" EnableViewState="true"></asp:Label>
- </td>
- <td style="width: 10%">
- <asp:CheckBox ID="RG_GroupSelect" runat="server" EnableViewState="true"></asp:CheckBox>
- </td>
- <td style="width: 25%" class="RepeaterTableLeft">
- <asp:Label ID="RG_GroupName" runat="server" EnableViewState="true"></asp:Label>
- </td>
- <td style="width: 20%">
- <asp:DropDownList ID="RG_AssignmentType" runat="server" EnableViewState="true">
- <asp:ListItem Text="First In Group" Value="FirstInGroup" />
- <asp:ListItem Text="Individual" Value="Individual" />
- </asp:DropDownList>
- </br>
- <asp:CheckBox ID="RG_PerformReview" runat="server" Visible="false" EnableViewState="true"
- Text="Perform Review" />
- </td>
- <td style="width: 28%">
- <div style="width:85%; height:45px; overflow:auto;" class="CheckBoxList">
- <asp:CheckBoxList ID="RG_GroupUsers" runat="server" EnableViewState="true">
- </asp:CheckBoxList>
- </div>
- </td>
- </tr>
- </asp:PlaceHolder>
- </AlternatingItemTemplate>
- </asp:Repeater>
- </table>
- </div>
- <%--
- <asp:Button ID="AssignReviewersButton" Text="Assign Selected Reviewers" runat="server"
- EnableViewState="true" OnClick="AssignReviewers_Click" />
- --%>
- </asp:Panel>
- <asp:Panel ID="ReviewCyclePanel" runat="server" EnableViewState="true" CssClass="SectionPanel"
- Visible="false" Width="100%">
- <asp:Panel ID="ReviewHeader" runat="server" EnableViewState="true" CssClass="SectionPanelHeader"
- Width="100%" Visible="true">
- Department Review - <span style="font-weight: normal; font-size: smaller">Review Cycle:</span>
- <asp:ListBox ID="SelectedReviewCycle" Rows="1" runat="server" EnableViewState="true"
- AutoPostBack="true"></asp:ListBox>
- </asp:Panel>
- <asp:Panel ID="ReviewerToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
- <table class="LineFieldAppTableSwitch">
- <tr align="left">
- <td align="left" bgcolor="" width="98%">
- <span class="hotspot"
- onmouseover="tooltip.show('Once drawings are reviewed and checklist complete: <br> 1. Select status <br> 2. Provide notes <br> 3. Attach Markups if needed <br> 4. Check <b>Plan Review Complete</b> <br> 5. Click <b>Complete Review</b>');"
- onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img> Reviewer Instructions</span>
- </td>
- </tr>
- </table>
- </asp:panel>
- <asp:Panel ID="ApplicantToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
- <table class="LineFieldAppTableSwitch">
- <tr align="left">
- <td align="left" bgcolor="" width="98%">
- <span class="hotspot"
- onmouseover="tooltip.show('Please reviwew comments and markups prior to completing the checkbox below and completing the task.');"
- onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img> Applicant Instructions</span>
- </td>
- </tr>
- </table>
- </asp:panel>
- <asp:Panel ID="QAToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
- <table class="LineFieldAppTableSwitch">
- <tr align="left">
- <td align="left" bgcolor="" width="98%">
- <span class="hotspot"
- onmouseover="tooltip.show('Please review reviewer notes for completeness and if necessary send back for a correction.');"
- onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img> QA Instructions</span>
- </td>
- </tr>
- </table>
- </asp:panel>
- <asp:Panel ID="ReviewCompleteToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
- <table class="LineFieldAppTableSwitch">
- <tr align="left">
- <td align="left" bgcolor="" width="98%">
- <span class="hotspot"
- onmouseover="tooltip.show('Based on the reviewer status the appropriate button will be displayed at the bottom of the form.');"
- onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img> Review Complete Instructions</span>
- </td>
- </tr>
- </table>
- </asp:panel>
- <asp:Panel ID="ReviewFieldSet" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
- Visible="true">
- <table class="RepeaterHeaderTable">
- <tr>
- <td style="width: 3%">Cycle</td>
- <td style="width: 6%">Department</td>
- <td style="width: 5%">Reviewer</td>
- <td style="width: 8%">Status</td>
- <td style="width: 10%">Review</td>
- </tr>
- </table>
- <div style="width:99%; height:auto; overflow:auto;">
- <table class="RepeaterTable">
- <asp:Repeater ID="ReviewCycleRepeater" runat="server" EnableViewState="true" OnItemDataBound="ReviewCycleRepeater_ItemDataBound" Visible="true">
- <ItemTemplate>
- <asp:PlaceHolder ID="RC_CycleRowPlaceHolder" runat="server">
- <tr style="background-color: #d3d9e9">
- <td style="width: 2%">
- <asp:CheckBox ID="RC_GroupSelect" runat="server" Visible="false" EnableViewState="true"></asp:CheckBox>
- </td>
- <td style="width: 10%">
- <asp:Label ID="RC_ReviewCycle" runat="server" Visible="true" EnableViewState="true"></asp:Label>
- </td>
- <td style="width: 15%">
- <asp:Label ID="RC_GroupName" runat="server" Visible="true" EnableViewState="true"></asp:Label>
- </td>
- <td style="width: 22%">
- <asp:Label ID="RC_ReviewerName" runat="server" Visible="true" EnableViewState="true"></asp:Label>
- <br />
- <asp:Label ID="RC_ReviewerEmail" runat="server" Visible="true" EnableViewState="true"></asp:Label>
- <br />
- <br />
- Assigned By:
- <br />
- <asp:Label ID="RC_AssignedBy" runat="server" Visible="true" EnableViewState="true"></asp:Label>
- <br />
- <br />
- Assignment Type:
- <br />
- <asp:Label ID="RC_AssignmentType" runat="server" EnableViewState="true"></asp:Label>
- </td>
- <td style="width: 60%">
- <asp:CheckBox ID="RC_PerformReview" runat="server" EnableViewState="true" Visible="true"
- Style="float: left;" Text="Perform Review" />
- <br style="clear: both" />
- <asp:Panel ID="RC_ReviewPanel" runat="server" EnableViewState="true" Visible="false"
- Style="width: 100%">
- <table style="width: 100%">
- <tr>
- <td style="width: 10%">
- <asp:Label ID="RC_ReviewStatus" runat="server" EnableViewState="true" Visible="false"></asp:Label>
- <asp:DropDownList ID="RC_ChangeStatus" runat="server" EnableViewState="true">
- </asp:DropDownList>
- </td>
- <td style="border: solid; width: 90%">
- <asp:CheckBox ID="RC_AssignCorrections" runat="server" EnableViewState="true" Text="Assign Correction"/>
- <br />
- <asp:Panel ID="RC_QAFieldSet" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
- Visible="true">
- <%-- need divs here. --%>
- <table style="width: 100%">
- <tr>
- <td style="border: solid; width: 50%">
- QA Request:
- <asp:TextBox ID="RC_QARequest" runat="server" EnableViewState="true" TextMode="MultiLine"
- Rows="3" Style="width: 95%"></asp:TextBox>
- </td>
- <td style="border: solid; width: 50%">
- QA Response:
- <asp:TextBox ID="RC_QAResponse" runat="server" EnableViewState="true" TextMode="MultiLine"
- Rows="3" Style="width: 95%"></asp:TextBox>
- </td>
- </tr>
- </table>
- <br class="Clear" />
- </asp:Panel>
- <asp:Panel ID="RC_ReviewCommentsPanel" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet">
- <asp:TextBox ID="RC_ReviewComments" runat="server" Rows="5" EnableViewState="true"
- CssClass="LineField" Style="width: 95%" TextMode="MultiLine"></asp:TextBox><br>
- <a runat="server" id="ChecklistLink" target="_blank">View Checklist</a><br />
- <%-- link to checklist form for each group --%>
- </asp:Panel>
- </td>
- </tr>
- <tr><td align="center" colspan="2" style="background-color:#D6D8D4; text-align:center">
- <asp:CheckBox ID="DeptReviewChk" runat="server" OnClick="ShowHideByCheckboxDeptReview(this.id ,CompleteButtonClientID)" Visible="true" EnableViewState="true" Text="Plan Review Complete" />
- </td></tr>
- </table>
- </asp:Panel>
- </td>
- </tr>
- </asp:PlaceHolder>
- </ItemTemplate>
- <AlternatingItemTemplate>
- <asp:PlaceHolder ID="RC_CycleRowPlaceHolder" runat="server">
- <tr style="background-color: #9daace">
- <td style="width: 2%">
- <asp:CheckBox ID="RC_GroupSelect" runat="server" Visible="false" EnableViewState="true"></asp:CheckBox>
- </td>
- <td style="width: 10%">
- <asp:Label ID="RC_ReviewCycle" runat="server" Visible="true" EnableViewState="true"></asp:Label>
- </td>
- <td style="width: 15%">
- <asp:Label ID="RC_GroupName" runat="server" Visible="true" EnableViewState="true"></asp:Label>
- </td>
- <td style="width: 22%">
- <asp:Label ID="RC_ReviewerName" runat="server" Visible="true" EnableViewState="true"></asp:Label>
- <br />
- <asp:Label ID="RC_ReviewerEmail" runat="server" Visible="true" EnableViewState="true"></asp:Label>
- <br />
- <br />
- Assigned By:
- <br />
- <asp:Label ID="RC_AssignedBy" runat="server" Visible="true" EnableViewState="true"></asp:Label>
- <br />
- <br />
- Assignment Type:
- <br />
- <asp:Label ID="RC_AssignmentType" runat="server" EnableViewState="true"></asp:Label>
- </td>
- <td style="width: 60%">
- <asp:CheckBox ID="RC_PerformReview" runat="server" EnableViewState="true" Visible="true"
- Style="float: left;" Text="Perform Review" />
- <br style="clear: both" />
- <asp:Panel ID="RC_ReviewPanel" runat="server" EnableViewState="true" Visible="false"
- Style="width: 100%">
- <table style="width: 100%">
- <tr>
- <td style="width: 10%">
- <asp:Label ID="RC_ReviewStatus" runat="server" EnableViewState="true" Visible="false"></asp:Label>
- <asp:DropDownList ID="RC_ChangeStatus" runat="server" EnableViewState="true">
- </asp:DropDownList>
- </td>
- <td style="width: 90%">
- <asp:CheckBox ID="RC_AssignCorrections" runat="server" EnableViewState="true" Text="Assign Correction"/>
- <br />
- <asp:Panel ID="RC_QAFieldSet" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
- Visible="true">
- <%-- need divs here. --%>
- <table style="width: 100%">
- <tr>
- <td style="border: none; width: 50%">
- QA Request:
- <asp:TextBox ID="RC_QARequest" runat="server" EnableViewState="true" TextMode="MultiLine"
- Rows="3" Style="width: 95%"></asp:TextBox>
- </td>
- <td style="width: 50%">
- QA Response:
- <asp:TextBox ID="RC_QAResponse" runat="server" EnableViewState="true" TextMode="MultiLine"
- Rows="3" Style="width: 95%"></asp:TextBox>
- </td>
- </tr>
- </table>
- <br class="Clear" />
- </asp:Panel>
- <asp:Panel ID="RC_ReviewCommentsPanel" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet">
- <asp:TextBox ID="RC_ReviewComments" runat="server" Rows="5" EnableViewState="true"
- CssClass="LineField" Style="width: 95%" TextMode="MultiLine"></asp:TextBox><br>
- <a runat="server" id="ChecklistLink" target="_blank">View Checklist</a><br />
- <%-- link to checklist form for each group --%>
- </asp:Panel>
- </td>
- </tr>
- <tr><td align="center" colspan="2" style="background-color:#C8C8C8; text-align:center">
- <asp:CheckBox ID="DeptReviewChk" runat="server" OnClick="ShowHideByCheckboxDeptReview(this.id ,CompleteButtonClientID)" Visible="true" EnableViewState="true" Text="Plan Review Complete" />
- </td></tr>
- </table>
- </asp:Panel>
- </td>
- </tr>
- </asp:PlaceHolder>
- </AlternatingItemTemplate>
- </asp:Repeater>
- </table>
- </div>
- <%--
- <asp:Button ID="AssignCorrectionsButton" Text="Assign Corrections" runat="server"
- EnableViewState="true" OnClick="AssignCorrections_Click" Visible="false" />
- --%>
- </asp:Panel>
- <asp:Panel ID="ReviewGroupDetail" runat="server" EnableViewState="true" CssClass="ThreeColumnFieldSet" Visible="False">
- <asp:Label ID="ReviewerNameLabel" runat="server" EnableViewState="true" CssClass="NarrowFieldLabel"
- AssociatedControlID="ReviewerName">Reviewer</asp:Label>
- <asp:TextBox ID="ReviewerName" runat="server" EnableViewState="true" CssClass="NarrowField"
- ReadOnly="true"></asp:TextBox>
- <br class="Clear" />
- <asp:Label ID="ReviewerEmailLabel" runat="server" EnableViewState="true" CssClass="NarrowFieldLabel"
- AssociatedControlID="ReviewerEmail"> Email</asp:Label>
- <asp:TextBox ID="ReviewerEmail" runat="server" EnableViewState="true" CssClass="NarrowField"
- ReadOnly="true"></asp:TextBox>
- <br class="Clear" />
- <asp:Label ID="AssignedByNameLabel" runat="server" EnableViewState="true" CssClass="NarrowFieldLabel"
- AssociatedControlID="AssignedByName">Assigned</asp:Label>
- <asp:TextBox ID="AssignedByName" runat="server" EnableViewState="true" CssClass="NarrowField"
- ReadOnly="true"></asp:TextBox>
- <br class="Clear" />
- <asp:Label ID="AssignedByEmailLabel" runat="server" EnableViewState="true" CssClass="NarrowFieldLabel"
- AssociatedControlID="AssignedByEmail"> Email</asp:Label>
- <asp:TextBox ID="AssignedByEmail" runat="server" EnableViewState="true" CssClass="NarrowField"
- ReadOnly="true"></asp:TextBox>
- <br class="Clear" />
- <asp:Label ID="ReviewStatusLabel" runat="server" EnableViewState="true" CssClass="NarrowFieldLabel"
- AssociatedControlID="ReviewStatus">Review Status</asp:Label>
- <asp:DropDownList ID="ReviewStatus" runat="server" EnableViewState="true" CssClass="NarrowField">
- <asp:ListItem Text="In Review" Selected="True" Value="InReview"></asp:ListItem>
- <asp:ListItem Text="Corrections Needed" Value="CorrectionsNeeded"></asp:ListItem>
- <asp:ListItem Text="Review" Value="ReviewComplete"></asp:ListItem>
- </asp:DropDownList>
- <br class="Clear" />
- <asp:Label ID="ReviewCommentsLabel" runat="server" EnableViewState="true" CssClass="WideFieldLabel"
- AssociatedControlID="ReviewComments">Reviewer Comments</asp:Label>
- <asp:TextBox ID="ReviewComments" runat="server" EnableViewState="true" CssClass="WideField"
- TextMode="MultiLine" Rows="5"></asp:TextBox>
- <br class="Clear" />
- <asp:Label ID="AttachmentsLabel" runat="server" EnableViewState="true" CssClass="NarrowFieldLabel">Attachments</asp:Label>
- <asp:Panel ID="AttachmentLinks" runat="server" EnableViewState="true" CssClass="NarrowField">
- <asp:HyperLink ID="HyperLink1" runat="server" EnableViewState="true" CssClass="AttachmentLink"
- Text="Attachment 1"></asp:HyperLink><br />
- <asp:HyperLink ID="HyperLink2" runat="server" EnableViewState="true" CssClass="AttachmentLink"
- Text="Attachment 2"></asp:HyperLink><br />
- <asp:HyperLink ID="HyperLink3" runat="server" EnableViewState="true" CssClass="AttachmentLink"
- Text="Attachment 3"></asp:HyperLink><br />
- <asp:HyperLink ID="HyperLink4" runat="server" EnableViewState="true" CssClass="AttachmentLink"
- Text="Attachment 4"></asp:HyperLink><br />
- </asp:Panel>
- </asp:Panel>
- <asp:Panel ID="QAFieldSet" runat="server" EnableViewState="true" CssClass="ThreeColumnFieldSet"
- Visible="false">
- <asp:CheckBox ID="QAAssignCorrection" runat="server" Text="Assign Correction" EnableViewState="true" Visible="true" />
- <br />
- <asp:Label ID="QARequestLabel" runat="server" EnableViewState="true" CssClass="WideFieldLabel"
- AssociatedControlID="QARequest">QA Request</asp:Label>
- <asp:TextBox ID="QARequest" runat="server" EnableViewState="true" CssClass="WideField"
- TextMode="MultiLine" Rows="5"></asp:TextBox>
- <br class="Clear" />
- <asp:Label ID="QAResponseLabel" runat="server" EnableViewState="true" CssClass="WideFieldLabel"
- AssociatedControlID="QAResponse">QA Response</asp:Label>
- <asp:TextBox ID="QAResponse" runat="server" EnableViewState="true" CssClass="WideField"
- TextMode="MultiLine" Rows="5"></asp:TextBox>
- <br class="Clear" />
- </asp:Panel>
- </asp:Panel>
- <asp:Panel ID="ReviewMarkupsPanel" runat="server" CssClass="SectionPanel" Visible="false" Width="100%">
- <asp:Panel ID="MarkupsPanel" runat="server" CssClass="SectionPanelHeader">Markups</asp:Panel>
- <asp:Panel ID="MarkupToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
- <table class="LineFieldAppTableSwitch">
- <tr align="left">
- <td align="left" bgcolor="" width="98%">
- <span class="hotspot"
- onmouseover="tooltip.show('Identify your markups below and attach to workflow for applicant to review.');"
- onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img> Markup Instructions</span>
- </td>
- </tr>
- </table>
- </asp:panel>
- <table style="width: 100%">
- <tr>
- <td style="width: 60%">
- <iframe width="100%" height="250" runat="server" id="MarkupListing"
- frameborder="1"></iframe>
- </td>
- <td style="width: 40%; vertical-align: top; text-align: left;">
- <table style="width: 100%; vertical-align: top; text-align: left;">
- <asp:Repeater ID="LinkedMarkupsRepeater" runat="server" OnItemDataBound="LinkedMarkupsRepeater_ItemDataBound">
- <HeaderTemplate>
- <tr>
- <td>Group</td>
- <td>Markup</td>
- <td>Action</td>
- </tr>
- </HeaderTemplate>
- <ItemTemplate>
- <tr style="background-color: #d3d9e9">
- <td><%# ((MarkUp)Container.DataItem).GroupName %></td>
- <td>
- <asp:HyperLink ID="MarkupLink" Target="_blank" runat="server"
- NavigateUrl="<%# ((MarkUp)Container.DataItem).URL%>"
- Text="<%# ((MarkUp)Container.DataItem).Name %>" />
- </td>
- <td>
- <asp:LinkButton ID="RemoveWF" runat="server"
- OnClientClick='<%# "RemoveMarkupLink_Click(\"" + ((MarkUp)Container.DataItem).ID + "\");"%>'
- Text="Remove" />
- </td>
- </tr>
- </ItemTemplate>
- <AlternatingItemTemplate>
- <tr style="background-color: #9daace">
- <td><%# ((MarkUp)Container.DataItem).GroupName %></td>
- <td>
- <asp:HyperLink ID="MarkupLink" Target="_blank" runat="server"
- NavigateUrl="<%# ((MarkUp)Container.DataItem).URL%>"
- Text="<%# ((MarkUp)Container.DataItem).Name %>" />
- </td>
- <td>
- <asp:LinkButton ID="RemoveWF" runat="server"
- OnClientClick='<%# "RemoveMarkupLink_Click(\"" + ((MarkUp)Container.DataItem).ID + "\");"%>'
- Text="Remove" />
- </td>
- </tr>
- </AlternatingItemTemplate>
- </asp:Repeater>
- </table>
- </td>
- </tr>
- </table>
- </asp:Panel>
- <asp:Panel ID="InstructionsPanel" runat="server" EnableViewState="true" CssClass="SectionPanel"
- Visible="true" Width="100%">
- <asp:Panel ID="InstructionsHeader" runat="server" EnableViewState="true" CssClass="SectionPanelHeader"
- Width="100%">Activity Instructions
- </asp:Panel>
- <asp:Panel ID="PreReviewInstructions" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet" Visible="false">
- <asp:Panel ID="PreReviewInstructionFieldSet" runat="server" EnableViewState="true"
- CssClass="OneColumnFieldSet" Visible="true">
- <div style="width: 100%">
- <span style=""></span>
- <ol>
- <li>If all necessary documents have been uploaded to begin the review, click the "Approve"
- button. This will start the review process.</li>
- <li>If certain items are missing or incorrect, provide the requested information in box below; click the "Reject"
- button.</li>
- </ol>
- </div>
- <span class="LineFieldLabel"></span>
- <table width="100%">
- <tr>
- <td>
- <div style="width: 100%; text-align: center">
- <asp:TextBox ID="PreNotes" runat="server" EnableViewState="true" CssClass=""
- Rows="5" TextMode="MultiLine" width="65%"></asp:TextBox>
- </div>
- </td>
- </tr>
- </table>
- </asp:Panel>
- </asp:Panel>
- <asp:Panel ID="PreRevAppInstructions" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
- Visible="false">
- <asp:Panel ID="PreRevAppInstructionFieldSet" runat="server" EnableViewState="true"
- CssClass="OneColumnFieldSet" Visible="true">
- <span class="LineFieldLabel"></span>
- <asp:Panel ID="VerifyPreRevPanel" runat="server" EnableViewState="true" CssClass="LineField">
- <asp:CheckBox ID="VerifyPreRevUpload" OnClick="ShowHideByCheckboxDeptReview(this.id ,CompleteButtonClientID)" runat="server" EnableViewState="true" />
- I have uploaded the corrected documents and/or drawings as indicated below.
- </asp:Panel>
- <div style="width: 100%">
- <br />
- <span style=""></span>
- </div>
- <table>
- <tr>
- <td width = "25%">
- <asp:Label ID="PreNotesAppLabel" runat="server" EnableViewState="true" CssClass="LineFieldLabel"
- AssociatedControlID="PreNotesApp"></asp:Label>
- </td>
- <td width="800px">
- <asp:TextBox ID="PreNotesApp" runat="server" EnableViewState="true" CssClass="LineField"
- Rows="5" TextMode="MultiLine"></asp:TextBox>
- </td>
- </tr>
- </table>
- </asp:Panel>
- </asp:Panel>
- <asp:Panel ID="AppResubmitInstructions" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
- Visible="false">
- <table width="95%" class="LineFieldAppTable">
- <tr>
- <td width="30px">
- <asp:Panel ID="AppResubStep1Panel" runat="server" EnableViewState="true" CssClass="LineFieldApp">
- <asp:CheckBox ID="AppResubStep1" OnClick="ShowHideByCheckboxApp(CompleteButtonClientID)" runat="server" EnableViewState="true" />
- </asp:Panel>
- </td>
- <td>
- I have reviewed and addressed the "Checklist Comments" provided on the form below.
- Please click on the link open the form and review each item. Each comment will be
- indicated as <span style="font-weight: bold">"Met"</span> or <span style="font-weight: bold">
- "Not Met"</span>. The total number of comments provided on the form is indicated
- in red below. If you would like to export a list of the comments to Excel, click
- on the Excel icon in the upper right hand corner of the popup window.
- </td>
- </tr>
- <tr>
- <td>
- <asp:Panel ID="AppResubStep2Panel" runat="server" EnableViewState="true" CssClass="LineFieldApp">
- <asp:CheckBox ID="AppResubStep2" OnClick="ShowHideByCheckboxApp(CompleteButtonClientID)" runat="server" EnableViewState="true" />
- </asp:Panel>
- </td>
- <td>
- I have addressed all of the items in the File Markups below that were identified
- during the Plan Review.
- </td>
- </tr>
- <tr>
- <td>
- <asp:Panel ID="AppResubStep3Panel" runat="server" EnableViewState="true" CssClass="LineFieldApp">
- <asp:CheckBox ID="AppResubStep3" OnClick="ShowHideByCheckboxApp(CompleteButtonClientID)" runat="server" EnableViewState="true" />
- </asp:Panel>
- </td>
- <td>
- I have uploaded the revised drawings into the "Submit Drawings" folder and, if requested,
- uploaded any revised documents into the "Submit Documents" folder using the SAME
- file name as the original files.
- </td>
- </tr>
- </table>
- <table class="LineFieldAppTableSwitch">
- <tr align="center">
- <td align="center" bgcolor="red" width="98%">
- <asp:Panel ID="SwitchToPaperPanel" runat="server" EnableViewState="true" CssClass="LineFieldApp">
- <asp:CheckBox ID="SwitchToPaper" runat="server" EnableViewState="true" />
- <span class="hotspot"
- onmouseover="tooltip.show('If you elect to Switch to paper the ePlan workflow will terminate.');"
- onmouseout="tooltip.hide();">
- <span style="font-weight: bold; color: #ffffff;">I wish to Switch To Paper</span></span>
- </asp:Panel>
- </td>
- </tr>
- </table>
- </asp:Panel>
- <asp:Panel ID="ResubmitReceivedInstructions" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
- Visible="false">
- <table width="95%">
- <tr>
- <td width="30px">
- <asp:Panel ID="ResubReceived" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet">
- <asp:CheckBox ID="PEDDSCorrect" runat="server" EnableViewState="true" />
- </asp:Panel>
- </td>
- <td>
- PEDDS Is Correct
- </td>
- </tr>
- </table>
- <table width="100%">
- <tr>
- <td>
- <div style="width: 100%; text-align: center">
- <asp:TextBox ID="PEDDSNotes" runat="server" EnableViewState="true" CssClass=""
- Rows="5" TextMode="MultiLine" width="65%"></asp:TextBox>
- </div>
- </td>
- </tr>
- </table
- </asp:Panel>
- <asp:Panel ID="ReviewCompletePanel" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
- Visible="false">
- <asp:Label ID="Label1" runat="server" EnableViewState="true" CssClass="LineFieldLabel" AssociatedControlID="PaymentNotes">Review Complete Notes</asp:Label>
- <asp:TextBox ID="ReviewCompleteNotes" runat="server" EnableViewState="true" CssClass="LineField"
- Rows="5" TextMode="MultiLine"></asp:TextBox>
- </asp:Panel>
- <asp:Panel ID="ReviewerStampsPanel" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
- Visible="false">
- Add Reviewer Stamps Controls Here
- </asp:Panel>
- <asp:Panel ID="BatchStampsPanel" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
- Visible="false">
- <asp:Panel ID="BatchStampToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
- <table class="LineFieldAppTableSwitch">
- <tr align="left">
- <td align="left" bgcolor="" width="98%">
- <span class="hotspot"
- onmouseover="tooltip.show('Please complete the tasks listed below.');"
- onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img> Batch Stamp</span>
- </td>
- </tr>
- </table>
- </asp:panel>
- <table width="95%" class="LineFieldAppTable">
- <tr>
- <td width="30px">
- <asp:Panel ID="BatchStampInfo1" runat="server" EnableViewState="true" CssClass="LineFieldApp">
- <asp:CheckBox ID="Batch1" OnClick="ShowHideByCheckboxBatch(CompleteButtonClientID)" runat="server" EnableViewState="true" />
- </asp:Panel>
- </td>
- <td>
- I have batched stamped all approved drawings and/or documents.
- </td>
- </tr>
- <tr>
- <td>
- <asp:Panel ID="BatchStampInfo2" runat="server" EnableViewState="true" CssClass="LineFieldApp">
- <asp:CheckBox ID="Batch2" OnClick="ShowHideByCheckboxBatch(CompleteButtonClientID)" runat="server" EnableViewState="true" />
- </asp:Panel>
- </td>
- <td>
- I exported the project for Laserfiche storage.
- </td>
- </tr>
- </table>
- </asp:Panel>
- <asp:Panel ID="AdditionalFeesPanel" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
- Visible="false">
- <table width="95%" class="LineFieldAppTable">
- <tr>
- <td width="30px">
- <asp:Panel ID="FeesRequiredPanel" runat="server" EnableViewState="true" CssClass="LineFieldApp">
- <asp:CheckBox ID="FeesRequired" runat="server" EnableViewState="true" />
- </asp:Panel>
- </td>
- <td>
- Additional Fees Are Required
- </td>
- </tr>
- </table>
- <table width="100%">
- <tr>
- <td>
- <div style="width: 100%; text-align: center">
- <asp:TextBox ID="AdditionalFeeNotes" runat="server" EnableViewState="true" CssClass=""
- Rows="5" TextMode="MultiLine" width="65%"></asp:TextBox>
- </div>
- </td>
- </tr>
- </table>
- </asp:Panel>
- <asp:Panel ID="ApplicantPEDDSPanel" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
- Visible="false">
- <asp:Panel ID="ApplicantPEDDSToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
- <table class="LineFieldAppTableSwitch">
- <tr align="left">
- <td align="left" bgcolor="" width="100%">
- <span class="hotspot"
- onmouseover="tooltip.show('Please review the notes below in prder to upload the correct PEDDS.');"
- onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img> PEDDS Correct</span>
- </td>
- </tr>
- </table>
- </asp:panel>
- <table width="100%">
- <tr>
- <td>
- <div style="width: 100%; text-align: center">
- <asp:TextBox ID="AppPEDDSNotes" runat="server" EnableViewState="true" CssClass=""
- Rows="5" TextMode="MultiLine" width="65%"></asp:TextBox>
- </div>
- </td>
- </tr>
- </table>
- </asp:Panel>
- </asp:Panel>
- <asp:Panel ID="AwaitingFinalPaymentPanel" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
- Visible="false">
- <span class="LineFieldLabel">Verify Payment</span>
- <asp:CheckBox ID="AwaitingFinalPaymentReceived" runat="server" EnableViewState="true" />
- I have received payment
- <div style="width: 100%">
- <span style="">Instructions:</span>
- <ol>
- <li>Before continuing you must confirm that payment has been received from user</li>
- </ol>
- </div>
- <asp:Label ID="Label2" runat="server" EnableViewState="true" CssClass="LineFieldLabel" AssociatedControlID="PaymentNotes">Payment Notes</asp:Label>
- <asp:TextBox ID="PaymentNotes" runat="server" EnableViewState="true" CssClass="LineField"
- Rows="5" TextMode="MultiLine"></asp:TextBox>
- </asp:Panel>
- <br />
- </asp:Panel>
- <iFrame height="45" width="95%" id="WorkingFrame" src="loader.htm" scrolling="no" frameborder="no" style="display:none">
- </iFrame>
- <%-- Hidden Fields --%>
- <asp:Panel ID="HiddenFieldsPanel" runat="server" EnableViewState="true" Visible="false">
- <asp:TextBox ID="PDOXReviewConfigLoaded" runat="server" EnableViewState="true" Text=""
- Visible="false" />
- <asp:TextBox ID="PDOXReviewCoordinator" runat="server" EnableViewState="true" Text=""
- Visible="false" />
- <asp:TextBox ID="PDOXBatchStampUserEmails" runat="server" EnableViewState="true" Text=""
- Visible="false" />
- </asp:Panel>
- <asp:HiddenField ID="AttachedMarkups" runat="server" EnableViewState="true" Value="" />
- </asp:Content>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement