This commit is contained in:
@@ -149,6 +149,10 @@ namespace VEPROMS
|
||||
ppTxbxChangeBarUserMsgOne.Text = MyProcedure.MyDocVersion.DocVersionConfig.Print_UserCBMess1;
|
||||
ppTxbxChangeBarUserMsgTwo.Text = MyProcedure.MyDocVersion.DocVersionConfig.Print_UserCBMess2;
|
||||
ppGpbxUserSpecTxt.Enabled = ppCmbxChgBarTxtType.SelectedIndex == (int)PrintChangeBarText.UserDef;
|
||||
bool hasReviewDate = _MyProcedure.ActiveFormat.PlantFormat.HasPageListToken("{REVIEWDATE}");
|
||||
foreach (SectionInfo mysection in _MyProcedure.Sections)
|
||||
hasReviewDate |= mysection.ActiveFormat.PlantFormat.HasPageListToken("{REVIEWDATE}");
|
||||
lblReviewDate.Visible = txbReviewDate.Visible = hasReviewDate;
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
@@ -338,57 +342,9 @@ namespace VEPROMS
|
||||
// to update the settings for PdfLocation, RevNum, RevDate and ReviewDate
|
||||
_Initializing = true;
|
||||
txbPdfLocationS.Text = txbPDFLocation.Text;
|
||||
txbRevNumS.Text = txbRevNum.Text;
|
||||
txbRevDateS.Text = txbRevDate.Text;
|
||||
txbReviewDateS.Text = txbReviewDate.Text;
|
||||
_Initializing = false;
|
||||
}
|
||||
|
||||
private void txbRevNumS_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (_Initializing) return;
|
||||
// save the RevNum to the procedure's config.
|
||||
ProcedureConfig pc = MyProcedure.MyConfig as ProcedureConfig;
|
||||
if (pc == null) return;
|
||||
pc.Print_Rev = txbRevNumS.Text;
|
||||
using (Item itm = Item.Get(MyProcedure.ItemID))
|
||||
{
|
||||
itm.MyContent.Config = MyProcedure.MyConfig.ToString();
|
||||
itm.Save();
|
||||
txbRevNum.Text = txbRevNumS.Text;
|
||||
}
|
||||
}
|
||||
|
||||
private void txbRevDateS_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (_Initializing) return;
|
||||
// save the RevDate to the procedure's config.
|
||||
ProcedureConfig pc = MyProcedure.MyConfig as ProcedureConfig;
|
||||
if (pc == null) return;
|
||||
pc.Print_RevDate = txbRevDateS.Text;
|
||||
using (Item itm = Item.Get(MyProcedure.ItemID))
|
||||
{
|
||||
itm.MyContent.Config = MyProcedure.MyConfig.ToString();
|
||||
itm.Save();
|
||||
txbRevDate.Text = txbRevDateS.Text;
|
||||
}
|
||||
}
|
||||
|
||||
private void txbReviewDateS_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (_Initializing) return;
|
||||
// save the ReviewDate to the procedure's config.
|
||||
ProcedureConfig pc = MyProcedure.MyConfig as ProcedureConfig;
|
||||
if (pc == null) return;
|
||||
pc.Print_ReviewDate = txbReviewDateS.Text;
|
||||
using (Item itm = Item.Get(MyProcedure.ItemID))
|
||||
{
|
||||
itm.MyContent.Config = MyProcedure.MyConfig.ToString();
|
||||
itm.Save();
|
||||
txbReviewDate.Text = txbReviewDateS.Text;
|
||||
// need to reset config to !dirty?
|
||||
}
|
||||
}
|
||||
|
||||
private void btnPdfLocation_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -438,10 +394,76 @@ namespace VEPROMS
|
||||
if (_Initializing) return;
|
||||
ppGpbxUserSpecTxt.Enabled = ppCmbxChgBarTxtType.SelectedIndex == (int)PrintChangeBarText.UserDef;
|
||||
}
|
||||
//public string MyStatus
|
||||
//{
|
||||
// get { return lblStatus.Text;}
|
||||
// set { lblStatus.Text = value; Application.DoEvents(); }
|
||||
//}
|
||||
private void txbRevDate_Enter(object sender, EventArgs e)
|
||||
{
|
||||
txbDate = txbRevDate;
|
||||
grpDateSelector.Text = "Select Revision Date";
|
||||
grpDateSelector.Visible = calDateSelector.Visible = true;
|
||||
|
||||
}
|
||||
|
||||
private void txbRevDate_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (_Initializing) return;
|
||||
txbDate = null;
|
||||
grpDateSelector.Visible = calDateSelector.Visible = false;
|
||||
// save the RevDate to the procedure's config.
|
||||
ProcedureConfig pc = MyProcedure.MyConfig as ProcedureConfig;
|
||||
if (pc == null) return;
|
||||
pc.Print_RevDate = txbRevDate.Text;
|
||||
using (Item itm = Item.Get(MyProcedure.ItemID))
|
||||
{
|
||||
itm.MyContent.Config = MyProcedure.MyConfig.ToString();
|
||||
itm.Save();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void txbReviewDate_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (_Initializing) return;
|
||||
txbDate = null;
|
||||
grpDateSelector.Visible = calDateSelector.Visible = false;
|
||||
// save the ReviewDate to the procedure's config.
|
||||
ProcedureConfig pc = MyProcedure.MyConfig as ProcedureConfig;
|
||||
if (pc == null) return;
|
||||
pc.Print_ReviewDate = txbReviewDate.Text;
|
||||
using (Item itm = Item.Get(MyProcedure.ItemID))
|
||||
{
|
||||
itm.MyContent.Config = MyProcedure.MyConfig.ToString();
|
||||
itm.Save();
|
||||
// need to reset config to !dirty?
|
||||
}
|
||||
|
||||
}
|
||||
private void txbReviewDate_Enter(object sender, EventArgs e)
|
||||
{
|
||||
txbDate = txbReviewDate;
|
||||
grpDateSelector.Text = "Select Review Date";
|
||||
grpDateSelector.Visible = calDateSelector.Visible = true;
|
||||
}
|
||||
|
||||
private TextBox txbDate = null;
|
||||
private void calDateSelector_DateSelected(object sender, DateRangeEventArgs e)
|
||||
{
|
||||
if (txbDate != null)
|
||||
txbDate.Text = e.Start.ToShortDateString();
|
||||
}
|
||||
|
||||
private void txbRevNum_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (_Initializing) return;
|
||||
// save the RevNum to the procedure's config.
|
||||
ProcedureConfig pc = MyProcedure.MyConfig as ProcedureConfig;
|
||||
if (pc == null) return;
|
||||
pc.Print_Rev = txbRevNum.Text;
|
||||
using (Item itm = Item.Get(MyProcedure.ItemID))
|
||||
{
|
||||
itm.MyContent.Config = MyProcedure.MyConfig.ToString();
|
||||
itm.Save();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user