Added a SQL Timeout text box to the Folder Property form.
Set the Database Default Timeout to twenty times SQL Timeout Property for the top folder. Set the Database SQL Timeout to SQL Timeout Property for the top Folder.
This commit is contained in:
parent
1eac3a41ca
commit
e77a17d645
@ -41,6 +41,9 @@ namespace VEPROMS
|
||||
this.ppDTPicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.ppRTxtName = new System.Windows.Forms.RichTextBox();
|
||||
this.ppRTxtHeading = new System.Windows.Forms.RichTextBox();
|
||||
this.tbSqlTimeout = new System.Windows.Forms.TextBox();
|
||||
this.lblSqlTimeout = new System.Windows.Forms.Label();
|
||||
this.lblSqlTimeoutDefault = new System.Windows.Forms.Label();
|
||||
this.ppBtnDefaultGrphFileExt = new DevComponents.DotNetBar.ButtonX();
|
||||
this.ppCmbxGrphFileExt = new DevComponents.DotNetBar.Controls.ComboBoxEx();
|
||||
this.imageCodecInfoBindingSource = new System.Windows.Forms.BindingSource(this.components);
|
||||
@ -346,6 +349,38 @@ namespace VEPROMS
|
||||
this.ppRTxtHeading.Text = "";
|
||||
this.ppRTxtHeading.Visible = false;
|
||||
//
|
||||
// tbSqlTimeout
|
||||
//
|
||||
this.tbSqlTimeout.Location = new System.Drawing.Point(400, 90);
|
||||
this.tbSqlTimeout.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.tbSqlTimeout.Multiline = false;
|
||||
this.tbSqlTimeout.Name = "tbSqlTimeout";
|
||||
this.tbSqlTimeout.Size = new System.Drawing.Size(71, 19);
|
||||
this.tbSqlTimeout.TabIndex = 10;
|
||||
this.tbSqlTimeout.Text = "";
|
||||
//
|
||||
// lblSqlTimeout
|
||||
//
|
||||
this.lblSqlTimeoutDefault.AutoSize = true;
|
||||
this.lblSqlTimeoutDefault.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lblSqlTimeoutDefault.Location = new System.Drawing.Point(300, 120);
|
||||
this.lblSqlTimeoutDefault.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.lblSqlTimeoutDefault.Name = "lblSqlTimeout";
|
||||
this.lblSqlTimeoutDefault.Size = new System.Drawing.Size(300, 13);
|
||||
this.lblSqlTimeoutDefault.TabIndex = 19;
|
||||
this.lblSqlTimeoutDefault.Text = "If not specified 30 sec will be used";
|
||||
//
|
||||
// lblSqlTimeout
|
||||
//
|
||||
this.lblSqlTimeout.AutoSize = true;
|
||||
this.lblSqlTimeout.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lblSqlTimeout.Location = new System.Drawing.Point(300, 90);
|
||||
this.lblSqlTimeout.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.lblSqlTimeout.Name = "lblSqlTimeout";
|
||||
this.lblSqlTimeout.Size = new System.Drawing.Size(100, 13);
|
||||
this.lblSqlTimeout.TabIndex = 19;
|
||||
this.lblSqlTimeout.Text = "SQL Timeout (sec)";
|
||||
//
|
||||
// ppBtnDefaultGrphFileExt
|
||||
//
|
||||
this.ppBtnDefaultGrphFileExt.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
@ -1948,6 +1983,9 @@ namespace VEPROMS
|
||||
this.tcpGeneral.Controls.Add(this.label3);
|
||||
this.tcpGeneral.Controls.Add(this.ppRTxtHeading);
|
||||
this.tcpGeneral.Controls.Add(this.ppRTxtName);
|
||||
this.tcpGeneral.Controls.Add(this.tbSqlTimeout);
|
||||
this.tcpGeneral.Controls.Add(this.lblSqlTimeout);
|
||||
this.tcpGeneral.Controls.Add(this.lblSqlTimeoutDefault);
|
||||
this.tcpGeneral.Controls.Add(this.label4);
|
||||
this.tcpGeneral.Controls.Add(this.lblHeading);
|
||||
this.tcpGeneral.Controls.Add(this.label2);
|
||||
@ -2535,6 +2573,9 @@ namespace VEPROMS
|
||||
private System.Windows.Forms.TextBox ppTxtBxUserID;
|
||||
private System.Windows.Forms.DateTimePicker ppDTPicker;
|
||||
private System.Windows.Forms.RichTextBox ppRTxtHeading;
|
||||
private System.Windows.Forms.TextBox tbSqlTimeout;
|
||||
private System.Windows.Forms.Label lblSqlTimeout;
|
||||
private System.Windows.Forms.Label lblSqlTimeoutDefault;
|
||||
private System.Windows.Forms.RichTextBox ppRTxtName;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.Label label12;
|
||||
|
@ -226,6 +226,10 @@ namespace VEPROMS
|
||||
// make visible the text box to allow the user to change the Procedure Panel's heading (title) on the panel bar
|
||||
ppRTxtHeading.Visible = true;
|
||||
lblHeading.Visible = true;
|
||||
tbSqlTimeout.Text = _FolderConfig.Timeout;
|
||||
tbSqlTimeout.Visible = true;
|
||||
lblSqlTimeout.Visible = true;
|
||||
lblSqlTimeoutDefault.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -314,6 +318,9 @@ namespace VEPROMS
|
||||
// HIDE the text box that allows the user to change the Procedure Panel's heading (title) on the panel bar
|
||||
ppRTxtHeading.Visible = false;
|
||||
lblHeading.Visible = false;
|
||||
tbSqlTimeout.Visible = false;
|
||||
lblSqlTimeout.Visible = false;
|
||||
lblSqlTimeoutDefault.Visible = false;
|
||||
}
|
||||
_Initializing = false;
|
||||
}
|
||||
@ -348,6 +355,7 @@ namespace VEPROMS
|
||||
// Save whether we should display the default values on this property page
|
||||
Settings.Default.ShowDefaultFolderProp = ppCbShwDefSettings.Checked;
|
||||
Settings.Default.Save();
|
||||
_FolderConfig.Timeout = tbSqlTimeout.Text;
|
||||
_FolderConfig.MyFolder.Config = _FolderConfig.ToString();
|
||||
_FolderConfig.MyFolder.Save().Dispose();
|
||||
SaveApprStages();
|
||||
|
@ -1099,6 +1099,15 @@ namespace VEPROMS
|
||||
VETreeNode jj_vetn = (VETreeNode)tv.Nodes[0]; // the VEPROMS tree node
|
||||
return ((FolderConfig)jj_vetn.VEObject.MyConfig).Title; // get the panel heading
|
||||
}
|
||||
private int getTimeout()
|
||||
{
|
||||
VETreeNode jj_vetn = (VETreeNode)tv.Nodes[0]; // the VEPROMS tree node
|
||||
string s = ((FolderConfig)jj_vetn.VEObject.MyConfig).Timeout; // get the panel heading
|
||||
int result = 30;
|
||||
if (!int.TryParse(s, out result))
|
||||
result = 30;
|
||||
return result;
|
||||
}
|
||||
|
||||
private Timer _RefreshTimer;
|
||||
|
||||
@ -1421,6 +1430,7 @@ namespace VEPROMS
|
||||
tc.SyncEnhancedDocuments = Properties.Settings.Default.SyncEnhancedDocuments;
|
||||
// Assign the Procedure Panel's title (heading)
|
||||
epProcedures.TitleText = getProcedurePanelHeading();// get the panel heading
|
||||
Database.DefaultTimeout = 20 * getTimeout();
|
||||
// if the procedure panel is expanded, make sure we enable the splitter so the user can resize the panel
|
||||
// Bug fix: B2013-89
|
||||
expandableSplitter1.Enabled = epProcedures.Expanded;
|
||||
@ -2429,7 +2439,10 @@ namespace VEPROMS
|
||||
frmFolderProperties frmfld = new frmFolderProperties(args.FolderConfig);
|
||||
dr = frmfld.ShowDialog();
|
||||
if (dr == DialogResult.OK)
|
||||
{
|
||||
epProcedures.TitleText = getProcedurePanelHeading();// get the panel heading
|
||||
Database.DefaultTimeout = 20 * getTimeout();
|
||||
}
|
||||
MySessionInfo.CheckInItem(ownerID);
|
||||
}
|
||||
else if (args.DocVersionConfig != null)
|
||||
|
Loading…
x
Reference in New Issue
Block a user