Advertisement
Guest User

Untitled

a guest
May 3rd, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 242.66 KB | None | 0 0
  1. <%@ Page Language="C#" EnableViewState="true" Debug="true" Inherits="ProjectDoxWorkflowLib.Core.PDWorkflowPage"
  2. MasterPageFile="~/WorkflowEForms/Masters/MasterFormUI.Master" %>
  3.  
  4. <%@ MasterType TypeName="ProjectDoxNET.WorkflowEForms.Masters.MasterFormUI" %>
  5. <%@ Import Namespace="System.Data" %>
  6. <%@ Import Namespace="System.Collections.Generic" %>
  7. <%@ Import Namespace="ProjectDoxLib.Core" %>
  8. <%@ Assembly Name="DataActiveLibrary" %>
  9. <%@ Import Namespace="DataActiveLibrary" %>
  10. <%@ Import Namespace="ProjectDoxWorkflowLib" %>
  11. <%@ Import Namespace="ProjectDoxWorkflowLib.Core" %>
  12. <%@ Import Namespace="ProjectDoxWorkflow.Activities" %>
  13. <%@ Import Namespace="Avolve.Utilities" %>
  14. <%@ Import Namespace="System.Reflection" %>
  15. <%@ Import Namespace="System.Xml" %>
  16. <%@ Import Namespace="System.IO" %>
  17. <%@ Import Namespace="ProjectDoxNET.WebSvcAPI" %>
  18. <%--
  19. // ================================================================================
  20. //
  21. // Config and Running Variables
  22. //
  23. // ================================================================================
  24. --%>
  25.  
  26. <script language="C#" runat="server" enableviewstate="true">
  27.  
  28. //
  29. // Debugging
  30. //
  31. public bool DebugEForm = false;
  32. public bool ResetDataSets = false; // setting this to true will rebuild datasets
  33.  
  34. //
  35. // Datasets
  36. //
  37. public DataSet ReviewConfigData = null;
  38. public DataSet ReviewGroupsData = null;
  39. public DataSet ReviewCycleData = null;
  40. public DataSet PermitData = null;
  41.  
  42. //
  43. // Structures
  44. //
  45. public struct MarkUp
  46. {
  47. public string URL;
  48. public string Name;
  49. public string ID;
  50. public string GroupName;
  51. }
  52.  
  53. //
  54. // PDOX Review Variables
  55. //
  56.  
  57. public string ReviewConfigName = "PlanReview";
  58.  
  59. // this static class holds enums and
  60. // and values needed for the review workflow
  61. public static class PDOX
  62. {
  63. public enum AssignmentTypes
  64. {
  65. Unknown,
  66. FirstInGroup, // means the first person in the project dox group to accept a review task will be assigned to the review
  67. Individual // this specific person is assigned to the review
  68. }
  69.  
  70. public enum ReviewStatuses
  71. {
  72. Unknown,
  73. Assigned, // reviewer is assigned (if first in group email & name assigned also)
  74. InReview, // for this user review is started
  75. QACorrection, //
  76. OnHold,
  77. PendingResubmit,
  78. Authorized,
  79. AuthorizedWithConditions,
  80. Denied
  81. }
  82.  
  83. public enum StandardActivities
  84. {
  85. Unknown = 0,
  86. DepartmentReview = 1,
  87. ReviewQA = 2,
  88. BeginReview = 3,
  89. ResubmitReceived = 4
  90. }
  91.  
  92. public static Dictionary<string, string> ActivityCodes = new Dictionary<string, string>();
  93. public static Dictionary<string, string> GroupCodes = new Dictionary<string, string>();
  94. public static Dictionary<string, string> StatusCodes = new Dictionary<string, string>();
  95.  
  96. public static List<string> DropDownStatuses = new List<string>();
  97. public static ProjectDoxLib.Core.PDProject CurrentProject;
  98.  
  99. //
  100. // Current Logged On User
  101. //
  102. public static class CurrentUser
  103. {
  104. public static PDGroups ProjectGroups = null;
  105. public static string Group = "";
  106. public static string GroupName = "";
  107. public static string SuperGroupName = "";
  108. public static PDUser User = null;
  109. public static string AssignmentType = "";
  110. public static int Depth = 0;
  111. public static string Lineage = "";
  112. public static bool CanAssignReviewers = false;
  113. public static bool CanPerformReview = false;
  114. public static bool IsReviewCoordinator = false;
  115. public static bool IsSuper = false;
  116. public static bool IsAncestor = false;
  117. public static bool IsDescendant = false;
  118. }
  119.  
  120. public static string ReviewCoordinatorGroupName = "Router Clerk";
  121.  
  122. public static class Review
  123. {
  124. public static int SelectedCycle = 0;
  125. public static int CycleCount = 0;
  126. public static int CurrentCycle = 0;
  127.  
  128. }
  129.  
  130. }
  131. </script>
  132.  
  133. <%--
  134. // ================================================================================
  135. //
  136. // Helper Methods
  137. //
  138. // ================================================================================
  139. --%>
  140.  
  141. <script language="C#" runat="server" enableviewstate="true">
  142.  
  143.  
  144. public void DebugMessage(string Message)
  145. {
  146. if (DebugEForm)
  147. this.Master.AddHeaderMessage(Message);
  148. }
  149.  
  150. public void AddDataSetField(string FieldName)
  151. {
  152. // hidden, not required, not editable
  153. FlowContext.Workflow.AddField(FieldName, "", ConfigManager.FieldTypes.Text, false, false, false);
  154. FlowContext.Workflow.AddField(FieldName + ".Schema", "", ConfigManager.FieldTypes.Text, false, false, false);
  155. }
  156.  
  157. public DataSet LoadFromDataSetField(string FieldName)
  158. {
  159. DataSet ds = null;
  160. XmlReader DSReader = null;
  161.  
  162. if (FlowContext.Workflow.FieldExists(FieldName))
  163. {
  164. ds = new DataSet();
  165. if (IsDataSetFieldEmpty(FieldName))
  166. {
  167. if (FlowContext.Workflow.FieldExists(FieldName + ".Schema"))
  168. {
  169. DSReader = new XmlTextReader(new StringReader(FlowContext.Workflow[FieldName + ".Schema"]));
  170. ds.ReadXmlSchema(DSReader);
  171. }
  172. }
  173. else
  174. {
  175. DSReader = new XmlTextReader(new StringReader(FlowContext.Workflow[FieldName]));
  176. ds.ReadXml(DSReader);
  177. }
  178. }
  179.  
  180. return ds;
  181. }
  182.  
  183. public void SaveToDataSetField(string FieldName, DataSet ExistingDataSet)
  184. {
  185. if (FlowContext.Workflow.FieldExists(FieldName + ".Schema"))
  186. FlowContext.Workflow[FieldName + ".Schema"] = ExistingDataSet.GetXmlSchema();
  187.  
  188. if (FlowContext.Workflow.FieldExists(FieldName))
  189. FlowContext.Workflow[FieldName] = ExistingDataSet.GetXml();
  190.  
  191. }
  192.  
  193. public bool IsDataSetFieldEmpty(string FieldName)
  194. {
  195. if (FlowContext.Workflow.FieldExists(FieldName))
  196. {
  197. if (FlowContext.Workflow[FieldName].Length == 0 || FlowContext.Workflow[FieldName] == "<NewDataSet />")
  198. return true;
  199. else
  200. {
  201. string Val = FlowContext.Workflow[FieldName];
  202. return false;
  203. }
  204. }
  205. else
  206. return true;
  207.  
  208. }
  209.  
  210. public DataSet BuildDataSet(string FieldName)
  211. {
  212. DataSet ds = null;
  213. switch (FieldName)
  214. {
  215. case "PDOX.ReviewConfigData":
  216. // ADMIN NOTE: this query usually results in less than 100 records
  217. ds = GetReviewConfigData();
  218. break;
  219.  
  220. case "PDOX.ReviewGroupsData":
  221. ds = GetReviewGroupsData();
  222. break;
  223.  
  224. case "PDOX.PermitData":
  225. ds = GetPermitData();
  226. break;
  227.  
  228. case "PDOX.ReviewCycleData":
  229. ds = GetReviewCycleData();
  230. break;
  231. }
  232.  
  233. return ds;
  234. }
  235.  
  236. public void BuildDataSetField(string FieldName)
  237. {
  238. DataSet ds = BuildDataSet(FieldName);
  239.  
  240. if (ds == null)
  241. {
  242. throw new System.Exception("Could not retrieve " + FieldName);
  243. }
  244.  
  245. FlowContext.Workflow[FieldName] = ds.GetXml();
  246. FlowContext.Workflow[FieldName + ".Schema"] = ds.GetXmlSchema();
  247. }
  248. protected bool IsActivity(Object ActivityNameToTest)
  249. {
  250. bool MatchingActivity = false;
  251.  
  252. //DebugMessage("IsActivity: ActivityNameToTest.GetType() = " + ActivityNameToTest.GetType().ToString());
  253. //DebugMessage("IsActivity: typeof(PDOX.StandardActivities) = " + typeof(PDOX.StandardActivities).ToString());
  254. //DebugMessage("IsActivity: typeof(string) = " + typeof(string).ToString());
  255. if (ActivityNameToTest.GetType() == typeof(PDOX.StandardActivities))
  256. {
  257. PDOX.StandardActivities StandardName = (PDOX.StandardActivities)ActivityNameToTest;
  258.  
  259. //DebugMessage("IsActivity: (FlowContext.Activity.ActivityName == StandardName.ToString()) = " + (FlowContext.Activity.ActivityName == StandardName.ToString()).ToString());
  260. MatchingActivity = (FlowContext.Activity.ActivityName == StandardName.ToString());
  261. }
  262. else if (ActivityNameToTest.GetType() == typeof(string))
  263. {
  264. //DebugMessage("IsActivity: (FlowContext.Activity.ActivityName == (string)ActivityNameToTest) = " + (FlowContext.Activity.ActivityName == (string)ActivityNameToTest));
  265. MatchingActivity = (FlowContext.Activity.ActivityName.Contains((string)ActivityNameToTest));
  266. }
  267. else
  268. {
  269. foreach (string ActivityName in Enum.GetNames(typeof(PDOX.StandardActivities)))
  270. {
  271. if (((string)ActivityNameToTest).Contains(ActivityName))
  272. MatchingActivity = true;
  273. }
  274. }
  275.  
  276. return MatchingActivity;
  277. }
  278. protected bool IsItemRow(RepeaterItem RepeaterItemToTest)
  279. {
  280. return ((RepeaterItemToTest.ItemType == ListItemType.AlternatingItem) || (RepeaterItemToTest.ItemType == ListItemType.Item));
  281. }
  282.  
  283. protected void VoidReview()
  284. {
  285. PDUsers RevCoordUsers = FlowContext.GetGroupUsers(PDOX.ReviewCoordinatorGroupName, Req.SessionUser);
  286.  
  287. List<string> RevCoordEmails = new List<string>();
  288. foreach (PDUser RevCoordUser in RevCoordUsers)
  289. RevCoordEmails.Add(RevCoordUser.Email);
  290.  
  291. // notify email for rev coord
  292.  
  293. // update project status to void
  294. FlowContext.Project.UpdateStatus("void", FlowContext.GetUser(PDUser.GetFirstSysAdmin()));
  295.  
  296. // terminate workflow
  297. FlowContext.StopWorkflow();
  298. }
  299. </script>
  300.  
  301. <%--
  302. // ================================================================================
  303. //
  304. // User Methods
  305. //
  306. // ================================================================================
  307. --%>
  308.  
  309. <script language="C#" runat="server">
  310. protected void InitReviewCoordinator()
  311. {
  312. FlowContext.Workflow.AddField("PDOX.ReviewCoordinator", "", ConfigManager.FieldTypes.Text, false, false, true);
  313.  
  314. PDUser RevCoordUser;
  315.  
  316. // show rev coord / WF starter
  317. if (FlowContext.Workflow["PDOX.ReviewCoordinator"] == "")
  318. {
  319. PDUser StartingUser = FlowContext.GetUser(FlowContext.Workflow.StarterID);
  320. FlowContext.Workflow["PDOX.ReviewCoordinator"] = StartingUser.Email;
  321. RevCoordUser = StartingUser;
  322. }
  323. else
  324. RevCoordUser = FlowContext.GetUser(FlowContext.Workflow["PDOX.ReviewCoordinator"].ToString());
  325.  
  326. PDOXReviewCoordinator.Text = RevCoordUser.Email;
  327. ReviewCoordinator.Text = RevCoordUser.LocalizedName + " ( " + RevCoordUser.Email + " )";
  328.  
  329. FlowContext.EForm["PDOXReviewCoordinator"] = RevCoordUser.Email;
  330. FlowContext.EForm.SaveField("PDOXReviewCoordinator");
  331. }
  332.  
  333. protected void InitCurrentUser(DataRow ConfigRow)
  334. {
  335. PDOX.CurrentUser.GroupName = ConfigRow["GroupName"].ToString();
  336. PDOX.CurrentUser.SuperGroupName = ConfigRow["SuperGroupName"].ToString();
  337.  
  338. PDOX.CurrentUser.IsAncestor = PDUtility.ConversionUtility.CBOOL2(ConfigRow["IsAncestor"]);
  339. PDOX.CurrentUser.IsDescendant = PDUtility.ConversionUtility.CBOOL2(ConfigRow["IsDescendant"]);
  340. int.TryParse(ConfigRow["Depth"].ToString(), out PDOX.CurrentUser.Depth);
  341. PDOX.CurrentUser.Lineage = ConfigRow["Lineage"].ToString();
  342.  
  343. PDOX.CurrentUser.CanAssignReviewers = PDUtility.ConversionUtility.CBOOL2(ConfigRow["AssignReviewers"]);
  344. PDOX.CurrentUser.CanPerformReview = PDUtility.ConversionUtility.CBOOL2(ConfigRow["PerformReview"]);
  345.  
  346. if (PDOX.CurrentUser.GroupName == PDOX.ReviewCoordinatorGroupName)
  347. PDOX.CurrentUser.IsReviewCoordinator = true;
  348. else
  349. PDOX.CurrentUser.IsReviewCoordinator = false;
  350.  
  351. if (!PDOX.CurrentUser.IsReviewCoordinator)
  352. {
  353. if (PDOX.CurrentUser.IsAncestor)
  354. PDOX.CurrentUser.IsSuper = true;
  355. }
  356.  
  357. PDOX.CurrentUser.AssignmentType = PDUtility.ConversionUtility.BlankNull(ConfigRow["HowAssigned"]);
  358. }
  359. </script>
  360.  
  361. <%--
  362. // ================================================================================
  363. //
  364. // Review Config Methods
  365. //
  366. // ================================================================================
  367. --%>
  368.  
  369. <script language="C#" runat="server">
  370. protected DataSet GetReviewConfigData()
  371. {
  372. DataSet ds = null;
  373.  
  374. using (DataActiveLibrary.Query Qry = new DataActiveLibrary.Query(GlobalVariables.DSN))
  375. {
  376. Qry.QueryText = @"
  377. SELECT
  378. ReviewConfigName
  379. ,GroupName
  380. ,SuperGroupName
  381. ,Node
  382. ,ParentNode
  383. ,Depth
  384. ,Lineage
  385. ,HowAssigned
  386. ,PermitTypes
  387. ,AssignReviewers
  388. ,PerformReview
  389. ,CAST((CASE WHEN DscCount > 0 THEN 1 ELSE 0 END) AS BIT) IsAncestor
  390. ,CAST((CASE WHEN AncCount > 0 THEN 1 ELSE 0 END) AS BIT) IsDescendant
  391. FROM
  392. (
  393. SELECT
  394. ISNULL(rc.ReviewConfigName,'') ReviewConfigName
  395. ,ISNULL(rc.GroupName,'') GroupName
  396. ,ISNULL(rc.SuperGroupName,'') SuperGroupName
  397. ,ISNULL(rc.Node,0) Node
  398. ,ISNULL(rc.ParentNode,0) ParentNode
  399. ,ISNULL(rc.Depth,0) Depth
  400. ,ISNULL(rc.Lineage,'') Lineage
  401. ,ISNULL(rc.HowAssigned,'') HowAssigned
  402. ,ISNULL(rc.PermitTypes,'') PermitTypes
  403. ,ISNULL(rc.AssignReviewers,0) AssignReviewers
  404. ,ISNULL(rc.PerformReview,0) PerformReview
  405. ,(
  406. SELECT COUNT(*)
  407. FROM ReviewConfig rcd
  408. WHERE rcd.ReviewConfigName = @ReviewConfigName
  409. AND rcd.Lineage LIKE '%/' + CAST(rc.Node AS VARCHAR(15)) + '%'
  410. AND rcd.Depth > rc.Depth
  411. ) DscCount
  412. ,(
  413. SELECT COUNT(*)
  414. FROM ReviewConfig rca
  415. WHERE rca.ReviewConfigName = @ReviewConfigName
  416. AND rca.Lineage LIKE '%/' + CAST(rc.ParentNode AS VARCHAR(15)) + '%'
  417. AND rca.Depth < rc.Depth
  418. ) AncCount
  419. FROM ReviewConfig rc
  420. WHERE ReviewConfigName = @ReviewConfigName
  421. ) hrc
  422. ORDER BY Lineage";
  423. Qry.AddSQLParam("@ReviewConfigName", ReviewConfigName, SqlDbType.VarChar);
  424.  
  425. ds = Qry.GetDataSet();
  426. }
  427.  
  428. return ds;
  429. }
  430.  
  431. protected void InitReviewConfigData()
  432. {
  433. AddDataSetField("PDOX.ReviewConfigData");
  434.  
  435. if (ResetDataSets)
  436. FlowContext.Workflow["PDOX.ReviewConfigData"] = "";
  437.  
  438. if (IsDataSetFieldEmpty("PDOX.ReviewConfigData"))
  439. BuildDataSetField("PDOX.ReviewConfigData");
  440.  
  441. ReviewConfigData = LoadFromDataSetField("PDOX.ReviewConfigData");
  442. }
  443.  
  444. public DataRow FindConfigGroup()
  445. {
  446. DataRow[] ConfigRow = null;
  447.  
  448. foreach (PDGroup ProjectGroup in PDOX.CurrentUser.ProjectGroups)
  449. {
  450. DebugMessage("FindConfigGroup: Searching for ProjectGroup.Name " + ProjectGroup.Name);
  451.  
  452. ConfigRow = ReviewConfigData.Tables[0].Select("GroupName = '" + ProjectGroup.Name + "'");
  453.  
  454. if (ConfigRow.Length > 0)
  455. break;
  456. }
  457.  
  458. return ((ConfigRow.Length > 0) ? ConfigRow[0] : null);
  459. }
  460. </script>
  461.  
  462. <%--
  463. // ================================================================================
  464. //
  465. // Reviewer Group Methods
  466. //
  467. // ================================================================================
  468. --%>
  469.  
  470. <script language="C#" runat="server">
  471. protected DataSet GetReviewGroupsData()
  472. {
  473. // initial build of the Reviewer Groups DataSet
  474.  
  475. DataSet ds = new DataSet();
  476. DataTable ReviewGroupsTable = new DataTable();
  477. ReviewGroupsTable.Columns.Add("ReviewCycle", typeof(int));
  478. ReviewGroupsTable.Columns.Add("Depth", typeof(int));
  479. ReviewGroupsTable.Columns.Add("Lineage", typeof(string));
  480. ReviewGroupsTable.Columns.Add("IsAncestor", typeof(bool));
  481. ReviewGroupsTable.Columns.Add("IsDescendant", typeof(bool));
  482. ReviewGroupsTable.Columns.Add("GroupSelect", typeof(bool));
  483. ReviewGroupsTable.Columns.Add("GroupName", typeof(string));
  484. ReviewGroupsTable.Columns.Add("PerformReview", typeof(bool));
  485. ReviewGroupsTable.Columns.Add("HowAssigned", typeof(string));
  486. ReviewGroupsTable.Columns.Add("IndividualReviewers", typeof(string));
  487.  
  488. // don't add the review coord to the groups since the group should never be assigned as a reviewer (per SA 9-16-09)
  489. DataRow[] ConfigRows = ReviewConfigData.Tables[0].Select("GroupName <> '" + PDOX.ReviewCoordinatorGroupName + "'", "Lineage ASC");
  490.  
  491. for (int ConfigRowIndex = 0; ConfigRowIndex < ConfigRows.Length; ConfigRowIndex++)
  492. {
  493. DataRow ConfigRow = ConfigRows[ConfigRowIndex];
  494. DataRow RG_Row = ReviewGroupsTable.NewRow();
  495.  
  496. RG_Row["ReviewCycle"] = 1;
  497. RG_Row["Depth"] = ConfigRow["Depth"];
  498. RG_Row["Lineage"] = ConfigRow["Lineage"];
  499. RG_Row["IsAncestor"] = ConfigRow["IsAncestor"];
  500. RG_Row["IsDescendant"] = ConfigRow["IsDescendant"];
  501. RG_Row["GroupSelect"] = false;
  502. RG_Row["GroupName"] = ConfigRow["GroupName"];
  503. RG_Row["PerformReview"] = false;
  504. RG_Row["HowAssigned"] = ConfigRow["HowAssigned"];
  505. RG_Row["IndividualReviewers"] = "";
  506.  
  507. ReviewGroupsTable.Rows.Add(RG_Row);
  508. }
  509.  
  510. ds.Tables.Add(ReviewGroupsTable);
  511.  
  512. return ds;
  513. }
  514.  
  515. protected void InitReviewGroupsData()
  516. {
  517. // Reviewer Groups Data
  518. AddDataSetField("PDOX.ReviewGroupsData");
  519. if (ResetDataSets) FlowContext.Workflow["PDOX.ReviewGroupsData"] = "";
  520.  
  521. if (IsDataSetFieldEmpty("PDOX.ReviewGroupsData"))
  522. BuildDataSetField("PDOX.ReviewGroupsData");
  523.  
  524. ReviewGroupsData = LoadFromDataSetField("PDOX.ReviewGroupsData");
  525. }
  526.  
  527. public DataRow FindReviewGroup(int ReviewCycle, string GroupName)
  528. {
  529. return ReviewGroupsData.Tables[0].Select("ReviewCycle = " + ReviewCycle.ToString() + " AND GroupName = '" + GroupName + "'")[0];
  530. }
  531.  
  532. protected void UpdateReviewGroups()
  533. {
  534. // ----------------------------------------------------------------------------------------
  535. // Update Reviewer Groups Data from Repeater
  536. // ----------------------------------------------------------------------------------------
  537.  
  538. foreach (RepeaterItem ReviewGroupItem in ReviewGroupsRepeater.Items)
  539. {
  540. if (IsItemRow(ReviewGroupItem))
  541. {
  542. // get controls for this repeater row
  543. CheckBox GroupSelect = (CheckBox)ReviewGroupItem.FindControl("RG_GroupSelect");
  544. CheckBox PerformReview = (CheckBox)ReviewGroupItem.FindControl("RG_PerformReview");
  545. Label GroupNameLabel = (Label)ReviewGroupItem.FindControl("RG_GroupName");
  546. DropDownList GroupAssignmentType = (DropDownList)ReviewGroupItem.FindControl("RG_AssignmentType");
  547. CheckBoxList GroupUsersList = (CheckBoxList)ReviewGroupItem.FindControl("RG_GroupUsers");
  548.  
  549. // get matching row in dataset for this repeater row and update it
  550. // this is not the same as the repeater data item
  551. DataRow GroupRow = FindReviewGroup(PDOX.Review.CurrentCycle, GroupNameLabel.Text);
  552.  
  553. GroupRow["GroupSelect"] = (GroupSelect.Checked == true) ? "true" : "false";
  554.  
  555. if (GroupAssignmentType.SelectedItem != null)
  556. GroupRow["HowAssigned"] = GroupAssignmentType.SelectedItem.Value;
  557. else
  558. GroupRow["HowAssigned"] = PDOX.AssignmentTypes.FirstInGroup.ToString();
  559.  
  560.  
  561. List<string> IndividualReviewers = new List<string>();
  562.  
  563. foreach (ListItem GroupUserItem in GroupUsersList.Items)
  564. {
  565. if (GroupUserItem.Selected == true)
  566. {
  567. IndividualReviewers.Add(GroupUserItem.Value);
  568. }
  569. }
  570.  
  571. if (IndividualReviewers.Count > 0)
  572. GroupRow["IndividualReviewers"] = string.Join(",", IndividualReviewers.ToArray());
  573. else
  574. GroupRow["IndividualReviewers"] = "";
  575.  
  576. GroupRow["PerformReview"] = (PerformReview.Checked == true) ? "true" : "false";
  577.  
  578. // apply changes
  579. GroupRow.AcceptChanges();
  580. ReviewGroupsData.Tables[0].AcceptChanges();
  581. }
  582. }
  583.  
  584. SaveToDataSetField("PDOX.ReviewGroupsData", ReviewGroupsData);
  585. FlowContext.Workflow.SaveField("PDOX.ReviewGroupsData");
  586.  
  587. // 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
  588. //FlowContext.Workflow.SaveFields();
  589.  
  590. }
  591.  
  592. protected void ReviewGroupsRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
  593. {
  594.  
  595. DataRow GroupRow = (DataRow)e.Item.DataItem;
  596.  
  597. // PlaceHolder
  598. PlaceHolder GroupRowPlaceHolder = (PlaceHolder)e.Item.FindControl("RG_GroupRowPlaceHolder");
  599.  
  600. // Review Cycle
  601. Label ReviewCycleLabel = (Label)e.Item.FindControl("RG_ReviewCycle");
  602. ReviewCycleLabel.Text = GroupRow["ReviewCycle"].ToString();
  603.  
  604. // Group Selection
  605. CheckBox GroupSelect = (CheckBox)e.Item.FindControl("RG_GroupSelect");
  606. GroupSelect.Checked = PDUtility.ConversionUtility.CBOOL2(GroupRow["GroupSelect"]);
  607.  
  608. // Group Name
  609. Label GroupNameLabel = (Label)e.Item.FindControl("RG_GroupName");
  610. GroupNameLabel.Text = GroupRow["GroupName"].ToString();
  611.  
  612. // Perform Review (for supers)
  613. CheckBox PerformReview = (CheckBox)e.Item.FindControl("RG_PerformReview");
  614.  
  615. // HowAssigned - default any previous "how assigned" selection
  616. DropDownList GroupAssignmentType = (DropDownList)e.Item.FindControl("RG_AssignmentType");
  617. ListItem AssignmentItem = GroupAssignmentType.Items.FindByValue(GroupRow["HowAssigned"].ToString());
  618.  
  619. AssignmentItem.Selected = true;
  620.  
  621. // GroupUsersList - add the group users as individual checkboxes so each user can be selected individually
  622. CheckBoxList GroupUsersList = (CheckBoxList)e.Item.FindControl("RG_GroupUsers");
  623.  
  624. List<string> SelectedUsers = PDUtility.ConversionUtility.ConvertStringToStringList(GroupRow["IndividualReviewers"].ToString(), ",");
  625.  
  626. // access the group members for the specific group and add all users
  627. ListItem li;
  628. foreach (PDUser GroupUser in FlowContext.GetGroupUsers(GroupNameLabel.Text, Req.SessionUser))
  629. {
  630. li = new ListItem(GroupUser.LocalizedName, GroupUser.Email);
  631.  
  632. if (SelectedUsers.Contains(GroupUser.Email)) // check box if this user was previously selected
  633. li.Selected = true;
  634.  
  635. GroupUsersList.Items.Add(li);
  636. }
  637.  
  638. // enable select parts of row
  639. int GroupDepth = Convert.ToInt32(GroupRow["Depth"]);
  640. bool EnableGroupSelect = false;
  641. bool EnableGroup = false;
  642. bool DisplayGroup = false;
  643. bool DisplayPerformReview = false;
  644. bool UserIsSuper = PDOX.CurrentUser.IsSuper;
  645. bool RowIsUser = (GroupRow["Lineage"].ToString() == PDOX.CurrentUser.Lineage);
  646. bool RowIsSubordinateToUser = (GroupRow["Lineage"].ToString().Contains(PDOX.CurrentUser.Lineage)) && !RowIsUser;
  647. bool RowIsDirectSubordinate = (RowIsSubordinateToUser && (Math.Abs(GroupDepth - PDOX.CurrentUser.Depth) < 2));
  648. bool RowCanPerformReview = PDUtility.ConversionUtility.CBOOL2(GroupRow["PerformReview"]);
  649. bool RowIsSuperGroup = PDUtility.ConversionUtility.CBOOL2(GroupRow["IsAncestor"]);
  650.  
  651.  
  652. DebugMessage("ReviewGroupsRepeater_ItemDataBound: RowIsSubordinateToUser = " + RowIsSubordinateToUser.ToString());
  653. DebugMessage("ReviewGroupsRepeater_ItemDataBound: GroupDepth = " + GroupDepth.ToString() + " : PDOX.CurrentUser.Depth = " + PDOX.CurrentUser.Depth.ToString());
  654. DebugMessage("ReviewGroupsRepeater_ItemDataBound: RowIsDirectSubordinate = " + RowIsDirectSubordinate.ToString());
  655.  
  656. if (IsActivity(PDOX.StandardActivities.BeginReview))
  657. {
  658. // only review coordinator should be here
  659. if (PDOX.CurrentUser.IsReviewCoordinator)
  660. {
  661. // enable for top groups and top super groups
  662. if (GroupDepth < 2)
  663. {
  664. EnableGroupSelect = true;
  665. EnableGroup = true;
  666. DisplayGroup = true;
  667.  
  668. if (RowIsSuperGroup)
  669. {
  670. // this is a super group (i.e. this group is ancestor and so has descendants)
  671. DisplayPerformReview = true;
  672. }
  673. }
  674. }
  675. }
  676. else if (IsActivity(PDOX.StandardActivities.DepartmentReview))
  677. {
  678. if (UserIsSuper)
  679. {
  680. if (RowIsUser)
  681. {
  682. // this is the super group
  683. EnableGroupSelect = false;
  684. EnableGroup = false;
  685. DisplayGroup = false;
  686. }
  687. else if (RowIsDirectSubordinate)
  688. {
  689. // this is a descendant group of the logged on super
  690. EnableGroupSelect = true;
  691. EnableGroup = true;
  692. DisplayGroup = true;
  693. }
  694. }
  695.  
  696. if (PDOX.CurrentUser.IsReviewCoordinator)
  697. {
  698. // enable for top groups and top super groups
  699. if (GroupDepth < 2)
  700. {
  701. EnableGroupSelect = true;
  702. EnableGroup = true;
  703. DisplayGroup = true;
  704.  
  705. if (RowIsSuperGroup)
  706. {
  707. // this is a super group (i.e. this group is ancestor and so has descendants)
  708. DisplayPerformReview = true;
  709. }
  710. }
  711. }
  712. }
  713. else if (IsActivity(PDOX.StandardActivities.ResubmitReceived))
  714. {
  715. // only review coordinator should be here
  716. if (PDOX.CurrentUser.IsReviewCoordinator)
  717. {
  718. // enable for top groups and top super groups
  719. if (GroupDepth < 2)
  720. {
  721. EnableGroupSelect = true;
  722. EnableGroup = true;
  723. DisplayGroup = true;
  724. }
  725.  
  726. }
  727. }
  728.  
  729.  
  730. //DebugMessage(GroupNameLabel.Text + " UIS:" + UserIsSuper.ToString() + " RISTU:" + RowIsSubordinateToUser.ToString() + " RIU:" + RowIsUser.ToString() + " EG:" + EnableGroup.ToString() + " DG: " + DisplayGroup.ToString());
  731.  
  732. if (PDOX.Review.SelectedCycle != PDOX.Review.CurrentCycle)
  733. {
  734. EnableGroupSelect = false;
  735. EnableGroup = false;
  736. }
  737.  
  738. GroupSelect.Enabled = EnableGroupSelect;
  739.  
  740. if (EnableGroup)
  741. {
  742. GroupAssignmentType.Enabled = true;
  743. GroupUsersList.Enabled = true;
  744. }
  745. else
  746. {
  747. GroupAssignmentType.Enabled = false;
  748. GroupUsersList.Enabled = false;
  749. }
  750.  
  751. if (DisplayPerformReview)
  752. PerformReview.Visible = false;
  753.  
  754. GroupRowPlaceHolder.Visible = DisplayGroup;
  755. }
  756.  
  757. protected void BindReviewGroupsData(int ReviewCycle)
  758. {
  759. if (ReviewGroupsData != null)
  760. {
  761. if (ReviewGroupsData.Tables.Count > 0)
  762. {
  763. DataRow[] SelectedReviewGroups = ReviewGroupsData.Tables[0].Select("ReviewCycle = " + ReviewCycle.ToString());
  764. ReviewGroupsRepeater.DataSource = SelectedReviewGroups;
  765. ReviewGroupsRepeater.DataBind();
  766. }
  767. }
  768. }
  769. </script>
  770.  
  771. <%--
  772. // ================================================================================
  773. //
  774. // Review Cycle Methods
  775. //
  776. // ================================================================================
  777. --%>
  778.  
  779. <script language="C#" runat="server">
  780. protected DataSet GetReviewCycleData()
  781. {
  782. DataSet ds = new DataSet();
  783.  
  784. DataTable ReviewCycleTable = new DataTable();
  785. ReviewCycleTable.Columns.Add("ReviewCycle", typeof(int));
  786. ReviewCycleTable.Columns.Add("GroupSelect", typeof(bool));
  787. ReviewCycleTable.Columns.Add("GroupName", typeof(string));
  788. ReviewCycleTable.Columns.Add("Depth", typeof(int));
  789. ReviewCycleTable.Columns.Add("Lineage", typeof(string));
  790. ReviewCycleTable.Columns.Add("ReviewerName", typeof(string));
  791. ReviewCycleTable.Columns.Add("ReviewerEmail", typeof(string));
  792. ReviewCycleTable.Columns.Add("PerformReview", typeof(bool));
  793. ReviewCycleTable.Columns.Add("HowAssigned", typeof(string));
  794. ReviewCycleTable.Columns.Add("AssignedBy", typeof(string));
  795. ReviewCycleTable.Columns.Add("ReviewStatus", typeof(string));
  796. ReviewCycleTable.Columns.Add("ReviewComments", typeof(string));
  797. ReviewCycleTable.Columns.Add("QARequest", typeof(string));
  798. ReviewCycleTable.Columns.Add("QAResponse", typeof(string));
  799. ReviewCycleTable.Columns.Add("AssignCorrections", typeof(bool));
  800. ReviewCycleTable.Columns.Add("TaskID", typeof(int));
  801.  
  802. ds.Tables.Add(ReviewCycleTable);
  803.  
  804.  
  805. return ds;
  806. }
  807.  
  808. protected void InitReviewCycleData()
  809. {
  810.  
  811. // determine cycles
  812. FlowContext.Workflow.AddField("PDOX.Review.CurrentCycle", "", ConfigManager.FieldTypes.Text, false, false, false);
  813. int.TryParse(FlowContext.Workflow["PDOX.Review.CurrentCycle"], out PDOX.Review.CurrentCycle);
  814.  
  815. if (PDOX.Review.CurrentCycle == 0)
  816. {
  817. PDOX.Review.CurrentCycle = 1;
  818. FlowContext.Workflow["PDOX.Review.CurrentCycle"] = PDOX.Review.CurrentCycle.ToString();
  819. }
  820. DebugMessage("InitReviewCycleData: PDOX.Review.CurrentCycle = " + PDOX.Review.CurrentCycle);
  821.  
  822. FlowContext.Workflow.AddField("PDOX.Review.CycleCount", "", ConfigManager.FieldTypes.Text, false, false, false);
  823. int.TryParse(FlowContext.Workflow["PDOX.Review.CycleCount"], out PDOX.Review.CycleCount);
  824.  
  825. if (PDOX.Review.CycleCount == 0) // default CycleCount to 1
  826. {
  827. PDOX.Review.CycleCount = 1;
  828. FlowContext.Workflow["PDOX.Review.CycleCount"] = PDOX.Review.CycleCount.ToString();
  829. }
  830.  
  831. FlowContext.Workflow.AddField("PDOX.Review.SelectedCycle", "", ConfigManager.FieldTypes.Text, false, false, false);
  832. if (!IsPostBack)
  833. {
  834. int.TryParse(FlowContext.Workflow["PDOX.Review.SelectedCycle"], out PDOX.Review.SelectedCycle);
  835.  
  836. if (PDOX.Review.SelectedCycle == 0)
  837. {
  838. PDOX.Review.SelectedCycle = 1;
  839. FlowContext.Workflow["PDOX.Review.SelectedCycle"] = PDOX.Review.SelectedCycle.ToString();
  840. }
  841. }
  842. else
  843. {
  844. PDOX.Review.SelectedCycle = SelectedReviewCycle.SelectedIndex + 1;
  845. }
  846. FlowContext.Workflow["PDOX.Review.SelectedCycle"] = PDOX.Review.SelectedCycle.ToString();
  847. FlowContext.Workflow.SaveField("PDOX.Review.SelectedCycle");
  848.  
  849. DebugMessage("InitReviewCycleData: PDOX.Review.SelectedCycle = " + PDOX.Review.SelectedCycle);
  850.  
  851. // cycle data
  852. AddDataSetField("PDOX.ReviewCycleData");
  853.  
  854. if (ResetDataSets)
  855. FlowContext.Workflow["PDOX.ReviewCycleData"] = "";
  856.  
  857. if (IsDataSetFieldEmpty("PDOX.ReviewCycleData"))
  858. BuildDataSetField("PDOX.ReviewCycleData");
  859.  
  860. ReviewCycleData = LoadFromDataSetField("PDOX.ReviewCycleData");
  861.  
  862. }
  863.  
  864. protected void FillReviewCycleFields()
  865. {
  866. if (!IsPostBack)
  867. {
  868. // fill review cycle dropdown
  869. SelectedReviewCycle.Items.Clear();
  870. for (int CycleIndex = 0; CycleIndex < PDOX.Review.CycleCount; CycleIndex++)
  871. SelectedReviewCycle.Items.Add(new ListItem((CycleIndex + 1).ToString(), (CycleIndex + 1).ToString()));
  872.  
  873. // select the correct review cycle on the drop down
  874. ListItem SelectedCycleItem = SelectedReviewCycle.Items.FindByValue(PDOX.Review.SelectedCycle.ToString());
  875. if (SelectedCycleItem != null)
  876. SelectedCycleItem.Selected = true;
  877. }
  878.  
  879.  
  880.  
  881. ReviewCycleText.Text = PDOX.Review.CurrentCycle.ToString();
  882.  
  883. }
  884.  
  885. public DataRow FindCycleGroup(int ReviewCycle, string GroupName, string ReviewerEmail)
  886. {
  887. DataRow[] CycleRow = null;
  888.  
  889. if (ReviewerEmail != "")
  890. CycleRow = ReviewCycleData.Tables[0].Select("ReviewCycle = " + ReviewCycle.ToString() + " AND GroupName = '" + GroupName + "' AND ReviewerEmail = '" + ReviewerEmail + "'");
  891. else
  892. CycleRow = ReviewCycleData.Tables[0].Select("ReviewCycle = " + ReviewCycle.ToString() + " AND GroupName = '" + GroupName + "'");
  893.  
  894. return (CycleRow.Length > 0) ? CycleRow[0] : null;
  895. }
  896.  
  897. protected string GetChecklistURL(string Mode, string GroupName, int ReviewCycle, string PermitSubType)
  898. {
  899. string ChecklistURL = "Checklist.aspx"
  900.  
  901. + "?WID=" + FlowContext.Workflow.FlowInstanceID.ToString()
  902. + "&AID=" + FlowContext.Activity.FlowInstanceActivityID.ToString()
  903. + "&PID=" + FlowContext.Project.ProjectID.ToString()
  904. + "&GroupName=" + GroupName
  905. + "&ReviewCycle=" + ReviewCycle.ToString();
  906.  
  907. if (IsActivity("GroupPreScreen"))
  908. ChecklistURL += "&Mode=Edit" + "&Cat1=" + PermitSubType + "&Cat2=Submissions";
  909. else if (IsActivity("PreScreenReview"))
  910. ChecklistURL += "&Cat1=" + PermitSubType + "&Cat2=Submissions";
  911. else if (IsActivity(PDOX.StandardActivities.DepartmentReview.ToString()))
  912. ChecklistURL += "&Mode=Edit" + "&Cat1=" + PermitSubType + "&Cat2=Review";
  913. else if (IsActivity("ApplicantResubmit"))
  914. ChecklistURL += "&Cat1=" + PermitSubType + "&Cat2=Review";
  915. return ChecklistURL;
  916.  
  917. }
  918.  
  919. protected void ReviewCycleRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
  920. {
  921. ListItem li;
  922.  
  923. DataRow CycleRow = (DataRow)e.Item.DataItem;
  924.  
  925. // PlaceHolder
  926. PlaceHolder CycleRowPlaceHolder = (PlaceHolder)e.Item.FindControl("RC_CycleRowPlaceHolder");
  927.  
  928. // Review Cycle
  929. Label ReviewCycleLabel = (Label)e.Item.FindControl("RC_ReviewCycle");
  930. ReviewCycleLabel.Text = CycleRow["ReviewCycle"].ToString();
  931.  
  932. // Group Select
  933. CheckBox GroupSelect = (CheckBox)e.Item.FindControl("RC_GroupSelect");
  934. GroupSelect.Checked = PDUtility.ConversionUtility.CBOOL2(CycleRow["GroupSelect"]);
  935.  
  936. // Group Name
  937. Label GroupNameLabel = (Label)e.Item.FindControl("RC_GroupName");
  938. GroupNameLabel.Text = CycleRow["GroupName"].ToString();
  939.  
  940. // Reviewer Name
  941. Label ReviewerNameLabel = (Label)e.Item.FindControl("RC_ReviewerName");
  942. ReviewerNameLabel.Text = CycleRow["ReviewerName"].ToString();
  943.  
  944. // Reviewer Email
  945. Label ReviewerEmailLabel = (Label)e.Item.FindControl("RC_ReviewerEmail");
  946. string ReviewerEmail = CycleRow["ReviewerEmail"].ToString();
  947. ReviewerEmailLabel.Text = ReviewerEmail;
  948.  
  949. // AssignedBy Label
  950. Label AssignedByLabel = (Label)e.Item.FindControl("RC_AssignedBy");
  951. AssignedByLabel.Text = CycleRow["AssignedBy"].ToString();
  952.  
  953. // Assignment Type Label
  954. Label AssignmentTypeLabel = (Label)e.Item.FindControl("RC_AssignmentType");
  955. AssignmentTypeLabel.Text = CycleRow["HowAssigned"].ToString();
  956.  
  957. // ReviewStatus Label
  958. Label ReviewStatusLabel = (Label)e.Item.FindControl("RC_ReviewStatus");
  959. ReviewStatusLabel.Text = CycleRow["ReviewStatus"].ToString();
  960.  
  961. // Review Comments
  962. TextBox ReviewComments = (TextBox)e.Item.FindControl("RC_ReviewComments");
  963. ReviewComments.Text = CycleRow["ReviewComments"].ToString();
  964.  
  965. // setup checklist link
  966. HtmlAnchor ChecklistLink = (HtmlAnchor)e.Item.FindControl("ChecklistLink");
  967. ChecklistLink.HRef = GetChecklistURL("Edit", Utility.URL.Encode(CycleRow["GroupName"].ToString()), PDOX.Review.SelectedCycle, PermitSubType.Text);
  968.  
  969.  
  970. // Review Panel
  971. CheckBox PerformReview = (CheckBox)e.Item.FindControl("RC_PerformReview");
  972. Panel PerformReviewPanel = (Panel)e.Item.FindControl("RC_ReviewPanel");
  973. CheckBox PerformReviewComplete = (CheckBox)e.Item.FindControl("DeptReviewChk");
  974.  
  975. // Group Select
  976. CheckBox AssignCorrectionsCheckBox = (CheckBox)e.Item.FindControl("RC_AssignCorrections");
  977. AssignCorrectionsCheckBox.Checked = PDUtility.ConversionUtility.CBOOL2(CycleRow["AssignCorrections"]);
  978.  
  979. // QA Panel
  980. Panel QAPanel = (Panel)e.Item.FindControl("RC_QAFieldSet");
  981. TextBox QARequestTextBox = (TextBox)e.Item.FindControl("RC_QARequest");
  982. TextBox QAResponseTextBox = (TextBox)e.Item.FindControl("RC_QAResponse");
  983.  
  984.  
  985. //
  986. // fill status drop down
  987. //
  988. DropDownList ChangeStatusDropDown = (DropDownList)e.Item.FindControl("RC_ChangeStatus");
  989. string StatusValue = "";
  990. ChangeStatusDropDown.Items.Clear();
  991.  
  992. ChangeStatusDropDown.Items.Add(new ListItem("-select status-", ""));
  993. foreach (string StatusText in PDOX.DropDownStatuses)
  994. {
  995. if (PDOX.StatusCodes.ContainsKey(StatusText))
  996. {
  997. StatusValue = PDOX.StatusCodes[StatusText];
  998. li = new ListItem(StatusValue, StatusText);
  999.  
  1000. if (li.Value == CycleRow["ReviewStatus"].ToString())
  1001. li.Selected = true;
  1002.  
  1003. ChangeStatusDropDown.Items.Add(li);
  1004. }
  1005. }
  1006.  
  1007. GroupSelect.Visible = true;
  1008. PerformReview.Checked = PDUtility.ConversionUtility.CBOOL2(CycleRow["PerformReview"]);
  1009.  
  1010. int RowDepth = Convert.ToInt32(CycleRow["Depth"].ToString());
  1011. bool CorrectionsNeeded = PDUtility.ConversionUtility.CBOOL2(FlowContext.Workflow["ReviewQA.CorrectionsNeeded"]);
  1012. bool ShowQAPanel = false;
  1013. bool EnableRow = false;
  1014. bool EnableGroupSelect = false;
  1015. bool DisplayRow = false;
  1016. bool UserIsSuper = PDOX.CurrentUser.IsSuper;
  1017. bool RowIsUser = (CycleRow["Lineage"].ToString() == PDOX.CurrentUser.Lineage);
  1018. bool RowIsSubordinateToUser = (CycleRow["Lineage"].ToString().Contains(PDOX.CurrentUser.Lineage)) && !RowIsUser;
  1019. bool RowIsDirectSubordinate = (RowIsSubordinateToUser && (Math.Abs(RowDepth - PDOX.CurrentUser.Depth) < 2));
  1020. bool RowCanPerformReview = PDUtility.ConversionUtility.CBOOL2(CycleRow["PerformReview"]);
  1021.  
  1022. AssignCorrectionsCheckBox.Visible = false;
  1023. PerformReviewComplete.Visible = false;
  1024.  
  1025. //DebugMessage("RowLineage = " + CycleRow["Lineage"].ToString() + " : UserLineage = " + PDOX.CurrentUser.Lineage);
  1026. if (IsActivity(PDOX.StandardActivities.DepartmentReview))
  1027. {
  1028. ShowQAPanel = CorrectionsNeeded;
  1029.  
  1030. PerformReview.Enabled = false;
  1031. PerformReview.Visible = false;
  1032. PerformReviewPanel.Visible = true;
  1033. PerformReviewComplete.Visible = true;
  1034.  
  1035. if (UserIsSuper)
  1036. {
  1037. // if this row is the super
  1038. if (RowIsUser)
  1039. {
  1040. if (RowCanPerformReview)
  1041. {
  1042. PerformReview.Visible = false;
  1043. PerformReviewPanel.Visible = true;
  1044. DisplayRow = true;
  1045. EnableRow = true;
  1046. }
  1047. }
  1048. else if (RowIsDirectSubordinate)
  1049. {
  1050. PerformReviewPanel.Visible = true;
  1051. DisplayRow = true;
  1052. EnableRow = false;
  1053. PerformReviewComplete.Enabled = false;
  1054. }
  1055. else
  1056. {
  1057. DisplayRow = false;
  1058. EnableRow = false;
  1059. }
  1060. }
  1061. else
  1062. {
  1063. if (RowIsUser)
  1064. {
  1065. DisplayRow = true;
  1066. EnableRow = true;
  1067. }
  1068. else
  1069. {
  1070. if (GroupSelect.Checked)
  1071. {
  1072. DisplayRow = true;
  1073. EnableRow = false;
  1074. }
  1075. }
  1076. }
  1077.  
  1078. GroupSelect.Visible = false;
  1079.  
  1080. if (CorrectionsNeeded)
  1081. {
  1082. AssignCorrectionsCheckBox.Visible = true;
  1083. AssignCorrectionsCheckBox.Enabled = false;
  1084. }
  1085.  
  1086. if (PDOX.CurrentUser.IsReviewCoordinator)
  1087. {
  1088. DisplayRow = true;
  1089. EnableRow = false;
  1090. PerformReviewPanel.Visible = true;
  1091. PerformReviewComplete.Visible = false;
  1092. }
  1093. }
  1094. else if (IsActivity(PDOX.StandardActivities.ReviewQA))
  1095. {
  1096. PerformReview.Visible = false;
  1097. PerformReviewPanel.Visible = true;
  1098. ShowQAPanel = GroupSelect.Checked;
  1099. DisplayRow = GroupSelect.Checked;
  1100.  
  1101. AssignCorrectionsCheckBox.Checked = false;
  1102. AssignCorrectionsCheckBox.Visible = true;
  1103. }
  1104. else if (IsActivity("ReviewComplete"))
  1105. {
  1106. PerformReview.Visible = false;
  1107. PerformReviewPanel.Visible = true;
  1108. ShowQAPanel = false;
  1109. EnableRow = false;
  1110. DisplayRow = GroupSelect.Checked;
  1111. }
  1112. else if (IsActivity("ApplicantResubmit"))
  1113. {
  1114. PerformReview.Visible = false;
  1115. PerformReviewPanel.Visible = true;
  1116. ShowQAPanel = false;
  1117. EnableRow = false;
  1118. DisplayRow = GroupSelect.Checked;
  1119. }
  1120. else if (IsActivity("ResubmitReceived"))
  1121. {
  1122. PerformReview.Visible = false;
  1123. PerformReviewPanel.Visible = true;
  1124. ShowQAPanel = false;
  1125. EnableRow = false;
  1126. DisplayRow = GroupSelect.Checked;
  1127. }
  1128.  
  1129. //DebugMessage(GroupNameLabel.Text + " UIS:" + UserIsSuper.ToString() + " RISTU:" + RowIsSubordinateToUser.ToString() + " RIU:" + RowIsUser.ToString() + " ER:" + EnableRow.ToString() + " DR: " + DisplayRow.ToString());
  1130. // check which elements should be disabled if the current user is not the assigned reviewer
  1131.  
  1132. if (PDOX.Review.SelectedCycle != PDOX.Review.CurrentCycle)
  1133. {
  1134. EnableGroupSelect = false;
  1135. EnableRow = false;
  1136. }
  1137.  
  1138. GroupSelect.Enabled = EnableGroupSelect;
  1139.  
  1140. if (EnableRow)
  1141. {
  1142. ChangeStatusDropDown.Enabled = true;
  1143.  
  1144. if (ShowQAPanel)
  1145. {
  1146. QAResponseTextBox.Enabled = true;
  1147. ReviewComments.Enabled = true;
  1148. }
  1149. }
  1150. else
  1151. {
  1152. ChangeStatusDropDown.Enabled = false;
  1153.  
  1154. if (ShowQAPanel)
  1155. {
  1156. QAResponseTextBox.Enabled = false;
  1157. }
  1158. ReviewComments.Enabled = false;
  1159.  
  1160. }
  1161.  
  1162. // QA Panel
  1163.  
  1164. if (IsActivity(PDOX.StandardActivities.DepartmentReview))
  1165. {
  1166. QAPanel.Visible = ShowQAPanel && AssignCorrectionsCheckBox.Checked;
  1167. }
  1168. else if (IsActivity(PDOX.StandardActivities.ReviewQA))
  1169. {
  1170. QAPanel.Visible = ShowQAPanel;
  1171. }
  1172. else if (IsActivity("ReviewComplete"))
  1173. {
  1174. QAPanel.Visible = false;
  1175. }
  1176. else if (IsActivity("ApplicantResubmit"))
  1177. {
  1178. QAPanel.Visible = ShowQAPanel;
  1179. }
  1180.  
  1181. if (QAPanel.Visible)
  1182. {
  1183. QARequestTextBox.Text = CycleRow["QARequest"].ToString();
  1184. QAResponseTextBox.Text = CycleRow["QAResponse"].ToString();
  1185.  
  1186. if (IsActivity(PDOX.StandardActivities.DepartmentReview.ToString()))
  1187. {
  1188. QARequestTextBox.Enabled = false;
  1189.  
  1190. }
  1191. }
  1192.  
  1193. if (PDOX.CurrentUser.GroupName != PDOX.ReviewCoordinatorGroupName) // if not a review coord then disallow the request box from edits
  1194. {
  1195. QARequestTextBox.ReadOnly = true;
  1196. }
  1197. else
  1198. {
  1199. //QARequestTextBox.Attributes.Add("onchange", "document.aspnetForm." + GroupSelect.UniqueID + ".checked=true");
  1200. }
  1201.  
  1202. if (PDOX.Review.SelectedCycle != PDOX.Review.CurrentCycle)
  1203. {
  1204. QARequestTextBox.Enabled = false;
  1205. QAResponseTextBox.Enabled = false;
  1206. PerformReviewComplete.Enabled = false;
  1207. }
  1208.  
  1209. CycleRowPlaceHolder.Visible = DisplayRow;
  1210.  
  1211. }
  1212.  
  1213. protected void UpdateReviewCycle()
  1214. {
  1215. // ----------------------------------------------------------------------------------------
  1216. // Fill Out Review Cycle Data Based on ReviewGroups
  1217. // ----------------------------------------------------------------------------------------
  1218.  
  1219. // delete current reviewcycle (we're replacing it)
  1220. /*
  1221. bool FoundToDelete = true;
  1222. while (FoundToDelete)
  1223. {
  1224. FoundToDelete = false;
  1225. foreach (DataRow CycleRow in ReviewCycleData.Tables[0].Rows)
  1226. {
  1227. if (Convert.ToInt32(CycleRow["ReviewCycle"]) == PDOX.Review.CurrentCycle)
  1228. {
  1229. CycleRow.Delete();
  1230. FoundToDelete = true;
  1231. break;
  1232. }
  1233. }
  1234. }
  1235. */
  1236.  
  1237. /*
  1238. DataRow[] RowsToDelete = ReviewCycleData.Tables[0].Select("ReviewCycle = " + PDOX.Review.CurrentCycle.ToString());
  1239.  
  1240. foreach (DataRow RowToDelete in RowsToDelete)
  1241. RowToDelete.Delete();
  1242.  
  1243. ReviewCycleData.Tables[0].AcceptChanges();
  1244. ReviewCycleData.AcceptChanges();
  1245. */
  1246.  
  1247.  
  1248.  
  1249. bool DeleteOld = false;
  1250. bool AddNew = false;
  1251. bool UpdateExisting = false;
  1252.  
  1253. DataRow GroupRow = null;
  1254. DataRow[] CycleRows = null;
  1255. bool IsSuper = false;
  1256. string GroupName = "";
  1257. PDOX.AssignmentTypes HowAssigned = PDOX.AssignmentTypes.Unknown;
  1258. bool CanPerformReview = false;
  1259. bool IsSelected = false;
  1260. ListItemCollection GroupUsers = null;
  1261. Dictionary<string, string> IndividualReviewers = new Dictionary<string, string>();
  1262. StringBuilder IndividualReviewerEmails = new StringBuilder();
  1263.  
  1264. // update rows for current review cycle based on group data
  1265. // this is a variation of the parade algo
  1266. foreach (RepeaterItem ReviewGroupItem in ReviewGroupsRepeater.Items)
  1267. {
  1268. if (IsItemRow(ReviewGroupItem))
  1269. {
  1270. PlaceHolder GroupRowPlaceHolder = (PlaceHolder)ReviewGroupItem.FindControl("RG_GroupRowPlaceHolder");
  1271.  
  1272. if (GroupRowPlaceHolder.Visible == true)
  1273. {
  1274. // get control values
  1275. IsSelected = ((CheckBox)ReviewGroupItem.FindControl("RG_GroupSelect")).Checked;
  1276. CanPerformReview = ((CheckBox)ReviewGroupItem.FindControl("RG_PerformReview")).Checked;
  1277. GroupName = ((Label)ReviewGroupItem.FindControl("RG_GroupName")).Text;
  1278. HowAssigned = (((DropDownList)ReviewGroupItem.FindControl("RG_AssignmentType")).SelectedItem.Value == PDOX.AssignmentTypes.FirstInGroup.ToString()) ? PDOX.AssignmentTypes.FirstInGroup : PDOX.AssignmentTypes.Individual;
  1279. GroupUsers = ((CheckBoxList)ReviewGroupItem.FindControl("RG_GroupUsers")).Items;
  1280.  
  1281. // find group row in ReviewGroupsData
  1282. GroupRow = FindReviewGroup(PDOX.Review.CurrentCycle, GroupName);
  1283. IsSuper = PDUtility.ConversionUtility.CBOOL2(GroupRow["IsAncestor"]);
  1284.  
  1285. UpdateExisting = false;
  1286. DeleteOld = false;
  1287. AddNew = false;
  1288.  
  1289. // get the rc row that matches these reviewers
  1290. CycleRows = ReviewCycleData.Tables[0].Select(
  1291. "ReviewCycle = " + PDOX.Review.CurrentCycle.ToString()
  1292. + " AND GroupName = '" + GroupName + "'"
  1293. );
  1294.  
  1295. // if it exists in rc data
  1296. if (CycleRows.Length > 0)
  1297. {
  1298. // if how assigned is the same
  1299. if (CycleRows[0]["HowAssigned"].ToString() == HowAssigned.ToString())
  1300. {
  1301. // if the group is selected
  1302. if (IsSelected)
  1303. UpdateExisting = true;
  1304. else
  1305. DeleteOld = true;
  1306. }
  1307. else
  1308. {
  1309. // if the group is selected
  1310. if (IsSelected)
  1311. {
  1312. // delete old individual records
  1313. DeleteOld = true;
  1314.  
  1315. // add new one as first in group
  1316. AddNew = true;
  1317. }
  1318. else
  1319. DeleteOld = true;
  1320. }
  1321. }
  1322. else
  1323. {
  1324. // doesn't exist in rc data
  1325. if (IsSelected)
  1326. AddNew = true;
  1327. }
  1328.  
  1329. IndividualReviewers.Clear();
  1330. IndividualReviewerEmails.Remove(0, IndividualReviewerEmails.Length);
  1331.  
  1332. // these are individual reviewers
  1333. foreach (ListItem GroupUser in GroupUsers)
  1334. {
  1335. if (GroupUser.Selected)
  1336. {
  1337. IndividualReviewers.Add(GroupUser.Value, GroupUser.Text);
  1338.  
  1339. if (IndividualReviewerEmails.Length > 0)
  1340. IndividualReviewerEmails.Append(",");
  1341. IndividualReviewerEmails.Append("'");
  1342. IndividualReviewerEmails.Append(GroupUser.Value);
  1343. IndividualReviewerEmails.Append("'");
  1344. }
  1345. }
  1346.  
  1347.  
  1348. if (DeleteOld)
  1349. {
  1350. foreach (DataRow CycleRow in CycleRows)
  1351. CycleRow.Delete();
  1352. }
  1353.  
  1354. switch (HowAssigned)
  1355. {
  1356. case PDOX.AssignmentTypes.FirstInGroup:
  1357. if (UpdateExisting)
  1358. {
  1359. // don't change anything
  1360. }
  1361.  
  1362. if (AddNew)
  1363. {
  1364. DataRow RC_Row = ReviewCycleData.Tables[0].NewRow();
  1365. RC_Row["GroupSelect"] = IsSelected;
  1366. RC_Row["ReviewCycle"] = PDOX.Review.CurrentCycle;
  1367. RC_Row["Depth"] = GroupRow["Depth"];
  1368. RC_Row["Lineage"] = GroupRow["Lineage"];
  1369. RC_Row["GroupName"] = GroupName;
  1370. RC_Row["HowAssigned"] = HowAssigned.ToString();
  1371. RC_Row["AssignedBy"] = Req.SessionUser.Email;
  1372.  
  1373. RC_Row["PerformReview"] = (IsSuper && CanPerformReview) || IsSelected;
  1374.  
  1375. RC_Row["ReviewerEmail"] = "";
  1376. RC_Row["ReviewerName"] = "";
  1377.  
  1378. RC_Row["ReviewStatus"] = PDOX.ReviewStatuses.Assigned.ToString();
  1379.  
  1380. RC_Row["ReviewComments"] = "";
  1381. RC_Row["QARequest"] = "";
  1382. RC_Row["QAResponse"] = "";
  1383. RC_Row["AssignCorrections"] = "false";
  1384. RC_Row["TaskID"] = FlowContext.Task.FlowTaskID;
  1385. ReviewCycleData.Tables[0].Rows.Add(RC_Row);
  1386. }
  1387. break;
  1388.  
  1389. case PDOX.AssignmentTypes.Individual:
  1390. if (UpdateExisting)
  1391. {
  1392. DataRow[] ReviewerRows = null;
  1393.  
  1394. // add any individual reviewers selected in group
  1395. // that are not in rc data
  1396. foreach (string ReviewerEmail in IndividualReviewers.Keys)
  1397. {
  1398. ReviewerRows = ReviewCycleData.Tables[0].Select(
  1399. "ReviewCycle = " + PDOX.Review.CurrentCycle.ToString()
  1400. + " AND GroupName = '" + GroupName + "'"
  1401. + " AND ReviewerEmail = '" + ReviewerEmail + "'"
  1402. );
  1403.  
  1404. // is it in rc data
  1405. if (ReviewerRows.Length < 1)
  1406. {
  1407. // add the row
  1408. DataRow RC_Row = ReviewCycleData.Tables[0].NewRow();
  1409. RC_Row["GroupSelect"] = IsSelected;
  1410. RC_Row["ReviewCycle"] = PDOX.Review.CurrentCycle;
  1411. RC_Row["Depth"] = GroupRow["Depth"];
  1412. RC_Row["Lineage"] = GroupRow["Lineage"];
  1413. RC_Row["GroupName"] = GroupName;
  1414. RC_Row["HowAssigned"] = HowAssigned.ToString();
  1415. RC_Row["AssignedBy"] = Req.SessionUser.Email;
  1416.  
  1417. RC_Row["PerformReview"] = (IsSuper && CanPerformReview) || IsSelected;
  1418.  
  1419. RC_Row["ReviewerEmail"] = ReviewerEmail;
  1420. RC_Row["ReviewerName"] = IndividualReviewers[ReviewerEmail];
  1421.  
  1422. RC_Row["ReviewStatus"] = PDOX.ReviewStatuses.Assigned.ToString();
  1423.  
  1424. RC_Row["ReviewComments"] = "";
  1425. RC_Row["QARequest"] = "";
  1426. RC_Row["QAResponse"] = "";
  1427. RC_Row["AssignCorrections"] = "false";
  1428. RC_Row["TaskID"] = FlowContext.Task.FlowTaskID;
  1429. ReviewCycleData.Tables[0].Rows.Add(RC_Row);
  1430. }
  1431. }
  1432.  
  1433. // remove any individual reviewers existing in rc data
  1434. // not selected in group
  1435. if (IndividualReviewers.Count > 0)
  1436. {
  1437. ReviewerRows = ReviewCycleData.Tables[0].Select(
  1438. "ReviewCycle = " + PDOX.Review.CurrentCycle.ToString()
  1439. + " AND GroupName = '" + GroupName + "'"
  1440. + " AND ReviewerEmail NOT IN (" + IndividualReviewerEmails.ToString() + ")"
  1441. );
  1442.  
  1443. foreach (DataRow ReviewerRow in ReviewerRows)
  1444. ReviewerRow.Delete();
  1445. }
  1446. else
  1447. {
  1448. // all ind rev were unchecked. delete all
  1449. ReviewerRows = ReviewCycleData.Tables[0].Select(
  1450. "ReviewCycle = " + PDOX.Review.CurrentCycle.ToString()
  1451. + " AND GroupName = '" + GroupName + "'"
  1452. );
  1453.  
  1454. foreach (DataRow ReviewerRow in ReviewerRows)
  1455. ReviewerRow.Delete();
  1456. }
  1457. }
  1458.  
  1459. if (AddNew)
  1460. {
  1461. // just add the reviewers
  1462. foreach (string ReviewerEmail in IndividualReviewers.Keys)
  1463. {
  1464. DataRow RC_Row = ReviewCycleData.Tables[0].NewRow();
  1465. RC_Row["GroupSelect"] = IsSelected;
  1466. RC_Row["ReviewCycle"] = PDOX.Review.CurrentCycle;
  1467. RC_Row["Depth"] = GroupRow["Depth"];
  1468. RC_Row["Lineage"] = GroupRow["Lineage"];
  1469. RC_Row["GroupName"] = GroupName;
  1470. RC_Row["HowAssigned"] = HowAssigned.ToString();
  1471. RC_Row["AssignedBy"] = Req.SessionUser.Email;
  1472.  
  1473. RC_Row["PerformReview"] = (IsSuper && CanPerformReview) || IsSelected;
  1474.  
  1475. RC_Row["ReviewerEmail"] = ReviewerEmail;
  1476. RC_Row["ReviewerName"] = IndividualReviewers[ReviewerEmail];
  1477.  
  1478. RC_Row["ReviewStatus"] = PDOX.ReviewStatuses.Assigned.ToString();
  1479.  
  1480. RC_Row["ReviewComments"] = "";
  1481. RC_Row["QARequest"] = "";
  1482. RC_Row["QAResponse"] = "";
  1483. RC_Row["AssignCorrections"] = "false";
  1484. RC_Row["TaskID"] = FlowContext.Task.FlowTaskID;
  1485. ReviewCycleData.Tables[0].Rows.Add(RC_Row);
  1486. }
  1487. }
  1488. break;
  1489.  
  1490.  
  1491. }
  1492.  
  1493. }
  1494. }
  1495.  
  1496. ReviewCycleData.Tables[0].AcceptChanges();
  1497. ReviewCycleData.AcceptChanges();
  1498. }
  1499.  
  1500. // save cycle data
  1501. SaveToDataSetField("PDOX.ReviewCycleData", ReviewCycleData);
  1502. FlowContext.Workflow.SaveField("PDOX.ReviewCycleData");
  1503.  
  1504. // 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
  1505. //FlowContext.Workflow.SaveFields();
  1506.  
  1507. }
  1508.  
  1509. protected void AddNewReviewCycle()
  1510. {
  1511. // increment PDOX.Review.CurrentCycle before calling this method
  1512.  
  1513. //ReviewGroupsTable.Columns.Add("ReviewCycle", typeof(int));
  1514. //ReviewGroupsTable.Columns.Add("GroupSelect", typeof(bool));
  1515. //ReviewGroupsTable.Columns.Add("GroupName", typeof(string));
  1516. //ReviewGroupsTable.Columns.Add("HowAssigned", typeof(string));
  1517. //ReviewGroupsTable.Columns.Add("IndividualReviewers", typeof(string));
  1518.  
  1519. if (ReviewGroupsData == null)
  1520. ReviewGroupsData = LoadFromDataSetField("PDOX.ReviewGroupsData");
  1521.  
  1522. if (ReviewCycleData == null)
  1523. ReviewCycleData = LoadFromDataSetField("PDOX.ReviewCycleData");
  1524.  
  1525. DataTable ReviewCycleTable = ReviewCycleData.Tables[0];
  1526. DataTable ReviewGroupsTable = ReviewGroupsData.Tables[0];
  1527. DataTable GroupsCopy = ReviewGroupsTable.Clone();
  1528. DataTable CycleCopy = ReviewCycleTable.Clone();
  1529. int PreviousCycle = PDOX.Review.CurrentCycle - 1;
  1530.  
  1531. //
  1532. // create a new set of reviewer groups for new review cycle
  1533. //
  1534.  
  1535. // select previous review groups rows and put them in copy table
  1536. DataRow[] PreviousGroupRows = ReviewGroupsTable.Select("ReviewCycle = " + PreviousCycle.ToString());
  1537. foreach (DataRow PreviousGroupRow in PreviousGroupRows)
  1538. GroupsCopy.ImportRow(PreviousGroupRow);
  1539.  
  1540. // update copied groups with new review cycle info
  1541. // TODO: change groups for the new review cycle here
  1542. foreach (DataRow CopiedGroupRow in GroupsCopy.Rows)
  1543. CopiedGroupRow["ReviewCycle"] = PDOX.Review.CurrentCycle;
  1544.  
  1545. GroupsCopy.AcceptChanges();
  1546.  
  1547. // append these rows back into Reviewer Groups Data
  1548. foreach (DataRow CopiedGroupRow in GroupsCopy.Rows)
  1549. ReviewGroupsTable.ImportRow(CopiedGroupRow);
  1550.  
  1551. ReviewGroupsTable.AcceptChanges();
  1552. ReviewGroupsData.AcceptChanges();
  1553.  
  1554. SaveToDataSetField("PDOX.ReviewGroupsData", ReviewGroupsData);
  1555. FlowContext.Workflow.SaveField("PDOX.ReviewGroupsData");
  1556.  
  1557.  
  1558. // select current review cycle rows and put them in copy table
  1559. DataRow[] CurrentGroupRows = ReviewGroupsTable.Select("ReviewCycle = " + PreviousCycle.ToString());
  1560. foreach (DataRow PreviousGroupRow in PreviousGroupRows)
  1561. GroupsCopy.ImportRow(PreviousGroupRow);
  1562.  
  1563. //
  1564. // create new set of review cycle data
  1565. //
  1566. DataRow[] PreviousCycleRows = ReviewCycleTable.Select("ReviewCycle = " + PreviousCycle.ToString());
  1567. foreach (DataRow PreviousCycleRow in PreviousCycleRows)
  1568. CycleCopy.ImportRow(PreviousCycleRow);
  1569.  
  1570. // update copied cycle data with new review cycle info
  1571. // TODO: change cycle data for the new review cycle here
  1572. foreach (DataRow CopiedCycleRow in CycleCopy.Rows)
  1573. {
  1574. CopiedCycleRow["ReviewComments"] = "";
  1575. CopiedCycleRow["QARequest"] = "";
  1576. CopiedCycleRow["QAResponse"] = "";
  1577. CopiedCycleRow["ReviewCycle"] = PDOX.Review.CurrentCycle;
  1578. CopiedCycleRow["ReviewStatus"] = PDOX.ReviewStatuses.Assigned.ToString();
  1579. CopiedCycleRow["AssignCorrections"] = "false";
  1580. CopiedCycleRow["TaskID"] = FlowContext.Task.FlowTaskID;
  1581. }
  1582.  
  1583. CycleCopy.AcceptChanges();
  1584.  
  1585. // append these rows back into Review cycle Data
  1586. foreach (DataRow CopiedCycleRow in CycleCopy.Rows)
  1587. ReviewCycleTable.ImportRow(CopiedCycleRow);
  1588.  
  1589. ReviewCycleTable.AcceptChanges();
  1590. ReviewCycleData.AcceptChanges();
  1591.  
  1592. SaveToDataSetField("PDOX.ReviewCycleData", ReviewCycleData);
  1593. FlowContext.Workflow.SaveField("PDOX.ReviewCycleData");
  1594.  
  1595. FlowContext.Workflow["PDOX.Review.CurrentCycle"] = PDOX.Review.CurrentCycle.ToString();
  1596. FlowContext.Workflow["PDOX.Review.CycleCount"] = PDOX.Review.CurrentCycle.ToString();
  1597. FlowContext.Workflow["PDOX.Review.SelectedCycle"] = PDOX.Review.CurrentCycle.ToString();
  1598. FlowContext.Workflow.SaveField("PDOX.Review.CurrentCycle");
  1599. FlowContext.Workflow.SaveField("PDOX.Review.CycleCount");
  1600. FlowContext.Workflow.SaveField("PDOX.Review.SelectedCycle");
  1601. }
  1602.  
  1603. protected void BindReviewCycleData(int ReviewCycle)
  1604. {
  1605.  
  1606. if (ReviewCycleData != null)
  1607. {
  1608. DebugMessage("BindReviewCycleData: ReviewCycleData != null");
  1609. if (ReviewCycleData.Tables.Count > 0)
  1610. {
  1611. DebugMessage("BindReviewCycleData: ReviewCycleData.Tables.Count > 0");
  1612.  
  1613. DataRow[] SelectedReviewCycleRows = ReviewCycleData.Tables[0].Select("ReviewCycle = " + ReviewCycle.ToString());
  1614. DebugMessage("BindReviewCycleData: Binding " + SelectedReviewCycleRows.Length.ToString() + " Rows");
  1615. ReviewCycleRepeater.DataSource = SelectedReviewCycleRows;
  1616. ReviewCycleRepeater.DataBind();
  1617. }
  1618. }
  1619. else
  1620. DebugMessage("BindReviewCycleData: ReviewCycleData == null");
  1621. }
  1622.  
  1623. </script>
  1624.  
  1625. <%--
  1626. // ================================================================================
  1627. //
  1628. // Permitting Methods
  1629. //
  1630. // ================================================================================
  1631. --%>
  1632.  
  1633. <script language="C#" runat="server">
  1634. protected DataSet GetPermitData()
  1635. {
  1636. DataSet ds = null;
  1637.  
  1638. string PPlusPermitNumber = FlowContext.Project.Name;
  1639.  
  1640. //"server=MIAMIBEACH330;database=PermDB;uid=pdox-sql;pwd=projectdox"
  1641. using (DataActiveLibrary.Query Qry = new DataActiveLibrary.Query("server=MIAMIBEACH330;database=PermDB;uid=pdox-sql;pwd=projectdox"))
  1642. {
  1643. Qry.QueryText = @"
  1644. SELECT TOP 1
  1645. ISNULL(Permit_No,'') Permit_No
  1646. ,ISNULL(Permit_Description,'') Permit_Description
  1647. ,ISNULL(Permit_Type,'') Permit_Type
  1648. ,ISNULL(Permit_Sub_Type,'') Permit_Sub_Type
  1649. ,ISNULL(Permit_Sub_Type_Description,'') Permit_Sub_Type_Description
  1650. ,ISNULL(Permit_Street_No,'') Permit_Street_No
  1651. ,ISNULL(Permit_Street_Direction,'') Permit_Street_Direction
  1652. ,ISNULL(Permit_Street_Name,'') Permit_Street_Name
  1653. ,ISNULL(Permit_Full_Address,'') Permit_Full_Address
  1654. ,ISNULL(Permit_Parcel_No,'') Permit_Parcel_No
  1655. ,ISNULL(Permit_Location,'') Permit_Location
  1656. ,ISNULL(Permit_Occupancy_Class,'') Permit_Occupancy_Class
  1657. ,ISNULL(Permit_Title,'') Permit_Title
  1658. ,ISNULL(Permit_Applied_Date,'') Permit_Applied_Date
  1659. ,ISNULL(Permit_Entered_Date,'') Permit_Entered_Date
  1660. ,ISNULL(Permit_Status,'') Permit_Status
  1661. ,ISNULL(Permit_Substantial_Improvements,'') Permit_Substantial_Improvements
  1662. ,ISNULL(Permit_Number_Buildings,'') Permit_Number_Buildings
  1663. ,ISNULL(Permit_Number_Units,'') Permit_Number_Units
  1664. ,ISNULL(Permit_Public_Owned,'') Permit_Public_Owned
  1665. ,ISNULL(Permit_OwnerName,'') Permit_OwnerName
  1666. ,ISNULL(Permit_OwnerAddress_1,'') Permit_OwnerAddress_1
  1667. ,ISNULL(Permit_OwnerAddress_2,'') Permit_OwnerAddress_2
  1668. ,ISNULL(Permit_OwnerAddress_3,'') Permit_OwnerAddress_3
  1669. ,ISNULL(Permit_OwnerZip,'') Permit_OwnerZip
  1670. ,ISNULL(Permit_Owner_Full_Address,'') Permit_Owner_Full_Address
  1671. ,ISNULL(Permit_OwnerPhone1,'') Permit_OwnerPhone1
  1672. ,ISNULL(Permit_ArchitectName,'') Permit_ArchitectName
  1673. ,ISNULL(Permit_ArchitectAddress_2,'') Permit_ArchitectAddress_2
  1674. ,ISNULL(Permit_ArchitectAddress_2,'') Permit_ArchitectAddress_2
  1675. ,ISNULL(Permit_ArchitectAddress_3,'') Permit_ArchitectAddress_3
  1676. ,ISNULL(Permit_ArchitectZip,'') Permit_ArchitectZip
  1677. ,ISNULL(Permit_Architect_Full_Address,'') Permit_Architect_Full_Address
  1678. ,ISNULL(Permit_ArchitectPhone_1,'' ) Permit_ArchitectPhone_1
  1679. ,ISNULL(Permit_EngineerName,'') Permit_EngineerName
  1680. ,ISNULL(Permit_EngineerAddress_1,'') Permit_EngineerAddress_1
  1681. ,ISNULL(Permit_EngineerAddress_2,'') Permit_EngineerAddress_2
  1682. ,ISNULL(Permit_EngineerAddress_3,'') Permit_EngineerAddress_3
  1683. ,ISNULL(Permit_EngineerZip,'') Permit_EngineerZip
  1684. ,ISNULL(Permit_Engineer_Full_Address,'') Permit_Engineer_Full_Address
  1685. ,ISNULL(Permit_EngineerPhone_1,'') Permit_EngineerPhone_1
  1686. ,ISNULL(Permit_ContractorName,'') Permit_ContractorName
  1687. ,ISNULL(Permit_ContractorAddress_1,'') Permit_ContractorAddress_1
  1688. ,ISNULL(Permit_ContractorAddress_2,'') Permit_ContractorAddress_2
  1689. ,ISNULL(Permit_ContractorAddress_3,'') Permit_ContractorAddress_3
  1690. ,ISNULL(Permit_ContractorZip,'') Permit_ContractorZip
  1691. ,ISNULL(Permit_Contractor_Full_Address,'') Permit_Contractor_Full_Address
  1692. ,ISNULL(Permit_ContractorPhone_1,'') Permit_ContractorPhone_1
  1693. ,ISNULL(Permit_ApplicantName,'') Permit_ApplicantName
  1694. ,ISNULL(Permit_ApplicantAddress_1,'') Permit_ApplicantAddress_1
  1695. ,ISNULL(Permit_ApplicantAddress_2,'') Permit_ApplicantAddress_2
  1696. ,ISNULL(Permit_ApplicantAddress_3,'') Permit_ApplicantAddress_3
  1697. ,ISNULL(Permit_ApplicantZip,'') Permit_ApplicantZip
  1698. ,ISNULL(Permit_Applicant_Full_Address,'') Permit_Applicant_Full_Address
  1699. ,ISNULL(Permit_ApplicantPhone_1,'') Permit_ApplicantPhone_1
  1700. ,ISNULL(CONVERT(VARCHAR(25),Permit_Valuation),'') Permit_Valuation
  1701. ,ISNULL(Permit_TotalSQFT,'') Permit_TotalSQFT
  1702. ,ISNULL(Permit_Area_Under_Roof,'') Permit_Area_Under_Roof
  1703. ,ISNULL(Permit_Zoning,'') Permit_Zoning
  1704. ,ISNULL(Permit_Parking,'') Permit_Parking
  1705. ,ISNULL(Permit_Building_Construction_Type,'') Permit_Building_Construction_Type
  1706. ,ISNULL(Permit_Historic_District,'') Permit_Historic_District
  1707. ,ISNULL(Permit_Special_Projects,'') Permit_Special_Projects
  1708. ,ISNULL(Permit_HUD,'') Permit_HUD
  1709. ,ISNULL(Permit_Private_Provider,'') Permit_Private_Provider
  1710. ,ISNULL(Permit_LEED,'') Permit_LEED
  1711. ,ISNULL(Permit_City_Projects,'') Permit_City_Projects
  1712. ,ISNULL(Permit_Building_Stories,'') Permit_Building_Stories
  1713. ,ISNULL(Permit_Building_Height,'') Permit_Building_Height
  1714. ,ISNULL(Permit_Building_Assembly_Occupancy,'') Permit_Building_Assembly_Occupancy
  1715. ,ISNULL(Permit_Occupant_Content,'') Permit_Occupant_Content
  1716. ,ISNULL(Permit_Large_Unusual,'') Permit_Large_Unusual
  1717. ,ISNULL(Permit_Electronic_Plan_Review,'') Permit_Electronic_Plan_Review
  1718. ,ISNULL(Permit_Legal_Description,'') Permit_Legal_Description
  1719. FROM VIEW_APP_PDOXINFO
  1720. WHERE Permit_No = @PermitNo";
  1721. Qry.AddSQLParam("@PermitNo", PPlusPermitNumber, SqlDbType.VarChar);
  1722.  
  1723. ds = Qry.GetDataSet();
  1724. }
  1725.  
  1726. return ds;
  1727. }
  1728.  
  1729. protected void InitPermitData()
  1730. {
  1731. // permit info
  1732. AddDataSetField("PDOX.PermitData");
  1733. if (ResetDataSets) FlowContext.Workflow["PDOX.PermitData"] = "";
  1734.  
  1735. if (PermitNumber.Text == "")
  1736. {
  1737. if (IsDataSetFieldEmpty("PDOX.PermitData"))
  1738. BuildDataSetField("PDOX.PermitData");
  1739.  
  1740. PermitData = LoadFromDataSetField("PDOX.PermitData");
  1741. }
  1742. }
  1743.  
  1744. protected void FillPermitFields()
  1745. {
  1746. // ----------------------------------------------------------------------------------------
  1747. // Permit Information
  1748. // ----------------------------------------------------------------------------------------
  1749. 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
  1750. {
  1751. foreach (DataRow PermitRow in PermitData.Tables[0].Rows)
  1752. {
  1753. PermitNumber.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_No"]); ;
  1754. PermitDescription.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Description"]);
  1755. PermitType.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Type"]);
  1756. PermitSubType.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Sub_Type"]);
  1757. SubtypeDescription.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Sub_Type_Description"]);
  1758. PermitParcelNumber.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Parcel_No"]);
  1759. PermitLocation.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Location"]);
  1760. PermitStatus.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Status"]);
  1761. PermitTitle.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Title"]);
  1762. SubstantialImprovements.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Substantial_Improvements"]);
  1763. BuildingCount.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Number_Buildings"]);
  1764. UnitCount.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Number_Units"]);
  1765. PermitValuation.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Valuation"]);
  1766. PermitAUR.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Area_Under_Roof"]);
  1767. BuildingConsType.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Building_Construction_Type"]);
  1768. SpecialProjects.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Special_Projects"]);
  1769. PrivateProvider.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Private_Provider"]);
  1770. CityProjects.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_City_Projects"]);
  1771. BuildingHeight.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Building_Height"]);
  1772. OccupancyContent.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Occupant_Content"]);
  1773.  
  1774. ApplicantName.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ApplicantName"]);
  1775. ApplicantPhone.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ApplicantPhone_1"]);
  1776. ApplicantEmail.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ApplicantName"]);
  1777. PermitOccClass.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Occupancy_Class"]);
  1778. ApplicantCell.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ApplicantName"]);
  1779. ApplicantFax.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ApplicantName"]);
  1780. AppliedDate.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Applied_Date"]);
  1781. EnteredDate.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Entered_Date"]);
  1782. TotalSqft.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_TotalSQFT"]);
  1783. Zoning.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Zoning"]);
  1784. HUD.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_HUD"]);
  1785. LEED.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_LEED"]);
  1786. BuildingStories.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Building_Stories"]);
  1787. BuildingAssmemblyOccupancy.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_Building_Assembly_Occupancy"]);
  1788.  
  1789. ArchitectName.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ArchitectName"]);
  1790. ArchitectPhone.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ArchitectPhone_1"]);
  1791. ArchitectCell.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ArchitectName"]);
  1792. ArchitectFax.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ArchitectName"]);
  1793. ArchitectEmail.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ArchitectName"]);
  1794.  
  1795. ContractorName.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ContractorName"]);
  1796. ContractorPhone.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ContractorPhone_1"]);
  1797. ContractorCell.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ContractorName"]);
  1798. ContractorFax.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ContractorName"]);
  1799. ContractorEmail.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_ContractorName"]);
  1800.  
  1801. EngineerName.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_EngineerName"]);
  1802. EngineerPhone.Text = PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_EngineerPhone_1"]);
  1803. EngineerCell.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_EngineerName"]);
  1804. EngineerFax.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_EngineerName"]);
  1805. EngineerEmail.Text = ""; //PDUtility.ConversionUtility.BlankNull(PermitRow["Permit_EngineerName"]);
  1806.  
  1807. }
  1808.  
  1809. }
  1810. }
  1811. </script>
  1812.  
  1813. <%--
  1814. // ================================================================================
  1815. //
  1816. // GroupPreScreen Methods
  1817. //
  1818. // ================================================================================
  1819. --%>
  1820.  
  1821. <script language="C#" runat="server">
  1822. protected void InitGroupPreScreenView()
  1823. {
  1824. // configure buttons
  1825. this.Master.GetButton("SaveButton").Visible = false;
  1826. this.Master.GetButton("SaveCloseButton").Visible = true;
  1827. this.Master.GetButton("CancelButton").Visible = false;
  1828. this.Master.GetButton("CancelButton").Text = "Close";
  1829. this.Master.GetButton("CompleteButton").Attributes.Add("disabled", "disabled");
  1830. this.Master.GetButton("CompleteButton").Text = "Prescreen Complete";
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838. // configure form panels
  1839.  
  1840. // configure panels
  1841. PermitPanel.Visible = true;
  1842. ReviewInfoPanel.Visible = true;
  1843. ReviewGroupsPanel.Visible = false;
  1844. ReviewCyclePanel.Visible = false;
  1845. InstructionsPanel.Visible = false;
  1846.  
  1847. GroupPreScreenPanel.Visible = true;
  1848. GroupPreScreenFieldSet1.Visible = false;
  1849. GroupPreScreenFieldSet2.Visible = false;
  1850. GroupPreScreenFieldSet3.Visible = false;
  1851.  
  1852. PreScreenChecklistLink1.HRef = GetChecklistURL("Edit", Utility.URL.Encode("Router Clerk"), PDOX.Review.SelectedCycle, PermitSubType.Text);
  1853. PreScreenChecklistLink2.HRef = GetChecklistURL("Edit", Utility.URL.Encode("B Building"), PDOX.Review.SelectedCycle, PermitSubType.Text);
  1854. PreScreenChecklistLink3.HRef = GetChecklistURL("Edit", Utility.URL.Encode("B Governmental Compliance"), PDOX.Review.SelectedCycle, PermitSubType.Text);
  1855.  
  1856. PreScreenToolTip.Visible = true;
  1857.  
  1858. switch (PDOX.CurrentUser.GroupName)
  1859. {
  1860. case "Router Clerk":
  1861. GroupPreScreenFieldSet1.Visible = true;
  1862. break;
  1863. case "B Building":
  1864. GroupPreScreenFieldSet2.Visible = true;
  1865. break;
  1866. case "B Governmental Compliance":
  1867. GroupPreScreenFieldSet3.Visible = true;
  1868. break;
  1869. }
  1870. }
  1871. </script>
  1872.  
  1873. <%--
  1874. // ================================================================================
  1875. //
  1876. // PreScreenReview Methods
  1877. //
  1878. // ================================================================================
  1879. --%>
  1880.  
  1881. <script language="C#" runat="server">
  1882. protected void InitPreScreenReviewView()
  1883. {
  1884. // configure buttons
  1885. this.Master.GetButton("SaveButton").Visible = false;
  1886. this.Master.GetButton("SaveCloseButton").Visible = false;
  1887. this.Master.GetButton("CancelButton").Visible = true;
  1888. this.Master.GetButton("CancelButton").Text = "Close";
  1889.  
  1890. this.Master.AddButton("VoidReviewButton", "Void Revew");
  1891. this.Master.GetButton("VoidReviewButton").CssClass = "EFormButton";
  1892.  
  1893. //this.Master.AddButton("ProjectExportButton", "Project Export");
  1894. //this.Master.GetButton("ProjectExportButton").CssClass = "EFormButton";
  1895.  
  1896. // configure form panels
  1897.  
  1898. // configure panels
  1899. PermitPanel.Visible = true;
  1900. ReviewInfoPanel.Visible = true;
  1901. ReviewGroupsPanel.Visible = false;
  1902. ReviewCyclePanel.Visible = false;
  1903. InstructionsPanel.Visible = true;
  1904. PreReviewInstructions.Visible = true;
  1905. PreRevAppInstructions.Visible = false;
  1906. AppResubmitInstructions.Visible = false;
  1907.  
  1908. PreScreenChecklistLink1.HRef = GetChecklistURL("", Utility.URL.Encode("Router Clerk"), PDOX.Review.SelectedCycle, PermitSubType.Text);
  1909. PreScreenChecklistLink2.HRef = GetChecklistURL("", Utility.URL.Encode("B Building"), PDOX.Review.SelectedCycle, PermitSubType.Text);
  1910. PreScreenChecklistLink3.HRef = GetChecklistURL("", Utility.URL.Encode("B Governmental Compliance"), PDOX.Review.SelectedCycle, PermitSubType.Text);
  1911.  
  1912. PreScreenReviewToolTip.Visible = true;
  1913.  
  1914. //PreNotesApp.Text = PreNotes.Text;
  1915. PreNotes.Visible = true;
  1916.  
  1917.  
  1918. GroupPreScreenPanel.Visible = true;
  1919. GroupPreScreenFieldSet1.Visible = true;
  1920. GroupPreScreenFieldSet2.Visible = true;
  1921. GroupPreScreenFieldSet3.Visible = true;
  1922.  
  1923. // make group pre screen read only / disabled
  1924. GroupPreScreenComments1.ReadOnly = true;
  1925. GroupPreScreenComments2.ReadOnly = true;
  1926. GroupPreScreenComments3.ReadOnly = true;
  1927. GroupPreScreenAD1.Enabled = false;
  1928. GroupPreScreenAD2.Enabled = false;
  1929. GroupPreScreenAD3.Enabled = false;
  1930.  
  1931. //make checkboxs disabled
  1932. PreScreenChecklistRC.Enabled = false;
  1933. PreScreenChecklistBLD.Enabled = false;
  1934. PreScreenChecklistGC.Enabled = false;
  1935.  
  1936. }
  1937.  
  1938.  
  1939. </script>
  1940.  
  1941. <%--
  1942. // ================================================================================
  1943. //
  1944. // CorrectionComplete Methods
  1945. //
  1946. // ================================================================================
  1947. --%>
  1948.  
  1949. <script language="C#" runat="server">
  1950. protected void InitCorrectionCompleteView()
  1951. {
  1952. // configure buttons
  1953. this.Master.GetButton("SaveButton").Visible = true;
  1954. this.Master.GetButton("SaveCloseButton").Visible = true;
  1955. this.Master.GetButton("CancelButton").Visible = true;
  1956. this.Master.GetButton("CompleteButton").Attributes.Add("disabled", "disabled");
  1957. this.Master.GetButton("CompleteButton").Text = "Corrections Complete";
  1958. this.Master.GetButton("CompleteButton").CssClass = "button";
  1959.  
  1960. // configure panels
  1961. PermitPanel.Visible = true;
  1962. ReviewInfoPanel.Visible = false;
  1963. ReviewGroupsPanel.Visible = false;
  1964. ReviewCyclePanel.Visible = false;
  1965. InstructionsPanel.Visible = true;
  1966. PreReviewInstructions.Visible = false;
  1967. PreRevAppInstructions.Visible = true;
  1968. AppResubmitInstructions.Visible = false;
  1969.  
  1970. PreNotesApp.Text = PreNotes.Text;
  1971. PreNotesApp.ReadOnly = true;
  1972.  
  1973. PreScreenAppToolTip.Visible = true;
  1974.  
  1975. }
  1976. </script>
  1977.  
  1978. <%--
  1979. // ================================================================================
  1980. //
  1981. // BeginReview Methods
  1982. //
  1983. // ================================================================================
  1984. --%>
  1985.  
  1986. <script language="C#" runat="server">
  1987. protected void InitBeginReviewView()
  1988. {
  1989. FlowContext.Workflow["DepartmentReview.ReviewersRequested"] = "false";
  1990. FlowContext.Workflow.SaveField("DepartmentReview.ReviewersRequested");
  1991.  
  1992. // configure buttons
  1993. this.Master.GetButton("SaveButton").Visible = false;
  1994. this.Master.GetButton("SaveCloseButton").Visible = true;
  1995. this.Master.GetButton("CancelButton").Visible = false;
  1996. this.Master.GetButton("CompleteButton").Text = "Begin Review";
  1997. //this.Master.GetButton("CompleteButton").Attributes.Add("disabled","disabled");
  1998.  
  1999. // add client event to verify the user has selected at least one reviewer
  2000. this.Master.GetButton("CompleteButton").OnClientClick = "return ShowWorkingPanel(CheckReviewers());";
  2001.  
  2002. // handler for an eform event
  2003. //this.EFormEvent += new EventHandler<PDWorkflowEformEventArgs>(this.AssignReviewers_Click);
  2004.  
  2005. // configure panels
  2006. PermitPanel.Visible = true;
  2007. ReviewInfoPanel.Visible = true;
  2008. ReviewGroupsPanel.Visible = true;
  2009. ReviewCyclePanel.Visible = false;
  2010.  
  2011. InstructionsPanel.Visible = false;
  2012.  
  2013. BeginReviewToolTip.Visible = true;
  2014.  
  2015. // PLAN REVIEW GUIDE
  2016. // initialize Review Groups selection
  2017. string SelectedGroups = "";
  2018. switch (PermitSubType.Text)
  2019. {
  2020. case "ALTRMD": SelectedGroups = "B Building,B Governmental Compliance,B Electrical,B Mechanical,B Plumbing,Fire"; break;
  2021. case "NCONST": SelectedGroups = "B Governmental Compliance,B Building,B Structural,B Elevator,B Mechanical,B Plumbing,Fire,Public Works"; break;
  2022. case "POOL": SelectedGroups = "B Building,B Structural,B Plumbing,Fire,Public Works,Planning-Zoning Chief"; break;
  2023. }
  2024. string[] SelectedGroupList = SelectedGroups.Split(',');
  2025.  
  2026. foreach (string SelectedGroup in SelectedGroupList)
  2027. {
  2028. if (SelectedGroup.Trim().Length > 0)
  2029. {
  2030. DataRow SelectedGroupRow = FindReviewGroup(PDOX.Review.CurrentCycle, SelectedGroup.Trim());
  2031.  
  2032. if (SelectedGroupRow != null)
  2033. {
  2034. SelectedGroupRow["GroupSelect"] = true;
  2035. }
  2036. }
  2037. }
  2038. }
  2039.  
  2040. protected DataRow[] GetSelectedReviewParticipants(DataTable ReviewTable, int ReviewCycle)
  2041. {
  2042. return ReviewTable.Select("ReviewCycle = " + ReviewCycle.ToString() + " AND GroupSelect = 'true'");
  2043. }
  2044.  
  2045. protected void AssignDepartmentReviewParticipants()
  2046. {
  2047. //FlowContext.Workflow["AssignReviewers.UserAssignees"] = PDOXReviewCoordinator.Text;
  2048.  
  2049. List<string> ActivityGroupNames = PDUtility.ConversionUtility.ConvertStringToStringList(FlowContext.Workflow["DepartmentReview.GroupNames"], ",");
  2050. List<string> ActivityUserEmails = PDUtility.ConversionUtility.ConvertStringToStringList(FlowContext.Workflow["DepartmentReview.UserEmails"], ",");
  2051.  
  2052. DataRow[] ReviewerRows = GetSelectedReviewParticipants(ReviewGroupsData.Tables[0], PDOX.Review.CurrentCycle);
  2053.  
  2054. foreach (DataRow ReviewerRow in ReviewerRows)
  2055. {
  2056.  
  2057. if (ReviewerRow["HowAssigned"].ToString() == PDOX.AssignmentTypes.FirstInGroup.ToString())
  2058. {
  2059. if (!ActivityGroupNames.Contains(ReviewerRow["GroupName"].ToString()))
  2060. ActivityGroupNames.Add(ReviewerRow["GroupName"].ToString());
  2061. }
  2062. else if (ReviewerRow["HowAssigned"].ToString() == PDOX.AssignmentTypes.Individual.ToString())
  2063. {
  2064. string[] IndividualReviewers = ReviewerRow["IndividualReviewers"].ToString().Split(',');
  2065.  
  2066. foreach (string IndividualReviewer in IndividualReviewers)
  2067. if (!ActivityUserEmails.Contains(IndividualReviewer))
  2068. ActivityUserEmails.Add(IndividualReviewer);
  2069. }
  2070. }
  2071.  
  2072. FlowContext.Workflow["DepartmentReview.GroupNames"] = String.Join(",", ActivityGroupNames.ToArray());
  2073. FlowContext.Workflow.SaveField("DepartmentReview.GroupNames");
  2074.  
  2075. FlowContext.Workflow["DepartmentReview.UserEmails"] = String.Join(",", ActivityUserEmails.ToArray());
  2076. FlowContext.Workflow.SaveField("DepartmentReview.UserEmails");
  2077.  
  2078. // 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
  2079. //FlowContext.Workflow.SaveFields();
  2080. }
  2081.  
  2082. protected void RequestAdditionalReviewParticipants()
  2083. {
  2084. if (FlowContext.Workflow["DepartmentReview.ReviewersRequested"].ToString() == "false")
  2085. {
  2086. // get rev coord group
  2087. PDGroup RevCoordGroup = new PDGroup(PDOX.ReviewCoordinatorGroupName, FlowContext.Project.Name);
  2088.  
  2089. // add task for rev coord group
  2090. int TaskID = PDFlowTask.AddFlowInstanceTask(
  2091. FlowContext.Workflow.FlowInstanceID
  2092. , FlowContext.Activity.FlowInstanceActivityID
  2093. , PDEntity.EntityTypes.Group
  2094. , RevCoordGroup.GroupID
  2095. , FlowContext.Activity.ActivityName
  2096. , PDEntity.EntityTypes.Project
  2097. , FlowContext.Project.ProjectID);
  2098.  
  2099. // make sure they are listed in the participant list
  2100. List<string> ActivityGroupNames = PDUtility.ConversionUtility.ConvertStringToStringList(FlowContext.Workflow["DepartmentReview.GroupNames"], ",");
  2101.  
  2102. if (!ActivityGroupNames.Contains(PDOX.ReviewCoordinatorGroupName))
  2103. ActivityGroupNames.Add(PDOX.ReviewCoordinatorGroupName);
  2104.  
  2105. FlowContext.Workflow["DepartmentReview.GroupNames"] = String.Join(",", ActivityGroupNames.ToArray());
  2106. FlowContext.Workflow.SaveField("DepartmentReview.GroupNames");
  2107.  
  2108. FlowContext.Workflow["DepartmentReview.ReviewersRequested"] = "true";
  2109. FlowContext.Workflow.SaveField("DepartmentReview.ReviewersRequested");
  2110. }
  2111. }
  2112.  
  2113. protected void AssignAdditionalReviewParticipants()
  2114. {
  2115.  
  2116. DebugMessage("AssignAdditionalReviewParticipants: DepartmentReview.GroupNames: " + FlowContext.Workflow["DepartmentReview.GroupNames"].ToString());
  2117. DebugMessage("AssignAdditionalReviewParticipants: DepartmentReview.UserEmails: " + FlowContext.Workflow["DepartmentReview.UserEmails"].ToString());
  2118. List<string> ActivityGroupNames = PDUtility.ConversionUtility.ConvertStringToStringList(FlowContext.Workflow["DepartmentReview.GroupNames"], ",");
  2119. List<string> ActivityUserEmails = PDUtility.ConversionUtility.ConvertStringToStringList(FlowContext.Workflow["DepartmentReview.UserEmails"], ",");
  2120.  
  2121. List<string> PossibleGroupNames = new List<string>();
  2122. List<string> PossibleUserEmails = new List<string>();
  2123.  
  2124. List<string> SelectedGroupNames = new List<string>();
  2125. List<string> SelectedUserEmails = new List<string>();
  2126. List<string> UnSelectedGroupNames = new List<string>();
  2127. List<string> UnSelectedUserEmails = new List<string>();
  2128.  
  2129. DataRow[] PossibleReviewerRows = ReviewGroupsData.Tables[0].Select("ReviewCycle = " + PDOX.Review.CurrentCycle.ToString());
  2130.  
  2131. bool UserIsSuper = PDOX.CurrentUser.IsSuper;
  2132.  
  2133. foreach (DataRow ReviewerRow in PossibleReviewerRows)
  2134. {
  2135. // is this a subordinate user
  2136. int GroupDepth = Convert.ToInt32(ReviewerRow["Depth"]);
  2137.  
  2138. bool RowIsUser = (ReviewerRow["Lineage"].ToString() == PDOX.CurrentUser.Lineage);
  2139. bool RowIsSubordinateToUser = (ReviewerRow["Lineage"].ToString().Contains(PDOX.CurrentUser.Lineage)) && !RowIsUser;
  2140. bool RowIsDirectSubordinate = (RowIsSubordinateToUser && (Math.Abs(GroupDepth - PDOX.CurrentUser.Depth) < 2));
  2141. bool RowSelected = PDUtility.ConversionUtility.CBOOL2(ReviewerRow["GroupSelect"]);
  2142.  
  2143. if (RowIsDirectSubordinate)
  2144. {
  2145. if (ReviewerRow["HowAssigned"].ToString() == PDOX.AssignmentTypes.FirstInGroup.ToString())
  2146. {
  2147. if (!PossibleGroupNames.Contains(ReviewerRow["GroupName"].ToString()))
  2148. PossibleGroupNames.Add(ReviewerRow["GroupName"].ToString());
  2149. if (RowSelected)
  2150. if (!SelectedGroupNames.Contains(ReviewerRow["GroupName"].ToString()))
  2151. SelectedGroupNames.Add(ReviewerRow["GroupName"].ToString());
  2152.  
  2153. }
  2154. else if (ReviewerRow["HowAssigned"].ToString() == PDOX.AssignmentTypes.Individual.ToString())
  2155. {
  2156. string[] IndividualReviewers = ReviewerRow["IndividualReviewers"].ToString().Split(',');
  2157.  
  2158. foreach (string IndividualReviewer in IndividualReviewers)
  2159. {
  2160. if (!PossibleUserEmails.Contains(IndividualReviewer))
  2161. PossibleUserEmails.Add(IndividualReviewer);
  2162. if (RowSelected)
  2163. if (!SelectedUserEmails.Contains(IndividualReviewer))
  2164. SelectedUserEmails.Add(IndividualReviewer);
  2165. }
  2166.  
  2167. }
  2168. }
  2169. }
  2170.  
  2171. DebugMessage("AssignAdditionalReviewParticipants: PossibleGroupNames: " + String.Join(",", PossibleGroupNames.ToArray()));
  2172. DebugMessage("AssignAdditionalReviewParticipants: PossibleUserEmails: " + String.Join(",", PossibleUserEmails.ToArray()));
  2173.  
  2174.  
  2175. // need the least hits to the db as possible here
  2176. // this will need to be rolled out to the lib
  2177. DataSet ExistingTasks = null;
  2178. StringBuilder PossibleGroupNameCSL = new StringBuilder();
  2179. StringBuilder PossibleUserEmailCSL = new StringBuilder();
  2180.  
  2181. foreach (string GroupName in PossibleGroupNames)
  2182. {
  2183. if (GroupName.Length > 0)
  2184. {
  2185. if (PossibleGroupNameCSL.Length > 0)
  2186. PossibleGroupNameCSL.Append(",");
  2187. PossibleGroupNameCSL.Append("'");
  2188. PossibleGroupNameCSL.Append(Avolve.Data.Query.SafeSQL(GroupName));
  2189. PossibleGroupNameCSL.Append("'");
  2190. }
  2191. }
  2192.  
  2193. foreach (string UserEmail in PossibleUserEmails)
  2194. {
  2195. if (UserEmail.Length > 0)
  2196. {
  2197. if (PossibleUserEmailCSL.Length > 0)
  2198. PossibleUserEmailCSL.Append(",");
  2199. PossibleUserEmailCSL.Append("'");
  2200. PossibleUserEmailCSL.Append(Avolve.Data.Query.SafeSQL(UserEmail));
  2201. PossibleUserEmailCSL.Append("'");
  2202. }
  2203. }
  2204.  
  2205. DebugMessage("AssignAdditionalReviewParticipants: Getting Existing Tasks for Groups and Users");
  2206. using (DataActiveLibrary.Query Qry = new DataActiveLibrary.Query(GlobalVariables.DSN))
  2207. {
  2208. Qry.QueryText = @"
  2209. SELECT FilteredTasks.FlowInstanceID
  2210. ,FilteredTasks.FlowInstanceActivityID
  2211. ,FilteredTasks.EntityTypeID
  2212. ,FilteredTasks.EntityID
  2213. ,FilteredTasks.EntityName
  2214. FROM
  2215. (
  2216. SELECT
  2217. AllTasks.FlowInstanceID
  2218. ,AllTasks.FlowInstanceActivityID
  2219. ,AllTasks.EntityTypeID
  2220. ,AllTasks.EntityID
  2221. ,(CASE AllTasks.EntityTypeID
  2222. WHEN " + Convert.ToInt32(PDEntity.EntityTypes.Group).ToString() + @" THEN ISNULL(Groups.Name,'')
  2223. WHEN " + Convert.ToInt32(PDEntity.EntityTypes.User).ToString() + @" THEN ISNULL(Users.Email,'')
  2224. ELSE ''
  2225. END) EntityName
  2226. FROM FlowTasks AllTasks
  2227. JOIN (
  2228. SELECT DISTINCT FlowInstanceID,FlowInstanceActivityID,EntityTypeID,EntityID,MAX(DateUpdated) MaxDateUpdated
  2229. FROM FlowTasks
  2230. WHERE FlowInstanceActivityID = @FlowInstanceActivityID
  2231. AND FlowInstanceID = @FlowInstanceID
  2232. AND TaskStatus IN (''
  2233. ,'" + PDFlowTask.TaskStatuses.Pending.ToString() + @"'
  2234. ,'" + PDFlowTask.TaskStatuses.Accepted.ToString() + @"'
  2235. )
  2236. GROUP BY FlowInstanceID,FlowInstanceActivityID,EntityTypeID,EntityID
  2237. ) LatestTasks ON AllTasks.FlowInstanceID = LatestTasks.FlowInstanceID
  2238. AND AllTasks.FlowInstanceActivityID = LatestTasks.FlowInstanceActivityID
  2239. AND AllTasks.EntityTypeID = LatestTasks.EntityTypeID
  2240. AND AllTasks.EntityID = LatestTasks.EntityID
  2241. AND AllTasks.DateUpdated >= LatestTasks.MaxDateUpdated
  2242. LEFT JOIN Groups ON Groups.GroupID = AllTasks.EntityID AND AllTasks.EntityTypeID = " + Convert.ToInt32(PDEntity.EntityTypes.Group).ToString() + @"
  2243. ";
  2244.  
  2245. if (PossibleGroupNameCSL.Length > 0)
  2246. Qry.QueryText += @"
  2247. AND Groups.Name IN (" + PossibleGroupNameCSL + ")";
  2248.  
  2249. Qry.QueryText += @"
  2250. LEFT JOIN Users ON Users.UserID = AllTasks.EntityID AND AllTasks.EntityTypeID = " + Convert.ToInt32(PDEntity.EntityTypes.User).ToString() + @"
  2251. ";
  2252.  
  2253. if (PossibleUserEmailCSL.Length > 0)
  2254. Qry.QueryText += @"
  2255. AND Users.Email IN (" + PossibleUserEmailCSL + ")";
  2256.  
  2257. Qry.QueryText += @"
  2258. ) FilteredTasks
  2259. WHERE LEN(EntityName) >0
  2260. ";
  2261.  
  2262. Qry.AddSQLParam("@FlowInstanceActivityID", FlowContext.Activity.FlowInstanceActivityID, SqlDbType.VarChar);
  2263. Qry.AddSQLParam("@FlowInstanceID", FlowContext.Workflow.FlowInstanceID, SqlDbType.VarChar);
  2264.  
  2265. ExistingTasks = Qry.GetDataSet();
  2266. }
  2267.  
  2268.  
  2269. if (ExistingTasks.Tables.Count > 0 && ExistingTasks.Tables[0].Rows.Count > 0)
  2270. {
  2271. DebugMessage(ExistingTasks.GetXml());
  2272.  
  2273. PDEntity.EntityTypes TaskEntityType = PDEntity.EntityTypes.Unknown;
  2274. int TaskEntityID = 0;
  2275. string TaskEntityName = "";
  2276.  
  2277. // remove any tasks for entities that should not have them
  2278. foreach (DataRow ExistingTask in ExistingTasks.Tables[0].Rows)
  2279. {
  2280.  
  2281. TaskEntityType = PDEntity.EntityTypes.Unknown;
  2282. TaskEntityID = 0;
  2283. TaskEntityName = "";
  2284.  
  2285. TaskEntityType = (PDEntity.EntityTypes)Enum.Parse(typeof(PDEntity.EntityTypes), ExistingTask["EntityTypeID"].ToString());
  2286. int.TryParse(ExistingTask["EntityID"].ToString(), out TaskEntityID);
  2287. TaskEntityName = ExistingTask["EntityName"].ToString();
  2288.  
  2289. DebugMessage("AssignAdditionalReviewParticipants: "
  2290. + "<br>" + TaskEntityType.ToString()
  2291. + "<br>" + TaskEntityID.ToString()
  2292. + "<br>" + TaskEntityName);
  2293.  
  2294. switch (TaskEntityType)
  2295. {
  2296. case PDEntity.EntityTypes.Group:
  2297.  
  2298. DebugMessage("AssignAdditionalReviewParticipants: Checking Group " + TaskEntityName);
  2299.  
  2300. if (TaskEntityName.Trim().Length > 0)
  2301. {
  2302. // if this group not in selected groups
  2303. if (!SelectedGroupNames.Contains(TaskEntityName))
  2304. {
  2305. DebugMessage("AssignAdditionalReviewParticipants: " + TaskEntityName + " not in selected groups. removing task for this group");
  2306. // remove group task
  2307. using (DataActiveLibrary.Query Qry = new DataActiveLibrary.Query(GlobalVariables.DSN))
  2308. {
  2309. Qry.AddSQLBuilderParam("FlowInstanceActivityID", FlowContext.Activity.FlowInstanceActivityID, SqlDbType.Int);
  2310. Qry.AddSQLBuilderParam("FlowInstanceID", FlowContext.Workflow.FlowInstanceID, SqlDbType.Int);
  2311. Qry.AddSQLBuilderParam("EntityTypeID", Convert.ToInt32(TaskEntityType), SqlDbType.Int);
  2312. Qry.AddSQLBuilderParam("EntityID", TaskEntityID, SqlDbType.Int);
  2313. Qry.Delete("FlowTasks");
  2314. Qry.ReinitializeForNewQuery();
  2315. }
  2316.  
  2317. if (!UnSelectedGroupNames.Contains(TaskEntityName))
  2318. UnSelectedGroupNames.Add(TaskEntityName);
  2319. }
  2320. }
  2321. break;
  2322.  
  2323. case PDEntity.EntityTypes.User:
  2324.  
  2325. DebugMessage("AssignAdditionalReviewParticipants: Checking User " + TaskEntityName);
  2326.  
  2327. if (TaskEntityName.Trim().Length > 0)
  2328. {
  2329. // if this user not in selected user
  2330. if (!SelectedUserEmails.Contains(TaskEntityName))
  2331. {
  2332. DebugMessage("AssignAdditionalReviewParticipants: " + TaskEntityName + " not in selected users. removing task for this users");
  2333. // remove user task
  2334. using (DataActiveLibrary.Query Qry = new DataActiveLibrary.Query(GlobalVariables.DSN))
  2335. {
  2336. Qry.AddSQLBuilderParam("FlowInstanceActivityID", FlowContext.Activity.FlowInstanceActivityID, SqlDbType.Int);
  2337. Qry.AddSQLBuilderParam("FlowInstanceID", FlowContext.Workflow.FlowInstanceID, SqlDbType.Int);
  2338. Qry.AddSQLBuilderParam("EntityTypeID", Convert.ToInt32(TaskEntityType), SqlDbType.Int);
  2339. Qry.AddSQLBuilderParam("EntityID", TaskEntityID, SqlDbType.Int);
  2340. Qry.Delete("FlowTasks");
  2341. Qry.ReinitializeForNewQuery();
  2342. }
  2343.  
  2344. if (!UnSelectedUserEmails.Contains(TaskEntityName))
  2345. UnSelectedUserEmails.Add(TaskEntityName);
  2346. }
  2347. }
  2348. break;
  2349. }
  2350.  
  2351. }
  2352.  
  2353. // add any tasks for groups that should have them
  2354. foreach (string GroupName in SelectedGroupNames)
  2355. {
  2356. DataRow[] GroupRows = ExistingTasks.Tables[0].Select("EntityTypeID = " + Convert.ToInt32(PDEntity.EntityTypes.Group).ToString() + " AND EntityName = '" + GroupName + "'");
  2357.  
  2358. // its not in the dataset so lets add it
  2359. if (GroupRows.Length == 0)
  2360. {
  2361. DebugMessage("AssignAdditionalReviewParticipants: " + GroupName + " in selected groups with no exisiting task. adding task for this group");
  2362.  
  2363. PDGroup UntaskedGroup = new PDGroup(GroupName, FlowContext.Project.Name);
  2364.  
  2365. int TaskID = PDFlowTask.AddFlowInstanceTask(
  2366. FlowContext.Workflow.FlowInstanceID
  2367. , FlowContext.Activity.FlowInstanceActivityID
  2368. , PDEntity.EntityTypes.Group
  2369. , UntaskedGroup.GroupID
  2370. , FlowContext.Activity.ActivityName
  2371. , PDEntity.EntityTypes.Project
  2372. , FlowContext.Project.ProjectID);
  2373. }
  2374.  
  2375. }
  2376.  
  2377. // add any tasks for users that should have them
  2378. foreach (string UserEmail in SelectedUserEmails)
  2379. {
  2380. DataRow[] UserRows = ExistingTasks.Tables[0].Select("EntityTypeID = " + Convert.ToInt32(PDEntity.EntityTypes.User).ToString() + " AND EntityName = '" + UserEmail + "'");
  2381.  
  2382. // its not in the dataset so lets add it
  2383. if (UserRows.Length == 0)
  2384. {
  2385. DebugMessage("AssignAdditionalReviewParticipants: " + UserEmail + " in selected users with no exisiting task. adding task for this user");
  2386.  
  2387. if (UserEmail.Trim().Length > 0)
  2388. {
  2389. PDUser UntaskedUser = new PDUser(UserEmail);
  2390. int TaskID = PDFlowTask.AddFlowInstanceTask(
  2391. FlowContext.Workflow.FlowInstanceID
  2392. , FlowContext.Activity.FlowInstanceActivityID
  2393. , PDEntity.EntityTypes.User
  2394. , UntaskedUser.UserID
  2395. , FlowContext.Activity.ActivityName
  2396. , PDEntity.EntityTypes.Project
  2397. , FlowContext.Project.ProjectID);
  2398. }
  2399. }
  2400. }
  2401.  
  2402. // remove or add from DeptReview ParticipantList
  2403. foreach (string GroupName in UnSelectedGroupNames)
  2404. if (ActivityGroupNames.Contains(GroupName))
  2405. ActivityGroupNames.Remove(GroupName);
  2406.  
  2407. foreach (string GroupName in SelectedGroupNames)
  2408. if (!ActivityGroupNames.Contains(GroupName))
  2409. ActivityGroupNames.Add(GroupName);
  2410.  
  2411. foreach (string UserEmail in UnSelectedUserEmails)
  2412. if (ActivityUserEmails.Contains(UserEmail))
  2413. ActivityUserEmails.Remove(UserEmail);
  2414.  
  2415. foreach (string UserEmail in SelectedUserEmails)
  2416. if (!ActivityUserEmails.Contains(UserEmail))
  2417. ActivityUserEmails.Add(UserEmail);
  2418.  
  2419. FlowContext.Workflow["DepartmentReview.GroupNames"] = String.Join(",", ActivityGroupNames.ToArray());
  2420. FlowContext.Workflow.SaveField("DepartmentReview.GroupNames");
  2421.  
  2422. FlowContext.Workflow["DepartmentReview.UserEmails"] = String.Join(",", ActivityUserEmails.ToArray());
  2423. FlowContext.Workflow.SaveField("DepartmentReview.UserEmails");
  2424.  
  2425. DebugMessage("AssignAdditionalReviewParticipants: DepartmentReview.GroupNames: " + FlowContext.Workflow["DepartmentReview.GroupNames"].ToString());
  2426. DebugMessage("AssignAdditionalReviewParticipants: DepartmentReview.UserEmails: " + FlowContext.Workflow["DepartmentReview.UserEmails"].ToString());
  2427.  
  2428. }
  2429. }
  2430. </script>
  2431.  
  2432. <%--
  2433. // ================================================================================
  2434. //
  2435. // DepartmentReview Methods
  2436. //
  2437. // ================================================================================
  2438. --%>
  2439.  
  2440. <script language="C#" runat="server">
  2441. protected void InitDepartmentReviewView()
  2442. {
  2443. // there are different views for department review
  2444.  
  2445. // configure buttons
  2446. this.Master.GetButton("SaveButton").Visible = false;
  2447. this.Master.GetButton("SaveCloseButton").Visible = true;
  2448. this.Master.GetButton("CancelButton").Visible = false;
  2449. this.Master.GetButton("CancelButton").Text = "Close";
  2450. this.Master.GetButton("CompleteButton").Attributes.Add("disabled", "disabled");
  2451. this.Master.GetButton("CompleteButton").Text = "Complete Review";
  2452.  
  2453. AppResubStep1.Checked = false;
  2454. AppResubStep2.Checked = false;
  2455. AppResubStep3.Checked = false;
  2456. PEDDSCorrect.Checked = false;
  2457.  
  2458. bool ShowAssignRemoveButton = false;
  2459. if (PDOX.CurrentUser.CanAssignReviewers)
  2460. ShowAssignRemoveButton = true;
  2461.  
  2462. DebugMessage("InitDepartmentReviewView: PDOX.CurrentUser.IsReviewCoordinator = " + PDOX.CurrentUser.IsReviewCoordinator.ToString());
  2463. if (!PDOX.CurrentUser.IsReviewCoordinator)
  2464. {
  2465. this.Master.AddButton("RequestReviewersButton", "Request Additional Group");
  2466. this.Master.GetButton("RequestReviewersButton").CssClass = "EFormButton";
  2467. this.Master.GetButton("RequestReviewersButton").Visible = true;
  2468.  
  2469. if (FlowContext.Workflow["DepartmentReview.ReviewersRequested"].ToString() == "true")
  2470. {
  2471. this.Master.GetButton("RequestReviewersButton").Attributes.Add("disabled", "disabled");
  2472. }
  2473. }
  2474.  
  2475. // add check to make sure that a status has been selected
  2476. this.Master.GetButton("CompleteButton").OnClientClick = "return ShowWorkingPanel(CheckDepartmentReview());";
  2477.  
  2478. DataRow CycleRow = null;
  2479. int SearchReviewCycle = PDOX.Review.CurrentCycle;
  2480. string SearchGroupName = PDOX.CurrentUser.GroupName;
  2481. string SearchReviewerEmail = "";
  2482.  
  2483.  
  2484. if (PDOX.CurrentUser.AssignmentType == PDOX.AssignmentTypes.FirstInGroup.ToString())
  2485. SearchReviewerEmail = "";
  2486. else if (PDOX.CurrentUser.AssignmentType == PDOX.AssignmentTypes.Individual.ToString())
  2487. SearchReviewerEmail = Req.SessionUser.Email;
  2488.  
  2489. DebugMessage(
  2490. @"InitDepartmentReviewView: ReviewCycleData.Tables.Count = " + ReviewCycleData.Tables.Count.ToString()
  2491. + @"<br>InitDepartmentReviewView: SearchReviewCycle = " + SearchReviewCycle.ToString()
  2492. + @"<br>InitDepartmentReviewView: " + SearchGroupName.ToString()
  2493. + @"<br>InitDepartmentReviewView: " + SearchReviewerEmail.ToString()
  2494. );
  2495.  
  2496. CycleRow = FindCycleGroup(SearchReviewCycle, SearchGroupName, SearchReviewerEmail);
  2497.  
  2498. if (CycleRow != null)
  2499. {
  2500. if (PDOX.CurrentUser.AssignmentType == PDOX.AssignmentTypes.FirstInGroup.ToString())
  2501. {
  2502. CycleRow["ReviewerEmail"] = Req.SessionUser.Email;
  2503. CycleRow["ReviewerName"] = Req.SessionUser.LocalizedName;
  2504. }
  2505.  
  2506. if (CycleRow["ReviewStatus"].ToString() == PDOX.ReviewStatuses.Assigned.ToString())
  2507. {
  2508. CycleRow["ReviewStatus"] = PDOX.ReviewStatuses.InReview.ToString();
  2509. }
  2510.  
  2511. // configure panels
  2512. PermitPanel.Visible = true;
  2513. ReviewInfoPanel.Visible = true;
  2514. InstructionsPanel.Visible = false;
  2515. ReviewMarkupsPanel.Visible = true;
  2516. ReviewerToolTip.Visible = true;
  2517. MarkupToolTip.Visible = true;
  2518.  
  2519.  
  2520. DebugMessage("PDOX.CurrentUser.CanPerformReview : " + PDOX.CurrentUser.CanPerformReview.ToString());
  2521. if (PDOX.CurrentUser.CanAssignReviewers)
  2522. ReviewGroupsPanel.Visible = true;
  2523.  
  2524. if (PDOX.CurrentUser.CanPerformReview || PDOX.CurrentUser.IsSuper)
  2525. ReviewCyclePanel.Visible = true;
  2526.  
  2527. CycleRow.AcceptChanges();
  2528. ReviewCycleData.Tables[0].AcceptChanges();
  2529. ReviewCycleData.AcceptChanges();
  2530.  
  2531. SaveToDataSetField("PDOX.ReviewCycleData", ReviewCycleData);
  2532. //FlowContext.Workflow["ReviewQA.CorrectionsNeeded"] = "false";
  2533. //FlowContext.Workflow.SaveField("ReviewQA.CorrectionsNeeded");
  2534.  
  2535. // 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
  2536. // FlowContext.Workflow.SaveFields();
  2537.  
  2538. }
  2539. else
  2540. {
  2541. // this is not a group that is listed as a reviewer
  2542. // if they are the the rev coord then this is the request
  2543. // additional group function
  2544. if (PDOX.CurrentUser.IsReviewCoordinator)
  2545. {
  2546. PermitPanel.Visible = true;
  2547. ReviewInfoPanel.Visible = true;
  2548. InstructionsPanel.Visible = false;
  2549. ReviewGroupsPanel.Visible = true;
  2550. ReviewCyclePanel.Visible = true;
  2551. ReviewerToolTip.Visible = false;
  2552. MarkupToolTip.Visible = false;
  2553.  
  2554. ShowAssignRemoveButton = true;
  2555. this.Master.GetButton("CompleteButton").Visible = false;
  2556.  
  2557. this.Master.AddButton("CompleteReqestButton", "Complete Group Request");
  2558. this.Master.GetButton("CompleteReqestButton").CssClass = "EFormButton";
  2559. this.Master.GetButton("CompleteReqestButton").Visible = true;
  2560. }
  2561. else
  2562. {
  2563. // put up message that user can't do this activity
  2564.  
  2565. // turn off fielded sections
  2566. PermitPanel.Visible = false;
  2567. ReviewInfoPanel.Visible = false;
  2568. InstructionsPanel.Visible = false;
  2569. ReviewGroupsPanel.Visible = false;
  2570. ReviewCyclePanel.Visible = false;
  2571.  
  2572. }
  2573. }
  2574.  
  2575. if (ShowAssignRemoveButton)
  2576. {
  2577. this.Master.AddButton("AssignReviewersButton", "Assign / Remove Reviewers");
  2578. this.Master.GetButton("AssignReviewersButton").CssClass = "EFormButton";
  2579. this.Master.GetButton("AssignReviewersButton").Visible = true;
  2580. this.Master.GetButton("AssignReviewersButton").OnClientClick = "return ShowWorkingPanel(true);";
  2581. }
  2582.  
  2583. }
  2584.  
  2585. protected void UpdateReview()
  2586. {
  2587. // save review for current user
  2588. SaveReview(PDOX.Review.CurrentCycle, PDOX.CurrentUser.AssignmentType, PDOX.CurrentUser.GroupName, Req.SessionUser.Email);
  2589. }
  2590.  
  2591. protected void SaveReview(int SelectedCycle, string SelectedAssignmentType, string SelectedGroupName, string SelectedUserEmail)
  2592. {
  2593.  
  2594. DebugMessage("SaveReview: Starting SaveReview");
  2595.  
  2596. bool GetItemData = false;
  2597. int SearchReviewCycle = SelectedCycle;
  2598. string SearchGroupName = SelectedGroupName;
  2599. string SearchUserEmail = SelectedUserEmail;
  2600. string NewReviewComments = "";
  2601. string NewReviewStatus = "";
  2602. string NewQARequest = "";
  2603. string NewQAResponse = "";
  2604. List<string> PostReviewActivityUsers = new List<string>();
  2605. List<string> PostReviewActivityGroups = new List<string>();
  2606.  
  2607. DebugMessage("SaveReview: ReviewCycleRepeater.Items.Count.ToString() = " + ReviewCycleRepeater.Items.Count.ToString());
  2608.  
  2609. foreach (RepeaterItem RepeaterCycleItem in ReviewCycleRepeater.Items)
  2610. {
  2611. if (IsItemRow(RepeaterCycleItem))
  2612. {
  2613. DataRow CycleRow = null;
  2614.  
  2615. Label ReviewCycleLabel = (Label)RepeaterCycleItem.FindControl("RC_ReviewCycle");
  2616. Label GroupNameLabel = (Label)RepeaterCycleItem.FindControl("RC_GroupName");
  2617. Label ReviewerEmailLabel = (Label)RepeaterCycleItem.FindControl("RC_ReviewerEmail");
  2618. CheckBox GroupSelect = (CheckBox)RepeaterCycleItem.FindControl("RC_GroupSelect");
  2619. Label AssignmentTypeLabel = (Label)RepeaterCycleItem.FindControl("RC_AssignmentType");
  2620.  
  2621. GetItemData = false;
  2622.  
  2623. if (SelectedAssignmentType == PDOX.AssignmentTypes.Unknown.ToString())
  2624. {
  2625. // save review data for any assignment type
  2626. SearchGroupName = GroupNameLabel.Text;
  2627. SearchUserEmail = "";
  2628. GetItemData = true;
  2629. }
  2630. else if (SelectedAssignmentType == PDOX.AssignmentTypes.FirstInGroup.ToString())
  2631. {
  2632. // save review data a first in group user
  2633. SearchGroupName = SelectedGroupName;
  2634. SearchUserEmail = "";
  2635.  
  2636. if (ReviewCycleLabel.Text == SelectedCycle.ToString()
  2637. && GroupNameLabel.Text == SelectedGroupName)
  2638. GetItemData = true;
  2639. }
  2640. else if (SelectedAssignmentType == PDOX.AssignmentTypes.Individual.ToString())
  2641. {
  2642. SearchGroupName = SelectedGroupName;
  2643. SearchUserEmail = SelectedUserEmail;
  2644.  
  2645. if (ReviewCycleLabel.Text == SelectedCycle.ToString()
  2646. && GroupNameLabel.Text == SelectedGroupName
  2647. && ReviewerEmailLabel.Text == SelectedUserEmail
  2648. )
  2649. GetItemData = true;
  2650. }
  2651.  
  2652. if (GetItemData)
  2653. {
  2654. DebugMessage("SaveReview: Getting " + GroupNameLabel.Text + " " + ReviewerEmailLabel.Text);
  2655.  
  2656. NewReviewStatus = "";
  2657. NewReviewComments = "";
  2658. NewQARequest = "";
  2659. NewQAResponse = "";
  2660.  
  2661. TextBox ReviewCommentsTextBox = (TextBox)RepeaterCycleItem.FindControl("RC_ReviewComments");
  2662. DropDownList ChangeStatusDropDown = (DropDownList)RepeaterCycleItem.FindControl("RC_ChangeStatus");
  2663. TextBox QARequestTextBox = (TextBox)RepeaterCycleItem.FindControl("RC_QARequest");
  2664. TextBox QAResponseTextBox = (TextBox)RepeaterCycleItem.FindControl("RC_QAResponse");
  2665. CheckBox AssignCorrections = (CheckBox)RepeaterCycleItem.FindControl("RC_AssignCorrections");
  2666.  
  2667. NewReviewComments = ReviewCommentsTextBox.Text;
  2668. if (ChangeStatusDropDown != null)
  2669. {
  2670. if (ChangeStatusDropDown.SelectedItem != null)
  2671. {
  2672. if (ChangeStatusDropDown.SelectedItem.Text != "-select status-")
  2673. NewReviewStatus = ChangeStatusDropDown.SelectedItem.Value;
  2674. }
  2675. }
  2676.  
  2677. NewQARequest = QARequestTextBox.Text;
  2678. NewQAResponse = QAResponseTextBox.Text;
  2679.  
  2680. DebugMessage("SaveReview: Review Comments = " + "<br><pre>" + NewReviewComments + "</br></pre>");
  2681. DebugMessage("SaveReview: Review Status = " + NewReviewStatus);
  2682. DebugMessage("SaveReview: QA Request = " + "<br><pre>" + NewQARequest + "</br></pre>");
  2683. DebugMessage("SaveReview: QA Response = " + "<br><pre>" + NewQAResponse + "</br></pre>");
  2684.  
  2685.  
  2686. CycleRow = FindCycleGroup(SearchReviewCycle, SearchGroupName, SearchUserEmail);
  2687.  
  2688. if (CycleRow != null)
  2689. {
  2690. CycleRow["ReviewComments"] = NewReviewComments;
  2691. if (NewReviewStatus != "")
  2692. CycleRow["ReviewStatus"] = NewReviewStatus;
  2693.  
  2694. //if (PDUtility.ConversionUtility.CBOOL2(FlowContext.Workflow["ReviewQA.CorrectionsNeeded"]))
  2695. //{
  2696. CycleRow["QARequest"] = PDUtility.ConversionUtility.BlankNull(NewQARequest);
  2697. CycleRow["QAResponse"] = PDUtility.ConversionUtility.BlankNull(NewQAResponse);
  2698. CycleRow["AssignCorrections"] = PDUtility.ConversionUtility.CBOOL2(AssignCorrections.Checked);
  2699. //}
  2700.  
  2701. CycleRow.AcceptChanges();
  2702. }
  2703. }
  2704.  
  2705.  
  2706. // update group select for all rows
  2707. if (AssignmentTypeLabel.Text == PDOX.AssignmentTypes.FirstInGroup.ToString())
  2708. {
  2709. CycleRow = FindCycleGroup(SearchReviewCycle, GroupNameLabel.Text, "");
  2710. }
  2711. else if (AssignmentTypeLabel.Text == PDOX.AssignmentTypes.Individual.ToString())
  2712. {
  2713. CycleRow = FindCycleGroup(SearchReviewCycle, GroupNameLabel.Text, ReviewerEmailLabel.Text);
  2714. }
  2715.  
  2716. if (CycleRow != null)
  2717. {
  2718. CycleRow["GroupSelect"] = GroupSelect.Checked;
  2719. }
  2720. }
  2721. }
  2722.  
  2723. ReviewCycleData.Tables[0].AcceptChanges();
  2724. ReviewCycleData.AcceptChanges();
  2725. SaveToDataSetField("PDOX.ReviewCycleData", ReviewCycleData);
  2726.  
  2727. FlowContext.Workflow.SaveField("PDOX.ReviewCycleData");
  2728.  
  2729. }
  2730.  
  2731.  
  2732. protected void UpdatePostReviewActivityParticipants(int SelectedReviewCycle)
  2733. {
  2734. // assign for reviewer stamps
  2735.  
  2736. List<string> ActivityNames = new List<string>();
  2737. List<string> ActivityUsers = new List<string>();
  2738.  
  2739. ActivityNames.Add("ReviewerStamps");
  2740.  
  2741.  
  2742. DataRow[] CycleRows = ReviewCycleData.Tables[0].Select("ReviewCycle = " + SelectedReviewCycle.ToString() + " AND GroupSelect = 'true' AND ReviewStatus <> 'AssignOnly'");
  2743.  
  2744. if (CycleRows != null && CycleRows.Length > 0)
  2745. {
  2746. foreach (DataRow CycleRow in CycleRows)
  2747. {
  2748. ActivityUsers.Add(CycleRow["ReviewerEmail"].ToString());
  2749. }
  2750. }
  2751. DebugMessage("UpdatePostReviewActivityParticipants: ActivityUsers =" + String.Join(",",ActivityUsers.ToArray()));
  2752. foreach (string ActivityName in ActivityNames)
  2753. {
  2754. if (ActivityUsers.Count > 0)
  2755. FlowContext.Workflow[ActivityName + ".UserEmails"] = String.Join(",", ActivityUsers.ToArray());
  2756. else
  2757. FlowContext.Workflow[ActivityName + ".UserEmails"] = "";
  2758. FlowContext.Workflow.SaveField(ActivityName + ".UserEmails");
  2759. }
  2760. }
  2761. </script>
  2762.  
  2763. <%--
  2764. // ================================================================================
  2765. //
  2766. // ReviewQA Methods
  2767. //
  2768. // ================================================================================
  2769. --%>
  2770.  
  2771. <script language="C#" runat="server">
  2772. protected void InitReviewQAView()
  2773. {
  2774. // configure buttons
  2775. this.Master.GetButton("SaveButton").Visible = false;
  2776. this.Master.GetButton("SaveCloseButton").Visible = false;
  2777. this.Master.GetButton("CancelButton").Visible = false;
  2778. this.Master.GetButton("CancelButton").Text = "close";
  2779. this.Master.GetButton("CompleteButton").Text = "Continue";
  2780.  
  2781. this.Master.AddButton("AssignCorrectionsButton", "Assign Corrections");
  2782. this.Master.GetButton("AssignCorrectionsButton").CssClass = "EFormButton";
  2783. this.Master.GetButton("AssignCorrectionsButton").OnClientClick = "return ShowWorkingPanel(true);";
  2784.  
  2785. PermitPanel.Visible = true;
  2786. ReviewInfoPanel.Visible = true;
  2787. ReviewGroupsPanel.Visible = false;
  2788. InstructionsPanel.Visible = false;
  2789. ReviewCyclePanel.Visible = true;
  2790. QAToolTip.Visible = true;
  2791. ReviewMarkupsPanel.Visible = true;
  2792. MarkupListing.Visible = false;
  2793.  
  2794.  
  2795. //AssignCorrectionsButton.Visible = true;
  2796.  
  2797. // handler for an eform event - assign corrections to be called as ane event on the eform save
  2798. //this.EFormEvent += new EventHandler<PDWorkflowEformEventArgs>(this.AssignCorrections_Click);
  2799. }
  2800.  
  2801. protected void AssignCorrectors()
  2802. {
  2803. // ----------------------------------------------------------------------------------------
  2804. // Save Reviewer Groups Data
  2805. // ----------------------------------------------------------------------------------------
  2806.  
  2807. bool CorrectionsNeeded = false;
  2808. List<string> CorrectorEmails = new List<string>();
  2809. foreach (RepeaterItem ReviewCycleItem in ReviewCycleRepeater.Items)
  2810. {
  2811.  
  2812. bool UpdateRow = false;
  2813.  
  2814. if (IsItemRow(ReviewCycleItem))
  2815. {
  2816. Label ReviewCycleLabel = (Label)ReviewCycleItem.FindControl("RC_ReviewCycle");
  2817. CheckBox GroupSelect = (CheckBox)ReviewCycleItem.FindControl("RC_GroupSelect");
  2818. CheckBox AssignCorrections = (CheckBox)ReviewCycleItem.FindControl("RC_AssignCorrections");
  2819. Label GroupNameLabel = (Label)ReviewCycleItem.FindControl("RC_GroupName");
  2820. Label AssignmentTypeLabel = (Label)ReviewCycleItem.FindControl("RC_AssignmentType");
  2821. TextBox QARequestTextBox = (TextBox)ReviewCycleItem.FindControl("RC_QARequest");
  2822. TextBox QAResponseTextBox = (TextBox)ReviewCycleItem.FindControl("RC_QAResponse");
  2823. Label ReviewerEmailLabel = (Label)ReviewCycleItem.FindControl("RC_ReviewerEmail");
  2824. DropDownList ChangeStatusDropDownList = (DropDownList)ReviewCycleItem.FindControl("RC_ChangeStatus");
  2825.  
  2826. if (AssignCorrections.Checked)
  2827. {
  2828. CorrectorEmails.Add(ReviewerEmailLabel.Text);
  2829. CorrectionsNeeded = true;
  2830. }
  2831. }
  2832. }
  2833.  
  2834. if (CorrectionsNeeded)
  2835. {
  2836. // tell while loop in workflow to loop again
  2837. FlowContext.Workflow["ReviewQA.CorrectionsNeeded"] = "true";
  2838. FlowContext.Workflow.SaveField("ReviewQA.CorrectionsNeeded");
  2839. FlowContext.Workflow["ReviewQA.CorrectionsWereRequested"] = "true";
  2840. FlowContext.Workflow.SaveField("ReviewQA.CorrectionsWereRequested");
  2841.  
  2842.  
  2843. // tell DepartmentReview which reviewers should get task.
  2844. FlowContext.Workflow["DepartmentReview.UserEmails"] = String.Join(",", CorrectorEmails.ToArray());
  2845. FlowContext.Workflow.SaveField("DepartmentReview.UserEmails");
  2846. FlowContext.Workflow["DepartmentReview.GroupNames"] = "";
  2847. FlowContext.Workflow.SaveField("DepartmentReview.GroupNames");
  2848. }
  2849. else
  2850. {
  2851. FlowContext.Workflow["ReviewQA.CorrectionsNeeded"] = "false";
  2852. FlowContext.Workflow.SaveField("ReviewQA.CorrectionsNeeded");
  2853. }
  2854. }
  2855.  
  2856. </script>
  2857.  
  2858. <%--
  2859. // ================================================================================
  2860. //
  2861. // ReviewComplete Methods
  2862. //
  2863. // ================================================================================
  2864. --%>
  2865.  
  2866. <script language="C#" runat="server">
  2867. protected void InitReviewCompleteView()
  2868. {
  2869. this.Master.GetButton("SaveButton").Visible = false;
  2870. this.Master.GetButton("SaveCloseButton").Visible = false;
  2871. this.Master.GetButton("CancelButton").Visible = false;
  2872.  
  2873. DataRow[] ReviewerRows = GetSelectedReviewParticipants(ReviewCycleData.Tables[0], PDOX.Review.CurrentCycle);
  2874.  
  2875. foreach (DataRow ReviewerRow in ReviewerRows)
  2876. {
  2877. if (ReviewerRow["ReviewStatus"].ToString() != PDOX.ReviewStatuses.Authorized.ToString())
  2878. this.Master.GetButton("ApproveButton").Visible = false;
  2879. }
  2880. if (this.Master.GetButton("ApproveButton").Visible == true)
  2881. this.Master.GetButton("RejectButton").Visible = false;
  2882.  
  2883. // just display the form for the review coordinator to approve or reject
  2884. // since we arent saving anything on this step, masterpage is taking
  2885. // care of showing correct buttons and sending approve or reject (via WCF)
  2886. // to workflow server
  2887. PermitPanel.Visible = true;
  2888. ReviewInfoPanel.Visible = true;
  2889. ReviewGroupsPanel.Visible = false;
  2890. PreReviewInstructions.Visible = false;
  2891. PreRevAppInstructions.Visible = false;
  2892. ReviewCompletePanel.Visible = true;
  2893. ReviewCyclePanel.Visible = true;
  2894. ReviewCompletePanel.Visible = false;
  2895. InstructionsPanel.Visible = false;
  2896. ReviewCompleteToolTip.Visible = true;
  2897. }
  2898.  
  2899. protected void PrepareReviewCompletion()
  2900. {
  2901. FlowContext.Workflow["PDOX.Review.CurrentCycle"] = PDOX.Review.CurrentCycle.ToString();
  2902.  
  2903. // reset flags here so that while activities do not drop through
  2904. FlowContext.Workflow["ReviewQA.CorrectionsNeeded"] = "true";
  2905. FlowContext.Workflow.SaveField("ReviewQA.CorrectionsNeeded");
  2906. FlowContext.Workflow["ResubmitReceived.Approved"] = "false";
  2907. FlowContext.Workflow.SaveField("ResubmitReceived.Approved");
  2908. FlowContext.Workflow["ReviewComplete.Approved"] = "false";
  2909. FlowContext.Workflow.SaveField("ReviewComplete.Approved");
  2910. }
  2911.  
  2912. protected void AcceptReview()
  2913. {
  2914. FlowContext.Workflow["ReviewComplete.Approved"] = "true";
  2915. FlowContext.Workflow.SaveField("ReviewComplete.Approved");
  2916. }
  2917.  
  2918. protected void RejectReview()
  2919. {
  2920.  
  2921. // reset flags here so that while activities do not drop through
  2922. FlowContext.Workflow["ReviewQA.CorrectionsNeeded"] = "true";
  2923. FlowContext.Workflow.SaveField("ReviewQA.CorrectionsNeeded");
  2924. FlowContext.Workflow["ResubmitReceived.Approved"] = "false";
  2925. FlowContext.Workflow.SaveField("ResubmitReceived.Approved");
  2926. FlowContext.Workflow["ReviewComplete.Approved"] = "false";
  2927. FlowContext.Workflow.SaveField("ReviewComplete.Approved");
  2928. FlowContext.Workflow["AdditionalFees.FeeRequired"] = "false";
  2929. FlowContext.Workflow.SaveField("AdditionalFees.FeeRequired");
  2930. FlowContext.Workflow["ApplicantResubmit.SwitchToPaper"] = "false";
  2931. FlowContext.Workflow.SaveField("ApplicantResubmit.SwitchToPaper");
  2932. FlowContext.Workflow["ResubmitRecieved.PEDDSCorrect"] = "false";
  2933. FlowContext.Workflow.SaveField("ResubmitRecieved.PEDDSCorrect");
  2934. }
  2935. </script>
  2936.  
  2937. <%--
  2938. // ================================================================================
  2939. //
  2940. // AwaitingFinalPayment Methods
  2941. //
  2942. // ================================================================================
  2943. --%>
  2944.  
  2945. <script language="C#" runat="server">
  2946. protected void InitAwaitingFinalPaymentView()
  2947. {
  2948. this.Master.GetButton("SaveButton").Visible = false;
  2949. this.Master.GetButton("SaveCloseButton").Visible = false;
  2950. this.Master.GetButton("CancelButton").Visible = false;
  2951.  
  2952. PermitPanel.Visible = true;
  2953. ReviewInfoPanel.Visible = true;
  2954. ReviewGroupsPanel.Visible = false;
  2955. InstructionsPanel.Visible = true;
  2956. AwaitingFinalPaymentPanel.Visible = true;
  2957. PreReviewInstructions.Visible = false;
  2958. PreRevAppInstructions.Visible = false;
  2959.  
  2960. // add javascript verification to make sure the user checks the receive payment button
  2961. this.Master.GetButton("CompleteButton").OnClientClick = "return ShowWorkingPanel(CheckAwaitingPayment());";
  2962.  
  2963.  
  2964. //TODO/DONE: add 'I have recieved payment' checkbox box in instructions panel for the user
  2965. //TODO/DONE: add instructions in instructions panel to let the user know to check the 'I have recieved payment' checkbox
  2966. }
  2967. </script>
  2968.  
  2969. <%--
  2970. // ================================================================================
  2971. //
  2972. // ApplicantResubmit Methods
  2973. //
  2974. // ================================================================================
  2975. --%>
  2976.  
  2977. <script language="C#" runat="server">
  2978. protected void InitApplicantResubmitView()
  2979. {
  2980. // configure buttons
  2981. this.Master.GetButton("SaveButton").Visible = false;
  2982. this.Master.GetButton("CancelButton").Visible = false;
  2983. this.Master.GetButton("CompleteButton").Attributes.Add("disabled", "disabled");
  2984.  
  2985. // configure panels
  2986. PermitPanel.Visible = true;
  2987. ReviewInfoPanel.Visible = true;
  2988. ReviewGroupsPanel.Visible = false;
  2989. InstructionsPanel.Visible = true;
  2990. ReviewCyclePanel.Visible = true;
  2991. AppResubmitInstructions.Visible = true;
  2992. PreReviewInstructions.Visible = false;
  2993. ReviewMarkupsPanel.Visible = true;
  2994. MarkupListing.Visible = false;
  2995. ApplicantToolTip.Visible = true;
  2996.  
  2997. // applicant is just checking off checkboxes in instructions section
  2998. // then clicking complete task button
  2999. }
  3000. </script>
  3001.  
  3002. <%--
  3003. // ================================================================================
  3004. //
  3005. // ResubmitReceived Methods
  3006. //
  3007. // ================================================================================
  3008. --%>
  3009.  
  3010. <script language="C#" runat="server">
  3011. protected void InitResubmitReceivedView()
  3012. {
  3013. // configure buttons
  3014. this.Master.GetButton("SaveButton").Visible = false;
  3015. this.Master.GetButton("SaveCloseButton").Visible = false;
  3016. this.Master.GetButton("CancelButton").Visible = false;
  3017. this.Master.GetButton("RejectButton").Visible = false;
  3018.  
  3019. this.Master.GetButton("ApproveButton").Text = "Begin ReReview";
  3020. this.Master.GetButton("RejectButton").Text = "Return to Applicant";
  3021.  
  3022. // display reviewer groups so reviewer coordinator can add different reviewers to new review cycle
  3023. PermitPanel.Visible = true;
  3024. ReviewInfoPanel.Visible = true;
  3025. ReviewGroupsPanel.Visible = true;
  3026. InstructionsPanel.Visible = true;
  3027. ResubmitReceivedInstructions.Visible = true;
  3028. AppResubmitInstructions.Visible = true;
  3029. AppResubStep1Panel.Enabled = false;
  3030. AppResubStep2Panel.Enabled = false;
  3031. AppResubStep3Panel.Enabled = false;
  3032. SwitchToPaperPanel.Enabled = true;
  3033. ReReviewToolTip.Visible = true;
  3034.  
  3035. }
  3036. </script>
  3037.  
  3038. <%--
  3039. // ================================================================================
  3040. //
  3041. // ReviewerStamps Methods
  3042. //
  3043. // ================================================================================
  3044. --%>
  3045.  
  3046. <script language="C#" runat="server">
  3047. protected void InitReviewerStampsView()
  3048. {
  3049. // configure buttons
  3050. this.Master.GetButton("SaveButton").Visible = false;
  3051. this.Master.GetButton("SaveCloseButton").Visible = false;
  3052. this.Master.GetButton("CancelButton").Visible = false;
  3053.  
  3054. // display reviewer groups so reviewer coordinator can add different reviewers to new review cycle
  3055. PermitPanel.Visible = true;
  3056. ReviewInfoPanel.Visible = true;
  3057. ReviewGroupsPanel.Visible = false;
  3058. InstructionsPanel.Visible = true;
  3059. ReviewerStampsPanel.Visible = true;
  3060. }
  3061. </script>
  3062.  
  3063. <%--
  3064. // ================================================================================
  3065. //
  3066. // BatchStamps Methods
  3067. //
  3068. // ================================================================================
  3069. --%>
  3070.  
  3071. <script language="C#" runat="server">
  3072. protected void InitBatchStampsView()
  3073. {
  3074. // configure buttons
  3075. this.Master.GetButton("SaveButton").Visible = false;
  3076. this.Master.GetButton("SaveCloseButton").Visible = false;
  3077. this.Master.GetButton("CancelButton").Visible = false;
  3078. this.Master.GetButton("CompleteButton").Attributes.Add("disabled", "disabled");
  3079.  
  3080. this.Master.AddButton("ProjectExportButton", "Project Export");
  3081. this.Master.GetButton("ProjectExportButton").CssClass = "EFormButton";
  3082. this.Master.GetButton("ProjectExportButton").OnClientClick = "return ShowWorkingPanel(true);";
  3083.  
  3084. //this.Master.GetButton("ProjectExportButton").Attributes.Add("disabled","disabled");
  3085. // display reviewer groups so reviewer coordinator can add different reviewers to new review cycle
  3086. PermitPanel.Visible = true;
  3087. ReviewInfoPanel.Visible = true;
  3088. ReviewGroupsPanel.Visible = false;
  3089. InstructionsPanel.Visible = true;
  3090. BatchStampsPanel.Visible = true;
  3091.  
  3092. BatchStampToolTip.Visible = true;
  3093. }
  3094. </script>
  3095.  
  3096. <%--
  3097. // ================================================================================
  3098. //
  3099. // Additional Fees Methods
  3100. //
  3101. // ================================================================================
  3102. --%>
  3103.  
  3104. <script language="C#" runat="server">
  3105. protected void InitAdditionalFeesView()
  3106. {
  3107. // configure buttons
  3108. this.Master.GetButton("SaveButton").Visible = false;
  3109. this.Master.GetButton("SaveCloseButton").Visible = false;
  3110. this.Master.GetButton("CancelButton").Visible = false;
  3111.  
  3112. // display reviewer groups so reviewer coordinator can add different reviewers to new review cycle
  3113. PermitPanel.Visible = true;
  3114. ReviewInfoPanel.Visible = true;
  3115. ReviewGroupsPanel.Visible = false;
  3116. InstructionsPanel.Visible = true;
  3117. AdditionalFeesPanel.Visible = true;
  3118. }
  3119. </script>
  3120.  
  3121. <%--
  3122. // ================================================================================
  3123. //
  3124. // Additional Fees Methods
  3125. //
  3126. // ================================================================================
  3127. --%>
  3128.  
  3129. <script language="C#" runat="server">
  3130. protected void InitApplicantPEDDSView()
  3131. {
  3132. // configure buttons
  3133. this.Master.GetButton("SaveButton").Visible = false;
  3134. this.Master.GetButton("SaveCloseButton").Visible = false;
  3135. this.Master.GetButton("CancelButton").Visible = false;
  3136.  
  3137. // display reviewer groups so reviewer coordinator can add different reviewers to new review cycle
  3138. PermitPanel.Visible = true;
  3139. ReviewInfoPanel.Visible = true;
  3140. ReviewGroupsPanel.Visible = false;
  3141. InstructionsPanel.Visible = true;
  3142. ApplicantPEDDSPanel.Visible = true;
  3143. ApplicantPEDDSToolTip.Visible = true;
  3144.  
  3145. AppPEDDSNotes.Text = PEDDSNotes.Text;
  3146. AppPEDDSNotes.ReadOnly = true;
  3147. }
  3148. </script>
  3149.  
  3150. <%--
  3151. // ================================================================================
  3152. //
  3153. // Page Init
  3154. //
  3155. // ================================================================================
  3156. --%>
  3157.  
  3158. <script language="C#" runat="server">
  3159. protected void Page_Init(object sender, EventArgs e)
  3160. {
  3161.  
  3162. // this.Master.GetButton("CompleteButton").Click += new EventHandler(AssignReviewers_Click); // additional event to assign all the reviewers to the WF
  3163.  
  3164. if (PDOX.ActivityCodes.Count == 0)
  3165. {
  3166. // CUSTOMIZATION NOTE: map review activities to step codes in permit system
  3167. PDOX.ActivityCodes.Add(PDOX.StandardActivities.BeginReview.ToString(), "");
  3168. PDOX.ActivityCodes.Add(PDOX.StandardActivities.DepartmentReview.ToString(), "");
  3169. PDOX.ActivityCodes.Add(PDOX.StandardActivities.ReviewQA.ToString(), "");
  3170. PDOX.ActivityCodes.Add(PDOX.StandardActivities.ResubmitReceived.ToString(), "");
  3171. }
  3172.  
  3173. if (PDOX.GroupCodes.Count == 0)
  3174. {
  3175. // map review groups to groups/depts/agencies in permit system
  3176. PDOX.GroupCodes.Add("Router Clerk", "");
  3177. PDOX.GroupCodes.Add("B Building", "");
  3178. PDOX.GroupCodes.Add("B Electrical", "");
  3179. PDOX.GroupCodes.Add("B Mechanical", "");
  3180. PDOX.GroupCodes.Add("B Plumbing", "");
  3181. PDOX.GroupCodes.Add("B Governmental Compliance", "");
  3182. PDOX.GroupCodes.Add("B Structural", "");
  3183. PDOX.GroupCodes.Add("B Elevator", "");
  3184. PDOX.GroupCodes.Add("Planning-Zoning", "");
  3185. PDOX.GroupCodes.Add("Public Works", "");
  3186. PDOX.GroupCodes.Add("Fire", "");
  3187. PDOX.GroupCodes.Add("DERM", "");
  3188. PDOX.GroupCodes.Add("WASD", "");
  3189. PDOX.GroupCodes.Add("IMPACTFEE", "");
  3190. PDOX.GroupCodes.Add("FDOH(POOL)", "");
  3191. PDOX.GroupCodes.Add("FBPR(HOTEL AND RESTAURANTS)", "");
  3192. PDOX.GroupCodes.Add("DERM Chief", "");
  3193. PDOX.GroupCodes.Add("Planning-Zoning Chief", "");
  3194. PDOX.GroupCodes.Add("Coastal", "");
  3195. }
  3196.  
  3197. if (PDOX.StatusCodes.Count == 0)
  3198. {
  3199. // CUSTOMIZATION NOTE: map review statuses to status codes in permit system
  3200. PDOX.StatusCodes.Add(PDOX.ReviewStatuses.Assigned.ToString(), PDOX.ReviewStatuses.Assigned.ToString());
  3201. PDOX.StatusCodes.Add(PDOX.ReviewStatuses.InReview.ToString(), PDOX.ReviewStatuses.InReview.ToString());
  3202. PDOX.StatusCodes.Add(PDOX.ReviewStatuses.QACorrection.ToString(), PDOX.ReviewStatuses.QACorrection.ToString());
  3203. PDOX.StatusCodes.Add(PDOX.ReviewStatuses.OnHold.ToString(), "Corrections Needed");
  3204. PDOX.StatusCodes.Add(PDOX.ReviewStatuses.PendingResubmit.ToString(), PDOX.ReviewStatuses.PendingResubmit.ToString());
  3205. PDOX.StatusCodes.Add(PDOX.ReviewStatuses.Authorized.ToString(), "Plans Approved");
  3206. PDOX.StatusCodes.Add(PDOX.ReviewStatuses.AuthorizedWithConditions.ToString(), PDOX.ReviewStatuses.AuthorizedWithConditions.ToString());
  3207. PDOX.StatusCodes.Add(PDOX.ReviewStatuses.Denied.ToString(), PDOX.ReviewStatuses.Denied.ToString());
  3208. PDOX.StatusCodes.Add("AssignOnly", "Assign Only");
  3209. }
  3210.  
  3211. if (PDOX.DropDownStatuses.Count == 0)
  3212. {
  3213. // CUSTOMIZATION NOTE: add the value part of selected statues from StatusCodes above
  3214. // only these statuses will show in change status drop down
  3215. PDOX.DropDownStatuses.Add(PDOX.ReviewStatuses.InReview.ToString());
  3216. PDOX.DropDownStatuses.Add(PDOX.ReviewStatuses.OnHold.ToString());
  3217. PDOX.DropDownStatuses.Add(PDOX.ReviewStatuses.Authorized.ToString());
  3218. PDOX.DropDownStatuses.Add("AssignOnly");
  3219. //PDOX.DropDownStatuses.Add(PDOX.ReviewStatuses.AuthorizedWithConditions.ToString());
  3220. //PDOX.DropDownStatuses.Add(PDOX.ReviewStatuses.Denied.ToString());
  3221. }
  3222.  
  3223. // the PD group that designates review coordinators
  3224. PDOX.ReviewCoordinatorGroupName = "Router Clerk";
  3225. }
  3226.  
  3227. </script>
  3228.  
  3229. <%--
  3230. // ================================================================================
  3231. //
  3232. // Page Load
  3233. //
  3234. // ================================================================================
  3235. --%>
  3236.  
  3237. <script language="C#" runat="server">
  3238. protected void LinkedMarkupsRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
  3239. {
  3240. if (IsItemRow(e.Item))
  3241. {
  3242. ASP.workfloweforms_planreview_aspx.MarkUp LinkedMarkup = (ASP.workfloweforms_planreview_aspx.MarkUp)e.Item.DataItem;
  3243. LinkButton RemoveAnchor = (LinkButton)e.Item.FindControl("RemoveWF");
  3244. if (LinkedMarkup.GroupName != PDOX.CurrentUser.GroupName)
  3245. {
  3246. RemoveAnchor.Visible = false;
  3247. }
  3248. }
  3249. }
  3250.  
  3251. protected void Page_Load(object sender, EventArgs e)
  3252. {
  3253. this.Master.GetButton("OKButton").OnClientClick = "return ShowWorkingPanel(true);";
  3254. this.Master.GetButton("ApproveButton").OnClientClick = "return ShowWorkingPanel(true);";
  3255. this.Master.GetButton("RejectButton").OnClientClick = "return ShowWorkingPanel(true);";
  3256. this.Master.GetButton("CompleteButton").OnClientClick = "return ShowWorkingPanel(true);";
  3257. this.Master.GetButton("CancelButton").OnClientClick = "return ShowWorkingPanel(true);";
  3258. this.Master.GetButton("SaveButton").OnClientClick = "return ShowWorkingPanel(true);";
  3259. this.Master.GetButton("SaveCloseButton").OnClientClick = "return ShowWorkingPanel(true);";
  3260.  
  3261. // fields for
  3262. FlowContext.Workflow.AddField("PDOX.PermitStatus", "", ConfigManager.FieldTypes.Text, false, false, true);
  3263. FlowContext.Workflow.AddField("DepartmentReview.ReviewersRequested", "", ConfigManager.FieldTypes.Text, false, false, true);
  3264. FlowContext.Workflow.AddField("AdditionalFees.FeeRequired", "", ConfigManager.FieldTypes.Text, false, false, true);
  3265. FlowContext.Workflow.AddField("ResubmitReceived.PEDDSCorrect", "", ConfigManager.FieldTypes.Text, false, false, true);
  3266. FlowContext.Workflow.AddField("ApplicantResubmit.SwitchToPaper", "", ConfigManager.FieldTypes.Text, false, false, true);
  3267. // make sure we have the MD key added before accessing later
  3268. FlowContext.Workflow.AddField("ReviewQA.CorrectionsNeeded", "", ConfigManager.FieldTypes.Text, false, false, false);
  3269. FlowContext.Workflow.AddField("ReviewQA.CorrectionsWereRequested", "", ConfigManager.FieldTypes.Text, false, false, false);
  3270.  
  3271. // NOTE: Access FlowContext in Page_Load or later in page lifecycle
  3272.  
  3273. // ----------------------------------------------------------------------------------------
  3274. // Attach Handlers
  3275. // ----------------------------------------------------------------------------------------
  3276. DebugMessage("Page_Load: Init Handlers");
  3277. //SelectedReviewCycle.SelectedIndexChanged += new EventHandler(SelectedReviewCycle_SelectedIndexChanged);
  3278. this.EFormEvent += new EventHandler<PDWorkflowEformEventArgs>(Page_EFormEvent);
  3279.  
  3280.  
  3281. // ----------------------------------------------------------------------------------------
  3282. // Init Data
  3283. // ----------------------------------------------------------------------------------------
  3284.  
  3285. DebugMessage("Page_Load: Init Project");
  3286. // Init current project
  3287. PDOX.CurrentUser.ProjectGroups = PDGroups.GetProjectGroupsForUser(FlowContext.Project.ProjectID, Req.SessionUser.UserID);
  3288. PDOX.CurrentProject = this.FlowContext.Project;
  3289.  
  3290. DebugMessage("Page_Load: Init Data");
  3291. InitReviewConfigData();
  3292.  
  3293. DataRow CurrentConfigRow = FindConfigGroup();
  3294. if (CurrentConfigRow == null)
  3295. {
  3296. CurrentConfigRow = ReviewConfigData.Tables[0].NewRow();
  3297.  
  3298. if (PDOX.CurrentUser.ProjectGroups != null && PDOX.CurrentUser.ProjectGroups.Count > 0)
  3299. {
  3300. // get first one
  3301. foreach (PDGroup UserProjectGroup in PDOX.CurrentUser.ProjectGroups)
  3302. {
  3303. CurrentConfigRow["GroupName"] = UserProjectGroup.Name;
  3304. break;
  3305. }
  3306. CurrentConfigRow["SuperGroupName"] = "";
  3307. CurrentConfigRow["IsAncestor"] = false;
  3308. CurrentConfigRow["IsDescendant"] = false;
  3309. CurrentConfigRow["Depth"] = 1;
  3310. CurrentConfigRow["AssignReviewers"] = false;
  3311. CurrentConfigRow["PerformReview"] = false;
  3312. CurrentConfigRow["Lineage"] = "";
  3313. CurrentConfigRow["HowAssigned"] = "";
  3314. }
  3315. }
  3316.  
  3317. InitCurrentUser(CurrentConfigRow);
  3318.  
  3319. DebugMessage("Page_Load: PDOX.CurrentUser.GroupName = " + PDOX.CurrentUser.GroupName);
  3320.  
  3321. InitReviewGroupsData();
  3322. InitPermitData();
  3323. InitReviewCycleData();
  3324. InitReviewCoordinator();
  3325.  
  3326.  
  3327. // ----------------------------------------------------------------------------------------
  3328. // Fill Fields (manually for the first time, second and later through eform load)
  3329. // ----------------------------------------------------------------------------------------
  3330. DebugMessage("Page_Load: Fill fields");
  3331.  
  3332. FillPermitFields();
  3333. FillReviewCycleFields();
  3334.  
  3335. // fill activity fields
  3336. PDFlowDef WorkflowDef = new PDFlowDef(FlowContext.Workflow.FlowDefID);
  3337. WorkflowPath.Text = WorkflowDef.FlowDefName + " / " + FlowContext.Activity.ActivityName;
  3338. CurrentUserLogon.Text = Req.SessionUser.LocalizedName + " ( " + Req.SessionUser.Email + ") ";
  3339.  
  3340.  
  3341. // ----------------------------------------------------------------------------------------
  3342. // Configure EForm View
  3343. // ----------------------------------------------------------------------------------------
  3344.  
  3345.  
  3346. // default generic panels to the off state - then turn on corresponding panels individually in each step
  3347.  
  3348. // turn this off for Miami Beach
  3349. AwaitingFinalPaymentPanel.Visible = false;
  3350.  
  3351.  
  3352. DebugMessage("Page_Load: ActivityName = " + FlowContext.Activity.ActivityName);
  3353.  
  3354. if (IsActivity("GroupPreScreen"))
  3355. {
  3356. DebugMessage("Page_Load: Init PreScreenReview");
  3357. InitGroupPreScreenView();
  3358. }
  3359. if (IsActivity("PreScreenReview"))
  3360. {
  3361. DebugMessage("Page_Load: Init PreScreenReview");
  3362. InitPreScreenReviewView();
  3363. }
  3364. else if (IsActivity("CorrectionComplete"))
  3365. {
  3366. DebugMessage("Page_Load: Init CorrectionComplete");
  3367. InitCorrectionCompleteView();
  3368. }
  3369. else if (IsActivity(PDOX.StandardActivities.BeginReview))
  3370. {
  3371. DebugMessage("Page_Load: Init BeginReview");
  3372. InitBeginReviewView();
  3373. }
  3374. else if (IsActivity(PDOX.StandardActivities.DepartmentReview))
  3375. {
  3376. DebugMessage("Page_Load: Init DepartmentReview");
  3377. InitDepartmentReviewView();
  3378. }
  3379. else if (IsActivity(PDOX.StandardActivities.ReviewQA))
  3380. {
  3381. DebugMessage("Page_Load: Init ReviewQA");
  3382. InitReviewQAView();
  3383. }
  3384. else if (IsActivity("ReviewComplete"))
  3385. {
  3386. DebugMessage("Page_Load: Init ReviewComplete");
  3387. InitReviewCompleteView();
  3388. }
  3389. else if (IsActivity("AwaitingFinalPayment"))
  3390. {
  3391. // this is turned off for Miami Beach
  3392. DebugMessage("Page_Load: Init AwaitingFinalPayment");
  3393. InitAwaitingFinalPaymentView();
  3394. }
  3395. else if (IsActivity("ApplicantResubmit"))
  3396. {
  3397. DebugMessage("Page_Load: Init ApplicantResubmit");
  3398. InitApplicantResubmitView();
  3399. }
  3400. else if (IsActivity(PDOX.StandardActivities.ResubmitReceived))
  3401. {
  3402. DebugMessage("Page_Load: Init ResubmitReceived");
  3403. InitResubmitReceivedView();
  3404. }
  3405. else if (IsActivity("ReviewerStamps"))
  3406. {
  3407. DebugMessage("Page_Load: Init ReviewerStamps");
  3408. InitReviewerStampsView();
  3409. }
  3410. else if (IsActivity("BatchStamps"))
  3411. {
  3412. DebugMessage("Page_Load: Init BatchStamps");
  3413. InitBatchStampsView();
  3414. }
  3415. else if (IsActivity("AdditionalFees"))
  3416. {
  3417. DebugMessage("Page_Load: Init AdditionalFees");
  3418. InitAdditionalFeesView();
  3419. }
  3420. else if (IsActivity("ApplicantPEDDS"))
  3421. {
  3422. DebugMessage("Page_Load: Init ApplicantPEDDS");
  3423. InitApplicantPEDDSView();
  3424. }
  3425.  
  3426. if (MarkupsPanel.Visible == true)
  3427. {
  3428. //show the linked markups
  3429.  
  3430. List<MarkUp> MarkupList = new List<MarkUp>();
  3431. string[] MarkupRecords = AttachedMarkups.Value.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
  3432. foreach (string MarkupRecord in MarkupRecords)
  3433. {
  3434. //Response.Write("<br>MarkupRecord: " + MarkupRecord);
  3435. string[] MarkupFields = MarkupRecord.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
  3436.  
  3437. if (!String.IsNullOrEmpty(MarkupFields[0]) && !String.IsNullOrEmpty(MarkupFields[1]))
  3438. {
  3439. if (PDOX.Review.SelectedCycle.ToString() == MarkupFields[5])
  3440. {
  3441. MarkUp NewMarkup = new MarkUp();
  3442. NewMarkup.URL = MarkupFields[0];
  3443. NewMarkup.Name = MarkupFields[1];
  3444. NewMarkup.ID = MarkupFields[2];
  3445. NewMarkup.GroupName = MarkupFields[4];
  3446. MarkupList.Add(NewMarkup);
  3447. }
  3448. }
  3449. }
  3450.  
  3451. LinkedMarkupsRepeater.DataSource = MarkupList;
  3452. LinkedMarkupsRepeater.DataBind();
  3453. }
  3454. if (MarkupListing.Visible == true)
  3455. {
  3456. MarkupListing.Attributes.Add("src", "../ViewFolders.aspx?Mode=AttachMarkup&ProjectName=" + FlowContext.Project.Name);
  3457. }
  3458.  
  3459.  
  3460. //
  3461. // Bind Repeater DataSets
  3462. //
  3463.  
  3464. if (!IsPostBack)
  3465. {
  3466. BindReviewGroupsData(PDOX.Review.SelectedCycle);
  3467. BindReviewCycleData(PDOX.Review.SelectedCycle);
  3468. }
  3469.  
  3470.  
  3471. // wouldn't normally do it this way
  3472. // but event order causes problems.
  3473. // is the control that caused the postback the Review Cycle DropDown
  3474. // if so then rebind the data with the selected cycle
  3475. if ((Request.Params.Get("__EVENTTARGET") == SelectedReviewCycle.ClientID.Replace("_", "$")))
  3476. {
  3477. BindReviewGroupsData(PDOX.Review.SelectedCycle);
  3478. BindReviewCycleData(PDOX.Review.SelectedCycle);
  3479. }
  3480.  
  3481. }
  3482.  
  3483. </script>
  3484.  
  3485. <%--
  3486. // ================================================================================
  3487. //
  3488. // Page EFormEvent
  3489. //
  3490. // ================================================================================
  3491. --%>
  3492.  
  3493. <script language="C#" runat="server">
  3494. // event called on all buttons defined in the master page
  3495. protected void Page_EFormEvent(object sender, PDWorkflowEformEventArgs e)
  3496. {
  3497. DebugMessage("Page_EFormEvent: " + e.EventName);
  3498.  
  3499. InitReviewGroupsData();
  3500.  
  3501. if (IsActivity("PreScreenReview"))
  3502. {
  3503. switch (e.EventName)
  3504. {
  3505. case "VoidReviewButton":
  3506. VoidReview();
  3507. break;
  3508. }
  3509. }
  3510. if (IsActivity(PDOX.StandardActivities.BeginReview))
  3511. {
  3512. switch (e.EventName)
  3513. {
  3514. case "CompleteButton":
  3515. UpdateReviewGroups();
  3516.  
  3517. InitReviewCycleData();
  3518.  
  3519. AssignDepartmentReviewParticipants();
  3520.  
  3521. UpdateReviewCycle();
  3522.  
  3523. // reset this before review cycles start
  3524. FlowContext.Workflow["ReviewQA.CorrectionsWereRequested"] = "false";
  3525. FlowContext.Workflow.SaveField("ReviewQA.CorrectionsWereRequested");
  3526.  
  3527. break;
  3528. }
  3529. }
  3530. else if (IsActivity(PDOX.StandardActivities.DepartmentReview))
  3531. {
  3532. switch (e.EventName)
  3533. {
  3534. case "CompleteButton":
  3535. UpdateReview();
  3536.  
  3537. FlowContext.Workflow["ReviewQA.CorrectionsNeeded"] = "false";
  3538. FlowContext.Workflow.SaveField("ReviewQA.CorrectionsNeeded");
  3539.  
  3540. if (PDOX.CurrentUser.IsReviewCoordinator)
  3541. {
  3542. FlowContext.Workflow["DepartmentReview.ReviewersRequested"] = "false";
  3543. FlowContext.Workflow.SaveField("DepartmentReview.ReviewersRequested");
  3544. }
  3545. break;
  3546. case "SaveButton":
  3547. UpdateReview();
  3548. break;
  3549. case "SaveCloseButton":
  3550. UpdateReview();
  3551. break;
  3552. case "RequestReviewersButton":
  3553. UpdateReview();
  3554. RequestAdditionalReviewParticipants();
  3555. this.Master.ClosePage();
  3556. break;
  3557. case "AssignReviewersButton":
  3558. UpdateReviewGroups();
  3559. AssignAdditionalReviewParticipants();
  3560. UpdateReview();
  3561. UpdateReviewCycle();
  3562. //this.Master.ClosePage();
  3563. break;
  3564. case "CompleteReqestButton":
  3565. FlowContext.CompleteTask();
  3566. this.Master.ClosePage();
  3567. break;
  3568. }
  3569.  
  3570. }
  3571. else if (IsActivity(PDOX.StandardActivities.ReviewQA))
  3572. {
  3573. switch (e.EventName)
  3574. {
  3575. case "CompleteButton":
  3576. UpdateReview();
  3577. if (PDOX.Review.CycleCount > 2 && FlowContext.Workflow["ReviewQA.CorrectionsWereRequested"] == "true")
  3578. {
  3579. FlowContext.Workflow["AdditionalFees.FeeRequired"] = "true";
  3580. FlowContext.Workflow.SaveField("AdditionalFees.FeeRequired");
  3581. }
  3582. FlowContext.Workflow["ReviewQA.CorrectionsNeeded"] = "false";
  3583. FlowContext.Workflow.SaveField("ReviewQA.CorrectionsNeeded");
  3584. break;
  3585. case "SaveButton":
  3586. UpdateReview();
  3587. break;
  3588. case "SaveCloseButton":
  3589. UpdateReview();
  3590. break;
  3591. case "AssignCorrectionsButton":
  3592. AssignCorrectors();
  3593. // save everybody
  3594. SaveReview(PDOX.Review.CurrentCycle, PDOX.AssignmentTypes.Unknown.ToString(), "", "");
  3595. FlowContext.CompleteTask();
  3596. this.Master.ClosePage();
  3597. break;
  3598. }
  3599.  
  3600. }
  3601. else if (IsActivity("ReviewComplete"))
  3602. {
  3603. // if the review is rejected then we have to go through another cycle
  3604. // so increment the CurrentCycle and update the dataset which will be persisted in MD
  3605. PrepareReviewCompletion();
  3606.  
  3607. switch (e.EventName)
  3608. {
  3609. case "RejectButton":
  3610. RejectReview();
  3611. break;
  3612. case "ApproveButton":
  3613. UpdateReview();
  3614. UpdatePostReviewActivityParticipants(PDOX.Review.CurrentCycle);
  3615. AcceptReview();
  3616. break;
  3617. }
  3618. }
  3619. else if (IsActivity("AdditionalFees"))
  3620. {
  3621. if (FeesRequired.Checked)
  3622. FlowContext.Workflow["AdditionalFees.FeeRequired"] = "true";
  3623. else
  3624. FlowContext.Workflow["AdditionalFees.FeeRequired"] = "false";
  3625.  
  3626. FlowContext.Workflow.SaveField("AdditionalFees.FeeRequired");
  3627. }
  3628. else if (IsActivity("ApplicantResubmit"))
  3629. {
  3630. switch (e.EventName)
  3631. {
  3632. case "CompleteButton":
  3633. PDOX.Review.CurrentCycle++;
  3634. AddNewReviewCycle();
  3635. break;
  3636. }
  3637.  
  3638. if (SwitchToPaper.Checked)
  3639. FlowContext.Workflow["ApplicantResubmit.SwitchToPaper"] = "true";
  3640. else
  3641. FlowContext.Workflow["ApplicantResubmit.SwitchToPaper"] = "false";
  3642.  
  3643. FlowContext.Workflow.SaveField("ApplicantResubmit.SwitchToPaper");
  3644. FlowContext.Workflow["ResubmitReceived.PEDDSCorrect"] = "false";
  3645. FlowContext.Workflow.SaveField("ResubmitReceived.PEDDSCorrect");
  3646.  
  3647. }
  3648. else if (IsActivity("ResubmitReceived"))
  3649. {
  3650. if (PEDDSCorrect.Checked)
  3651. FlowContext.Workflow["ResubmitReceived.PEDDSCorrect"] = "true";
  3652. else
  3653. FlowContext.Workflow["ResubmitReceived.PEDDSCorrect"] = "false";
  3654.  
  3655. FlowContext.Workflow.SaveField("ResubmitReceived.PEDDSCorrect");
  3656.  
  3657. switch (e.EventName)
  3658. {
  3659. case "ApproveButton":
  3660. UpdateReviewGroups();
  3661.  
  3662. UpdateReviewCycle();
  3663.  
  3664. // clear DepartmentReview Participants first
  3665. // so we only get selected groups
  3666. FlowContext.Workflow["DepartmentReview.GroupNames"] = "";
  3667. FlowContext.Workflow.SaveField("DepartmentReview.GroupNames");
  3668.  
  3669. FlowContext.Workflow["DepartmentReview.UserEmails"] = "";
  3670. FlowContext.Workflow.SaveField("DepartmentReview.UserEmails");
  3671.  
  3672. // now assign selected groups
  3673. AssignDepartmentReviewParticipants();
  3674.  
  3675. // reset this flag to true so WhileReviewIncorrect loop
  3676. // will run when workflow comes around to department review
  3677. FlowContext.Workflow["ReviewQA.CorrectionsNeeded"] = "true";
  3678. FlowContext.Workflow.SaveField("ReviewQA.CorrectionsNeeded");
  3679. break;
  3680. }
  3681. }
  3682. else if (IsActivity("ApplicantPEDDS"))
  3683. {
  3684. switch (e.EventName)
  3685. {
  3686. case "CompleteButton":
  3687. if (PEDDSCorrect.Checked)
  3688. FlowContext.Workflow["ResubmitReceived.PEDDSCorrect"] = "true";
  3689. else
  3690. FlowContext.Workflow["ResubmitReceived.PEDDSCorrect"] = "false";
  3691.  
  3692. FlowContext.Workflow.SaveField("ResubmitReceived.PEDDSCorrect");
  3693. break;
  3694. }
  3695. }
  3696. else if (IsActivity("BatchStamps"))
  3697. {
  3698. switch (e.EventName)
  3699. {
  3700. case "ProjectExportButton":
  3701. string DestinationFolderPath = @"\\miamibeach1275\ProjectExportFolder";
  3702. Export(DestinationFolderPath);
  3703. break;
  3704. }
  3705. }
  3706. else if (IsActivity("GroupPreScreen"))
  3707. {
  3708. switch (e.EventName)
  3709. {
  3710. case "VoidReviewButton":
  3711. VoidReview();
  3712. break;
  3713. }
  3714. }
  3715.  
  3716. //FlowContext.Workflow.SaveFields();
  3717.  
  3718. //
  3719. // Bind Repeater DataSets
  3720. //
  3721. BindReviewGroupsData(PDOX.Review.SelectedCycle);
  3722. BindReviewCycleData(PDOX.Review.SelectedCycle);
  3723. }
  3724.  
  3725. //TODO: Need the 3rd folder name!!!!
  3726. //Export the Drawings, Documents and ??? folders and all files contained in these folders to DestinationFolderPath
  3727. private void Export(string DestinationFolderPath)
  3728. {
  3729. StringBuilder folderIDs = new StringBuilder(); //all folder IDs
  3730. StringBuilder fileIdList = new StringBuilder(); //all file IDs
  3731.  
  3732. GetFolderFileIDs(FlowContext, "Approved DERM - WASD", folderIDs, fileIdList);
  3733. GetFolderFileIDs(FlowContext, "Approved Copy", folderIDs, fileIdList);
  3734. GetFolderFileIDs(FlowContext, "Approved Supporting Documents,", folderIDs, fileIdList);
  3735.  
  3736. DebugMessage("FolderID List: " + folderIDs.ToString());
  3737. DebugMessage("FileID List: " + fileIdList.ToString());
  3738.  
  3739. bool ArchiveEntireProject = false; //only export the files and folds who's IDs were returned from GetFolderFileIDs()
  3740. bool IncludeMetadata = true;
  3741. 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.
  3742. bool IncludeTopicNotes = true;
  3743. bool IncludeAllVersions = true;
  3744. bool OutputZip = true;
  3745. bool OutputFileSystem = true;
  3746. string Output3rdParty = String.Empty;
  3747.  
  3748. ProjectDoxProject PDProjectWebService = new ProjectDoxProject();
  3749. PDProjectWebService.ProcessExport(FlowContext.Project.Name, fileIdList.ToString(), folderIDs.ToString(), ArchiveEntireProject, DestinationFolderPath, IncludeMetadata, IncludeIncoming,
  3750. IncludeTopicNotes, IncludeAllVersions, OutputZip, OutputFileSystem, Output3rdParty, Req.SessionUser.Email, GlobalVariables.SecurityToken);
  3751. }
  3752.  
  3753. //Gets the folder and file IDs and returns them in the StringBuilder parmas
  3754. private static void GetFolderFileIDs(WorkflowContext FlowContext, string folderName, StringBuilder folderIDs, StringBuilder fileIdList)
  3755. {
  3756. PDFolder pdFolder = new PDFolder(FlowContext.Project.ProjectID, 0, folderName);
  3757. folderIDs.Append(pdFolder.FolderID);
  3758. folderIDs.Append(",");
  3759.  
  3760. PDFiles files = pdFolder.GetLatestFiles(PDFiles.FileOrderBy.FileRank);
  3761. foreach (PDFile file in files.ItemList)
  3762. {
  3763. fileIdList.Append(file.FileID);
  3764. fileIdList.Append(",");
  3765. }
  3766. }
  3767. </script>
  3768.  
  3769. <asp:Content ID="HeadContent" runat="server" EnableViewState="true" ContentPlaceHolderID="HeadContentPlaceHolder">
  3770. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
  3771. <title>Plan Review Request Form</title>
  3772. <style type="text/css">
  3773. .CheckBoxList
  3774. {
  3775. height: 64px;
  3776. overflow: auto;
  3777. }
  3778. .RepeaterTable td
  3779. {
  3780. padding: 5px;
  3781. margin: 0;
  3782. border-left: solid 1px #AAAACC;
  3783. border-bottom: solid 1px #CCCCFF;
  3784. }
  3785. .QAField
  3786. {
  3787. width: 45%;
  3788. }
  3789. </style>
  3790.  
  3791. <script language="javascript" src="../JavaScripts.js" type="text/javascript"></script>
  3792.  
  3793. <script language="javascript" src="tooltip.js" type="text/javascript"></script>
  3794.  
  3795. <script type="text/javascript">
  3796.  
  3797. CompleteButtonClientID = '<%=this.Master.GetButton("CompleteButton").ClientID%>';
  3798.  
  3799. function ShowWorkingPanel(Bubble)
  3800. {
  3801. // only show if bubbling up
  3802. if (Bubble)
  3803. {
  3804. var IFrame = document.getElementById("WorkingFrame");
  3805. IFrame.src = "Loader.htm";
  3806. IFrame.style.display = "inline";
  3807. }
  3808. return Bubble;
  3809. }
  3810.  
  3811. function HideWorkingPanel(Bubble)
  3812. {
  3813. // always hide
  3814. var WorkingPanel = document.getElementById("WorkingPanel");
  3815. WorkingPanel.style.display = "none";
  3816. WorkingPanel.style.visibility = "hidden";
  3817. return Bubble;
  3818. }
  3819.  
  3820. // gets a specific kind of ElementType (i.e. checkbox) in a ParentID object (i.e. <div id="myDiv">)
  3821. function GetFormElementsInParent(ParentID, ElementType)
  3822. {
  3823. var container = document.getElementById(ParentID); // get the main target element
  3824. var Elems = new Array();
  3825. if (container) // if the object is found then get the nodes in it
  3826. {
  3827. var FormElemType = '';
  3828.  
  3829. 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')
  3830. FormElemType = 'input';
  3831.  
  3832. else if (ElementType.toLowerCase() == 'select-one' || ElementType.toLowerCase() == 'select-multiple')
  3833. FormElemType = 'select';
  3834.  
  3835. else
  3836. FoemElemType = ElemType;
  3837.  
  3838.  
  3839. // Get all the form elements within the container elements
  3840. var sub_elements = container.getElementsByTagName(FormElemType);
  3841.  
  3842. // Loop through all the elements within the target element
  3843. for (var i = 0; i < sub_elements.length; i++)
  3844. {
  3845. if (sub_elements[i].type == ElementType.toLowerCase())
  3846. {
  3847. Elems[Elems.length] = sub_elements[i];
  3848. }
  3849. }
  3850. }
  3851.  
  3852. return Elems;
  3853. }
  3854.  
  3855.  
  3856. // verify the user has selected at least one reviewer
  3857. function CheckReviewers()
  3858. {
  3859. var Found = false;
  3860. var Objs = GetFormElementsInParent('<%=ReviewGroupsPanel.ClientID%>', 'checkbox');
  3861.  
  3862. for (var i = 0; i < Objs.length; i++)
  3863. {
  3864. if (Objs[i].id.endsWith('RG_GroupSelect') && Objs[i].checked) // look for the main "select group" checkbox
  3865. {
  3866. Found = true;
  3867. break;
  3868. }
  3869. }
  3870.  
  3871. if (Found)
  3872. {
  3873. return CompleteConfirm();
  3874. }
  3875. else
  3876. {
  3877. alert("You must choose at least one reviewer");
  3878. return false;
  3879. }
  3880. }
  3881.  
  3882. function CheckDepartmentReview()
  3883. {
  3884. var Found = false;
  3885. var Objs = GetFormElementsInParent('<%=ReviewFieldSet.ClientID%>', 'select-one');
  3886.  
  3887. // look for the changestatus dropdown that is enabled (i.e. our current group)
  3888. for (var i = 0; i < Objs.length; i++)
  3889. {
  3890. if (
  3891. Objs[i].id.endsWith('RC_ChangeStatus')
  3892. && Objs[i].selectedIndex == 0
  3893. && Objs[i].enabled == true
  3894. )
  3895. {
  3896. Found = true;
  3897. break;
  3898. }
  3899. }
  3900.  
  3901. if (!Found)
  3902. {
  3903. return CompleteConfirm();
  3904. }
  3905. else
  3906. {
  3907. alert("You must choose a status for the review");
  3908. return false;
  3909. }
  3910. }
  3911.  
  3912. // confirms user has checked the recevied payment box
  3913. function CheckAwaitingPayment()
  3914. {
  3915. if (!document.aspnetForm.elements['<%=AwaitingFinalPaymentReceived.UniqueID%>'].checked)
  3916. {
  3917. alert("You must verify that you have received payment");
  3918. return false;
  3919. }
  3920. else
  3921. return true;
  3922. }
  3923.  
  3924. //Validte CHeckbox Prescreen
  3925. function ShowHideByCheckbox(chkBoxID, elementID)
  3926. {
  3927. if (document.aspnetForm.elements[chkBoxID].checked)
  3928. {
  3929. document.getElementById(elementID).disabled = false;
  3930. }
  3931. else
  3932. {
  3933. document.getElementById(elementID).disabled = true;
  3934. }
  3935. }
  3936. //Validte CHeckbox DepartmentReview
  3937. function ShowHideByCheckboxDeptReview(chkBoxID, elementID)
  3938. {
  3939. //alert(chkBoxID + "-" + elementID);
  3940. if (document.aspnetForm.elements[chkBoxID].checked)
  3941. {
  3942. document.getElementById(elementID).disabled = false;
  3943. }
  3944. else
  3945. {
  3946. document.getElementById(elementID).disabled = true;
  3947. }
  3948. }
  3949. //Validate checkbox on ApplicantResubmit
  3950. function ShowHideByCheckboxApp(elementID)
  3951. {
  3952. //alert(chkBoxID + "-" + elementID);
  3953.  
  3954. if (document.aspnetForm.elements['<%=AppResubStep1.UniqueID%>'].checked && document.aspnetForm.elements['<%=AppResubStep2.UniqueID%>'].checked && document.aspnetForm.elements['<%=AppResubStep3.UniqueID%>'].checked)
  3955. {
  3956. document.getElementById(elementID).disabled = false;
  3957. }
  3958. else
  3959. {
  3960. document.getElementById(elementID).disabled = true;
  3961. }
  3962. }
  3963.  
  3964. //Validate checkbox on Batch Stamp
  3965. function ShowHideByCheckboxBatch(elementID)
  3966. {
  3967. //alert(chkBoxID + "-" + elementID);
  3968.  
  3969. if (document.aspnetForm.elements['<%=Batch1.UniqueID%>'].checked && document.aspnetForm.elements['<%=Batch2.UniqueID%>'].checked)
  3970. {
  3971. document.getElementById(elementID).disabled = false;
  3972. }
  3973. else
  3974. {
  3975. document.getElementById(elementID).disabled = true;
  3976. }
  3977. }
  3978.  
  3979. function FinalizeMarkup(MarkupArray)
  3980. {
  3981. var markups = document.aspnetForm.elements['<%=AttachedMarkups.ClientID%>'].value;
  3982. for (var i = 0; i < MarkupArray.length; i++)
  3983. {
  3984. if (markups != "")
  3985. {
  3986. markups += ";";
  3987. }
  3988. markups +=
  3989. MarkupArray[i].URL
  3990. + "," + MarkupArray[i].Name
  3991. + "," + MarkupArray[i].ID
  3992. + "," + MarkupArray[i].File
  3993. + "," + '<%=PDOX.CurrentUser.GroupName%>'
  3994. + "," + '<%=PDOX.Review.CurrentCycle%>';
  3995. }
  3996.  
  3997. document.aspnetForm.elements['<%=AttachedMarkups.ClientID%>'].value = markups;
  3998. __doPostBack('<%=AttachedMarkups.UniqueID%>', '');
  3999. }
  4000.  
  4001. function RemoveMarkupLink_Click(id)
  4002. {
  4003. //make sure there are no spaces
  4004. var ID = trim(id);
  4005. //get the current markups
  4006. var markups = document.aspnetForm.elements['<%=AttachedMarkups.ClientID%>'].value;
  4007. var splitMarkups = markups.split(";");
  4008. var newMarkupList = "";
  4009.  
  4010. //loop through all markups and remove the selected markup
  4011. for (var i = 0; i < splitMarkups.length; i++)
  4012. {
  4013. if (trim(splitMarkups[i]) !== "")
  4014. {
  4015. var markup = splitMarkups[i].split(",");
  4016. var found = false;
  4017. //IDs match so remove it
  4018. if (ID === trim(markup[2]))
  4019. {
  4020. found = true;
  4021. }
  4022.  
  4023. //only add the non-selected markups on a component by component bases
  4024. if (found === false)
  4025. {
  4026. for (var j = 0; j < markup.length; j++)
  4027. {
  4028. newMarkupList = newMarkupList + markup[j] + ",";
  4029. }
  4030. newMarkupList = newMarkupList + ";";
  4031. }
  4032. }
  4033. }
  4034.  
  4035. //populate the hidden field with all the correct markups
  4036. document.aspnetForm.elements['<%=AttachedMarkups.ClientID%>'].value = newMarkupList;
  4037. __doPostBack('<%=AttachedMarkups.UniqueID%>', '');
  4038. }
  4039. </script>
  4040. </asp:Content>
  4041. <asp:Content ID="BodyContent" runat="server" EnableViewState="true" ContentPlaceHolderID="BodyContentPlaceHolder">
  4042. <asp:Panel ID="LogoPanel" runat="server" EnableViewState="true" CssClass="SectionPanel"
  4043. Width="100%">
  4044. <asp:Panel ID="LogoPanelImage" runat="server" EnableViewState="true" CssClass="LogoImage" />
  4045. </asp:Panel>
  4046. <asp:Panel ID="PermitPanel" runat="server" EnableViewState="true" CssClass="SectionPanel"
  4047. Visible="false" Style="left: 0px; top: 0px" Width="100%">
  4048. <asp:Panel ID="PermitHeader" runat="server" EnableViewState="true" CssClass="SectionPanelHeader"
  4049. Width="100%">
  4050. Permit Overview
  4051. </asp:Panel>
  4052. <asp:Panel ID="PermitFieldSet1" runat="server" EnableViewState="true" CssClass="TwoColumnFieldSet"
  4053. Width="48%">
  4054. <span class="WideFieldLabel">Permit #</span>
  4055. <asp:TextBox ID="PermitNumber" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4056. <br class="Clear" />
  4057. <span class="WideFieldLabel">Permit Description</span>
  4058. <asp:TextBox ID="PermitDescription" TextMode="multiline" rows="4" Wrap="true" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4059. <br class="Clear" />
  4060. <span class="WideFieldLabel">Permit Type</span>
  4061. <asp:TextBox ID="PermitType" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4062. <br class="Clear" />
  4063. <span class="WideFieldLabel">Permit Subtype</span>
  4064. <asp:TextBox ID="PermitSubType" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4065. <br class="Clear" />
  4066. <span class="WideFieldLabel">Subtype Description</span>
  4067. <asp:TextBox ID="SubtypeDescription" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4068. <br class="Clear" />
  4069. <span class="WideFieldLabel">Permit Parcel #</span>
  4070. <asp:TextBox ID="PermitParcelNumber" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4071. <br class="Clear" />
  4072. <span class="WideFieldLabel">Permit Location</span>
  4073. <asp:TextBox ID="PermitLocation" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4074. <br class="Clear" />
  4075. <span class="WideFieldLabel">Permit Title</span>
  4076. <asp:TextBox ID="PermitTitle" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4077. <br class="Clear" />
  4078. <span class="WideFieldLabel">Permit Status</span>
  4079. <asp:TextBox ID="PermitStatus" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4080. <br class="Clear" />
  4081. <span class="WideFieldLabel">Substantial Improvements</span>
  4082. <asp:TextBox ID="SubstantialImprovements" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4083. <br class="Clear" />
  4084. <span class="WideFieldLabel"># of Buildings</span>
  4085. <asp:TextBox ID="BuildingCount" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4086. <br class="Clear" />
  4087. <span class="WideFieldLabel"># of Units</span>
  4088. <asp:TextBox ID="UnitCount" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4089. <br class="Clear" />
  4090. <span class="WideFieldLabel">Permit Valuation</span>
  4091. <asp:TextBox ID="PermitValuation" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4092. <br class="Clear" />
  4093. <span class="WideFieldLabel">Permit Area Under Roof</span>
  4094. <asp:TextBox ID="PermitAUR" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4095. <br class="Clear" />
  4096. <span class="WideFieldLabel">Building Construction Type</span>
  4097. <asp:TextBox ID="BuildingConsType" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4098. <br class="Clear" />
  4099. <span class="WideFieldLabel">Special Projects</span>
  4100. <asp:TextBox ID="SpecialProjects" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4101. <br class="Clear" />
  4102. <span class="WideFieldLabel">Private Provider</span>
  4103. <asp:TextBox ID="PrivateProvider" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4104. <br class="Clear" />
  4105. <span class="WideFieldLabel">City Projects</span>
  4106. <asp:TextBox ID="CityProjects" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4107. <br class="Clear" />
  4108. <span class="WideFieldLabel">Building Height</span>
  4109. <asp:TextBox ID="BuildingHeight" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4110. <br class="Clear" />
  4111. <span class="WideFieldLabel">Occupancy Content</span>
  4112. <asp:TextBox ID="OccupancyContent" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4113. <br class="Clear" />
  4114. </asp:Panel>
  4115. <asp:Panel ID="PermitFieldSet2" runat="server" EnableViewState="true" CssClass="TwoColumnFieldSet"
  4116. Width="48%">
  4117. <span class="WideFieldLabel">Applicant Name</span>
  4118. <asp:TextBox ID="ApplicantName" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4119. <br class="Clear" />
  4120. <span class="WideFieldLabel">Applicant Phone</span>
  4121. <asp:TextBox ID="ApplicantPhone" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4122. <br class="Clear" />
  4123. <span class="WideFieldLabel">Applicant Email Address</span>
  4124. <asp:TextBox ID="ApplicantEmail" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4125. <br class="Clear" />
  4126. <span class="WideFieldLabel">Permit Occupancy Class</span>
  4127. <asp:TextBox ID="PermitOccClass" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4128. <br class="Clear" />
  4129. <span class="WideFieldLabel">Applicant Cell</span>
  4130. <asp:TextBox ID="ApplicantCell" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4131. <br class="Clear" />
  4132. <span class="WideFieldLabel">Applicant Fax</span>
  4133. <asp:TextBox ID="ApplicantFax" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4134. <br class="Clear" />
  4135. <span class="WideFieldLabel">Applied Date</span>
  4136. <asp:TextBox ID="AppliedDate" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4137. <br class="Clear" />
  4138. <span class="WideFieldLabel">Entered Date</span>
  4139. <asp:TextBox ID="EnteredDate" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4140. <br class="Clear" />
  4141. <span class="WideFieldLabel">Total SQFT</span>
  4142. <asp:TextBox ID="TotalSqft" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4143. <br class="Clear" />
  4144. <span class="WideFieldLabel">Zoning</span>
  4145. <asp:TextBox ID="Zoning" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4146. <br class="Clear" />
  4147. <span class="WideFieldLabel">HUD</span>
  4148. <asp:TextBox ID="HUD" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4149. <br class="Clear" />
  4150. <span class="WideFieldLabel">LEED</span>
  4151. <asp:TextBox ID="LEED" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4152. <br class="Clear" />
  4153. <span class="WideFieldLabel">Building Stories</span>
  4154. <asp:TextBox ID="BuildingStories" runat="server" EnableViewState="true" CssClass="WideField"></asp:TextBox>
  4155. <br class="Clear" />
  4156. <span class="WideFieldLabel">Building Asbly Occupancy</span>
  4157. <asp:TextBox ID="BuildingAssmemblyOccupancy" runat="server" EnableViewState="true"
  4158. CssClass="WideField"></asp:TextBox>
  4159. <br class="Clear" />
  4160. </asp:Panel>
  4161. <br class="Clear" />
  4162. <br />
  4163. <asp:Panel ID="ArchitectFieldSet" runat="server" EnableViewState="true" CssClass="ThreeColumnFieldSet"
  4164. Width="32%">
  4165. <asp:Panel ID="ArchitectFieldSetHeader" runat="server" EnableViewState="true" CssClass="FieldSetHeader"
  4166. Width="100%">
  4167. Architect
  4168. </asp:Panel>
  4169. <span class="NarrowFieldLabel">Name</span>
  4170. <asp:TextBox ID="ArchitectName" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
  4171. <br class="Clear" />
  4172. <span class="NarrowFieldLabel">Phone #</span>
  4173. <asp:TextBox ID="ArchitectPhone" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
  4174. <br class="Clear" />
  4175. <span class="NarrowFieldLabel">Cell #</span>
  4176. <asp:TextBox ID="ArchitectCell" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
  4177. <br class="Clear" />
  4178. <span class="NarrowFieldLabel">Fax #</span>
  4179. <asp:TextBox ID="ArchitectFax" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
  4180. <br class="Clear" />
  4181. <span class="NarrowFieldLabel">Email</span>
  4182. <asp:TextBox ID="ArchitectEmail" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
  4183. <br class="Clear" />
  4184. </asp:Panel>
  4185. <asp:Panel ID="ContractorFieldSet" runat="server" EnableViewState="true" CssClass="ThreeColumnFieldSet"
  4186. Width="32%">
  4187. <asp:Panel ID="ContractorFieldSetHeader" runat="server" EnableViewState="true" CssClass="FieldSetHeader"
  4188. Width="100%">
  4189. Contractor
  4190. </asp:Panel>
  4191. <span class="NarrowFieldLabel">Name</span>
  4192. <asp:TextBox ID="ContractorName" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
  4193. <br class="Clear" />
  4194. <span class="NarrowFieldLabel">Phone #</span>
  4195. <asp:TextBox ID="ContractorPhone" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
  4196. <br class="Clear" />
  4197. <span class="NarrowFieldLabel">Cell #</span>
  4198. <asp:TextBox ID="ContractorCell" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
  4199. <br class="Clear" />
  4200. <span class="NarrowFieldLabel">Fax #</span>
  4201. <asp:TextBox ID="ContractorFax" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
  4202. <br class="Clear" />
  4203. <span class="NarrowFieldLabel">Email</span>
  4204. <asp:TextBox ID="ContractorEmail" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
  4205. <br class="Clear" />
  4206. </asp:Panel>
  4207. <asp:Panel ID="EngineerFieldSet" runat="server" EnableViewState="true" CssClass="ThreeColumnFieldSet"
  4208. Width="32%">
  4209. <asp:Panel ID="EngineerFieldSetHeader" runat="server" EnableViewState="true" CssClass="FieldSetHeader"
  4210. Width="100%">
  4211. Engineer
  4212. </asp:Panel>
  4213. <span class="NarrowFieldLabel">Name</span>
  4214. <asp:TextBox ID="EngineerName" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
  4215. <br class="Clear" />
  4216. <span class="NarrowFieldLabel">Phone #</span>
  4217. <asp:TextBox ID="EngineerPhone" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
  4218. <br class="Clear" />
  4219. <span class="NarrowFieldLabel">Cell #</span>
  4220. <asp:TextBox ID="EngineerCell" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
  4221. <br class="Clear" />
  4222. <span class="NarrowFieldLabel">Fax #</span>
  4223. <asp:TextBox ID="EngineerFax" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
  4224. <br class="Clear" />
  4225. <span class="NarrowFieldLabel">Email</span>
  4226. <asp:TextBox ID="EngineerEmail" runat="server" EnableViewState="true" CssClass="NarrowField"></asp:TextBox>
  4227. <br class="Clear" />
  4228. </asp:Panel>
  4229. <br class="Clear" />
  4230. </asp:Panel>
  4231. <asp:Panel ID="ReviewInfoPanel" runat="server" EnableViewState="true" CssClass="SectionPanel"
  4232. Visible="false" Width="100%">
  4233. <asp:Panel ID="ReviewInfoHeader" runat="server" EnableViewState="true" CssClass="SectionPanelHeader"
  4234. Width="100%">
  4235. Review Information
  4236. </asp:Panel>
  4237. <asp:Panel ID="ReviewInfoFieldSet" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
  4238. Width="100%">
  4239. <span class="LineFieldLabel">Review Coordinator</span>
  4240. <asp:TextBox ID="ReviewCoordinator" runat="server" EnableViewState="true" CssClass="LineField"
  4241. ReadOnly="true"></asp:TextBox>
  4242. <br class="Clear" />
  4243. <span class="LineFieldLabel">Review Cycle</span>
  4244. <asp:TextBox ID="ReviewCycleText" runat="server" EnableViewState="true" CssClass="LineField"
  4245. ReadOnly="true"></asp:TextBox>
  4246. <br class="Clear" />
  4247. <span class="LineFieldLabel">Workflow Name / Activity Name</span>
  4248. <asp:TextBox ID="WorkflowPath" runat="server" EnableViewState="true" CssClass="LineField"
  4249. ReadOnly="true"></asp:TextBox>
  4250. <br class="Clear" />
  4251. <span class="LineFieldLabel">Activity Instructions</span>
  4252. <asp:TextBox ID="ActivityInstructions" runat="server" EnableViewState="true" CssClass="LineField"
  4253. ReadOnly="true"></asp:TextBox>
  4254. <br class="Clear" />
  4255. <span class="LineFieldLabel">Current User Logon</span>
  4256. <asp:TextBox ID="CurrentUserLogon" runat="server" EnableViewState="true" CssClass="LineField"
  4257. ReadOnly="true"></asp:TextBox>
  4258. <br class="Clear" />
  4259. </asp:Panel>
  4260. </asp:Panel>
  4261. <asp:Panel ID="GroupPreScreenPanel" runat="server" EnableViewState="true" CssClass="SectionPanel"
  4262. Visible="false" Style="left: 0px; top: 0px" Width="100%">
  4263. <asp:Panel ID="GroupPreScreenHeader" runat="server" EnableViewState="true" CssClass="SectionPanelHeader" Width="100%">Pre Screen</asp:Panel>
  4264. <asp:Panel ID="PreScreenReviewToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
  4265. <table class="LineFieldAppTableSwitch">
  4266. <tr align="left">
  4267. <td align="left" bgcolor="" width="98%">
  4268. <span class="hotspot"
  4269. onmouseover="tooltip.show('Please review pre-screening notes and checklist in order to determine if a correction is need from the applicant');"
  4270. onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img>&nbsp;Pre-Screen Review Instructions</span>
  4271. </td>
  4272. </tr>
  4273. </table>
  4274. </asp:panel>
  4275.  
  4276. <asp:Panel ID="PreScreenToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
  4277. <table class="LineFieldAppTableSwitch">
  4278. <tr align="left">
  4279. <td align="left" bgcolor="" width="98%">
  4280. <span class="hotspot"
  4281. onmouseover="tooltip.show('Please review the applicant drawings for completness and accuracy');"
  4282. onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img>&nbsp;Pre-Screen Instructions</span>
  4283. </td>
  4284. </tr>
  4285. </table>
  4286. </asp:panel>
  4287.  
  4288. <asp:Panel ID="PreScreenAppToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
  4289. <table class="LineFieldAppTableSwitch">
  4290. <tr align="left">
  4291. <td align="left" bgcolor="" width="98%">
  4292. <span class="hotspot"
  4293. onmouseover="tooltip.show('Please review the notes in order to correct your drawings or documents for plan review');"
  4294. onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img>&nbsp;Applicant Instructions</span>
  4295. </td>
  4296. </tr>
  4297. </table>
  4298. </asp:panel>
  4299.  
  4300. <asp:Panel ID="GroupPreScreenFieldSet1" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
  4301. Width="100%">
  4302. <table class="PreScreenTable">
  4303. <tr>
  4304. <td width="30%"><span class="LineField">Router Clerk</span></td>
  4305. <td width="75%">
  4306. <div class="LineField">
  4307. <a runat="server" id="PreScreenChecklistLink1" target="_blank">View Checklist</a>
  4308. <br />
  4309. <asp:TextBox ID="GroupPreScreenComments1" runat="server" EnableViewState="true" CssClass="LineField"
  4310. TextMode="MultiLine" Rows="5"></asp:TextBox>
  4311. <asp:DropDownList ID="GroupPreScreenAD1" runat="server" EnableViewState="true" CssClass="LineField">
  4312. <asp:ListItem Text="Approved" Value="Approved" />
  4313. <asp:ListItem Text="Denied" Value="Denied" />
  4314. </asp:DropDownList><br />
  4315. <asp:CheckBox ID="PreScreenChecklistRC" runat="server" OnClick="ShowHideByCheckbox(this.id ,CompleteButtonClientID)" Visible="true" EnableViewState="true"
  4316. Text="Complete" />
  4317. </div>
  4318. </td>
  4319. </tr>
  4320. </table>
  4321. <hr/>
  4322. </asp:Panel>
  4323.  
  4324. <asp:Panel ID="GroupPreScreenFieldSet2" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
  4325. Width="100%">
  4326. <table class="PreScreenTable">
  4327. <tr>
  4328. <td width="30%"><span class="LineField">B Building</span></td>
  4329.  
  4330. <td width="75%">
  4331. <div class="LineField">
  4332. <a runat="server" id="PreScreenChecklistLink2" target="_blank">View Checklist</a><br />
  4333. <asp:TextBox ID="GroupPreScreenComments2" runat="server" EnableViewState="true" CssClass="LineField"
  4334. TextMode="MultiLine" Rows="5"></asp:TextBox>
  4335. <asp:DropDownList ID="GroupPreScreenAD2" runat="server" EnableViewState="true" CssClass="LineField">
  4336. <asp:ListItem Text="Approved" Value="Approved" />
  4337. <asp:ListItem Text="Denied" Value="Denied" />
  4338. </asp:DropDownList><br />
  4339. <asp:CheckBox ID="PreScreenChecklistBLD" runat="server" OnClick="ShowHideByCheckbox(this.id ,CompleteButtonClientID)" Visible="true" EnableViewState="true"
  4340. Text="Complete" />
  4341. </div>
  4342. </td>
  4343. </tr>
  4344. </table>
  4345. <hr/>
  4346. </asp:Panel>
  4347.  
  4348. <asp:Panel ID="GroupPreScreenFieldSet3" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
  4349. Width="100%">
  4350. <table class="PreScreenTable">
  4351. <tr>
  4352. <td width="30%"><span class="LineField">B Governmental Compliance</span></td>
  4353.  
  4354. <td width="75%">
  4355. <div class="LineField">
  4356. <a runat="server" id="PreScreenChecklistLink3" target="_blank">View Checklist</a><br />
  4357. <asp:TextBox ID="GroupPreScreenComments3" runat="server" EnableViewState="true" CssClass="LineField"
  4358. TextMode="MultiLine" Rows="5"></asp:TextBox>
  4359. <asp:DropDownList ID="GroupPreScreenAD3" runat="server" EnableViewState="true" CssClass="LineField">
  4360. <asp:ListItem Text="Approved" Value="Approved" />
  4361. <asp:ListItem Text="Denied" Value="Denied" />
  4362. </asp:DropDownList><br />
  4363. <asp:CheckBox ID="PreScreenChecklistGC" runat="server" OnClick="ShowHideByCheckbox(this.id ,CompleteButtonClientID)" Visible="true" EnableViewState="true"
  4364. Text="Complete" />
  4365. </div>
  4366. </td>
  4367. </tr>
  4368. </table>
  4369. <hr/>
  4370. </asp:Panel>
  4371.  
  4372. </asp:Panel>
  4373.  
  4374. <asp:Panel ID="ReviewGroupsPanel" runat="server" EnableViewState="true" CssClass="SectionPanel"
  4375. Visible="false" Width="100%">
  4376. <asp:Panel ID="ReviewersHeader" runat="server" EnableViewState="true" CssClass="SectionPanelHeader"
  4377. Width="100%">Select Reviewers
  4378. </asp:Panel>
  4379.  
  4380. <asp:Panel ID="BeginReviewToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
  4381. <table class="LineFieldAppTableSwitch">
  4382. <tr align="left">
  4383. <td align="left" bgcolor="" width="98%">
  4384. <span class="hotspot"
  4385. onmouseover="tooltip.show('Please select the necessary departments below and click the Begin Review button at the bottom of the form.');"
  4386. onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img>&nbsp;Begin Review Instructions</span>
  4387. </td>
  4388. </tr>
  4389. </table>
  4390. </asp:panel>
  4391.  
  4392.  
  4393. <asp:Panel ID="ReReviewToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
  4394. <table class="LineFieldAppTableSwitch">
  4395. <tr align="left">
  4396. <td align="left" bgcolor="" width="98%">
  4397. <span class="hotspot"
  4398. 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.');"
  4399. onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img>&nbsp;ReReview Instructions</span>
  4400. </td>
  4401. </tr>
  4402. </table>
  4403. </asp:panel>
  4404.  
  4405. <table style="width: 100%" class="RepeaterHeaderTable">
  4406. <tr>
  4407. <td style="width: 10%">
  4408. <div style="width: 100%; text-align: center">Cycle</div>
  4409. </td>
  4410. <td style="width: 12%">
  4411. <div style="width: 100%; text-align: center">Select</div>
  4412. </td>
  4413. <td style="width: 25%">
  4414. <div style="width: 100%; text-align: center">Department</div>
  4415. </td>
  4416. <td style="width: 20%">
  4417. <div style="width: 100%; text-align: center">Assignment</div>
  4418. </td>
  4419. <td style="width: 35%">
  4420. <div style="width: 100%; text-align: center">Reviewer</div>
  4421. </td>
  4422. </tr>
  4423. </table>
  4424.  
  4425. <div style="width:100%; height:auto; overflow:auto;">
  4426. <table style="width: 98%" class="RepeaterTable">
  4427. <asp:Repeater ID="ReviewGroupsRepeater" runat="server" EnableViewState="true" OnItemDataBound="ReviewGroupsRepeater_ItemDataBound">
  4428. <ItemTemplate>
  4429. <asp:PlaceHolder ID="RG_GroupRowPlaceHolder" runat="server">
  4430. <tr style="background-color: #d3d9e9">
  4431. <td style="width: 10%">
  4432. <asp:Label ID="RG_ReviewCycle" runat="server" EnableViewState="true"></asp:Label>
  4433. </td>
  4434. <td style="width: 10%">
  4435. <asp:CheckBox ID="RG_GroupSelect" runat="server" EnableViewState="true"></asp:CheckBox>
  4436. </td>
  4437. <td style="width: 25%" class="RepeaterTableLeft" >
  4438. <asp:Label ID="RG_GroupName" runat="server" EnableViewState="true"></asp:Label>
  4439. </td>
  4440. <td style="width: 20%">
  4441. <asp:DropDownList ID="RG_AssignmentType" runat="server" EnableViewState="true">
  4442. <asp:ListItem Text="First In Group" Value="FirstInGroup" />
  4443. <asp:ListItem Text="Individual" Value="Individual" />
  4444. </asp:DropDownList>
  4445. </br>
  4446. <asp:CheckBox ID="RG_PerformReview" runat="server" Visible="false" EnableViewState="true"
  4447. Text="Perform Review" />
  4448. </td>
  4449. <td style="width: 28%">
  4450. <div style="width:85%; height:45px; overflow:auto;" class="CheckBoxList">
  4451. <asp:CheckBoxList ID="RG_GroupUsers" runat="server" EnableViewState="true">
  4452. </asp:CheckBoxList>
  4453. </div>
  4454. </td>
  4455. </tr>
  4456. </asp:PlaceHolder>
  4457. </ItemTemplate>
  4458.  
  4459. <AlternatingItemTemplate>
  4460. <asp:PlaceHolder ID="RG_GroupRowPlaceHolder" runat="server">
  4461. <tr style="background-color: #9daace">
  4462. <td style="width: 10%">
  4463. <asp:Label ID="RG_ReviewCycle" runat="server" EnableViewState="true"></asp:Label>
  4464. </td>
  4465. <td style="width: 10%">
  4466. <asp:CheckBox ID="RG_GroupSelect" runat="server" EnableViewState="true"></asp:CheckBox>
  4467. </td>
  4468. <td style="width: 25%" class="RepeaterTableLeft">
  4469. <asp:Label ID="RG_GroupName" runat="server" EnableViewState="true"></asp:Label>
  4470. </td>
  4471. <td style="width: 20%">
  4472. <asp:DropDownList ID="RG_AssignmentType" runat="server" EnableViewState="true">
  4473. <asp:ListItem Text="First In Group" Value="FirstInGroup" />
  4474. <asp:ListItem Text="Individual" Value="Individual" />
  4475. </asp:DropDownList>
  4476. </br>
  4477. <asp:CheckBox ID="RG_PerformReview" runat="server" Visible="false" EnableViewState="true"
  4478. Text="Perform Review" />
  4479. </td>
  4480. <td style="width: 28%">
  4481. <div style="width:85%; height:45px; overflow:auto;" class="CheckBoxList">
  4482. <asp:CheckBoxList ID="RG_GroupUsers" runat="server" EnableViewState="true">
  4483. </asp:CheckBoxList>
  4484. </div>
  4485. </td>
  4486. </tr>
  4487. </asp:PlaceHolder>
  4488. </AlternatingItemTemplate>
  4489. </asp:Repeater>
  4490. </table>
  4491. </div>
  4492. <%--
  4493. <asp:Button ID="AssignReviewersButton" Text="Assign Selected Reviewers" runat="server"
  4494. EnableViewState="true" OnClick="AssignReviewers_Click" />
  4495. --%>
  4496. </asp:Panel>
  4497.  
  4498. <asp:Panel ID="ReviewCyclePanel" runat="server" EnableViewState="true" CssClass="SectionPanel"
  4499. Visible="false" Width="100%">
  4500. <asp:Panel ID="ReviewHeader" runat="server" EnableViewState="true" CssClass="SectionPanelHeader"
  4501. Width="100%" Visible="true">
  4502. Department Review - <span style="font-weight: normal; font-size: smaller">Review Cycle:</span>
  4503. <asp:ListBox ID="SelectedReviewCycle" Rows="1" runat="server" EnableViewState="true"
  4504. AutoPostBack="true"></asp:ListBox>
  4505. </asp:Panel>
  4506.  
  4507. <asp:Panel ID="ReviewerToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
  4508. <table class="LineFieldAppTableSwitch">
  4509. <tr align="left">
  4510. <td align="left" bgcolor="" width="98%">
  4511. <span class="hotspot"
  4512. onmouseover="tooltip.show('Once drawings are reviewed and checklist complete: <br>&nbsp;&nbsp; 1. Select status <br>&nbsp;&nbsp; 2. Provide notes <br>&nbsp;&nbsp; 3. Attach Markups if needed <br>&nbsp;&nbsp; 4. Check <b>Plan Review Complete</b> <br>&nbsp;&nbsp; 5. Click <b>Complete Review</b>');"
  4513. onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img>&nbsp;Reviewer Instructions</span>
  4514. </td>
  4515. </tr>
  4516. </table>
  4517. </asp:panel>
  4518.  
  4519. <asp:Panel ID="ApplicantToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
  4520. <table class="LineFieldAppTableSwitch">
  4521. <tr align="left">
  4522. <td align="left" bgcolor="" width="98%">
  4523. <span class="hotspot"
  4524. onmouseover="tooltip.show('Please reviwew comments and markups prior to completing the checkbox below and completing the task.');"
  4525. onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img>&nbsp;Applicant Instructions</span>
  4526. </td>
  4527. </tr>
  4528. </table>
  4529. </asp:panel>
  4530.  
  4531. <asp:Panel ID="QAToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
  4532. <table class="LineFieldAppTableSwitch">
  4533. <tr align="left">
  4534. <td align="left" bgcolor="" width="98%">
  4535. <span class="hotspot"
  4536. onmouseover="tooltip.show('Please review reviewer notes for completeness and if necessary send back for a correction.');"
  4537. onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img>&nbsp;QA Instructions</span>
  4538. </td>
  4539. </tr>
  4540. </table>
  4541. </asp:panel>
  4542.  
  4543. <asp:Panel ID="ReviewCompleteToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
  4544. <table class="LineFieldAppTableSwitch">
  4545. <tr align="left">
  4546. <td align="left" bgcolor="" width="98%">
  4547. <span class="hotspot"
  4548. onmouseover="tooltip.show('Based on the reviewer status the appropriate button will be displayed at the bottom of the form.');"
  4549. onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img>&nbsp;Review Complete Instructions</span>
  4550. </td>
  4551. </tr>
  4552. </table>
  4553. </asp:panel>
  4554.  
  4555.  
  4556. <asp:Panel ID="ReviewFieldSet" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
  4557. Visible="true">
  4558. <table class="RepeaterHeaderTable">
  4559. <tr>
  4560. <td style="width: 3%">Cycle</td>
  4561. <td style="width: 6%">Department</td>
  4562. <td style="width: 5%">Reviewer</td>
  4563. <td style="width: 8%">Status</td>
  4564. <td style="width: 10%">Review</td>
  4565. </tr>
  4566. </table>
  4567. <div style="width:99%; height:auto; overflow:auto;">
  4568. <table class="RepeaterTable">
  4569. <asp:Repeater ID="ReviewCycleRepeater" runat="server" EnableViewState="true" OnItemDataBound="ReviewCycleRepeater_ItemDataBound" Visible="true">
  4570. <ItemTemplate>
  4571. <asp:PlaceHolder ID="RC_CycleRowPlaceHolder" runat="server">
  4572. <tr style="background-color: #d3d9e9">
  4573. <td style="width: 2%">
  4574. <asp:CheckBox ID="RC_GroupSelect" runat="server" Visible="false" EnableViewState="true"></asp:CheckBox>
  4575. </td>
  4576. <td style="width: 10%">
  4577. <asp:Label ID="RC_ReviewCycle" runat="server" Visible="true" EnableViewState="true"></asp:Label>
  4578. </td>
  4579. <td style="width: 15%">
  4580. <asp:Label ID="RC_GroupName" runat="server" Visible="true" EnableViewState="true"></asp:Label>
  4581. </td>
  4582. <td style="width: 22%">
  4583. <asp:Label ID="RC_ReviewerName" runat="server" Visible="true" EnableViewState="true"></asp:Label>
  4584. <br />
  4585. <asp:Label ID="RC_ReviewerEmail" runat="server" Visible="true" EnableViewState="true"></asp:Label>
  4586. <br />
  4587. <br />
  4588. Assigned By:
  4589. <br />
  4590. <asp:Label ID="RC_AssignedBy" runat="server" Visible="true" EnableViewState="true"></asp:Label>
  4591. <br />
  4592. <br />
  4593. Assignment Type:
  4594. <br />
  4595. <asp:Label ID="RC_AssignmentType" runat="server" EnableViewState="true"></asp:Label>
  4596. </td>
  4597. <td style="width: 60%">
  4598. <asp:CheckBox ID="RC_PerformReview" runat="server" EnableViewState="true" Visible="true"
  4599. Style="float: left;" Text="Perform Review" />
  4600. <br style="clear: both" />
  4601. <asp:Panel ID="RC_ReviewPanel" runat="server" EnableViewState="true" Visible="false"
  4602. Style="width: 100%">
  4603. <table style="width: 100%">
  4604. <tr>
  4605. <td style="width: 10%">
  4606. <asp:Label ID="RC_ReviewStatus" runat="server" EnableViewState="true" Visible="false"></asp:Label>
  4607. <asp:DropDownList ID="RC_ChangeStatus" runat="server" EnableViewState="true">
  4608. </asp:DropDownList>
  4609. </td>
  4610. <td style="border: solid; width: 90%">
  4611. <asp:CheckBox ID="RC_AssignCorrections" runat="server" EnableViewState="true" Text="Assign Correction"/>
  4612. <br />
  4613. <asp:Panel ID="RC_QAFieldSet" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
  4614. Visible="true">
  4615. <%-- need divs here. --%>
  4616. <table style="width: 100%">
  4617. <tr>
  4618. <td style="border: solid; width: 50%">
  4619. QA Request:
  4620. <asp:TextBox ID="RC_QARequest" runat="server" EnableViewState="true" TextMode="MultiLine"
  4621. Rows="3" Style="width: 95%"></asp:TextBox>
  4622. </td>
  4623. <td style="border: solid; width: 50%">
  4624. QA Response:
  4625. <asp:TextBox ID="RC_QAResponse" runat="server" EnableViewState="true" TextMode="MultiLine"
  4626. Rows="3" Style="width: 95%"></asp:TextBox>
  4627. </td>
  4628. </tr>
  4629. </table>
  4630. <br class="Clear" />
  4631. </asp:Panel>
  4632. <asp:Panel ID="RC_ReviewCommentsPanel" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet">
  4633.  
  4634. <asp:TextBox ID="RC_ReviewComments" runat="server" Rows="5" EnableViewState="true"
  4635. CssClass="LineField" Style="width: 95%" TextMode="MultiLine"></asp:TextBox><br>
  4636. <a runat="server" id="ChecklistLink" target="_blank">View Checklist</a><br />
  4637. <%-- link to checklist form for each group --%>
  4638.  
  4639. </asp:Panel>
  4640. </td>
  4641. </tr>
  4642.  
  4643. <tr><td align="center" colspan="2" style="background-color:#D6D8D4; text-align:center">
  4644. <asp:CheckBox ID="DeptReviewChk" runat="server" OnClick="ShowHideByCheckboxDeptReview(this.id ,CompleteButtonClientID)" Visible="true" EnableViewState="true" Text="Plan Review Complete" />
  4645. </td></tr>
  4646.  
  4647. </table>
  4648.  
  4649. </asp:Panel>
  4650.  
  4651. </td>
  4652. </tr>
  4653. </asp:PlaceHolder>
  4654. </ItemTemplate>
  4655.  
  4656.  
  4657. <AlternatingItemTemplate>
  4658. <asp:PlaceHolder ID="RC_CycleRowPlaceHolder" runat="server">
  4659. <tr style="background-color: #9daace">
  4660. <td style="width: 2%">
  4661. <asp:CheckBox ID="RC_GroupSelect" runat="server" Visible="false" EnableViewState="true"></asp:CheckBox>
  4662. </td>
  4663. <td style="width: 10%">
  4664. <asp:Label ID="RC_ReviewCycle" runat="server" Visible="true" EnableViewState="true"></asp:Label>
  4665. </td>
  4666. <td style="width: 15%">
  4667. <asp:Label ID="RC_GroupName" runat="server" Visible="true" EnableViewState="true"></asp:Label>
  4668. </td>
  4669. <td style="width: 22%">
  4670. <asp:Label ID="RC_ReviewerName" runat="server" Visible="true" EnableViewState="true"></asp:Label>
  4671. <br />
  4672. <asp:Label ID="RC_ReviewerEmail" runat="server" Visible="true" EnableViewState="true"></asp:Label>
  4673. <br />
  4674. <br />
  4675. Assigned By:
  4676. <br />
  4677. <asp:Label ID="RC_AssignedBy" runat="server" Visible="true" EnableViewState="true"></asp:Label>
  4678. <br />
  4679. <br />
  4680. Assignment Type:
  4681. <br />
  4682. <asp:Label ID="RC_AssignmentType" runat="server" EnableViewState="true"></asp:Label>
  4683. </td>
  4684. <td style="width: 60%">
  4685. <asp:CheckBox ID="RC_PerformReview" runat="server" EnableViewState="true" Visible="true"
  4686. Style="float: left;" Text="Perform Review" />
  4687. <br style="clear: both" />
  4688. <asp:Panel ID="RC_ReviewPanel" runat="server" EnableViewState="true" Visible="false"
  4689. Style="width: 100%">
  4690. <table style="width: 100%">
  4691. <tr>
  4692. <td style="width: 10%">
  4693. <asp:Label ID="RC_ReviewStatus" runat="server" EnableViewState="true" Visible="false"></asp:Label>
  4694. <asp:DropDownList ID="RC_ChangeStatus" runat="server" EnableViewState="true">
  4695. </asp:DropDownList>
  4696. </td>
  4697. <td style="width: 90%">
  4698. <asp:CheckBox ID="RC_AssignCorrections" runat="server" EnableViewState="true" Text="Assign Correction"/>
  4699. <br />
  4700. <asp:Panel ID="RC_QAFieldSet" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
  4701. Visible="true">
  4702. <%-- need divs here. --%>
  4703. <table style="width: 100%">
  4704. <tr>
  4705. <td style="border: none; width: 50%">
  4706. QA Request:
  4707. <asp:TextBox ID="RC_QARequest" runat="server" EnableViewState="true" TextMode="MultiLine"
  4708. Rows="3" Style="width: 95%"></asp:TextBox>
  4709. </td>
  4710. <td style="width: 50%">
  4711. QA Response:
  4712. <asp:TextBox ID="RC_QAResponse" runat="server" EnableViewState="true" TextMode="MultiLine"
  4713. Rows="3" Style="width: 95%"></asp:TextBox>
  4714. </td>
  4715. </tr>
  4716. </table>
  4717. <br class="Clear" />
  4718. </asp:Panel>
  4719. <asp:Panel ID="RC_ReviewCommentsPanel" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet">
  4720.  
  4721. <asp:TextBox ID="RC_ReviewComments" runat="server" Rows="5" EnableViewState="true"
  4722. CssClass="LineField" Style="width: 95%" TextMode="MultiLine"></asp:TextBox><br>
  4723. <a runat="server" id="ChecklistLink" target="_blank">View Checklist</a><br />
  4724. <%-- link to checklist form for each group --%>
  4725.  
  4726. </asp:Panel>
  4727. </td>
  4728. </tr>
  4729.  
  4730. <tr><td align="center" colspan="2" style="background-color:#C8C8C8; text-align:center">
  4731. <asp:CheckBox ID="DeptReviewChk" runat="server" OnClick="ShowHideByCheckboxDeptReview(this.id ,CompleteButtonClientID)" Visible="true" EnableViewState="true" Text="Plan Review Complete" />
  4732. </td></tr>
  4733.  
  4734. </table>
  4735.  
  4736. </asp:Panel>
  4737.  
  4738. </td>
  4739. </tr>
  4740. </asp:PlaceHolder>
  4741. </AlternatingItemTemplate>
  4742.  
  4743. </asp:Repeater>
  4744. </table>
  4745. </div>
  4746. <%--
  4747. <asp:Button ID="AssignCorrectionsButton" Text="Assign Corrections" runat="server"
  4748. EnableViewState="true" OnClick="AssignCorrections_Click" Visible="false" />
  4749. --%>
  4750. </asp:Panel>
  4751.  
  4752. <asp:Panel ID="ReviewGroupDetail" runat="server" EnableViewState="true" CssClass="ThreeColumnFieldSet" Visible="False">
  4753. <asp:Label ID="ReviewerNameLabel" runat="server" EnableViewState="true" CssClass="NarrowFieldLabel"
  4754. AssociatedControlID="ReviewerName">Reviewer</asp:Label>
  4755. <asp:TextBox ID="ReviewerName" runat="server" EnableViewState="true" CssClass="NarrowField"
  4756. ReadOnly="true"></asp:TextBox>
  4757. <br class="Clear" />
  4758. <asp:Label ID="ReviewerEmailLabel" runat="server" EnableViewState="true" CssClass="NarrowFieldLabel"
  4759. AssociatedControlID="ReviewerEmail"> Email</asp:Label>
  4760. <asp:TextBox ID="ReviewerEmail" runat="server" EnableViewState="true" CssClass="NarrowField"
  4761. ReadOnly="true"></asp:TextBox>
  4762. <br class="Clear" />
  4763. <asp:Label ID="AssignedByNameLabel" runat="server" EnableViewState="true" CssClass="NarrowFieldLabel"
  4764. AssociatedControlID="AssignedByName">Assigned</asp:Label>
  4765. <asp:TextBox ID="AssignedByName" runat="server" EnableViewState="true" CssClass="NarrowField"
  4766. ReadOnly="true"></asp:TextBox>
  4767. <br class="Clear" />
  4768. <asp:Label ID="AssignedByEmailLabel" runat="server" EnableViewState="true" CssClass="NarrowFieldLabel"
  4769. AssociatedControlID="AssignedByEmail"> Email</asp:Label>
  4770. <asp:TextBox ID="AssignedByEmail" runat="server" EnableViewState="true" CssClass="NarrowField"
  4771. ReadOnly="true"></asp:TextBox>
  4772. <br class="Clear" />
  4773. <asp:Label ID="ReviewStatusLabel" runat="server" EnableViewState="true" CssClass="NarrowFieldLabel"
  4774. AssociatedControlID="ReviewStatus">Review Status</asp:Label>
  4775. <asp:DropDownList ID="ReviewStatus" runat="server" EnableViewState="true" CssClass="NarrowField">
  4776. <asp:ListItem Text="In Review" Selected="True" Value="InReview"></asp:ListItem>
  4777. <asp:ListItem Text="Corrections Needed" Value="CorrectionsNeeded"></asp:ListItem>
  4778. <asp:ListItem Text="Review" Value="ReviewComplete"></asp:ListItem>
  4779. </asp:DropDownList>
  4780. <br class="Clear" />
  4781. <asp:Label ID="ReviewCommentsLabel" runat="server" EnableViewState="true" CssClass="WideFieldLabel"
  4782. AssociatedControlID="ReviewComments">Reviewer Comments</asp:Label>
  4783. <asp:TextBox ID="ReviewComments" runat="server" EnableViewState="true" CssClass="WideField"
  4784. TextMode="MultiLine" Rows="5"></asp:TextBox>
  4785. <br class="Clear" />
  4786. <asp:Label ID="AttachmentsLabel" runat="server" EnableViewState="true" CssClass="NarrowFieldLabel">Attachments</asp:Label>
  4787. <asp:Panel ID="AttachmentLinks" runat="server" EnableViewState="true" CssClass="NarrowField">
  4788. <asp:HyperLink ID="HyperLink1" runat="server" EnableViewState="true" CssClass="AttachmentLink"
  4789. Text="Attachment 1"></asp:HyperLink><br />
  4790. <asp:HyperLink ID="HyperLink2" runat="server" EnableViewState="true" CssClass="AttachmentLink"
  4791. Text="Attachment 2"></asp:HyperLink><br />
  4792. <asp:HyperLink ID="HyperLink3" runat="server" EnableViewState="true" CssClass="AttachmentLink"
  4793. Text="Attachment 3"></asp:HyperLink><br />
  4794. <asp:HyperLink ID="HyperLink4" runat="server" EnableViewState="true" CssClass="AttachmentLink"
  4795. Text="Attachment 4"></asp:HyperLink><br />
  4796. </asp:Panel>
  4797. </asp:Panel>
  4798. <asp:Panel ID="QAFieldSet" runat="server" EnableViewState="true" CssClass="ThreeColumnFieldSet"
  4799. Visible="false">
  4800. <asp:CheckBox ID="QAAssignCorrection" runat="server" Text="Assign Correction" EnableViewState="true" Visible="true" />
  4801. <br />
  4802. <asp:Label ID="QARequestLabel" runat="server" EnableViewState="true" CssClass="WideFieldLabel"
  4803. AssociatedControlID="QARequest">QA Request</asp:Label>
  4804. <asp:TextBox ID="QARequest" runat="server" EnableViewState="true" CssClass="WideField"
  4805. TextMode="MultiLine" Rows="5"></asp:TextBox>
  4806. <br class="Clear" />
  4807. <asp:Label ID="QAResponseLabel" runat="server" EnableViewState="true" CssClass="WideFieldLabel"
  4808. AssociatedControlID="QAResponse">QA Response</asp:Label>
  4809. <asp:TextBox ID="QAResponse" runat="server" EnableViewState="true" CssClass="WideField"
  4810. TextMode="MultiLine" Rows="5"></asp:TextBox>
  4811. <br class="Clear" />
  4812. </asp:Panel>
  4813. </asp:Panel>
  4814.  
  4815. <asp:Panel ID="ReviewMarkupsPanel" runat="server" CssClass="SectionPanel" Visible="false" Width="100%">
  4816. <asp:Panel ID="MarkupsPanel" runat="server" CssClass="SectionPanelHeader">Markups</asp:Panel>
  4817.  
  4818. <asp:Panel ID="MarkupToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
  4819. <table class="LineFieldAppTableSwitch">
  4820. <tr align="left">
  4821. <td align="left" bgcolor="" width="98%">
  4822. <span class="hotspot"
  4823. onmouseover="tooltip.show('Identify your markups below and attach to workflow for applicant to review.');"
  4824. onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img>&nbsp;Markup Instructions</span>
  4825. </td>
  4826. </tr>
  4827. </table>
  4828. </asp:panel>
  4829.  
  4830. <table style="width: 100%">
  4831. <tr>
  4832. <td style="width: 60%">
  4833. <iframe width="100%" height="250" runat="server" id="MarkupListing"
  4834. frameborder="1"></iframe>
  4835. </td>
  4836. <td style="width: 40%; vertical-align: top; text-align: left;">
  4837. <table style="width: 100%; vertical-align: top; text-align: left;">
  4838. <asp:Repeater ID="LinkedMarkupsRepeater" runat="server" OnItemDataBound="LinkedMarkupsRepeater_ItemDataBound">
  4839. <HeaderTemplate>
  4840. <tr>
  4841. <td>Group</td>
  4842. <td>Markup</td>
  4843. <td>Action</td>
  4844. </tr>
  4845. </HeaderTemplate>
  4846. <ItemTemplate>
  4847. <tr style="background-color: #d3d9e9">
  4848. <td><%# ((MarkUp)Container.DataItem).GroupName %></td>
  4849. <td>
  4850. <asp:HyperLink ID="MarkupLink" Target="_blank" runat="server"
  4851. NavigateUrl="<%# ((MarkUp)Container.DataItem).URL%>"
  4852. Text="<%# ((MarkUp)Container.DataItem).Name %>" />
  4853. </td>
  4854. <td>
  4855. <asp:LinkButton ID="RemoveWF" runat="server"
  4856.  
  4857. OnClientClick='<%# "RemoveMarkupLink_Click(\"" + ((MarkUp)Container.DataItem).ID + "\");"%>'
  4858. Text="Remove" />
  4859. </td>
  4860. </tr>
  4861. </ItemTemplate>
  4862. <AlternatingItemTemplate>
  4863. <tr style="background-color: #9daace">
  4864. <td><%# ((MarkUp)Container.DataItem).GroupName %></td>
  4865. <td>
  4866. <asp:HyperLink ID="MarkupLink" Target="_blank" runat="server"
  4867. NavigateUrl="<%# ((MarkUp)Container.DataItem).URL%>"
  4868. Text="<%# ((MarkUp)Container.DataItem).Name %>" />
  4869. </td>
  4870. <td>
  4871. <asp:LinkButton ID="RemoveWF" runat="server"
  4872.  
  4873. OnClientClick='<%# "RemoveMarkupLink_Click(\"" + ((MarkUp)Container.DataItem).ID + "\");"%>'
  4874. Text="Remove" />
  4875. </td>
  4876. </tr>
  4877. </AlternatingItemTemplate>
  4878. </asp:Repeater>
  4879. </table>
  4880. </td>
  4881. </tr>
  4882. </table>
  4883. </asp:Panel>
  4884.  
  4885. <asp:Panel ID="InstructionsPanel" runat="server" EnableViewState="true" CssClass="SectionPanel"
  4886. Visible="true" Width="100%">
  4887. <asp:Panel ID="InstructionsHeader" runat="server" EnableViewState="true" CssClass="SectionPanelHeader"
  4888. Width="100%">Activity Instructions
  4889. </asp:Panel>
  4890. <asp:Panel ID="PreReviewInstructions" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet" Visible="false">
  4891. <asp:Panel ID="PreReviewInstructionFieldSet" runat="server" EnableViewState="true"
  4892. CssClass="OneColumnFieldSet" Visible="true">
  4893. <div style="width: 100%">
  4894. <span style=""></span>
  4895. <ol>
  4896. <li>If all necessary documents have been uploaded to begin the review, click the "Approve"
  4897. button. This will start the review process.</li>
  4898. <li>If certain items are missing or incorrect, provide the requested information in box below; click the "Reject"
  4899. button.</li>
  4900. </ol>
  4901. </div>
  4902. <span class="LineFieldLabel"></span>
  4903. <table width="100%">
  4904. <tr>
  4905. <td>
  4906. <div style="width: 100%; text-align: center">
  4907. <asp:TextBox ID="PreNotes" runat="server" EnableViewState="true" CssClass=""
  4908. Rows="5" TextMode="MultiLine" width="65%"></asp:TextBox>
  4909. </div>
  4910. </td>
  4911. </tr>
  4912. </table>
  4913. </asp:Panel>
  4914. </asp:Panel>
  4915.  
  4916. <asp:Panel ID="PreRevAppInstructions" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
  4917. Visible="false">
  4918. <asp:Panel ID="PreRevAppInstructionFieldSet" runat="server" EnableViewState="true"
  4919. CssClass="OneColumnFieldSet" Visible="true">
  4920. <span class="LineFieldLabel"></span>
  4921. <asp:Panel ID="VerifyPreRevPanel" runat="server" EnableViewState="true" CssClass="LineField">
  4922. <asp:CheckBox ID="VerifyPreRevUpload" OnClick="ShowHideByCheckboxDeptReview(this.id ,CompleteButtonClientID)" runat="server" EnableViewState="true" />
  4923. I have uploaded the corrected documents and/or drawings as indicated below.
  4924. </asp:Panel>
  4925. <div style="width: 100%">
  4926. <br />
  4927. <span style=""></span>
  4928. </div>
  4929.  
  4930. <table>
  4931. <tr>
  4932. <td width = "25%">
  4933. <asp:Label ID="PreNotesAppLabel" runat="server" EnableViewState="true" CssClass="LineFieldLabel"
  4934. AssociatedControlID="PreNotesApp"></asp:Label>
  4935. </td>
  4936. <td width="800px">
  4937. <asp:TextBox ID="PreNotesApp" runat="server" EnableViewState="true" CssClass="LineField"
  4938. Rows="5" TextMode="MultiLine"></asp:TextBox>
  4939. </td>
  4940. </tr>
  4941. </table>
  4942.  
  4943. </asp:Panel>
  4944. </asp:Panel>
  4945.  
  4946. <asp:Panel ID="AppResubmitInstructions" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
  4947. Visible="false">
  4948. <table width="95%" class="LineFieldAppTable">
  4949. <tr>
  4950. <td width="30px">
  4951. <asp:Panel ID="AppResubStep1Panel" runat="server" EnableViewState="true" CssClass="LineFieldApp">
  4952. <asp:CheckBox ID="AppResubStep1" OnClick="ShowHideByCheckboxApp(CompleteButtonClientID)" runat="server" EnableViewState="true" />
  4953. </asp:Panel>
  4954. </td>
  4955. <td>
  4956. I have reviewed and addressed the "Checklist Comments" provided on the form below.
  4957. Please click on the link open the form and review each item. Each comment will be
  4958. indicated as <span style="font-weight: bold">"Met"</span> or <span style="font-weight: bold">
  4959. "Not Met"</span>. The total number of comments provided on the form is indicated
  4960. in red below. If you would like to export a list of the comments to Excel, click
  4961. on the Excel icon in the upper right hand corner of the popup window.
  4962.  
  4963. </td>
  4964. </tr>
  4965. <tr>
  4966. <td>
  4967. <asp:Panel ID="AppResubStep2Panel" runat="server" EnableViewState="true" CssClass="LineFieldApp">
  4968. <asp:CheckBox ID="AppResubStep2" OnClick="ShowHideByCheckboxApp(CompleteButtonClientID)" runat="server" EnableViewState="true" />
  4969. </asp:Panel>
  4970. </td>
  4971. <td>
  4972. I have addressed all of the items in the File Markups below that were identified
  4973. during the Plan Review.
  4974. </td>
  4975. </tr>
  4976. <tr>
  4977. <td>
  4978. <asp:Panel ID="AppResubStep3Panel" runat="server" EnableViewState="true" CssClass="LineFieldApp">
  4979. <asp:CheckBox ID="AppResubStep3" OnClick="ShowHideByCheckboxApp(CompleteButtonClientID)" runat="server" EnableViewState="true" />
  4980. </asp:Panel>
  4981. </td>
  4982. <td>
  4983. I have uploaded the revised drawings into the "Submit Drawings" folder and, if requested,
  4984. uploaded any revised documents into the "Submit Documents" folder using the SAME
  4985. file name as the original files.
  4986. </td>
  4987. </tr>
  4988.  
  4989. </table>
  4990.  
  4991. <table class="LineFieldAppTableSwitch">
  4992. <tr align="center">
  4993. <td align="center" bgcolor="red" width="98%">
  4994.  
  4995. <asp:Panel ID="SwitchToPaperPanel" runat="server" EnableViewState="true" CssClass="LineFieldApp">
  4996. <asp:CheckBox ID="SwitchToPaper" runat="server" EnableViewState="true" />
  4997. <span class="hotspot"
  4998. onmouseover="tooltip.show('If you elect to Switch to paper the ePlan workflow will terminate.');"
  4999. onmouseout="tooltip.hide();">
  5000. <span style="font-weight: bold; color: #ffffff;">I wish to Switch To Paper</span></span>
  5001. </asp:Panel>
  5002.  
  5003. </td>
  5004. </tr>
  5005. </table>
  5006. </asp:Panel>
  5007.  
  5008. <asp:Panel ID="ResubmitReceivedInstructions" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
  5009. Visible="false">
  5010.  
  5011. <table width="95%">
  5012. <tr>
  5013. <td width="30px">
  5014. <asp:Panel ID="ResubReceived" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet">
  5015. <asp:CheckBox ID="PEDDSCorrect" runat="server" EnableViewState="true" />
  5016. </asp:Panel>
  5017. </td>
  5018. <td>
  5019. PEDDS Is Correct
  5020. </td>
  5021. </tr>
  5022. </table>
  5023. <table width="100%">
  5024. <tr>
  5025. <td>
  5026. <div style="width: 100%; text-align: center">
  5027. <asp:TextBox ID="PEDDSNotes" runat="server" EnableViewState="true" CssClass=""
  5028. Rows="5" TextMode="MultiLine" width="65%"></asp:TextBox>
  5029. </div>
  5030. </td>
  5031. </tr>
  5032. </table
  5033. </asp:Panel>
  5034.  
  5035. <asp:Panel ID="ReviewCompletePanel" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
  5036. Visible="false">
  5037. <asp:Label ID="Label1" runat="server" EnableViewState="true" CssClass="LineFieldLabel" AssociatedControlID="PaymentNotes">Review Complete Notes</asp:Label>
  5038. <asp:TextBox ID="ReviewCompleteNotes" runat="server" EnableViewState="true" CssClass="LineField"
  5039. Rows="5" TextMode="MultiLine"></asp:TextBox>
  5040. </asp:Panel>
  5041.  
  5042. <asp:Panel ID="ReviewerStampsPanel" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
  5043. Visible="false">
  5044. Add Reviewer Stamps Controls Here
  5045. </asp:Panel>
  5046.  
  5047. <asp:Panel ID="BatchStampsPanel" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
  5048. Visible="false">
  5049.  
  5050. <asp:Panel ID="BatchStampToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
  5051. <table class="LineFieldAppTableSwitch">
  5052. <tr align="left">
  5053. <td align="left" bgcolor="" width="98%">
  5054. <span class="hotspot"
  5055. onmouseover="tooltip.show('Please complete the tasks listed below.');"
  5056. onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img>&nbsp;Batch Stamp</span>
  5057. </td>
  5058. </tr>
  5059. </table>
  5060. </asp:panel>
  5061.  
  5062. <table width="95%" class="LineFieldAppTable">
  5063. <tr>
  5064. <td width="30px">
  5065. <asp:Panel ID="BatchStampInfo1" runat="server" EnableViewState="true" CssClass="LineFieldApp">
  5066. <asp:CheckBox ID="Batch1" OnClick="ShowHideByCheckboxBatch(CompleteButtonClientID)" runat="server" EnableViewState="true" />
  5067. </asp:Panel>
  5068. </td>
  5069. <td>
  5070. I have batched stamped all approved drawings and/or documents.
  5071.  
  5072. </td>
  5073. </tr>
  5074. <tr>
  5075. <td>
  5076. <asp:Panel ID="BatchStampInfo2" runat="server" EnableViewState="true" CssClass="LineFieldApp">
  5077. <asp:CheckBox ID="Batch2" OnClick="ShowHideByCheckboxBatch(CompleteButtonClientID)" runat="server" EnableViewState="true" />
  5078. </asp:Panel>
  5079. </td>
  5080. <td>
  5081. I exported the project for Laserfiche storage.
  5082. </td>
  5083. </tr>
  5084.  
  5085. </table>
  5086. </asp:Panel>
  5087.  
  5088. <asp:Panel ID="AdditionalFeesPanel" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
  5089. Visible="false">
  5090. <table width="95%" class="LineFieldAppTable">
  5091. <tr>
  5092. <td width="30px">
  5093. <asp:Panel ID="FeesRequiredPanel" runat="server" EnableViewState="true" CssClass="LineFieldApp">
  5094. <asp:CheckBox ID="FeesRequired" runat="server" EnableViewState="true" />
  5095. </asp:Panel>
  5096. </td>
  5097. <td>
  5098. Additional Fees Are Required
  5099. </td>
  5100. </tr>
  5101. </table>
  5102. <table width="100%">
  5103. <tr>
  5104. <td>
  5105. <div style="width: 100%; text-align: center">
  5106. <asp:TextBox ID="AdditionalFeeNotes" runat="server" EnableViewState="true" CssClass=""
  5107. Rows="5" TextMode="MultiLine" width="65%"></asp:TextBox>
  5108. </div>
  5109. </td>
  5110. </tr>
  5111. </table>
  5112. </asp:Panel>
  5113.  
  5114. <asp:Panel ID="ApplicantPEDDSPanel" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
  5115. Visible="false">
  5116. <asp:Panel ID="ApplicantPEDDSToolTip" runat="server" EnableViewState="true" CssClass="SectionPanelHeaderInstructions" Width="100%" Visible="false">
  5117. <table class="LineFieldAppTableSwitch">
  5118. <tr align="left">
  5119. <td align="left" bgcolor="" width="100%">
  5120. <span class="hotspot"
  5121. onmouseover="tooltip.show('Please review the notes below in prder to upload the correct PEDDS.');"
  5122. onmouseout="tooltip.hide();"><img src="Images/info.PNG"></img>&nbsp;PEDDS Correct</span>
  5123. </td>
  5124. </tr>
  5125. </table>
  5126. </asp:panel>
  5127. <table width="100%">
  5128. <tr>
  5129. <td>
  5130. <div style="width: 100%; text-align: center">
  5131. <asp:TextBox ID="AppPEDDSNotes" runat="server" EnableViewState="true" CssClass=""
  5132. Rows="5" TextMode="MultiLine" width="65%"></asp:TextBox>
  5133. </div>
  5134. </td>
  5135. </tr>
  5136. </table>
  5137. </asp:Panel>
  5138. </asp:Panel>
  5139.  
  5140. <asp:Panel ID="AwaitingFinalPaymentPanel" runat="server" EnableViewState="true" CssClass="OneColumnFieldSet"
  5141. Visible="false">
  5142. <span class="LineFieldLabel">Verify Payment</span>
  5143. <asp:CheckBox ID="AwaitingFinalPaymentReceived" runat="server" EnableViewState="true" />
  5144. I have received payment
  5145. <div style="width: 100%">
  5146. <span style="">Instructions:</span>
  5147. <ol>
  5148. <li>Before continuing you must confirm that payment has been received from user</li>
  5149. </ol>
  5150. </div>
  5151. <asp:Label ID="Label2" runat="server" EnableViewState="true" CssClass="LineFieldLabel" AssociatedControlID="PaymentNotes">Payment Notes</asp:Label>
  5152. <asp:TextBox ID="PaymentNotes" runat="server" EnableViewState="true" CssClass="LineField"
  5153. Rows="5" TextMode="MultiLine"></asp:TextBox>
  5154. </asp:Panel>
  5155. <br />
  5156.  
  5157. </asp:Panel>
  5158.  
  5159. <iFrame height="45" width="95%" id="WorkingFrame" src="loader.htm" scrolling="no" frameborder="no" style="display:none">
  5160. </iFrame>
  5161.  
  5162. <%-- Hidden Fields --%>
  5163. <asp:Panel ID="HiddenFieldsPanel" runat="server" EnableViewState="true" Visible="false">
  5164. <asp:TextBox ID="PDOXReviewConfigLoaded" runat="server" EnableViewState="true" Text=""
  5165. Visible="false" />
  5166. <asp:TextBox ID="PDOXReviewCoordinator" runat="server" EnableViewState="true" Text=""
  5167. Visible="false" />
  5168. <asp:TextBox ID="PDOXBatchStampUserEmails" runat="server" EnableViewState="true" Text=""
  5169. Visible="false" />
  5170. </asp:Panel>
  5171. <asp:HiddenField ID="AttachedMarkups" runat="server" EnableViewState="true" Value="" />
  5172. </asp:Content>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement