C2025-028 Add a Quick Print Section option / B2025-032 Fix Section not Printing Applicability Properly #557
@@ -533,6 +533,7 @@ namespace VEPROMS
 | 
			
		||||
 | 
			
		||||
			tv.PrintProcedure += new vlnTreeViewEvent(tv_PrintProcedure);
 | 
			
		||||
			tv.PrintSection += new vlnTreeViewEvent(tv_PrintSection);
 | 
			
		||||
			tv.QPrintSection += new vlnTreeViewEvent(tv_QPrintSection);
 | 
			
		||||
			tv.QPrintProcedure += new vlnTreeViewEvent(tv_QPrintProcedure);
 | 
			
		||||
			tv.PrintAllProcedures += new vlnTreeViewEvent(tv_PrintAllProcedures);
 | 
			
		||||
			tv.ApproveProcedure += new vlnTreeViewEvent(tv_ApproveProcedure);
 | 
			
		||||
@@ -1213,7 +1214,19 @@ namespace VEPROMS
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		void tv_PrintSection(object sender, vlnTreeEventArgs args)  // Quick Print right click menu on Procedure name.
 | 
			
		||||
		//Print Section
 | 
			
		||||
		//C2025-028 Add a Quick Print Section option
 | 
			
		||||
	
 | 
			
		||||
		void tv_PrintSection(object sender, vlnTreeEventArgs args)
 | 
			
		||||
		{
 | 
			
		||||
			PrintSection(sender, args, false);
 | 
			
		||||
		}
 | 
			
		||||
		void tv_QPrintSection(object sender, vlnTreeEventArgs args)
 | 
			
		||||
		{
 | 
			
		||||
			PrintSection(sender, args, true);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		void PrintSection(object sender, vlnTreeEventArgs args, bool quickprint)  
 | 
			
		||||
		{
 | 
			
		||||
			try
 | 
			
		||||
			{
 | 
			
		||||
@@ -1225,7 +1238,9 @@ namespace VEPROMS
 | 
			
		||||
 | 
			
		||||
				tc.SaveCurrentEditItem(si2.MyProcedure);
 | 
			
		||||
 | 
			
		||||
				//B2025-032 Fix Section not Printing Applicability Properly
 | 
			
		||||
				si2.MyDocVersion.DocVersionConfig.SelectedSlave = args.UnitIndex;
 | 
			
		||||
				si2.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = args.UnitIndex;
 | 
			
		||||
 | 
			
		||||
				using (DlgPrintProcedure prnDlg = new DlgPrintProcedure(si2.MyProcedure))
 | 
			
		||||
				{
 | 
			
		||||
@@ -1233,8 +1248,14 @@ namespace VEPROMS
 | 
			
		||||
					prnDlg.SelectedSlave = args.UnitIndex;
 | 
			
		||||
					prnDlg.MySessionInfo = MySessionInfo;
 | 
			
		||||
					prnDlg.SetupForProcedure();  // Setup filename
 | 
			
		||||
					prnDlg.ShowDialog(this);  // Create Print report
 | 
			
		||||
 | 
			
		||||
					if (quickprint)
 | 
			
		||||
						prnDlg.QPCreatePDF();  // Create Print report
 | 
			
		||||
					else
 | 
			
		||||
						prnDlg.ShowDialog(this);  // Create Print report
 | 
			
		||||
 | 
			
		||||
					//B2025-032 Fix Section not Printing Applicability Properly
 | 
			
		||||
					si2.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
 | 
			
		||||
					si2.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
@@ -528,6 +528,11 @@ namespace Volian.Controls.Library
 | 
			
		||||
		{
 | 
			
		||||
			if (PrintSection != null) PrintSection(sender, args);
 | 
			
		||||
		}
 | 
			
		||||
		public event vlnTreeViewEvent QPrintSection;
 | 
			
		||||
		private void OnQPrintSection(object sender, vlnTreeEventArgs args)
 | 
			
		||||
		{
 | 
			
		||||
			if (QPrintSection != null) QPrintSection(sender, args);
 | 
			
		||||
		}
 | 
			
		||||
		public event vlnTreeViewEvent PrintAllProcedures;
 | 
			
		||||
		private void OnPrintAllProcedures(object sender, vlnTreeEventArgs args)
 | 
			
		||||
		{
 | 
			
		||||
@@ -994,11 +999,26 @@ namespace Volian.Controls.Library
 | 
			
		||||
												mp.Tag = k;
 | 
			
		||||
											}
 | 
			
		||||
											cm.MenuItems.Add(mps);
 | 
			
		||||
 | 
			
		||||
											//C2025-028 Add a Quick Print Section option
 | 
			
		||||
											MenuItem mps_qp = new MenuItem("Quick Print Section");
 | 
			
		||||
											int k_qp = 0;
 | 
			
		||||
											foreach (string s in si2.MyDocVersion.UnitNames)
 | 
			
		||||
											{
 | 
			
		||||
												k_qp++;
 | 
			
		||||
												MenuItem mp_qp = mps_qp.MenuItems.Add(s, new EventHandler(miMultiUnit_Click));
 | 
			
		||||
												mp_qp.Tag = k_qp;
 | 
			
		||||
											}
 | 
			
		||||
											cm.MenuItems.Add(mps_qp);
 | 
			
		||||
										}
 | 
			
		||||
									}
 | 
			
		||||
									else
 | 
			
		||||
									{
 | 
			
		||||
										if(!si2.IsSubsection) cm.MenuItems.Add("Print Section", new EventHandler(mi_Click));
 | 
			
		||||
										if (!si2.IsSubsection)
 | 
			
		||||
										{
 | 
			
		||||
											cm.MenuItems.Add("Print Section", new EventHandler(mi_Click));
 | 
			
		||||
											cm.MenuItems.Add("Quick Print Section", new EventHandler(mi_Click));
 | 
			
		||||
										}
 | 
			
		||||
									}
 | 
			
		||||
								}
 | 
			
		||||
							}
 | 
			
		||||
@@ -1064,6 +1084,7 @@ namespace Volian.Controls.Library
 | 
			
		||||
						if (i.HasWordContent)
 | 
			
		||||
						{
 | 
			
		||||
							cm.MenuItems.Add("Print Section", new EventHandler(mi_Click));
 | 
			
		||||
							cm.MenuItems.Add("Quick Print Section", new EventHandler(mi_Click));
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
					#endregion
 | 
			
		||||
@@ -1867,6 +1888,9 @@ namespace Volian.Controls.Library
 | 
			
		||||
				case "Print Section":
 | 
			
		||||
					OnPrintSection(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag));
 | 
			
		||||
					break;
 | 
			
		||||
				case "Quick Print Section":
 | 
			
		||||
					OnQPrintSection(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag));
 | 
			
		||||
					break;
 | 
			
		||||
				case "Print All Procedures for":
 | 
			
		||||
					OnPrintAllProcedures(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0,mi.Text,(int)mi.Tag));
 | 
			
		||||
					break;
 | 
			
		||||
@@ -2014,6 +2038,10 @@ namespace Volian.Controls.Library
 | 
			
		||||
					VETreeNode tn2 = SelectedNode as VETreeNode;
 | 
			
		||||
					OnPrintSection(this, new vlnTreeEventArgs(tn2 as VETreeNode, null, 0));
 | 
			
		||||
					break;
 | 
			
		||||
				case "Quick Print Section":
 | 
			
		||||
					VETreeNode tn2qp = SelectedNode as VETreeNode;
 | 
			
		||||
					OnQPrintSection(this, new vlnTreeEventArgs(tn2qp as VETreeNode, null, 0));
 | 
			
		||||
					break;
 | 
			
		||||
				case "Open":
 | 
			
		||||
					OpenNode();
 | 
			
		||||
					break;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user