Compare commits

..

7 Commits

Author SHA1 Message Date
b47f9b2606 revert 2b5becfa34
revert F2024-074 (Farley) Include the Cover Page in the total page count of the procedures
2024-10-09 15:49:28 -04:00
2b5becfa34 F2024-074 (Farley) Include the Cover Page in the total page count of the procedures 2024-10-09 15:20:09 -04:00
ce02c3e4bd revert 2ab1856b13
revert F2024-074 (farley)  Include the Cover Page in the total page count of the procedures
2024-10-09 15:09:54 -04:00
2ab1856b13 F2024-074 (farley) Include the Cover Page in the total page count of the procedures 2024-10-09 14:50:55 -04:00
027a9dc729 revert b071db8f60
revert F2024-074 (Farley) Include the Cover Page in the total page count of the procedures
2024-10-09 14:41:45 -04:00
b071db8f60 F2024-074 (Farley) Include the Cover Page in the total page count of the procedures 2024-10-09 14:32:47 -04:00
98d6557cd2 F2024-074 (Farley) Include the Cover Page in the total page count of the procedures 2024-10-09 14:05:20 -04:00
345 changed files with 168013 additions and 166919 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -23,8 +23,8 @@ using System.Runtime.CompilerServices;
// Build YYMM (two digit year, two digit month) // Build YYMM (two digit year, two digit month)
// Revision DHH (day - no leading zero, two digit hour - military time // Revision DHH (day - no leading zero, two digit hour - military time
// //
[assembly: AssemblyVersion("2.3.2410.907")] [assembly: AssemblyVersion("2.3.2410.815")]
[assembly: AssemblyFileVersion("2.3.2410.907")] [assembly: AssemblyFileVersion("2.3.2410.815")]
// //
// In order to sign your assembly you must specify a key to use. Refer to the // In order to sign your assembly you must specify a key to use. Refer to the
@@ -93,6 +93,5 @@ using System.Runtime.CompilerServices;

View File

@@ -377,7 +377,6 @@ namespace ROEditor
this.btnOK.TabIndex = 3; this.btnOK.TabIndex = 3;
this.btnOK.Text = "OK"; this.btnOK.Text = "OK";
this.btnOK.Click += new System.EventHandler(this.btnOK_Click); this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
// //
// btnCancel // btnCancel
// //
@@ -554,7 +553,6 @@ namespace ROEditor
// update the local/internal copy of the schema. // update the local/internal copy of the schema.
if (success != true) if (success != true)
{ {
this.DialogResult = DialogResult.Cancel;
return; // DO YET process an error. return; // DO YET process an error.
} }
else else

View File

@@ -266,7 +266,6 @@ namespace ROEditor
if (success != true) if (success != true)
{ {
this.DialogResult = DialogResult.Cancel;
return; // DO YET process an error. return; // DO YET process an error.
} }
else else
@@ -368,7 +367,6 @@ namespace ROEditor
// //
// btnOK // btnOK
// //
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(216, 72); this.btnOK.Location = new System.Drawing.Point(216, 72);
this.btnOK.Name = "btnOK"; this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(88, 24); this.btnOK.Size = new System.Drawing.Size(88, 24);

View File

@@ -220,7 +220,6 @@ namespace ROEditor
return; return;
} }
string origFieldName = myrof.GetFieldname;
myrof.SetFieldname(this.tbFieldName.Text); myrof.SetFieldname(this.tbFieldName.Text);
uint ftype=0; uint ftype=0;
if (this.rbSingleLine.Checked == true) if (this.rbSingleLine.Checked == true)
@@ -248,7 +247,6 @@ namespace ROEditor
if (success != true) if (success != true)
{ {
this.DialogResult = DialogResult.Cancel;
return; // DO YET process an error. return; // DO YET process an error.
} }
return; return;
@@ -272,9 +270,7 @@ namespace ROEditor
} }
myrof.SetFieldType(ftype); myrof.SetFieldType(ftype);
FieldTextFrm ftxt = new FieldTextFrm(myrof, myrodb, myelem, original_type, editlevel, origname, avlist, iulist); FieldTextFrm ftxt = new FieldTextFrm(myrof, myrodb, myelem, original_type, editlevel, origname, avlist, iulist);
if (ftxt.ShowDialog() == DialogResult.Cancel) ftxt.ShowDialog();
myrof.SetFieldname(origFieldName);
this.Close(); this.Close();
} }
#region Windows Form Designer generated code #region Windows Form Designer generated code

View File

@@ -433,7 +433,6 @@ namespace ROEditor
// //
// btnOK // btnOK
// //
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(24, 248); this.btnOK.Location = new System.Drawing.Point(24, 248);
this.btnOK.Name = "btnOK"; this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(144, 24); this.btnOK.Size = new System.Drawing.Size(144, 24);

View File

@@ -151,7 +151,7 @@ namespace ROEditor
private string origMenuItem; private string origMenuItem;
StringBuilder parseerror; StringBuilder parseerror;
private int hi, lo; private int hi, lo;
private Label lb_chkApplc; private Label lb_chkApplc;
private int dbtype; private int dbtype;
// C2021-026 returns true is Parent/Child info was passed into the RO Editor // C2021-026 returns true is Parent/Child info was passed into the RO Editor
public bool PCApplicabilityEnabled public bool PCApplicabilityEnabled
@@ -188,33 +188,33 @@ namespace ROEditor
lboxInUse.Visible = true; lboxInUse.Visible = true;
lb_chkApplc.Visible = false; lb_chkApplc.Visible = false;
} }
if (editlevel == (uint)RecordType.GroupSchema) this.Text = "Subgroup Definition"; if (editlevel==(uint)RecordType.GroupSchema)this.Text = "Subgroup Definition";
FillInData(grptxt); FillInData(grptxt);
} }
/// <summary> /// <summary>
/// Clean up any resources being used. /// Clean up any resources being used.
/// </summary> /// </summary>
protected override void Dispose(bool disposing) protected override void Dispose( bool disposing )
{ {
if (disposing) if( disposing )
{ {
if (components != null) if(components != null)
{ {
components.Dispose(); components.Dispose();
} }
} }
base.Dispose(disposing); base.Dispose( disposing );
} }
private void FillInAvailable() private void FillInAvailable()
{ {
ROField rof; ROField rof;
// put the items in the AvailList box. // put the items in the AvailList box.
for (int i = 0; i < AvailList.Count; i++) for (int i=0; i< AvailList.Count; i++)
{ {
rof = (ROField)AvailList[i]; rof = (ROField) AvailList[i];
if (rof.GetFieldname != null) // DO YET: Why null? if (rof.GetFieldname != null) // DO YET: Why null?
this.lboxAvail.Items.Add(rof.GetFieldname); this.lboxAvail.Items.Add(rof.GetFieldname);
} }
@@ -277,7 +277,7 @@ namespace ROEditor
_initializing = false; _initializing = false;
} }
private void DoValueTextBoxes() private void DoValueTextBoxes()
{ {
string menuitm, retval; string menuitm, retval;
@@ -297,7 +297,7 @@ namespace ROEditor
else else
parent = null; parent = null;
} }
if (menuitm != "") if (menuitm !="")
this.tbMenuVal.Text = CvtFldToUserFld(menuitm); this.tbMenuVal.Text = CvtFldToUserFld(menuitm);
else else
this.tbMenuVal.Text = ""; this.tbMenuVal.Text = "";
@@ -310,21 +310,21 @@ namespace ROEditor
this.lblRetVal.Visible = true; this.lblRetVal.Visible = true;
VlnXmlElement parent; VlnXmlElement parent;
parent = (VlnXmlElement) elem.ParentNode; parent = (VlnXmlElement) elem.ParentNode;
while (parent != null && (menuitm == "" || retval == "")) while (parent != null && (menuitm == "" || retval==""))
{ {
// walk up tree to get parent and check for data there // walk up tree to get parent and check for data there
if (menuitm == "") menuitm = parent.GetAttribute("MenuItem"); if (menuitm == "") menuitm = parent.GetAttribute("MenuItem");
if (retval == "") retval = parent.GetAttribute("RetVal"); if (retval == "") retval = parent.GetAttribute("RetVal");
if (parent.Name != "RO_Root") if (parent.Name != "RO_Root")
parent = (VlnXmlElement)parent.ParentNode; parent = (VlnXmlElement) parent.ParentNode;
else else
parent = null; parent = null;
} }
if (menuitm != "") if (menuitm!="")
this.tbMenuVal.Text = CvtFldToUserFld(menuitm); this.tbMenuVal.Text = CvtFldToUserFld(menuitm);
else else
this.tbMenuVal.Text = ""; this.tbMenuVal.Text = "";
if (retval != "") if (retval!="")
this.tbRetVal.Text = CvtFldToUserFld(retval); this.tbRetVal.Text = CvtFldToUserFld(retval);
else else
this.tbRetVal.Text = ""; this.tbRetVal.Text = "";
@@ -332,7 +332,7 @@ namespace ROEditor
} }
private void FillInData(string grptxt) private void FillInData(string grptxt)
{ {
this.lblGroupText.Text = grptxt; this.lblGroupText.Text = grptxt;
DoValueTextBoxes(); DoValueTextBoxes();
SetUpListBoxes(); SetUpListBoxes();
@@ -344,27 +344,24 @@ namespace ROEditor
lboxAvail.GotFocus += new EventHandler(this.lboxAvail_GotFocus); lboxAvail.GotFocus += new EventHandler(this.lboxAvail_GotFocus);
lboxInUse.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lboxInUse_MouseUp);
lboxInUseCB.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lboxInUseCB_MouseUp);
// save copies of local data, so if there is a change, we know we must save them. // save copies of local data, so if there is a change, we know we must save them.
origRetVal = this.tbRetVal.Text; origRetVal=this.tbRetVal.Text;
origMenuItem = this.tbMenuVal.Text; origMenuItem=this.tbMenuVal.Text;
// if this is a database level definition & it's a user defined database, // if this is a database level definition & it's a user defined database,
// the okay button is disabled until a field is used. // the okay button is disabled until a field is used.
if (elem.ParentNode.Name == "RO_Root" && dbtype == 3) if (elem.ParentNode.Name == "RO_Root" && dbtype==3)
{ {
string attr; string attr;
if (editlevel == (uint)RecordType.Schema) if (editlevel==(uint)RecordType.Schema)
attr = elem.GetAttribute("FieldsInUse"); attr = elem.GetAttribute("FieldsInUse");
else else
attr = elem.GetAttribute("GroupFieldsInUse"); attr = elem.GetAttribute("GroupFieldsInUse");
if (attr == null || attr == "") btnOK.Enabled = false; if (attr==null || attr=="") btnOK.Enabled=false;
} }
} }
protected void lboxInUse_GotFocus(object sender, EventArgs e) protected void lboxInUse_GotFocus (object sender, EventArgs e)
{ {
lboxAvail.ClearSelected(); lboxAvail.ClearSelected();
this.btnRemove.Enabled = true; this.btnRemove.Enabled = true;
@@ -378,7 +375,7 @@ namespace ROEditor
this.btnAdd.Enabled = false; this.btnAdd.Enabled = false;
this.btnEdit.Enabled = true; this.btnEdit.Enabled = true;
} }
protected void lboxAvail_GotFocus(object sender, EventArgs e) protected void lboxAvail_GotFocus (object sender, EventArgs e)
{ {
if (PCApplicabilityEnabled) if (PCApplicabilityEnabled)
lboxInUseCB.ClearSelected(); lboxInUseCB.ClearSelected();
@@ -388,103 +385,6 @@ namespace ROEditor
this.btnRemove.Enabled = false; this.btnRemove.Enabled = false;
this.btnEdit.Enabled = true; this.btnEdit.Enabled = true;
} }
//CSM C2024-024
//Simple Selection of Fields to add to Return Values and Menu Values.
//Part of 2024 PROMS Upgrades
//Add Context Menu for In Use Listbox
//Will allow user to right click Selected Items
//and add then to the Return Value / Menu Value Text Boxes
//without re-typing them
protected void lboxInUse_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right && lboxInUse.SelectedItems.Count > 0)
{
ContextMenuStrip cn = new ContextMenuStrip();
if (tbRetVal.Visible)
{
var AddToReturnItem = new ToolStripMenuItem("Add to Return Value");
AddToReturnItem.Click += new EventHandler(lboxInUse_Click);
AddToReturnItem.Name = "Add to Return Value";
cn.Items.Add(AddToReturnItem);
}
var AddToMenuItem = new ToolStripMenuItem("Add to Menu Value");
AddToMenuItem.Click += new EventHandler(lboxInUse_Click);
AddToMenuItem.Name = "Add to Menu Value";
cn.Items.Add(AddToMenuItem);
this.lboxInUse.ContextMenuStrip = cn;
cn.Show(Control.MousePosition.X, Control.MousePosition.Y);
}
}
private void lboxInUse_Click(object sender, EventArgs e)
{
switch (((ToolStripMenuItem)sender).Name)
{
case "Add to Return Value":
if (tbRetVal.Text == "")
tbRetVal.Text += $"<{lboxInUse.SelectedItem}>";
else
tbRetVal.Text += $" - <{lboxInUse.SelectedItem}>";
break;
case "Add to Menu Value":
if (tbMenuVal.Text == "")
tbMenuVal.Text += $"<{lboxInUse.SelectedItem}>";
else
tbMenuVal.Text += $" - <{lboxInUse.SelectedItem}>";
break;
}
}
//CSM C2024-024
//Simple Selection of Fields to add to Return Values and Menu Values.
//Part of 2024 PROMS Upgrades
//Add Context Menu for In Use ComboBox
//(Replaces In Use Listbox when Applicability
//to allow for selection of items per Unit)
//Will allow user to right click Selected Items
//and add then to the Return Value / Menu Value Text Boxes
//without re-typing them
protected void lboxInUseCB_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right && lboxInUseCB.SelectedItems.Count > 0)
{
ContextMenuStrip cn = new ContextMenuStrip();
if (tbRetVal.Visible)
{
var AddToReturnItem = new ToolStripMenuItem("Add to Return Value");
AddToReturnItem.Click += new EventHandler(lboxInUseCB_Click);
AddToReturnItem.Name = "Add to Return Value";
cn.Items.Add(AddToReturnItem);
}
var AddToMenuItem = new ToolStripMenuItem("Add to Menu Value");
AddToMenuItem.Click += new EventHandler(lboxInUseCB_Click);
AddToMenuItem.Name = "Add to Menu Value";
cn.Items.Add(AddToMenuItem);
this.lboxInUseCB.ContextMenuStrip = cn;
cn.Show(Control.MousePosition.X, Control.MousePosition.Y);
}
}
private void lboxInUseCB_Click(object sender, EventArgs e)
{
switch (((ToolStripMenuItem)sender).Name)
{
case "Add to Return Value":
if (tbRetVal.Text == "")
tbRetVal.Text += $"<{lboxInUseCB.SelectedItem}>";
else
tbRetVal.Text += $" - <{lboxInUseCB.SelectedItem}>";
break;
case "Add to Menu Value":
if (tbMenuVal.Text == "")
tbMenuVal.Text += $"<{lboxInUseCB.SelectedItem}>";
else
tbMenuVal.Text += $" - <{lboxInUseCB.SelectedItem}>";
break;
}
}
private void btnRemove_Click(object sender, System.EventArgs e) private void btnRemove_Click(object sender, System.EventArgs e)
{ {
//get item in lboxInUse (in use list) and remove it from there //get item in lboxInUse (in use list) and remove it from there
@@ -504,7 +404,7 @@ namespace ROEditor
ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType); ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType);
AvailList.Add(copyrof); AvailList.Add(copyrof);
lboxAvail.Items.Add(CvtFldToUserFld(copyrof.GetFieldname)); lboxAvail.Items.Add(copyrof.GetFieldname);
InUseList.RemoveAt(indx); InUseList.RemoveAt(indx);
if (InUseApplcList.Contains(rof)) // C2021-026 remove from the field applicability list if (InUseApplcList.Contains(rof)) // C2021-026 remove from the field applicability list
InUseApplcList.Remove(rof); InUseApplcList.Remove(rof);
@@ -527,7 +427,7 @@ namespace ROEditor
ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType); ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType);
AvailList.Add(copyrof); AvailList.Add(copyrof);
lboxAvail.Items.Add(CvtFldToUserFld(copyrof.GetFieldname)); lboxAvail.Items.Add(copyrof.GetFieldname);
InUseList.RemoveAt(indx); InUseList.RemoveAt(indx);
if (InUseApplcList.Contains(rof)) // C2021-026 remove from the field applicability list if (InUseApplcList.Contains(rof)) // C2021-026 remove from the field applicability list
InUseApplcList.Remove(rof); InUseApplcList.Remove(rof);
@@ -555,7 +455,7 @@ namespace ROEditor
ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType); ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType);
InUseList.Add(copyrof); InUseList.Add(copyrof);
lboxInUseCB.Items.Add(CvtFldToUserFld(copyrof.GetFieldname)); lboxInUseCB.Items.Add(copyrof.GetFieldname);
AvailList.RemoveAt(indx); AvailList.RemoveAt(indx);
lboxAvail.Refresh(); lboxAvail.Refresh();
lboxInUseCB.Refresh(); lboxInUseCB.Refresh();
@@ -577,7 +477,7 @@ namespace ROEditor
ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType); ROField copyrof = new ROField(rof.GetFieldname, rof.GetRecID, rof.GetMasterRecID, rof.GetFieldType);
InUseList.Add(copyrof); InUseList.Add(copyrof);
lboxInUse.Items.Add(CvtFldToUserFld(copyrof.GetFieldname)); lboxInUse.Items.Add(copyrof.GetFieldname);
AvailList.RemoveAt(indx); AvailList.RemoveAt(indx);
lboxAvail.Refresh(); lboxAvail.Refresh();
lboxInUse.Refresh(); lboxInUse.Refresh();
@@ -740,13 +640,12 @@ namespace ROEditor
{ {
ROField rof = (ROField) InUseList[i]; ROField rof = (ROField) InUseList[i];
rofname = rof.GetFieldname; rofname = rof.GetFieldname;
if (inusename == rofname || inusename == CvtFldToUserFld(rofname)) if (inusename == rofname)
{ {
found = true; found = true;
break; break;
} }
} }
if (inusename == "u") found = true; //to handle unit designation
if (found == false)syntax(inusename+" invalid field name",strt,where); if (found == false)syntax(inusename+" invalid field name",strt,where);
// used to have procini def stuff here. // used to have procini def stuff here.
start=where+1; start=where+1;
@@ -846,7 +745,7 @@ namespace ROEditor
{ {
ROField rof = (ROField) InUseList[i]; ROField rof = (ROField) InUseList[i];
rofname = rof.GetFieldname; rofname = rof.GetFieldname;
if (inusename == rofname || inusename == CvtFldToUserFld(rofname)) if (inusename == rofname)
{ {
found = true; found = true;
break; break;
@@ -1197,8 +1096,7 @@ namespace ROEditor
return; return;
} }
} }
string origname = CvtFldToUserFld(rof.GetFieldname);
uint ftype = rof.GetFieldType; uint ftype = rof.GetFieldType;
if (ftype == (uint)FieldTypes.FrmtSingleTxt || ftype == (uint)FieldTypes.VariableTxt || if (ftype == (uint)FieldTypes.FrmtSingleTxt || ftype == (uint)FieldTypes.VariableTxt ||
ftype == (uint)FieldTypes.SingleTxt || ftype == (uint)FieldTypes.Table || ftype == (uint)FieldTypes.SingleTxt || ftype == (uint)FieldTypes.Table ||
@@ -1214,10 +1112,6 @@ namespace ROEditor
nwcomb.ShowDialog(); nwcomb.ShowDialog();
} }
//need to refresh pull from table for fields in use.
_ = myrodb.RODB_GetFields(elem, 0, true);
string newname = CvtFldToUserFld(rof.GetFieldname);
// Update Lists & Text boxes to represent any modified text. // Update Lists & Text boxes to represent any modified text.
if (isInSelList) if (isInSelList)
{ {
@@ -1231,31 +1125,20 @@ namespace ROEditor
rof = (ROField) InUseList[i]; rof = (ROField) InUseList[i];
if (rof.GetFieldname != null) if (rof.GetFieldname != null)
{ {
string fieldname = CvtFldToUserFld(rof.GetFieldname);
// C2021-026 if doing Parent/Child enabled RO Editor, put the In Use fields in the Check Box List instead of the normal list // C2021-026 if doing Parent/Child enabled RO Editor, put the In Use fields in the Check Box List instead of the normal list
if (PCApplicabilityEnabled) if (PCApplicabilityEnabled)
{ {
this.lboxInUseCB.Items.Add(fieldname); this.lboxInUseCB.Items.Add(rof.GetFieldname);
if (rof.FieldTypeCanDoApplicability()) if (rof.FieldTypeCanDoApplicability())
{ {
if (ContainedInUseApplicList(rof)) if (ContainedInUseApplicList(rof))
this.lboxInUseCB.SetItemCheckState(lboxInUseCB.Items.IndexOf(fieldname), CheckState.Checked); this.lboxInUseCB.SetItemCheckState(lboxInUseCB.Items.IndexOf(rof.GetFieldname), CheckState.Checked);
} }
} }
else else
this.lboxInUse.Items.Add(fieldname); this.lboxInUse.Items.Add(rof.GetFieldname);
} }
} }
if (origname != newname)
{
tbMenuVal.Text = tbMenuVal.Text.Replace($"<{origname}>", $"<{newname}>");
tbRetVal.Text = tbRetVal.Text.Replace($"<{origname}>", $"<{newname}>");
//CSM-C2024-035 This is needed for items like Setpoint Value that may have commas with field lengths in them
tbMenuVal.Text = tbMenuVal.Text.Replace($"<{origname},", $"<{newname},");
tbRetVal.Text = tbRetVal.Text.Replace($"<{origname},", $"<{newname},");
}
} }
else else
{ {
@@ -1265,7 +1148,7 @@ namespace ROEditor
{ {
rof = (ROField) AvailList[i]; rof = (ROField) AvailList[i];
if (rof.GetFieldname != null) if (rof.GetFieldname != null)
this.lboxAvail.Items.Add(CvtFldToUserFld(rof.GetFieldname)); this.lboxAvail.Items.Add(rof.GetFieldname);
} }
} }
} }
@@ -1279,11 +1162,8 @@ namespace ROEditor
if (rof.GetFieldname != null) if (rof.GetFieldname != null)
{ {
AvailList.Add(rof); AvailList.Add(rof);
lboxAvail.Items.Add(CvtFldToUserFld(rof.GetFieldname)); lboxAvail.Items.Add(rof.GetFieldname);
} }
//need to refresh pull from table for fields in use.
_ = myrodb.RODB_GetFields(elem, 0, true);
} }
// C2021-026 Check/un-check field for Parent/Child values // C2021-026 Check/un-check field for Parent/Child values
private void lboxInUseCB_ItemCheck(object sender, ItemCheckEventArgs e) private void lboxInUseCB_ItemCheck(object sender, ItemCheckEventArgs e)
@@ -1517,7 +1397,6 @@ namespace ROEditor
this.btnCancel.Size = new System.Drawing.Size(80, 24); this.btnCancel.Size = new System.Drawing.Size(80, 24);
this.btnCancel.TabIndex = 10; this.btnCancel.TabIndex = 10;
this.btnCancel.Text = "Cancel"; this.btnCancel.Text = "Cancel";
// //
// RODefFrm // RODefFrm
// //
@@ -1540,71 +1419,6 @@ namespace ROEditor
this.PerformLayout(); this.PerformLayout();
} }
//if User clicked save (DialogResult.OK) close the form
//if use did not click save, ask if they are sure they want to close the form
//only close if they say "Yes, they want to"
protected override void OnFormClosing(FormClosingEventArgs e)
{
if (this.DialogResult != System.Windows.Forms.DialogResult.OK && IsPendingChange() && !CloseCancel())
{
e.Cancel = true;
}
}
public static bool CloseCancel()
{
const string message = "Are you sure that you would like to cancel? Information may not be saved.";
const string caption = "Cancel";
var result = MessageBox.Show(message, caption,
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);
return result == DialogResult.Yes;
}
//return true if a field has been modified
private bool IsPendingChange()
{
if (origRetVal != this.tbRetVal.Text)
return true;
if (origMenuItem != this.tbMenuVal.Text)
return true;
// check if in use records have changed
string inuserecs = null;
ROField rof;
for (int i = 0; i < InUseList.Count; i++)
{
rof = (ROField)InUseList[i];
if (rof.GetFieldname != null) //DO YET: why null?
{
inuserecs = inuserecs + rof.GetRecID;
if (i + 1 < InUseList.Count) inuserecs = inuserecs + " ";
}
}
if (inuserecs != origFieldsInUse)
return true;
//check if applicability fields have changed
string applicfieldrecs = null;
for (int i = 0; i < InUseApplcList.Count; i++)
{
rof = (ROField)InUseApplcList[i];
if (rof.GetFieldname != null)
{
applicfieldrecs = applicfieldrecs + rof.GetRecID;
if (i + 1 < InUseApplcList.Count) applicfieldrecs = applicfieldrecs + " ";
}
}
if (applicfieldrecs != origApplicFields)
return true;
//nothing has changed
return false;
}
#endregion #endregion
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE
CAAAAk1TRnQBSQFMAgEBAgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo CAAAAk1TRnQBSQFMAgEBAgEAARwBAAEcAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@@ -175,7 +175,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe
CwAAAk1TRnQBSQFMAgEBBgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo CwAAAk1TRnQBSQFMAgEBBgEAARwBAAEcAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@@ -336,10 +336,10 @@ namespace RODBInterface
public abstract bool RODB_GetChildData(VlnXmlElement node, bool CheckChildCount); public abstract bool RODB_GetChildData(VlnXmlElement node, bool CheckChildCount);
public abstract bool IsDuplicateAccPageID(VlnXmlElement ro, string newacc); public abstract bool IsDuplicateAccPageID(VlnXmlElement ro, string newacc);
public abstract VlnXmlElement RODB_ReadRO(string tbl, string recid); public abstract VlnXmlElement RODB_ReadRO(string tbl, string recid);
public abstract bool RODB_WriteRO(VlnXmlElement ro, bool movedRO = false); public abstract bool RODB_WriteRO(VlnXmlElement ro);
public abstract bool RODB_InsertRO(VlnXmlElement ro); public abstract bool RODB_InsertRO(VlnXmlElement ro);
public abstract ushort RODB_GetFieldType(VlnXmlElement elem, string TableName, string Fld); public abstract ushort RODB_GetFieldType(VlnXmlElement elem, string TableName, string Fld);
public abstract ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype, bool refresh = false); public abstract ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype);
public abstract string RODB_GetSchemaPiece(string Recid, string table); public abstract string RODB_GetSchemaPiece(string Recid, string table);
public abstract bool RODB_NewSchemaPiece(string recid, string parentid, string table, string schpiece, uint rtype); public abstract bool RODB_NewSchemaPiece(string recid, string parentid, string table, string schpiece, uint rtype);
public abstract bool RODB_WriteSchemaPiece(string Recid, string table, string schpiece); public abstract bool RODB_WriteSchemaPiece(string Recid, string table, string schpiece);
@@ -2120,7 +2120,7 @@ namespace RODBInterface
return retele; return retele;
} }
public override bool RODB_WriteRO(VlnXmlElement ro, bool movedRO = false) public override bool RODB_WriteRO(VlnXmlElement ro)
{ {
bool success; bool success;
if (ro.Name == "vlnGroup") if (ro.Name == "vlnGroup")
@@ -2140,13 +2140,6 @@ namespace RODBInterface
string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now); string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now);
string xmlstr = GenerateXmlString(ro, false); string xmlstr = GenerateXmlString(ro, false);
string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstr + "'"; string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstr + "'";
if (movedRO)
{
VlnXmlElement parent = (VlnXmlElement)ro.ParentNode;
ro.SetAttribute("ParentID", parent.GetAttribute("RecID"));
strUpdate += ", ParentID = '" + ro.GetAttribute("ParentID") + "'";
}
strUpdate = strUpdate + ", ModDateTime = '" + dt + "', AccPageID = '" + wraccid + "' WHERE RecID='" + ro.GetAttribute("RecID") + "'"; strUpdate = strUpdate + ", ModDateTime = '" + dt + "', AccPageID = '" + wraccid + "' WHERE RecID='" + ro.GetAttribute("RecID") + "'";
try try
{ {
@@ -2199,8 +2192,6 @@ namespace RODBInterface
ro.SetAttribute("HasChild", "False"); ro.SetAttribute("HasChild", "False");
if (ro.HasAttribute("AccPageID")) if (ro.HasAttribute("AccPageID"))
{ {
// Code is never reached, but this was noticed - this next line should likely be:
// strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageID, ModDateTime, Info ) ";
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) "; strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) ";
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID"); strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');"; strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');";
@@ -2303,16 +2294,11 @@ namespace RODBInterface
} }
// For the given element's table, get all of the RO fields defined in this table. // For the given element's table, get all of the RO fields defined in this table.
public override ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype, bool refresh = false) public override ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype)
{ {
string table = elem.GetAttribute("Table"); string table = elem.GetAttribute("Table");
if (!FieldDefinitions.ContainsKey(table)) if (!FieldDefinitions.ContainsKey(table))
FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem)); FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem));
else if (refresh)
{
FieldDefinitions.Remove(table);
FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem));
}
return FieldDefinitions[table]; return FieldDefinitions[table];
} }
private Dictionary<string, ArrayList> _FieldDefinitions = null; private Dictionary<string, ArrayList> _FieldDefinitions = null;
@@ -2405,7 +2391,7 @@ namespace RODBInterface
Info = null; Info = null;
DBE.ReaderClose(); DBE.ReaderClose();
DBE.CommandDispose(); DBE.CommandDispose();
return Info?.Replace("&apos;", "\'"); return Info.Replace("&apos;", "\'");
} }
public override bool RODB_NewSchemaPiece(string recid, string parentid, string table, string schpiece, uint rtype) public override bool RODB_NewSchemaPiece(string recid, string parentid, string table, string schpiece, uint rtype)
@@ -2667,9 +2653,8 @@ namespace RODBInterface
bool isused = RODB_CheckForStandardName(oldname); bool isused = RODB_CheckForStandardName(oldname);
if (isused == true) if (isused == true)
{ {
DialogResult result = MessageBox.Show($"The field name is used to define new Setpoints or Graphics Database.\n\n The update will be for this local (database) group only.\n\n Select OK to update local definition for all items in that table ({GetTopParentName(myelem)}).", "Field name modification.", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); MessageBox.Show("The field name is used to define new Setpoints or Graphics Database.\n The update will be for this local (database) group only.", "Field name modification.");
changegeneric = false; changegeneric = false;
if(result == DialogResult.Cancel) return false;
} }
} }
@@ -2681,8 +2666,8 @@ namespace RODBInterface
// Generic definition, i.e. all Groups, and No updates only Local definition, i.e. just this Group Added a // Generic definition, i.e. all Groups, and No updates only Local definition, i.e. just this Group Added a
// Cancel button to Cancel from this dialog and return to previous dialog. Added more information to the // Cancel button to Cancel from this dialog and return to previous dialog. Added more information to the
// dialog to inform user of this // dialog to inform user of this
string dmsg = $"Update Generic definition?\r\n\r\n Yes - updates Generic definitions, \r\n No - updates Local definitions, \r\n Cancel - returns to previous dialog." + string dmsg = "Update Generic definition?\r\n\r\n Yes - updates Generic definitions, \r\n No - updates Local definitions, \r\n Cancel - returns to previous dialog." +
$"\r\n\r\n 'Generic' updates definition in ALL groups that use the name\r\n 'Local' updates definition only in the selected group, and will change the definition for all items in that table ({GetTopParentName(myelem)})."; "\r\n\r\n 'Generic' updates definition in ALL groups that use the name\r\n 'Local' updates definition only in the selected group.";
System.Windows.Forms.DialogResult result = MessageBox.Show(dmsg, "Referenced Object Definition", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); System.Windows.Forms.DialogResult result = MessageBox.Show(dmsg, "Referenced Object Definition", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
if (result == DialogResult.Cancel) return false; if (result == DialogResult.Cancel) return false;
if (result == DialogResult.No) changegeneric = false; if (result == DialogResult.No) changegeneric = false;
@@ -2787,19 +2772,6 @@ namespace RODBInterface
return success; return success;
} }
//CSM-C2024-030
//Explain that Local is local to that table (and include Table name in wording displayed to user)
public string GetTopParentName(VlnXmlElement elem)
{
VlnXmlElement nodetocheck = elem;
while (nodetocheck.GetAttribute("ParentID") != "00000000" && nodetocheck.ParentNode != null)
{
nodetocheck = (VlnXmlElement) nodetocheck.ParentNode;
}
return nodetocheck.FirstChild.InnerText;
}
public override XmlSchema RODB_GetGroupSchema(VlnXmlElement elem) public override XmlSchema RODB_GetGroupSchema(VlnXmlElement elem)
{ {
XmlSchema myschema; XmlSchema myschema;

View File

@@ -1557,7 +1557,7 @@ namespace RODBInterface
} }
return retele; return retele;
} }
public override bool RODB_WriteRO(VlnXmlElement ro, bool movedRO = false) public override bool RODB_WriteRO(VlnXmlElement ro)
{ {
bool success; bool success;
if (ro.Name == "vlnGroup") if (ro.Name == "vlnGroup")
@@ -1589,13 +1589,6 @@ namespace RODBInterface
command.Parameters.AddWithValue("@ModDateTime", dt); command.Parameters.AddWithValue("@ModDateTime", dt);
command.Parameters.AddWithValue("@AccPageID", wraccid); // B2020-003: set accpageid to correct value command.Parameters.AddWithValue("@AccPageID", wraccid); // B2020-003: set accpageid to correct value
command.Parameters.AddWithValue("@RecID", ro.GetAttribute("RecID")); command.Parameters.AddWithValue("@RecID", ro.GetAttribute("RecID"));
if (movedRO)
{
VlnXmlElement parent = (VlnXmlElement)ro.ParentNode;
ro.SetAttribute("ParentID", parent.GetAttribute("RecID"));
command.Parameters.AddWithValue("@ParentID", ro.GetAttribute("ParentID"));
}
using (SqlDataReader reader = command.ExecuteReader()) using (SqlDataReader reader = command.ExecuteReader())
{ {
success = true; success = true;
@@ -1751,18 +1744,13 @@ namespace RODBInterface
return ftype; return ftype;
} }
// For the given element's table, get all of the RO fields defined in this table. // For the given element's table, get all of the RO fields defined in this table.
public override ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype, bool refresh = false) public override ArrayList RODB_GetFields(VlnXmlElement elem, uint rtype)
{ {
string table = elem.GetAttribute("Table"); string table = elem.GetAttribute("Table");
if (!FieldDefinitions.ContainsKey(table)) if (!FieldDefinitions.ContainsKey(table))
{ {
FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem)); FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem));
} }
else if (refresh)
{
FieldDefinitions.Remove(table);
FieldDefinitions.Add(table, RODB_GetFieldsFromDB(elem));
}
return FieldDefinitions[table]; return FieldDefinitions[table];
} }
private Dictionary<string, ArrayList> _FieldDefinitions = null; private Dictionary<string, ArrayList> _FieldDefinitions = null;
@@ -1921,7 +1909,7 @@ namespace RODBInterface
command.Parameters.AddWithValue("@RecID", Recid); command.Parameters.AddWithValue("@RecID", Recid);
using (SqlDataReader reader = command.ExecuteReader()) using (SqlDataReader reader = command.ExecuteReader())
{ {
if (reader.Read()) if (DBE.Read())
Info = reader.GetString(0); Info = reader.GetString(0);
else else
Info = null; Info = null;

View File

@@ -85,7 +85,7 @@ namespace VlnStatus
this.lblStatMsg.Name = "lblStatMsg"; this.lblStatMsg.Name = "lblStatMsg";
this.lblStatMsg.Size = new System.Drawing.Size(420, 81); this.lblStatMsg.Size = new System.Drawing.Size(420, 81);
this.lblStatMsg.TabIndex = 0; this.lblStatMsg.TabIndex = 0;
this.lblStatMsg.Text = "Put Status Message Here"; this.lblStatMsg.Text = "Put Satus Message Here";
this.lblStatMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblStatMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// StatusMessageFrm // StatusMessageFrm

View File

@@ -324,17 +324,29 @@ namespace ctlXMLEditLib
string ROINI = Directory.GetCurrentDirectory()+ "\\ROAPP.INI"; string ROINI = Directory.GetCurrentDirectory()+ "\\ROAPP.INI";
// Get the default file extension for graphic files // Get the default file extension for graphic files
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("ROApp","Extention","",5,"ROAPP.INI"); // DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("ROApp","Extention","",5,"ROAPP.INI");
// Bug fix: B2006-025 // Bug fix: B2006-025
// needed to pass the full path of ROAPP.INI // needed to pass the full path of ROAPP.INI
// B2025-007 only use the default file location (remove 16 bit PROMS location)
IniReader in1 = new IniReader(ROINI); IniReader in1 = new IniReader(ROINI);
DefaultGraphicFileExtension = in1.ReadString("ROApp", "Extention"); DefaultGraphicFileExtension = in1.ReadString("ROApp","Extention","");
if (string.IsNullOrEmpty(DefaultGraphicFileExtension)) DefaultGraphicFileExtension = in1.ReadString("ROApp", "Extension", ".TIF"); if (DefaultGraphicFileExtension.Equals(""))
// if (File.Exists(PromsINI)) {
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("Graphics","defaultext",".TIF",5,PromsINI); string ApplPathUp = ApplicationPath.ToUpper();
// if (File.Exists("ROAPP.INI")) int idx = ApplPathUp.IndexOf("VE-PROMS.NET\\BIN");
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("ROApp","Extention",".TIF",5,"ROAPP.INI"); if (idx >= 0)
{
string PromsINI = ApplicationPath.Substring(0, idx);
PromsINI += "VE-PROMS\\VEPROMS.INI";
IniReader in2 = new IniReader(PromsINI);
DefaultGraphicFileExtension = in2.ReadString("Graphics", "defaultext", ".TIF");
}
else
DefaultGraphicFileExtension = ".TIF";
}
// if (File.Exists(PromsINI))
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("Graphics","defaultext",".TIF",5,PromsINI);
// if (File.Exists("ROAPP.INI"))
// DefaultGraphicFileExtension = TheIniFile.GetINIKeyValueStr("ROApp","Extention",".TIF",5,"ROAPP.INI");
if (!DefaultGraphicFileExtension.StartsWith(".")) if (!DefaultGraphicFileExtension.StartsWith("."))
DefaultGraphicFileExtension = "." + DefaultGraphicFileExtension; DefaultGraphicFileExtension = "." + DefaultGraphicFileExtension;
@@ -772,7 +784,6 @@ namespace ctlXMLEditLib
dosaveflag = false; dosaveflag = false;
return (true); return (true);
} }
MessageBox.Show("Save Failed");
return (false); return (false);
} }
@@ -1118,7 +1129,7 @@ namespace ctlXMLEditLib
mylabel.BackColor = chlbckcolor; // PC Applic fields are shaded blue otherwise backcolor is transparent mylabel.BackColor = chlbckcolor; // PC Applic fields are shaded blue otherwise backcolor is transparent
mylabel.Location = new Point(screenx+indent, screeny); mylabel.Location = new Point(screenx+indent, screeny);
mylabel.Name = (pcChildIdx == 0) ? CvtUserFldToFld(element.Name) : CvtUserFldToFld(pcChildFldName); mylabel.Name = (pcChildIdx == 0) ? CvtUserFldToFld(element.Name) : CvtUserFldToFld(pcChildFldName);
mylabel.Text = (applicLabel.Length > 0) ? applicLabel : CvtFldToUserFld(element.Name).Replace("Image_",""); // C2021-026 applicLabel is the P/C Child name mylabel.Text = (applicLabel.Length > 0) ? applicLabel : CvtFldToUserFld(element.Name); // C2021-026 applicLabel is the P/C Child name
mylabel.AutoSize = true; mylabel.AutoSize = true;
Controls.Add(mylabel); Controls.Add(mylabel);
// add 3 onto screeny so that textbox is slightly below label. // add 3 onto screeny so that textbox is slightly below label.
@@ -1473,15 +1484,12 @@ namespace ctlXMLEditLib
if (fnamebox.Text != "" && fnamebox.Modified == true) if (fnamebox.Text != "" && fnamebox.Modified == true)
{ {
FileInfo ifi = new FileInfo(fnamebox.Text); FileInfo ifi = new FileInfo(fnamebox.Text);
if (ifi.Exists == false) if (ifi.Exists == false)
{ {
FileInfo ifi2 = new FileInfo(fnamebox.Text + DefaultGraphicFileExtension); MessageBoxButtons buttons = MessageBoxButtons.OK;
if (!ifi2.Exists) MessageBox.Show( "File does not exist.",
{ "File Input Error", buttons);
MessageBox.Show("File does not exist.", return;
"File Input Error", MessageBoxButtons.OK);
return;
}
} }
bool ok = ValidGraphicsFile(fnamebox.Text); bool ok = ValidGraphicsFile(fnamebox.Text);
if (ok != true) if (ok != true)
@@ -1688,7 +1696,7 @@ namespace ctlXMLEditLib
} }
catch (Exception ee) catch (Exception ee)
{ {
MessageBox.Show("The Height and Width cannot be empty fields. Enter a number in either field and the other will automatically adjust to a proportional size.", "Invalid Height Input"); MessageBox.Show("Invalid Height Input",ee.ToString());
} }
} }
} }
@@ -1705,7 +1713,7 @@ namespace ctlXMLEditLib
} }
catch (Exception ee) catch (Exception ee)
{ {
MessageBox.Show("The Height and Width cannot be empty fields. Enter a number in either field and the other will automatically adjust to a proportional size.", "Invalid Width Input"); MessageBox.Show("Invalid Width Input", ee.ToString());
} }
} }
} }

View File

@@ -24039,66 +24039,6 @@ GO
========================================================================================================== ==========================================================================================================
*/ */
---The following RememberOpenTabs/AlwaysOpenTabs columns were added for Remeber Open Tabs.
--- RememberOpenTabs = Do not prompt User when PROMS opens
--- AutoOpenTabs = OpenTabs when PROMS opens - Default to On
IF NOT EXISTS(SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Users'
AND COLUMN_NAME = 'RememberOpenTabs')
ALTER TABLE Users ADD RememberOpenTabs bit NOT NULL DEFAULT(0);
go
-- Display the status
IF (@@Error = 0) PRINT 'Altered table [Users] Succeeded for RememberOpenTabs'
ELSE PRINT 'Altered table [Users] Error on Alter for RememberOpenTabs'
go
IF NOT EXISTS(SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Users'
AND COLUMN_NAME = 'AutoOpenTabs')
ALTER TABLE Users ADD AutoOpenTabs bit NOT NULL DEFAULT(1);
go
-- Display the status
IF (@@Error = 0) PRINT 'Altered table [Users] Succeeded for AutoOpenTabs'
ELSE PRINT 'Altered table [Users] Error on Alter for AutoOpenTabs'
go
/****** Object: StoredProcedure [dbo].[vesp_UpdateUserSettings] Script Date: 10/24/2024 11:29:44 AM ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_UpdateUserSettings]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [vesp_UpdateUserSettings];
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Matthew Schill
-- Create date: 10/24/2024
-- Description: Update User Settings
-- =============================================
CREATE PROCEDURE [dbo].[vesp_UpdateUserSettings]
(
@UID varchar(100),
@Remember bit = null,
@AutoOpen bit = null
)
WITH EXECUTE AS OWNER
AS
UPDATE Users SET
RememberOpenTabs = ISNULL(@Remember,RememberOpenTabs),
AutoOpenTabs = ISNULL(@AutoOpen,AutoOpenTabs)
WHERE UserID =@UID
RETURN
GO
IF (@@Error = 0) PRINT 'Running vesp_UpdateUserSettings Succeeded'
ELSE PRINT 'Running vesp_UpdateUserSettings Failed to Execute'
GO
/* /*
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
| ADD New Code Before this Block | | ADD New Code Before this Block |
@@ -24132,7 +24072,7 @@ BEGIN TRY -- Try Block
DECLARE @RevDate varchar(255) DECLARE @RevDate varchar(255)
DECLARE @RevDescription varchar(255) DECLARE @RevDescription varchar(255)
set @RevDate = '10/28/2024 11:24' set @RevDate = '10/03/2024 11:24'
set @RevDescription = 'Add the ability for PROMS to remember the procedure tabs that were open when you closed PROMS' set @RevDescription = 'Add the ability for PROMS to remember the procedure tabs that were open when you closed PROMS'
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription

View File

@@ -328,18 +328,6 @@ namespace VEPROMS.Properties {
} }
} }
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool cbShwRplWrdsColor {
get {
return ((bool)(this["cbShwRplWrdsColor"]));
}
set {
this["cbShwRplWrdsColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")] [global::System.Configuration.DefaultSettingValueAttribute("False")]

View File

@@ -80,11 +80,6 @@
<Setting Name="UpdateSettings" Type="System.Boolean" Scope="User"> <Setting Name="UpdateSettings" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value> <Value Profile="(Default)">True</Value>
</Setting> </Setting>
<Setting Name="cbShwRplWrdsColor" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="PasteNoReturns" Type="System.Boolean" Scope="User"> <Setting Name="PasteNoReturns" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value> <Value Profile="(Default)">False</Value>
</Setting> </Setting>

View File

@@ -674,8 +674,7 @@ CREATE PROCEDURE [dbo].[updateInfoAccidByRecid]
@RecID char(8), @RecID char(8),
@AccPageID char(32), @AccPageID char(32),
@Info nvarchar(max), @Info nvarchar(max),
@ModDateTime char(14), @ModDateTime char(14)
@ParentID varchar(8) = NULL
) )
WITH EXECUTE AS OWNER WITH EXECUTE AS OWNER
AS AS
@@ -685,8 +684,7 @@ BEGIN TRY -- Try Block
SET SET
[Info]=@Info, [Info]=@Info,
[ModDateTime]=@ModDateTime, [ModDateTime]=@ModDateTime,
[AccPageID]=@AccPageID, [AccPageID]=@AccPageID
[ParentID]=ISNULL(@ParentID, ParentID)
WHERE [ROTable]=@ROTable AND [RecID]=@RecID WHERE [ROTable]=@ROTable AND [RecID]=@RecID
IF @@ROWCOUNT = 0 IF @@ROWCOUNT = 0
BEGIN BEGIN

View File

@@ -163,12 +163,6 @@
<Compile Include="dlgCheckedOutProcedure.designer.cs"> <Compile Include="dlgCheckedOutProcedure.designer.cs">
<DependentUpon>dlgCheckedOutProcedure.cs</DependentUpon> <DependentUpon>dlgCheckedOutProcedure.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="dlgCheckOpenTabs.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgCheckOpenTabs.Designer.cs">
<DependentUpon>dlgCheckOpenTabs.cs</DependentUpon>
</Compile>
<Compile Include="DlgCloseTabsOrExit.cs"> <Compile Include="DlgCloseTabsOrExit.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -330,9 +324,6 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<DependentUpon>AboutVEPROMS.cs</DependentUpon> <DependentUpon>AboutVEPROMS.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="dlgCheckOpenTabs.resx">
<DependentUpon>dlgCheckOpenTabs.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DlgCloseTabsOrExit.resx"> <EmbeddedResource Include="DlgCloseTabsOrExit.resx">
<DependentUpon>DlgCloseTabsOrExit.cs</DependentUpon> <DependentUpon>DlgCloseTabsOrExit.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@@ -635,4 +626,4 @@
<PropertyGroup> <PropertyGroup>
<PreBuildEvent>cmd /c "$(ProjectDir)FixRev.bat"</PreBuildEvent> <PreBuildEvent>cmd /c "$(ProjectDir)FixRev.bat"</PreBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -1,116 +0,0 @@

namespace VEPROMS
{
partial class dlgCheckOpenTabs
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.labelX1 = new DevComponents.DotNetBar.LabelX();
this.cbRemember = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.btnOpenTabs = new DevComponents.DotNetBar.ButtonX();
this.btnNoTabs = new DevComponents.DotNetBar.ButtonX();
this.SuspendLayout();
//
// labelX1
//
//
//
//
this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX1.Location = new System.Drawing.Point(23, 2);
this.labelX1.Name = "labelX1";
this.labelX1.Size = new System.Drawing.Size(363, 78);
this.labelX1.TabIndex = 0;
this.labelX1.Text = "Would you like for PROMS to reopen the tabs that you had open during your last se" +
"ssion?";
this.labelX1.WordWrap = true;
//
// cbRemember
//
//
//
//
this.cbRemember.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbRemember.Location = new System.Drawing.Point(23, 75);
this.cbRemember.Name = "cbRemember";
this.cbRemember.Size = new System.Drawing.Size(376, 47);
this.cbRemember.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cbRemember.TabIndex = 1;
this.cbRemember.Text = "Check this box to not be prompted in the future when opening PROMS. \nNote that th" +
"ese settings can be adjusted at any time from the \nOPTIONS menu for PROMS.";
//
// btnOpenTabs
//
this.btnOpenTabs.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnOpenTabs.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnOpenTabs.DialogResult = System.Windows.Forms.DialogResult.Yes;
this.btnOpenTabs.Location = new System.Drawing.Point(23, 139);
this.btnOpenTabs.Name = "btnOpenTabs";
this.btnOpenTabs.Size = new System.Drawing.Size(150, 42);
this.btnOpenTabs.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnOpenTabs.TabIndex = 2;
this.btnOpenTabs.Text = "Yes, Open Tabs from Last Session";
this.btnOpenTabs.Click += new System.EventHandler(this.btnTabs_Click);
//
// btnNoTabs
//
this.btnNoTabs.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnNoTabs.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnNoTabs.DialogResult = System.Windows.Forms.DialogResult.No;
this.btnNoTabs.Location = new System.Drawing.Point(216, 139);
this.btnNoTabs.Name = "btnNoTabs";
this.btnNoTabs.Size = new System.Drawing.Size(150, 42);
this.btnNoTabs.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnNoTabs.TabIndex = 3;
this.btnNoTabs.Text = "No, Do Not Open Tabs from Previous Session";
this.btnNoTabs.Click += new System.EventHandler(this.btnTabs_Click);
//
// dlgCheckOpenTabs
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(411, 193);
this.ControlBox = false;
this.Controls.Add(this.btnNoTabs);
this.Controls.Add(this.btnOpenTabs);
this.Controls.Add(this.cbRemember);
this.Controls.Add(this.labelX1);
this.Name = "dlgCheckOpenTabs";
this.Text = "Open Tabs from Previous Session";
this.ResumeLayout(false);
}
#endregion
private DevComponents.DotNetBar.LabelX labelX1;
private DevComponents.DotNetBar.Controls.CheckBoxX cbRemember;
private DevComponents.DotNetBar.ButtonX btnOpenTabs;
private DevComponents.DotNetBar.ButtonX btnNoTabs;
}
}

View File

@@ -1,28 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace VEPROMS
{
public partial class dlgCheckOpenTabs : Form
{
public dlgCheckOpenTabs()
{
InitializeComponent();
}
public bool Remember { get; set; } = false;
private void btnTabs_Click(object sender, EventArgs e)
{
Remember = this.cbRemember.Checked;
this.Close();
}
}
}

View File

@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing; using System.Drawing;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
@@ -8,6 +10,7 @@ using System.IO;
using Volian.Controls.Library; using Volian.Controls.Library;
using DevComponents.DotNetBar; using DevComponents.DotNetBar;
using JR.Utils.GUI.Forms; using JR.Utils.GUI.Forms;
using Volian.Controls.Library;
using System.Linq; using System.Linq;
namespace VEPROMS namespace VEPROMS
@@ -175,8 +178,6 @@ namespace VEPROMS
myDocVersions.Clear(); myDocVersions.Clear();
FolderInfo fi = FolderInfo.GetTop(); FolderInfo fi = FolderInfo.GetTop();
fi.RefreshChildFolders();
if (fi.ChildFolderCount > 0) if (fi.ChildFolderCount > 0)
{ {
TreeNode tn = new TreeNode(fi.Name); TreeNode tn = new TreeNode(fi.Name);
@@ -232,7 +233,7 @@ namespace VEPROMS
loadedWorkingDraft = true; loadedWorkingDraft = true;
} }
if (tn.Parent != null && !loadedWorkingDraft && fi.FolderDocVersionCount == 0) if (tn.Parent != null && !loadedWorkingDraft)
{ {
tn.Remove(); tn.Remove();
} }
@@ -339,8 +340,6 @@ namespace VEPROMS
pbProcess.PerformStep(); pbProcess.PerformStep();
Application.DoEvents(); Application.DoEvents();
} }
ClearCache();
} }
Application.DoEvents(); Application.DoEvents();
@@ -388,23 +387,6 @@ namespace VEPROMS
this.Cursor = Cursors.Default; this.Cursor = Cursors.Default;
} }
//C2025-011 RO Update Admin Tool Memory Enhancements
//Clear what we can from the cache
//runs after each section
private void ClearCache()
{
txtProcess.AppendText("Reclaiming memory used during previous sections.");
PartInfo.ClearPartInfoCache();
ItemInfo.ClearItemInfoCache();
Item.ClearItemCache();
ContentInfo.ClearContentInfoCache();
GridInfo.ClearGridInfoCache();
GC.Collect();
GC.WaitForPendingFinalizers();
}
//C2022-028 check for Bad RO Links - we will check all of the RO links found in procedure step text //C2022-028 check for Bad RO Links - we will check all of the RO links found in procedure step text
//B2022-144 Allow to check individual procedures for bad RO links //B2022-144 Allow to check individual procedures for bad RO links
private void CheckROLinks() private void CheckROLinks()
@@ -499,14 +481,12 @@ namespace VEPROMS
// B2018-002 - Invalid Transitions - Define Transition Refresh Statistics // B2018-002 - Invalid Transitions - Define Transition Refresh Statistics
private int numTransProcessed = 0; private int numTransProcessed = 0;
private int numTransFixed = 0; private int numTransFixed = 0;
private int numTransCantFix = 0;
private int numTransConverted = 0; private int numTransConverted = 0;
// B2018-002 - Invalid Transitions - Initialize Transition Refresh Statistics // B2018-002 - Invalid Transitions - Initialize Transition Refresh Statistics
private void ResetTransNumbers() private void ResetTransNumbers()
{ {
numTransProcessed = 0; numTransProcessed = 0;
numTransFixed = 0; numTransFixed = 0;
numTransCantFix = 0;
numTransConverted = 0; numTransConverted = 0;
} }
private void RefreshTransitions() private void RefreshTransitions()
@@ -555,12 +535,11 @@ namespace VEPROMS
numTransConverted += ProcedureInfo.TranConvertCount; numTransConverted += ProcedureInfo.TranConvertCount;
numTransProcessed += ProcedureInfo.TranCheckCount; numTransProcessed += ProcedureInfo.TranCheckCount;
numTransFixed += ProcedureInfo.TranFixCount; numTransFixed += ProcedureInfo.TranFixCount;
numTransCantFix += ProcedureInfo.TranCantFixCount; //Bad Transition Link
pbProcess.PerformStep(); pbProcess.PerformStep();
Application.DoEvents(); Application.DoEvents();
} }
} }
if (numTransFixed == 0 && numTransConverted == 0 && numTransCantFix == 0) if (numTransFixed == 0 && numTransConverted == 0)
{ {
txtResults.AppendText("No Transitions Needed Updated."); txtResults.AppendText("No Transitions Needed Updated.");
txtResults.AppendText(Environment.NewLine); txtResults.AppendText(Environment.NewLine);
@@ -572,18 +551,16 @@ namespace VEPROMS
txtProcess.AppendText(string.Format("Transitions Checked: {0}", numTransProcessed)); txtProcess.AppendText(string.Format("Transitions Checked: {0}", numTransProcessed));
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistics // B2018-002 - Invalid Transitions - Display Transition Refresh Statistics
txtProcess.AppendText(string.Format("Transitions Correct As Is: {0}", numTransProcessed - (numTransConverted + numTransFixed + numTransCantFix))); txtProcess.AppendText(string.Format("Transitions Correct As Is: {0}", numTransProcessed - (numTransConverted + numTransFixed)));
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Transitions Modified: {0}", numTransFixed)); txtProcess.AppendText(string.Format("Transitions Modified: {0}", numTransFixed));
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Transitions Converted to text: {0}", numTransConverted)); txtProcess.AppendText(string.Format("Transitions Converted to text: {0}", numTransConverted));
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Transitions Unable to be Automatically Fixed (Annotation: Bad Transition Link): {0}", numTransCantFix));
Application.DoEvents(); Application.DoEvents();
if (pil.Count > 0) if (pil.Count > 0)
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.AppendLine("The batch refresh process was not successful for all procedures selected."); sb.AppendLine("The batch refresh process was not usccessful for all procedures selected.");
sb.AppendLine("The following procedures were not able to be refreshed..."); sb.AppendLine("The following procedures were not able to be refreshed...");
sb.AppendLine(); sb.AppendLine();
sb.AppendLine(sbProcs.ToString()); sb.AppendLine(sbProcs.ToString());
@@ -602,11 +579,11 @@ namespace VEPROMS
} }
} }
this.Cursor = Cursors.Default; this.Cursor = Cursors.Default;
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistic // B2018-002 - Invalid Transitions - Display Transition Refresh Statisitic
if (numTransFixed == 0 && numTransConverted == 0 && numTransCantFix == 0) if (numTransFixed == 0 && numTransConverted == 0)
MessageBox.Show(string.Format("{0} Transitions Checked.\n\nNo Transitions Modified.", numTransProcessed), "Refresh Transitions Completed"); MessageBox.Show(string.Format("{0} Transitions Checked.\n\nNo Transitions Modified.", numTransProcessed), "Refresh Transitions Completed");
else else
MessageBox.Show(string.Format("{0} Transitions Checked.\n\n {1} Correct as is.\n\n {2} Transitions modified.\n\n {3} Transitions converted to text.\n\n {4} Transitions unable to be automatically fixed (Annotation: Bad Transition Link).", numTransProcessed, numTransProcessed - (numTransFixed + numTransConverted + numTransCantFix), numTransFixed, numTransConverted, numTransCantFix), "Refresh Transitions Completed"); MessageBox.Show(string.Format("{0} Transitions Checked.\n\n {1} Correct as is.\n\n {2} Transitions modified.\n\n {3} Transitions converted to text.", numTransProcessed, numTransProcessed - (numTransFixed + numTransConverted), numTransFixed, numTransConverted), "Refresh Transitions Completed");
} }
// C2017-030 - new Admin Tools user interface // C2017-030 - new Admin Tools user interface
@@ -1018,9 +995,6 @@ namespace VEPROMS
txtResults.AppendText(Environment.NewLine); txtResults.AppendText(Environment.NewLine);
txtResults.AppendText(Environment.NewLine); txtResults.AppendText(Environment.NewLine);
} }
//C2025-011 RO Update Admin Tool Memory Enhancements
//clear the list since no longer using it
myItems.Clear();
DateTime pEnd = DateTime.Now; DateTime pEnd = DateTime.Now;
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm"))); txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
@@ -1107,7 +1081,6 @@ namespace VEPROMS
} }
roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
ROFst newrofst = ROFstInfo.RefreshROFst(dv, roFstInfo, DoProgressBarRefresh, txtProcess); ROFst newrofst = ROFstInfo.RefreshROFst(dv, roFstInfo, DoProgressBarRefresh, txtProcess);
//ROFst newrofst = ROFstInfo.RefreshROFst(dv, roFstInfo, DoProgressBarRefresh, null);
roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
} }
@@ -1130,7 +1103,8 @@ namespace VEPROMS
ProcedureInfo.RefreshTransitions(pq);//, transitionsToDisconnected, transitionsToNonEditable); ProcedureInfo.RefreshTransitions(pq);//, transitionsToDisconnected, transitionsToNonEditable);
TimeSpan ts = DateTime.Now - start; TimeSpan ts = DateTime.Now - start;
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistics // B2018-002 - Invalid Transitions - Display Transition Refresh Statistics
txtProcess.AppendText(string.Format("Procedure: {1}{0}Checked {2} Transitions{0}Fixed {3} Transitions{0}Converted to Text {4} Transitions{0}Cant Fix (Annotation: Bad Transition Link) {5} Transitions{0}Elapsed Seconds:{6}{0}{0}", Environment.NewLine, pq.DisplayNumber, ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount, ProcedureInfo.TranCantFixCount, ts.TotalSeconds)); txtProcess.AppendText(string.Format("Procedure: {1}{0}Checked {2} Transitions{0}Fixed {3} Transitions{0}Converted to Text {4} Transitions{0}Elapsed Seconds:{5}{0}{0}", Environment.NewLine, pq.DisplayNumber, ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount, ts.TotalSeconds));
//Console.WriteLine("\"{0}\"\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}", pq.DisplayNumber, ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount, ts.TotalSeconds, numTransProcessed, numTransFixed, numTransConverted);
if (myFixes.Length > 0) if (myFixes.Length > 0)
{ {
txtResults.AppendText(myFixes.ToString()); txtResults.AppendText(myFixes.ToString());
@@ -1996,20 +1970,7 @@ namespace VEPROMS
pil.Add(myProcedures[tn]); pil.Add(myProcedures[tn]);
return pil; return pil;
} }
}
//C2025-011 RO Update Admin Tool Memory Enhancements
private void txtProcess_TextChanged(object sender, EventArgs e)
{
//clears the stack to help with memory - should never need to undo text changes to this.
txtProcess.ClearUndo();
}
private void txtResults_TextChanged(object sender, EventArgs e)
{
//clears the stack to help with memory - should never need to undo text changes to this.
txtResults.ClearUndo();
}
}
} }

View File

@@ -183,19 +183,19 @@ It is recommended that this be done during off hours.
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="warningBox5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl
/IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy
eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj
h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ 8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV
ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84
Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz
wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0 jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq
rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM
CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY 2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA
FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
ud8AKwnMnBpmYFAAAAAASUVORK5CYII= zJwL4b/EAAAAAElFTkSuQmCC
</value> </value>
</data> </data>
<data name="swUpdateROVals.SuperTooltip" xml:space="preserve"> <data name="swUpdateROVals.SuperTooltip" xml:space="preserve">
@@ -230,36 +230,36 @@ If more than one procedure is selected, it is recommended that this be performed
</data> </data>
<data name="warningBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl
/IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy
eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj
h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ 8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV
ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84
Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz
wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0 jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq
rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM
CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY 2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA
FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
ud8AKwnMnBpmYFAAAAAASUVORK5CYII= zJwL4b/EAAAAAElFTkSuQmCC
</value> </value>
</data> </data>
<data name="warningBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl
/IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy
eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj
h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ 8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV
ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84
Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz
wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0 jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq
rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM
CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY 2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA
FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
ud8AKwnMnBpmYFAAAAAASUVORK5CYII= zJwL4b/EAAAAAElFTkSuQmCC
</value> </value>
</data> </data>
<data name="swCkObsoleteROData.SuperTooltip" xml:space="preserve"> <data name="swCkObsoleteROData.SuperTooltip" xml:space="preserve">
@@ -324,36 +324,36 @@ This function will remove all of the saved attachment PDFS stored in the databas
</data> </data>
<data name="warningBox4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl
/IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy
eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj
h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ 8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV
ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84
Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz
wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0 jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq
rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM
CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY 2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA
FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
ud8AKwnMnBpmYFAAAAAASUVORK5CYII= zJwL4b/EAAAAAElFTkSuQmCC
</value> </value>
</data> </data>
<data name="warningBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="warningBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl
/IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy
eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj
h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ 8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV
ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84
Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz
wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0 jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq
rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM
CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY 2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA
FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
ud8AKwnMnBpmYFAAAAAASUVORK5CYII= zJwL4b/EAAAAAElFTkSuQmCC
</value> </value>
</data> </data>
<data name="swRmObsoleteROData.SuperTooltip" xml:space="preserve"> <data name="swRmObsoleteROData.SuperTooltip" xml:space="preserve">

View File

@@ -88,12 +88,6 @@ namespace VEPROMS
this.btnFormat = new DevComponents.DotNetBar.ButtonX(); this.btnFormat = new DevComponents.DotNetBar.ButtonX();
this.btnGeneral = new DevComponents.DotNetBar.ButtonX(); this.btnGeneral = new DevComponents.DotNetBar.ButtonX();
this.tcSectionProp = new DevComponents.DotNetBar.TabControl(); this.tcSectionProp = new DevComponents.DotNetBar.TabControl();
this.tcpFormat = new DevComponents.DotNetBar.TabControlPanel();
this.ppCbShowRplWords = new System.Windows.Forms.CheckBox();
this.rbWordSect = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.rbStepSect = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.ppGpbxSignoffCheckoff = new DevComponents.DotNetBar.Controls.GroupPanel();
this.tiFormat = new DevComponents.DotNetBar.TabItem(this.components);
this.tcpGeneral = new DevComponents.DotNetBar.TabControlPanel(); this.tcpGeneral = new DevComponents.DotNetBar.TabControlPanel();
this.ppCbAutoIndent = new System.Windows.Forms.CheckBox(); this.ppCbAutoIndent = new System.Windows.Forms.CheckBox();
this.ppCbEditableData = new System.Windows.Forms.CheckBox(); this.ppCbEditableData = new System.Windows.Forms.CheckBox();
@@ -101,6 +95,11 @@ namespace VEPROMS
this.ppSectNumberStpRTB = new Volian.Controls.Library.StepRTB(this.components); this.ppSectNumberStpRTB = new Volian.Controls.Library.StepRTB(this.components);
this.ppSectTitleStpRTB = new Volian.Controls.Library.StepRTB(this.components); this.ppSectTitleStpRTB = new Volian.Controls.Library.StepRTB(this.components);
this.tiGeneral = new DevComponents.DotNetBar.TabItem(this.components); this.tiGeneral = new DevComponents.DotNetBar.TabItem(this.components);
this.tcpFormat = new DevComponents.DotNetBar.TabControlPanel();
this.rbWordSect = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.rbStepSect = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.ppGpbxSignoffCheckoff = new DevComponents.DotNetBar.Controls.GroupPanel();
this.tiFormat = new DevComponents.DotNetBar.TabItem(this.components);
this.tcpAutomation = new DevComponents.DotNetBar.TabControlPanel(); this.tcpAutomation = new DevComponents.DotNetBar.TabControlPanel();
this.ppCbNoDuplexFoldout = new System.Windows.Forms.CheckBox(); this.ppCbNoDuplexFoldout = new System.Windows.Forms.CheckBox();
this.gpTOC = new DevComponents.DotNetBar.Controls.GroupPanel(); this.gpTOC = new DevComponents.DotNetBar.Controls.GroupPanel();
@@ -121,9 +120,9 @@ namespace VEPROMS
this.panSectBtns.SuspendLayout(); this.panSectBtns.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tcSectionProp)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tcSectionProp)).BeginInit();
this.tcSectionProp.SuspendLayout(); this.tcSectionProp.SuspendLayout();
this.tcpGeneral.SuspendLayout();
this.tcpFormat.SuspendLayout(); this.tcpFormat.SuspendLayout();
this.ppGpbxSignoffCheckoff.SuspendLayout(); this.ppGpbxSignoffCheckoff.SuspendLayout();
this.tcpGeneral.SuspendLayout();
this.tcpAutomation.SuspendLayout(); this.tcpAutomation.SuspendLayout();
this.gpTOC.SuspendLayout(); this.gpTOC.SuspendLayout();
this.grpLnkEnh.SuspendLayout(); this.grpLnkEnh.SuspendLayout();
@@ -872,8 +871,8 @@ namespace VEPROMS
this.tcSectionProp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.tcSectionProp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.tcSectionProp.BackColor = System.Drawing.Color.Transparent; this.tcSectionProp.BackColor = System.Drawing.Color.Transparent;
this.tcSectionProp.CanReorderTabs = true; this.tcSectionProp.CanReorderTabs = true;
this.tcSectionProp.Controls.Add(this.tcpFormat);
this.tcSectionProp.Controls.Add(this.tcpGeneral); this.tcSectionProp.Controls.Add(this.tcpGeneral);
this.tcSectionProp.Controls.Add(this.tcpFormat);
this.tcSectionProp.Controls.Add(this.tcpAutomation); this.tcSectionProp.Controls.Add(this.tcpAutomation);
this.tcSectionProp.Controls.Add(this.tcpLibDoc); this.tcSectionProp.Controls.Add(this.tcpLibDoc);
this.tcSectionProp.Controls.Add(this.tabControlPanel4); this.tcSectionProp.Controls.Add(this.tabControlPanel4);
@@ -893,151 +892,6 @@ namespace VEPROMS
this.tcSectionProp.TabsVisible = false; this.tcSectionProp.TabsVisible = false;
this.tcSectionProp.Text = "tabControl2"; this.tcSectionProp.Text = "tabControl2";
// //
// tcpFormat
//
this.tcpFormat.Controls.Add(this.ppCbShowRplWords);
this.tcpFormat.Controls.Add(this.cbIsFoldoutSection);
this.tcpFormat.Controls.Add(this.ppCbDefaultStepSection);
this.tcpFormat.Controls.Add(this.cbKeepWordDocMargins);
this.tcpFormat.Controls.Add(this.ppLblDefaultNumColumns);
this.tcpFormat.Controls.Add(this.ppLblDefPaginationStyle);
this.tcpFormat.Controls.Add(this.ppBtnDefaultNumColumns);
this.tcpFormat.Controls.Add(this.ppBtnDefaultPaginationStyle);
this.tcpFormat.Controls.Add(this.rbWordSect);
this.tcpFormat.Controls.Add(this.rbStepSect);
this.tcpFormat.Controls.Add(this.ppGpbxSignoffCheckoff);
this.tcpFormat.Controls.Add(this.lblFormat);
this.tcpFormat.Controls.Add(this.ppCmbxNumColumns);
this.tcpFormat.Controls.Add(this.lblColumns);
this.tcpFormat.Controls.Add(this.ppCmbxSectPagination);
this.tcpFormat.Controls.Add(this.lblSectType);
this.tcpFormat.Controls.Add(this.ppCmbxStyleSectionType);
this.tcpFormat.Controls.Add(this.lblPagination);
this.tcpFormat.Controls.Add(this.ppBtnDefaultFmt);
this.tcpFormat.Controls.Add(this.ppCmbxFormat);
this.tcpFormat.Controls.Add(this.ppLblFormatDefault);
this.tcpFormat.DisabledBackColor = System.Drawing.Color.Empty;
this.tcpFormat.Dock = System.Windows.Forms.DockStyle.Fill;
this.tcpFormat.Location = new System.Drawing.Point(0, 22);
this.tcpFormat.Margin = new System.Windows.Forms.Padding(2);
this.tcpFormat.Name = "tcpFormat";
this.tcpFormat.Padding = new System.Windows.Forms.Padding(1);
this.tcpFormat.Size = new System.Drawing.Size(557, 318);
this.tcpFormat.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
this.tcpFormat.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
this.tcpFormat.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tcpFormat.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
this.tcpFormat.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tcpFormat.Style.GradientAngle = 90;
this.tcpFormat.TabIndex = 2;
this.tcpFormat.TabItem = this.tiFormat;
this.tcpFormat.Enter += new System.EventHandler(this.tabpage_Enter);
//
// ppCbShowRplWords
//
this.ppCbShowRplWords.AutoSize = true;
this.ppCbShowRplWords.BackColor = System.Drawing.Color.Transparent;
this.ppCbShowRplWords.Location = new System.Drawing.Point(272, 252);
this.ppCbShowRplWords.Name = "ppCbShowRplWords";
this.ppCbShowRplWords.Size = new System.Drawing.Size(130, 17);
this.ppCbShowRplWords.TabIndex = 62;
this.ppCbShowRplWords.Text = "Show Replace Words";
this.ppCbShowRplWords.UseVisualStyleBackColor = false;
this.ppCbShowRplWords.CheckedChanged += new System.EventHandler(this.ppCbShowRplWords_CheckedChanged);
//
// rbWordSect
//
this.rbWordSect.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.rbWordSect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.rbWordSect.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
this.rbWordSect.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbWordSect.Location = new System.Drawing.Point(247, 60);
this.rbWordSect.Margin = new System.Windows.Forms.Padding(2);
this.rbWordSect.Name = "rbWordSect";
this.rbWordSect.Size = new System.Drawing.Size(88, 19);
this.rbWordSect.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.rbWordSect.TabIndex = 23;
this.rbWordSect.TabStop = false;
this.rbWordSect.Text = "Word Section";
//
// rbStepSect
//
this.rbStepSect.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.rbStepSect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.rbStepSect.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
this.rbStepSect.Checked = true;
this.rbStepSect.CheckState = System.Windows.Forms.CheckState.Checked;
this.rbStepSect.CheckValue = "Y";
this.rbStepSect.FocusCuesEnabled = false;
this.rbStepSect.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbStepSect.Location = new System.Drawing.Point(138, 60);
this.rbStepSect.Margin = new System.Windows.Forms.Padding(2);
this.rbStepSect.Name = "rbStepSect";
this.rbStepSect.Size = new System.Drawing.Size(86, 19);
this.rbStepSect.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.rbStepSect.TabIndex = 22;
this.rbStepSect.TabStop = false;
this.rbStepSect.Text = "Step Section";
this.rbStepSect.CheckedChanged += new System.EventHandler(this.rbStepSect_CheckedChanged);
//
// ppGpbxSignoffCheckoff
//
this.ppGpbxSignoffCheckoff.BackColor = System.Drawing.Color.Transparent;
this.ppGpbxSignoffCheckoff.CanvasColor = System.Drawing.SystemColors.Control;
this.ppGpbxSignoffCheckoff.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.ppGpbxSignoffCheckoff.Controls.Add(this.ppCmbxCheckoffHeading);
this.ppGpbxSignoffCheckoff.Controls.Add(this.lblCheckoffType);
this.ppGpbxSignoffCheckoff.Controls.Add(this.ppCmbxCheckoffType);
this.ppGpbxSignoffCheckoff.Controls.Add(this.lblCheckoffHeading);
this.ppGpbxSignoffCheckoff.DisabledBackColor = System.Drawing.Color.Empty;
this.ppGpbxSignoffCheckoff.Location = new System.Drawing.Point(272, 123);
this.ppGpbxSignoffCheckoff.Margin = new System.Windows.Forms.Padding(2);
this.ppGpbxSignoffCheckoff.Name = "ppGpbxSignoffCheckoff";
this.ppGpbxSignoffCheckoff.Size = new System.Drawing.Size(206, 117);
//
//
//
this.ppGpbxSignoffCheckoff.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.ppGpbxSignoffCheckoff.Style.BackColorGradientAngle = 90;
this.ppGpbxSignoffCheckoff.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.ppGpbxSignoffCheckoff.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderBottomWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.ppGpbxSignoffCheckoff.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderLeftWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderRightWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderTopWidth = 1;
this.ppGpbxSignoffCheckoff.Style.CornerDiameter = 4;
this.ppGpbxSignoffCheckoff.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.ppGpbxSignoffCheckoff.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.ppGpbxSignoffCheckoff.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.ppGpbxSignoffCheckoff.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.ppGpbxSignoffCheckoff.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
//
//
//
this.ppGpbxSignoffCheckoff.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.ppGpbxSignoffCheckoff.TabIndex = 51;
this.ppGpbxSignoffCheckoff.Text = "Signoffs / Checkoffs";
//
// tiFormat
//
this.tiFormat.AttachedControl = this.tcpFormat;
this.tiFormat.Name = "tiFormat";
this.tiFormat.Text = "Format";
//
// tcpGeneral // tcpGeneral
// //
this.tcpGeneral.Controls.Add(this.ppCbAutoIndent); this.tcpGeneral.Controls.Add(this.ppCbAutoIndent);
@@ -1192,6 +1046,138 @@ namespace VEPROMS
this.tiGeneral.Name = "tiGeneral"; this.tiGeneral.Name = "tiGeneral";
this.tiGeneral.Text = "General"; this.tiGeneral.Text = "General";
// //
// tcpFormat
//
this.tcpFormat.Controls.Add(this.cbIsFoldoutSection);
this.tcpFormat.Controls.Add(this.ppCbDefaultStepSection);
this.tcpFormat.Controls.Add(this.cbKeepWordDocMargins);
this.tcpFormat.Controls.Add(this.ppLblDefaultNumColumns);
this.tcpFormat.Controls.Add(this.ppLblDefPaginationStyle);
this.tcpFormat.Controls.Add(this.ppBtnDefaultNumColumns);
this.tcpFormat.Controls.Add(this.ppBtnDefaultPaginationStyle);
this.tcpFormat.Controls.Add(this.rbWordSect);
this.tcpFormat.Controls.Add(this.rbStepSect);
this.tcpFormat.Controls.Add(this.ppGpbxSignoffCheckoff);
this.tcpFormat.Controls.Add(this.lblFormat);
this.tcpFormat.Controls.Add(this.ppCmbxNumColumns);
this.tcpFormat.Controls.Add(this.lblColumns);
this.tcpFormat.Controls.Add(this.ppCmbxSectPagination);
this.tcpFormat.Controls.Add(this.lblSectType);
this.tcpFormat.Controls.Add(this.ppCmbxStyleSectionType);
this.tcpFormat.Controls.Add(this.lblPagination);
this.tcpFormat.Controls.Add(this.ppBtnDefaultFmt);
this.tcpFormat.Controls.Add(this.ppCmbxFormat);
this.tcpFormat.Controls.Add(this.ppLblFormatDefault);
this.tcpFormat.DisabledBackColor = System.Drawing.Color.Empty;
this.tcpFormat.Dock = System.Windows.Forms.DockStyle.Fill;
this.tcpFormat.Location = new System.Drawing.Point(0, 22);
this.tcpFormat.Margin = new System.Windows.Forms.Padding(2);
this.tcpFormat.Name = "tcpFormat";
this.tcpFormat.Padding = new System.Windows.Forms.Padding(1);
this.tcpFormat.Size = new System.Drawing.Size(557, 318);
this.tcpFormat.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
this.tcpFormat.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
this.tcpFormat.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tcpFormat.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
this.tcpFormat.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tcpFormat.Style.GradientAngle = 90;
this.tcpFormat.TabIndex = 2;
this.tcpFormat.TabItem = this.tiFormat;
this.tcpFormat.Enter += new System.EventHandler(this.tabpage_Enter);
//
// rbWordSect
//
this.rbWordSect.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.rbWordSect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.rbWordSect.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
this.rbWordSect.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbWordSect.Location = new System.Drawing.Point(247, 60);
this.rbWordSect.Margin = new System.Windows.Forms.Padding(2);
this.rbWordSect.Name = "rbWordSect";
this.rbWordSect.Size = new System.Drawing.Size(88, 19);
this.rbWordSect.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.rbWordSect.TabIndex = 23;
this.rbWordSect.TabStop = false;
this.rbWordSect.Text = "Word Section";
//
// rbStepSect
//
this.rbStepSect.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.rbStepSect.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.rbStepSect.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
this.rbStepSect.Checked = true;
this.rbStepSect.CheckState = System.Windows.Forms.CheckState.Checked;
this.rbStepSect.CheckValue = "Y";
this.rbStepSect.FocusCuesEnabled = false;
this.rbStepSect.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbStepSect.Location = new System.Drawing.Point(138, 60);
this.rbStepSect.Margin = new System.Windows.Forms.Padding(2);
this.rbStepSect.Name = "rbStepSect";
this.rbStepSect.Size = new System.Drawing.Size(86, 19);
this.rbStepSect.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.rbStepSect.TabIndex = 22;
this.rbStepSect.TabStop = false;
this.rbStepSect.Text = "Step Section";
this.rbStepSect.CheckedChanged += new System.EventHandler(this.rbStepSect_CheckedChanged);
//
// ppGpbxSignoffCheckoff
//
this.ppGpbxSignoffCheckoff.BackColor = System.Drawing.Color.Transparent;
this.ppGpbxSignoffCheckoff.CanvasColor = System.Drawing.SystemColors.Control;
this.ppGpbxSignoffCheckoff.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.ppGpbxSignoffCheckoff.Controls.Add(this.ppCmbxCheckoffHeading);
this.ppGpbxSignoffCheckoff.Controls.Add(this.lblCheckoffType);
this.ppGpbxSignoffCheckoff.Controls.Add(this.ppCmbxCheckoffType);
this.ppGpbxSignoffCheckoff.Controls.Add(this.lblCheckoffHeading);
this.ppGpbxSignoffCheckoff.DisabledBackColor = System.Drawing.Color.Empty;
this.ppGpbxSignoffCheckoff.Location = new System.Drawing.Point(272, 123);
this.ppGpbxSignoffCheckoff.Margin = new System.Windows.Forms.Padding(2);
this.ppGpbxSignoffCheckoff.Name = "ppGpbxSignoffCheckoff";
this.ppGpbxSignoffCheckoff.Size = new System.Drawing.Size(206, 117);
//
//
//
this.ppGpbxSignoffCheckoff.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.ppGpbxSignoffCheckoff.Style.BackColorGradientAngle = 90;
this.ppGpbxSignoffCheckoff.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.ppGpbxSignoffCheckoff.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderBottomWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.ppGpbxSignoffCheckoff.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderLeftWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderRightWidth = 1;
this.ppGpbxSignoffCheckoff.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.ppGpbxSignoffCheckoff.Style.BorderTopWidth = 1;
this.ppGpbxSignoffCheckoff.Style.CornerDiameter = 4;
this.ppGpbxSignoffCheckoff.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.ppGpbxSignoffCheckoff.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.ppGpbxSignoffCheckoff.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.ppGpbxSignoffCheckoff.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.ppGpbxSignoffCheckoff.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
//
//
//
this.ppGpbxSignoffCheckoff.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.ppGpbxSignoffCheckoff.TabIndex = 51;
this.ppGpbxSignoffCheckoff.Text = "Signoffs / Checkoffs";
//
// tiFormat
//
this.tiFormat.AttachedControl = this.tcpFormat;
this.tiFormat.Name = "tiFormat";
this.tiFormat.Text = "Format";
//
// tcpAutomation // tcpAutomation
// //
this.tcpAutomation.Controls.Add(this.ppCbNoDuplexFoldout); this.tcpAutomation.Controls.Add(this.ppCbNoDuplexFoldout);
@@ -1479,7 +1465,7 @@ namespace VEPROMS
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CaptionFont = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.CaptionFont = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ClientSize = new System.Drawing.Size(722, 390); this.ClientSize = new System.Drawing.Size(730, 398);
this.ControlBox = false; this.ControlBox = false;
this.Controls.Add(this.tcSectionProp); this.Controls.Add(this.tcSectionProp);
this.Controls.Add(this.panSectBtns); this.Controls.Add(this.panSectBtns);
@@ -1503,12 +1489,12 @@ namespace VEPROMS
this.panSectBtns.ResumeLayout(false); this.panSectBtns.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.tcSectionProp)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.tcSectionProp)).EndInit();
this.tcSectionProp.ResumeLayout(false); this.tcSectionProp.ResumeLayout(false);
this.tcpGeneral.ResumeLayout(false);
this.tcpGeneral.PerformLayout();
this.tcpFormat.ResumeLayout(false); this.tcpFormat.ResumeLayout(false);
this.tcpFormat.PerformLayout(); this.tcpFormat.PerformLayout();
this.ppGpbxSignoffCheckoff.ResumeLayout(false); this.ppGpbxSignoffCheckoff.ResumeLayout(false);
this.ppGpbxSignoffCheckoff.PerformLayout(); this.ppGpbxSignoffCheckoff.PerformLayout();
this.tcpGeneral.ResumeLayout(false);
this.tcpGeneral.PerformLayout();
this.tcpAutomation.ResumeLayout(false); this.tcpAutomation.ResumeLayout(false);
this.tcpAutomation.PerformLayout(); this.tcpAutomation.PerformLayout();
this.gpTOC.ResumeLayout(false); this.gpTOC.ResumeLayout(false);
@@ -1612,6 +1598,5 @@ namespace VEPROMS
private DevComponents.DotNetBar.ButtonX ppBtnConvertToDocX; private DevComponents.DotNetBar.ButtonX ppBtnConvertToDocX;
private System.Windows.Forms.CheckBox cbIsFoldoutSection; private System.Windows.Forms.CheckBox cbIsFoldoutSection;
private System.Windows.Forms.CheckBox ppCbNoDuplexFoldout; private System.Windows.Forms.CheckBox ppCbNoDuplexFoldout;
private System.Windows.Forms.CheckBox ppCbShowRplWords; }
}
} }

View File

@@ -523,23 +523,6 @@ namespace VEPROMS
else else
ppCbDefaultStepSection.Text = "Make this the Default Step Section"; ppCbDefaultStepSection.Text = "Make this the Default Step Section";
} }
// Show Replace Words
ppCbShowRplWords.Visible = false;
if (_isStepSection && _SectionConfig.MySection.MySectionInfo.MyActiveParent.IsProcedure)
{
ppCbShowRplWords.Visible = true;
ppCbShowRplWords.Checked = _SectionConfig.Section_ShwRplWords == "Y";
// Use checkbox text to clarify what is case for this section, i.e. is it already
// the default or can it be set. Note that this is used when printing of page numbers
// that use the 'WithSteps' numbering sequence.
if (_SectionConfig.Section_OriginalSteps == "Y")
{
ppCbShowRplWords.Text = "Show Replace Words"; // C2020-021 add the word "the"
_isDefaultStepSection = true;
}
else
ppCbShowRplWords.Text = "Show Replace Words";
}
// if the parent has enhanced documents (and is not an enhanced document, i.e. the test // if the parent has enhanced documents (and is not an enhanced document, i.e. the test
// ed.Type != 0 proves that) put up the group panel on the automation tab that allows for setting of // ed.Type != 0 proves that) put up the group panel on the automation tab that allows for setting of
@@ -1228,7 +1211,6 @@ namespace VEPROMS
ppGpbxSignoffCheckoff.Visible = _isStepSection; ppGpbxSignoffCheckoff.Visible = _isStepSection;
cbKeepWordDocMargins.Visible = !_isStepSection; cbKeepWordDocMargins.Visible = !_isStepSection;
ppCbDefaultStepSection.Visible = _isStepSection; ppCbDefaultStepSection.Visible = _isStepSection;
ppCbShowRplWords.Visible = _isStepSection;
} }
private void rbStepSect_CheckedChanged(object sender, EventArgs e) private void rbStepSect_CheckedChanged(object sender, EventArgs e)
@@ -1398,8 +1380,7 @@ namespace VEPROMS
_SectionConfig.Section_OriginalSteps = ppCbDefaultStepSection.Checked ? "Y" : "N"; _SectionConfig.Section_OriginalSteps = ppCbDefaultStepSection.Checked ? "Y" : "N";
} }
} }
private void ppBtnConvertToDocX_Click(object sender, EventArgs e)
private void ppBtnConvertToDocX_Click(object sender, EventArgs e)
{ {
// Get Document as file // Get Document as file
ItemInfo ii = ItemInfo.Get(_SectionConfig.MySection.ItemID); ItemInfo ii = ItemInfo.Get(_SectionConfig.MySection.ItemID);
@@ -1466,14 +1447,6 @@ namespace VEPROMS
{ {
_SectionConfig.Section_DontIncludeDuplexFoldout = ppCbNoDuplexFoldout.Checked; _SectionConfig.Section_DontIncludeDuplexFoldout = ppCbNoDuplexFoldout.Checked;
} }
// C2029-025 Show or hide replace words. Can highlight replace words in editor.
private void ppCbShowRplWords_CheckedChanged(object sender, EventArgs e)
{
if (!_Initializing)
{
_SectionConfig.Section_ShwRplWords = ppCbShowRplWords.Checked ? "Y" : "N";
}
}
//private void ppBtnDefaultPrintSize_Click(object sender, EventArgs e) //private void ppBtnDefaultPrintSize_Click(object sender, EventArgs e)
//{ //{

View File

@@ -142,11 +142,8 @@ When a format other than the inherited one is selected, a button labeled "Defaul
Pressing the "Default" button will revert back to using the inherited format for this section. Pressing the "Default" button will revert back to using the inherited format for this section.
</value> </value>
</data> </data>
<metadata name="sectionConfigBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>128, 18</value>
</metadata>
<data name="cbIsFoldoutSection.SuperTooltip" xml:space="preserve"> <data name="cbIsFoldoutSection.SuperTooltip" xml:space="preserve">
<value>If the format supports duplex Foldouts: <value>If the format supports duplex Foldouts:
- This can be used to turn On duplexing of the Foldout instead - This can be used to turn On duplexing of the Foldout instead
of using "FOLDOUT" as the section number of using "FOLDOUT" as the section number

File diff suppressed because it is too large Load Diff

View File

@@ -11,7 +11,6 @@ using DevComponents.DotNetBar;
using VEPROMS.Properties; using VEPROMS.Properties;
using Volian.Base.Library; using Volian.Base.Library;
using DescriptiveEnum; using DescriptiveEnum;
using VEPROMS.CSLA.Library;
namespace VEPROMS namespace VEPROMS
{ {
@@ -25,9 +24,6 @@ namespace VEPROMS
get { return _CanChangeSeparateWindowsSetting; } get { return _CanChangeSeparateWindowsSetting; }
set { _CanChangeSeparateWindowsSetting = value; } set { _CanChangeSeparateWindowsSetting = value; }
} }
private UserSettings _usersettings;
public frmSysOptions() public frmSysOptions()
{ {
_initializing = true; _initializing = true;
@@ -68,7 +64,6 @@ namespace VEPROMS
colorPickerButton1.SelectedColor = Settings.Default.TransitionRangeColor; colorPickerButton1.SelectedColor = Settings.Default.TransitionRangeColor;
cbAnnotationPopup.Checked = Settings.Default.AutoPopUpAnnotations; cbAnnotationPopup.Checked = Settings.Default.AutoPopUpAnnotations;
cbStepTypeToolTip.Checked = Settings.Default.StepTypeToolTip; cbStepTypeToolTip.Checked = Settings.Default.StepTypeToolTip;
cbShwRplWrdsColor.Checked = Settings.Default.cbShwRplWrdsColor;
cbTVExpand.Checked = Settings.Default.SaveTreeviewExpanded; cbTVExpand.Checked = Settings.Default.SaveTreeviewExpanded;
cbPasteNoReturns.Checked = Settings.Default.PasteNoReturns; cbPasteNoReturns.Checked = Settings.Default.PasteNoReturns;
cbPastePlainText.Checked = Settings.Default.PastePlainText; cbPastePlainText.Checked = Settings.Default.PastePlainText;
@@ -94,13 +89,6 @@ namespace VEPROMS
break; break;
} }
//CSM - C2024-031 - Getting User Settings
//and set checkboxes based on what they are set to
_usersettings = new UserSettings(VlnSettings.UserID);
cbOTRemember.Checked = _usersettings.UserSetting_OpenTabs_Remember;
cbOTAutoOpen.Enabled = cbOTAutoOpen.Visible = cbOTRemember.Checked;
cbOTAutoOpen.Checked = _usersettings.UserSetting_OpenTabs_AutoOpen || !cbOTRemember.Checked;
} }
private void cbEnhancedDocumentSync_CheckedChanged(object sender, System.EventArgs e) private void cbEnhancedDocumentSync_CheckedChanged(object sender, System.EventArgs e)
{ {
@@ -163,15 +151,6 @@ namespace VEPROMS
Settings.Default.PropPageStyle = 3; Settings.Default.PropPageStyle = 3;
Settings.Default.Save(); Settings.Default.Save();
//CSM - C2024-031 - Save User Settings
//based on what checkboxes are set to
bool? OTAuto = null;
if (cbOTRemember.Checked)
{
OTAuto = cbOTAutoOpen.Checked;
}
_usersettings.SetUserSettings(cbOTRemember.Checked, OTAuto);
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
this.Close(); this.Close();
} }
@@ -181,7 +160,6 @@ namespace VEPROMS
private Color ss_TransRangeColor; private Color ss_TransRangeColor;
private bool ss_PopUPAnnotations; private bool ss_PopUPAnnotations;
private bool ss_StepTypeToolTip; private bool ss_StepTypeToolTip;
private bool ss_cbShwRplWrdsColor;
private bool ss_SaveTreeviewExpanded; private bool ss_SaveTreeviewExpanded;
private bool ss_PasteNoReturns; private bool ss_PasteNoReturns;
private bool ss_PastePlainText; private bool ss_PastePlainText;
@@ -197,8 +175,6 @@ namespace VEPROMS
ss_TransRangeColor = Settings.Default.TransitionRangeColor; ss_TransRangeColor = Settings.Default.TransitionRangeColor;
ss_PopUPAnnotations = Settings.Default.AutoPopUpAnnotations; ss_PopUPAnnotations = Settings.Default.AutoPopUpAnnotations;
ss_StepTypeToolTip = Settings.Default.StepTypeToolTip; ss_StepTypeToolTip = Settings.Default.StepTypeToolTip;
ss_cbShwRplWrdsColor = Settings.Default.cbShwRplWrdsColor;
ss_SaveTreeviewExpanded = Settings.Default.SaveTreeviewExpanded; ss_SaveTreeviewExpanded = Settings.Default.SaveTreeviewExpanded;
ss_PasteNoReturns = Settings.Default.PasteNoReturns; ss_PasteNoReturns = Settings.Default.PasteNoReturns;
ss_PastePlainText = Settings.Default.PastePlainText; ss_PastePlainText = Settings.Default.PastePlainText;
@@ -215,7 +191,6 @@ namespace VEPROMS
Settings.Default.TransitionRangeColor = ss_TransRangeColor; Settings.Default.TransitionRangeColor = ss_TransRangeColor;
Settings.Default.AutoPopUpAnnotations = ss_PopUPAnnotations; Settings.Default.AutoPopUpAnnotations = ss_PopUPAnnotations;
Settings.Default.StepTypeToolTip = ss_StepTypeToolTip; Settings.Default.StepTypeToolTip = ss_StepTypeToolTip;
Settings.Default.cbShwRplWrdsColor = ss_cbShwRplWrdsColor;
Settings.Default.SaveTreeviewExpanded = ss_SaveTreeviewExpanded; Settings.Default.SaveTreeviewExpanded = ss_SaveTreeviewExpanded;
Settings.Default.PasteNoReturns = ss_PasteNoReturns; Settings.Default.PasteNoReturns = ss_PasteNoReturns;
Settings.Default.PastePlainText = ss_PastePlainText; Settings.Default.PastePlainText = ss_PastePlainText;
@@ -349,16 +324,5 @@ namespace VEPROMS
Settings.Default.UCFImportOpt = 4; Settings.Default.UCFImportOpt = 4;
} }
} }
private void cbOTRemember_CheckedChanged(object sender, EventArgs e) }
{
cbOTAutoOpen.Enabled = cbOTAutoOpen.Visible = cbShwRplWrdsColor.Checked;
}
private void cbShwRplWrdsColor_CheckedChanged(object sender, EventArgs e)
{
Settings.Default.cbShwRplWrdsColor = cbShwRplWrdsColor.Checked;
VlnSettings.cbShwRplWrdsColor = cbShwRplWrdsColor.Checked;
Properties.Settings.Default.cbShwRplWrdsColor = cbShwRplWrdsColor.Checked; // update setting value
Properties.Settings.Default.Save(); // save settings
}
}
} }

View File

@@ -112,20 +112,21 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="colorPickerButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="colorPickerButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAABJxAAAScQHz3HqOAAAAKklE YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA
QVQ4T2P4//8/RRhCAClyMIoBIJoUPGrAqAEgPBwNIAfDDSAf/2cAALEslYfUgx+eAAAAAElFTkSuQmCC EnEB89x6jgAAACpJREFUOE9j+P//P0UYQgApcjCKASCaFDxqwKgBIDwcDSAHww0gH/9nAACxLJWH1IMf
ngAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@@ -524,7 +524,6 @@ namespace VEPROMS
this.Activated += new EventHandler(frmVEPROMS_Activated); this.Activated += new EventHandler(frmVEPROMS_Activated);
VlnSettings.StepTypeToolType = Settings.Default.StepTypeToolTip; VlnSettings.StepTypeToolType = Settings.Default.StepTypeToolTip;
VlnSettings.cbShwRplWrdsColor = Settings.Default.cbShwRplWrdsColor;
displayLibDocs.PrintRequest += new DisplayLibDocEvent(displayLibDocs_PrintRequest); displayLibDocs.PrintRequest += new DisplayLibDocEvent(displayLibDocs_PrintRequest);
ContentInfo.InfoChanged += new ContentInfoEvent(RefreshDisplayHistory); ContentInfo.InfoChanged += new ContentInfoEvent(RefreshDisplayHistory);
AnnotationInfo.InfoChanged += new AnnotationInfoEvent(RefreshDisplayHistory); AnnotationInfo.InfoChanged += new AnnotationInfoEvent(RefreshDisplayHistory);
@@ -817,11 +816,6 @@ namespace VEPROMS
set { frmVEPROMS._ErrorLogFileName = value; } set { frmVEPROMS._ErrorLogFileName = value; }
} }
public static bool colorReplaceWords()
{
return Properties.Settings.Default.cbShwRplWrdsColor;
}
static bool ChangeLogFileName(string AppenderName, string NewFilename) static bool ChangeLogFileName(string AppenderName, string NewFilename)
{ {
log4net.Repository.ILoggerRepository RootRep; log4net.Repository.ILoggerRepository RootRep;
@@ -1660,10 +1654,6 @@ namespace VEPROMS
// B2017-214 added a null reference check // B2017-214 added a null reference check
// B2010-071 Since we cannot tell if the user click on the X in Word or the X in PROMS, ask if the current tab // B2010-071 Since we cannot tell if the user click on the X in Word or the X in PROMS, ask if the current tab
// should be closed or if we should exit PROMS or just Cancel to continue working // should be closed or if we should exit PROMS or just Cancel to continue working
if (tc._MyDisplayTabItems.Count < 1) // If all thabs are closed in the editor will indicate that in the database.
{
VEPROMS.CSLA.Library.Item.DeactivateStateDisplayTabTmp(MySessionInfo.UserID);
}
if (!_WeAreExitingPROMS && !ClosingWithError && tc.SelectedDisplayTabItem != null && tc._MyDisplayTabItems.Count > 0) if (!_WeAreExitingPROMS && !ClosingWithError && tc.SelectedDisplayTabItem != null && tc._MyDisplayTabItems.Count > 0)
{ {
// B2019-071 dialog to ask user if we are to close one tab or exit // B2019-071 dialog to ask user if we are to close one tab or exit
@@ -2359,49 +2349,18 @@ namespace VEPROMS
public void openDisplaytabstate() public void openDisplaytabstate()
{ {
// Retrieve edit tab state from database.
DataTable DisPlayTabState = VEPROMS.CSLA.Library.Item.GetDisplayTabs(VlnSettings.UserID); DataTable DisPlayTabState = VEPROMS.CSLA.Library.Item.GetDisplayTabs(VlnSettings.UserID);
//CSM - C2024-031 - Getting User Settings if (DisPlayTabState.Rows.Count > 0)
//and set checkboxes based on what they are set to
UserSettings usersettings = new UserSettings(VlnSettings.UserID);
if (DisPlayTabState.Rows.Count > 0 && (usersettings.UserSetting_OpenTabs_AutoOpen || !usersettings.UserSetting_OpenTabs_Remember))
{ {
//will open tabs by default / ask by default foreach (DataRow TabState in DisPlayTabState.Rows)
DialogResult result = DialogResult.Yes;
if (!usersettings.UserSetting_OpenTabs_Remember)
{ {
dlgCheckOpenTabs checkOpenTabs = new dlgCheckOpenTabs(); int _ItemID = (int)TabState["ItemID"];
result = checkOpenTabs.ShowDialog(); //ItemInfoList _Procedures = ItemInfoList.GetList(_ItemID, (int)E_FromType.Procedure));
ItemInfo _Procedure = ItemInfo.Get(_ItemID);
//if checkbox was checked in form, then update User Settings in database //ItemInfo.Get
if (checkOpenTabs.Remember) //ItemInfo.Get
usersettings.SetUserSettings(true, result == DialogResult.Yes); OpenItem(_Procedure);
}
if (result == DialogResult.Yes)
{
foreach (DataRow TabState in DisPlayTabState.Rows)
{
int _ItemID = (int)TabState["ItemID"];
ItemInfo _Procedure = ItemInfo.Get(_ItemID);
// Open procedure in the editor.
OpenItem(_Procedure);
// SelectedStepTabPanel needs to be set so the print buttons on the ribbon will work.
SelectedStepTabPanel = tc.MyEditItem.MyStepPanel.MyStepTabPanel;
//CSM B2024-090 - if last displaytab item,
//select the steptab panel for it
//and set the EditItem for Find/Replace
//otherwise will cause PROMS to crash if Find clicked before a Tab is given Focus
if ((DisPlayTabState.Rows.IndexOf(TabState) == DisPlayTabState.Rows.Count - 1))
{
SelectedStepTabPanel.Select();
dlgFindReplace.MyEditItem = tc.MyEditItem;
}
}
} }
} }
} }

View File

@@ -517,57 +517,6 @@ namespace VEPROMS.CSLA.Library
} }
} }
#endregion CheckOff #endregion CheckOff
#region ShwRplWds
[Serializable]
[TypeConverter(typeof(ExpandableObjectConverter))]
public class ShwRplWds
{
private string _MenuItem;
[XmlAttribute("MenuItem")]
[Browsable(false)]
public string MenuItem
{
get { return _MenuItem; }
set { _MenuItem = value; }
}
private string _Index;
[XmlAttribute("Index")]
[Browsable(false)] // Don't show in the property grid
public string Index
{
get { return _Index; }
set { _Index = value; }
}
private bool? _Active;
[DisplayName("Active ShwRplWds")]
[Description("Allow use of this ShwRplWds")]
public bool? Active
{
get { return _Active; }
set { _Active = value; }
}
private bool? _OrigActive;
[XmlIgnore]
[Browsable(false)]
public bool? OrigActive
{
get { return _OrigActive; }
set { _OrigActive = value; }
}
public ShwRplWds()
{
}
public string ConvertToString()
{
return GenericSerializer<ShwRplWds>.StringSerialize(this);
}
public override string ToString()
{
return MenuItem;
}
}
#endregion ShwRplWds
#region StepData (list) #region StepData (list)
[Serializable] [Serializable]
[TypeConverter(typeof(ExpandableObjectConverter))] [TypeConverter(typeof(ExpandableObjectConverter))]

View File

@@ -528,24 +528,6 @@ namespace VEPROMS.CSLA.Library
OnPropertyChanged("Section_OriginalSteps"); OnPropertyChanged("Section_OriginalSteps");
} }
} }
[Browsable(false)]
[DisplayName("Section ShowReplaceWords")]
[RefreshProperties(RefreshProperties.All)]
[Description("Section ShowReplaceWords")]
public string Section_ShwRplWords
{
get
{
//return _Xp["Section", "ShwRplWords"];
string tmp = _Xp["Section", "ShwRplWords"];
return tmp == null || tmp == "" ? "Y" : tmp;
}
set
{
_Xp["Section", "ShwRplWords"] = value;
OnPropertyChanged("Section_ShwRplWords");
}
}
[Category("Section")] [Category("Section")]
//PROPGRID: Hide Section NumPages //PROPGRID: Hide Section NumPages
[Browsable(false)] [Browsable(false)]

View File

@@ -474,53 +474,6 @@ namespace VEPROMS.CSLA.Library
OnPropertyChanged("Step_FixedTblForSrch"); OnPropertyChanged("Step_FixedTblForSrch");
} }
} }
//CSM F2024-080: For South Texas - Ability to toggle off Initial Line
public bool Step_DisableInitialLine
{
get
{
string s = _Xp["Step", "DisableInitialLine"];
if (s == string.Empty) return false;
if (s == "True") return true;
return false;
}
set
{
string s = _Xp["Step", "DisableInitialLine"];
if (value.ToString() == s) return;
_Xp["Step", "DisableInitialLine"] = value.ToString();
OnPropertyChanged("Step_DisableInitialLine");
}
}
//C2019-025 Ability to Toggle Replace Words
public int Step_ShwRplWdsIndex
{
get
{
string s = _Xp["Step", "ShwRplWdsIndex"];
if (s == string.Empty) return 0;
if (s == "0") return 0;
if (s == "1") return 1;
if (s == "2") return 2;
if (s == "3") return 3;
return 0;
}
set
{
string s = _Xp["Step", ""];
if (value.ToString() == s) return;
_Xp["Step", "ShwRplWdsIndex"] = value.ToString();
OnPropertyChanged("Step_ShwRplWdsIndex");
}
}
#region RO image sizing #region RO image sizing
// if the RO image (figure) is resized, save it in the step config, not in the ROImageConfig. If stored in ROImageConfig // if the RO image (figure) is resized, save it in the step config, not in the ROImageConfig. If stored in ROImageConfig
// the size is set for ALL uses. // the size is set for ALL uses.

View File

@@ -687,46 +687,19 @@ namespace VEPROMS.CSLA.Library
myLength += mg.Groups[3].Length; myLength += mg.Groups[3].Length;
} }
string gg = MyGrid.Data.Substring(myIndex, myLength); string gg = MyGrid.Data.Substring(myIndex, myLength);
//CSM B2024-003 Updating RO Values inside a text Grid, adding a karat
// and/or dash into the RO value changes to question marks in the UI,
if (newvalue.Contains(@"\u8209?")) if (newvalue.Contains(@"\u8209?"))
{ {
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m == null) if (m == null)
newvalue = newvalue.Replace(@"\u8209?", "-"); newvalue = newvalue.Replace(@"\u8209?", "-");
else if (m.Groups[1].Value == "")
newvalue = newvalue.Replace(@"\u8209?", "-");
else else
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value); newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
} }
int indx_to_addfont = -1;
if (newvalue.Contains(@"\u916?"))
{
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m == null)
newvalue = newvalue.Replace(@"\u916?", "^");
else if (m.Groups[1].Value == "" && !ContentItems[0].MyItem.MyItemInfo.MyDocVersion.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta)
newvalue = newvalue.Replace(@"\u916?", "^");
else if (m.Groups[1].Value == "")
{
//B2024-003, B2023-113, B2024-093 - Updating RO Values inside a text Grid,
// adding a caret and/or dash into the RO value and then updating RO values changed to question marks in the UI.
// This is to handle if ConvertCaretToDelta is true
// since delta is not part of the standard ascii
// may need to add a font to handle it.
newvalue = newvalue.Replace(@"\u916?", @"\f9\u916?\f0 ");
indx_to_addfont = GetLocationToInsertFontInGrid(myIndex);
}
else
newvalue = newvalue.Replace(@"\u916?", m.Groups[1].Value + @"\u916?" + m.Groups[3].Value);
}
if (newvalue.Contains(@"\u8593?")) if (newvalue.Contains(@"\u8593?"))
{ {
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m == null) if (m == null)
newvalue = newvalue.Replace(@"\u8593?", "^"); newvalue = newvalue.Replace(@"\u8593?", "^");
else if (m.Groups[1].Value == "")
newvalue = newvalue.Replace(@"\u8593?", "^");
else else
newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value); newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value);
} }
@@ -735,8 +708,6 @@ namespace VEPROMS.CSLA.Library
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m == null) if (m == null)
newvalue = newvalue.Replace(@"\u9586?", @"\\"); newvalue = newvalue.Replace(@"\u9586?", @"\\");
else if (m.Groups[1].Value == "")
newvalue = newvalue.Replace(@"\u9586?", @"\\");
else else
newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value); newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value);
} }
@@ -748,17 +719,7 @@ namespace VEPROMS.CSLA.Library
if (gg != newvalue) if (gg != newvalue)
{ {
retval = gg; retval = gg;
//B2024-003, B2023-113, B2024-093 - Updating RO Values inside a text Grid, MyGrid.Data = MyGrid.Data.Substring(0, myIndex) + newvalue + MyGrid.Data.Substring(myIndex + myLength);
// adding a caret and/or dash into the RO value and then updating RO values changed to question marks in the UI.
// This is to handle if ConvertCaretToDelta is true
// since delta is not part of the standard ascii
// may need to add a font to handle it.
string begin_str = MyGrid.Data.Substring(0, myIndex);
if (indx_to_addfont > -1)
begin_str = begin_str.Insert(indx_to_addfont, @"{\f9\fnil\fcharset0 FreeMono;}");
MyGrid.Data = begin_str + newvalue + MyGrid.Data.Substring(myIndex + myLength);
MyGrid.Save();
break; break;
} }
} }
@@ -768,64 +729,6 @@ namespace VEPROMS.CSLA.Library
return retval; return retval;
} }
//B2024-003, B2023-113, B2024-093 - Updating RO Values inside a text Grid,
// adding a caret and/or dash into the RO value and then updating RO values changed to question marks in the UI.
// This is to handle if ConvertCaretToDelta is true
// since delta is not part of the standard ascii
// may need to add a font to handle it.
// startIndex = Index in the Grid at which the text we want to replace is starting
//basic Grid data partitioning using the variables in this sub is as follows:
//
// [indexOfPrefix] [indx]
// | |
// [text before last occurrence of prefix] {prefix} [rest of fonts] [text after fonts]
private int GetLocationToInsertFontInGrid(int startIndex)
{
//searches backwards from the srtIndex for the last previous occurrence of the prefix
string prefix = @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{";
int indexOfPrefix = MyGrid.Data.LastIndexOf(prefix, startIndex);
//find the end of the font section
//by passing in the Grid data
//with the following removed:
// - Everything before the last occurrence of the prefix
// - the prefix itself removed
int indx = GetIndexOfCloseBracket(MyGrid.Data.Substring(indexOfPrefix + prefix.Length, startIndex - indexOfPrefix - prefix.Length));
if (indx > -1)
{
indx += indexOfPrefix;
indx += prefix.Length;
}
//indx will contain last spot inside the font section
return indx;
}
//B2024-003, B2023-113, B2024-093 - Updating RO Values inside a text Grid,
// this function will find the corresponding occurrence of a closing bracket :
// usage is you pass in some text after an opening bracket, and it will tell you what the index is for it closing
private int GetIndexOfCloseBracket(string text)
{
int indx = 0;
Stack<char> stk = new System.Collections.Generic.Stack<char>();
foreach (char c in text)
{
if (c == '{')
stk.Push('{');
else if (c == '}' && stk.Count == 0)
return indx;
else if (c == '}')
stk.Pop();
indx++;
}
return -1;
}
public static string MakeConsistentFormat(string gg) public static string MakeConsistentFormat(string gg)
{ {
// replace degree, bullet dash, hardspace // replace degree, bullet dash, hardspace
@@ -1352,16 +1255,6 @@ namespace VEPROMS.CSLA.Library
{ {
gg = ItemInfo.ConvertToDisplayText(gg); gg = ItemInfo.ConvertToDisplayText(gg);
newvalue = ItemInfo.ConvertToDisplayText(newvalue); newvalue = ItemInfo.ConvertToDisplayText(newvalue);
//CSM B2024-094 - Carats (as Deltas) print as question marks in tables when unit <u> is used in RO Definition Value
//If there is a grid, need to keep these as the \u code
//Otherwise they will not use the correct font and end up as question marks
if (MyGrid != null)
{
gg = gg.Replace($"{(char)916}", @"\u916?");
newvalue = newvalue.Replace($"{(char)916}", @"\u916?");
}
// Debug - jsj 5-19-2017 - left in for initial check-in // Debug - jsj 5-19-2017 - left in for initial check-in
//string xx_gg = gg_org.Replace(@"\'b0", @"\'B0").Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace("\xA0", " "); //string xx_gg = gg_org.Replace(@"\'b0", @"\'B0").Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace("\xA0", " ");
//string xx_nv = newval_org.Replace(@"\'b0", @"\'B0").Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace("\xA0", " "); //string xx_nv = newval_org.Replace(@"\'b0", @"\'B0").Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace("\xA0", " ");
@@ -1414,19 +1307,7 @@ namespace VEPROMS.CSLA.Library
else else
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value); newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
} }
//B2024-003, B2023-113, B2024-093 - Updating RO Values inside a text Grid,
// This will handle if there is a delta and the column/row of the grid is removed
//then restored from history
if (newvalue.Contains(@"\u916?"))
{
Match m = Regex.Match(gg, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m.Groups.Count < 3 && !ContentItems[0].MyDocVersion.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta)
newvalue = newvalue.Replace(@"\u916?", "^");
else if (m.Groups.Count < 3)
newvalue = newvalue.Replace(@"\u916?", $"{(char)916}");
else
newvalue = newvalue.Replace(@"\u916?", m.Groups[1].Value + @"\u916?" + m.Groups[3].Value);
}
if (newvalue.Contains(@"\u8593?")) if (newvalue.Contains(@"\u8593?"))
{ {
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");

View File

@@ -6,18 +6,11 @@ using System.Text.RegularExpressions;
using System.Drawing; using System.Drawing;
using Volian.Base.Library; using Volian.Base.Library;
using JR.Utils.GUI.Forms; using JR.Utils.GUI.Forms;
//using VEPROMS.colorReplaceWords;
// This was moved from volian.controls.library // This was moved from volian.controls.library
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
public enum E_FieldToEdit { StepText, Text, Number, PSI }; public enum E_FieldToEdit { StepText, Text, Number, PSI };
public enum ReplaceWords
{
Inherit = 0,
Show = 1,
DoNotShow = 2
}
public class DisplayText public class DisplayText
{ {
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@@ -53,45 +46,6 @@ namespace VEPROMS.CSLA.Library
return string.Empty; return string.Empty;
} }
} }
private string ShwRplWords(ItemInfo _MyItemInfo)
{
//if (_Initalizing) return "N";
//_MyItemInfo.
SectionConfig sc = _MyItemInfo.MyConfig as SectionConfig;
if (sc == null) return "N";
return sc.Section_ShwRplWords;
}
// C2019-025 c2025-010 Ability-to-Toggle-Replace-Words
private bool ShwRplWdsIndex(ItemInfo _MyItemInfo)
{
StepConfig sc = _MyItemInfo.MyConfig as StepConfig;
int setting = sc.Step_ShwRplWdsIndex;
switch (setting)
{
case (int)ReplaceWords.DoNotShow:
return false;
break;
case (int)ReplaceWords.Show:
return true;
break;
case (int)ReplaceWords.Inherit:
//SectionConfig sc2 = _MyItemInfo.ActiveParent.MyConfig as SectionConfig;
SectionConfig sc2 = _MyItemInfo.ActiveSection.MyConfig as SectionConfig;
if (sc2 == null || sc2.Section_ShwRplWords == "Y")
{
return true;
}
else
{
return false;
}
break;
default:
return false;
break;
}
}
private Item _MyItem; private Item _MyItem;
private string EditText private string EditText
{ {
@@ -403,34 +357,9 @@ namespace VEPROMS.CSLA.Library
// But don't do ReplaceWords if the TurnOffReplaceWords format flag is set // But don't do ReplaceWords if the TurnOffReplaceWords format flag is set
if (wordsShouldBeReplaced && !_MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.TurnOffReplaceWords) if (wordsShouldBeReplaced && !_MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.TurnOffReplaceWords)
{ {
int profileDepth1 = ProfileTimer.Push(">>>> DoReplaceWords2"); int profileDepth1 = ProfileTimer.Push(">>>> DoReplaceWords2");
// C2029-025 Show or hide replace words. Can highlight replace words in editor. text = DoReplaceWords2(text);
if (_MyItemInfo.IsSection)
{
string ShwRplWrds = ShwRplWords(_MyItemInfo);
if (ShwRplWrds == "Y")
{
text = DoReplaceWords2(text, epMode);
}
}
if (_MyItemInfo.IsStep)
{
bool ShwRplWrds = ShwRplWdsIndex(_MyItemInfo);
if (ShwRplWrds == true)
{
text = DoReplaceWords2(text, epMode);
}
}
if (_MyItemInfo.IsFolder || _MyItemInfo.IsProcedure)
{
text = DoReplaceWords2(text, epMode);
}
ProfileTimer.Pop(profileDepth1); ProfileTimer.Pop(profileDepth1);
} }
if (_MyItemInfo != null && ROsShouldBeAdjusted) // B2017-019 - added check for ROsShouldBeAdjusted so that these token are not "cooked" on property pages if (_MyItemInfo != null && ROsShouldBeAdjusted) // B2017-019 - added check for ROsShouldBeAdjusted so that these token are not "cooked" on property pages
@@ -1236,17 +1165,13 @@ namespace VEPROMS.CSLA.Library
{ {
int sp = odte.Link.IndexOf(" ") + 1; // get past tran type int sp = odte.Link.IndexOf(" ") + 1; // get past tran type
string srecid = odte.Link.Substring(sp, odte.Link.IndexOf(" ", sp) - sp); string srecid = odte.Link.Substring(sp, odte.Link.IndexOf(" ", sp) - sp);
recid = System.Convert.ToInt32(srecid);
//CSM B2024-078 - when a bad transition link / does not contain a number, simply return the text as-is foreach (ContentTransition ct in itm.MyContent.ContentTransitions)
if (int.TryParse(srecid, out recid))
{ {
foreach (ContentTransition ct in itm.MyContent.ContentTransitions) if (ct.TransitionID == recid)
{ {
if (ct.TransitionID == recid) itm.MyContent.ContentTransitions.Remove(ct);
{ break;
itm.MyContent.ContentTransitions.Remove(ct);
break;
}
} }
} }
} }
@@ -1731,15 +1656,7 @@ namespace VEPROMS.CSLA.Library
private string FixTransition(string link, string text) private string FixTransition(string link, string text)
{ {
if (link.IndexOf("<NewID>") != -1) return text; if (link.IndexOf("<NewID>") != -1) return text;
int transitionID = Convert.ToInt32(link.Split(" ".ToCharArray())[1]);
//CSM B2024-078 - when a bad transition link / does not contain a number, simply return the text as-is
int transitionID;
string[] splt_link = link.Split(' ');
if (splt_link.Length < 2 || !int.TryParse(splt_link[1], out transitionID))
{
return text;
}
// Find the transition // Find the transition
if (_MyItemInfo.MyContent.ContentTransitionCount <= 0) if (_MyItemInfo.MyContent.ContentTransitionCount <= 0)
{ {
@@ -2172,7 +2089,7 @@ namespace VEPROMS.CSLA.Library
return (bool) _ProcessReplaceWords; return (bool) _ProcessReplaceWords;
} }
} }
private string DoReplaceWords2(string Text, E_EditPrintMode epMode) private string DoReplaceWords2(string Text)
{ {
if(!ProcessReplaceWords) return Text; if(!ProcessReplaceWords) return Text;
// F2021-053: BNPP Alarm - need ability to have super/sub scripts in the text of Alarm Tables (ROs). // F2021-053: BNPP Alarm - need ability to have super/sub scripts in the text of Alarm Tables (ROs).
@@ -2233,7 +2150,6 @@ namespace VEPROMS.CSLA.Library
// CASEINSENS: Do ReplaceWords for all words that match, regardless of case, and replace with the ReplaceWith string as is // CASEINSENS: Do ReplaceWords for all words that match, regardless of case, and replace with the ReplaceWith string as is
//RegexOptions myOptions = (rs.Flag & E_ReplaceFlags.CaseInsens) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase & RegexOptions.Singleline : RegexOptions.None & RegexOptions.Singleline; //RegexOptions myOptions = (rs.Flag & E_ReplaceFlags.CaseInsens) == E_ReplaceFlags.CaseInsens ? RegexOptions.IgnoreCase & RegexOptions.Singleline : RegexOptions.None & RegexOptions.Singleline;
string replaceWord = Regex.Replace(rs.ReplaceWord, @"[[\]\\()]", @"\$0"); string replaceWord = Regex.Replace(rs.ReplaceWord, @"[[\]\\()]", @"\$0");
// if first or last character in replaceword is a non-word character, for example, ',', ')', or '.', // if first or last character in replaceword is a non-word character, for example, ',', ')', or '.',
// don't use the \W, i.e. don't bother to look for a non-word character. // don't use the \W, i.e. don't bother to look for a non-word character.
string wordMatchBeg = Regex.IsMatch(replaceWord.Substring(0, 1), @"\W") ? "" : @"(?<=\W|^)"; string wordMatchBeg = Regex.IsMatch(replaceWord.Substring(0, 1), @"\W") ? "" : @"(?<=\W|^)";
@@ -2260,7 +2176,7 @@ namespace VEPROMS.CSLA.Library
} }
//ProfileTimer.Pop(profileDepth); //ProfileTimer.Pop(profileDepth);
//int profileDepth5 = ProfileTimer.Push(">>>> DoReplaceWords2.ReplaceMatches"); //int profileDepth5 = ProfileTimer.Push(">>>> DoReplaceWords2.ReplaceMatches");
Text = myMatches.ReplaceMatches(epMode); Text = myMatches.ReplaceMatches();
//ProfileTimer.Pop(profileDepth5); //ProfileTimer.Pop(profileDepth5);
Text = Text.Replace(@"\xA0", @"\u160?"); //replace hard space Text = Text.Replace(@"\xA0", @"\u160?"); //replace hard space
return Text; return Text;
@@ -2552,8 +2468,7 @@ namespace VEPROMS.CSLA.Library
if (str.Length == index && str == text.Substring(0, str.Length)) return true; if (str.Length == index && str == text.Substring(0, str.Length)) return true;
return false; return false;
} }
public string ReplaceMatches()
public string ReplaceMatches(E_EditPrintMode epMode)
{ {
int offset = 0; int offset = 0;
string text = _Text; string text = _Text;
@@ -2645,11 +2560,6 @@ namespace VEPROMS.CSLA.Library
with = with.Replace(@"\ul ", ""); with = with.Replace(@"\ul ", "");
with = with.Replace(@"\ulnone ", ""); with = with.Replace(@"\ulnone ", "");
} }
//if (Properties.Settings.Default.cbShwRplWrdsColor && !(epMode == E_EditPrintMode.Print))
if (Properties.Settings.Default.cbShwRplWrdsColor && !(epMode == E_EditPrintMode.Print))
{
with = $@"\cf2{with}\cf0 ";
}
text = text.Substring(0, offset + foundMatch.MyMatch.Index) + with + text.Substring(offset + foundMatch.MyMatch.Index + foundMatch.MyMatch.Length); text = text.Substring(0, offset + foundMatch.MyMatch.Index) + with + text.Substring(offset + foundMatch.MyMatch.Index + foundMatch.MyMatch.Length);
//offset += foundMatch.MyWord.ReplaceWith.Length - foundMatch.MyMatch.Length; //offset += foundMatch.MyWord.ReplaceWith.Length - foundMatch.MyMatch.Length;

View File

@@ -49,35 +49,29 @@ namespace VEPROMS.CSLA.Library
{ {
if (DocVersionAssociations == null || DocVersionAssociations.Count == 0) return false; if (DocVersionAssociations == null || DocVersionAssociations.Count == 0) return false;
using (ROFstInfo roFstInfo = ROFstInfo.GetJustROFst(DocVersionAssociations[0].ROFstID)) ROFstInfo roFstInfo = ROFstInfo.GetJustROFst(DocVersionAssociations[0].ROFstID);
{
using (RODbInfo rdi = RODbInfo.GetJustRODB(roFstInfo.RODbID))
{
string rofstPath = rdi.FolderPath + @"\ro.fst";
if (!File.Exists(rofstPath)) return false;
FileInfo fiRofst = new FileInfo(rofstPath); RODbInfo rdi = RODbInfo.GetJustRODB(roFstInfo.RODbID);
string rofstPath = rdi.FolderPath + @"\ro.fst";
if (!File.Exists(rofstPath)) return false;
// if the database Ro.Fst is newer or if the files have identical DTS, FileInfo fiRofst = new FileInfo(rofstPath);
// assume that they are the same file.
if (roFstInfo.DTS >= fiRofst.LastWriteTimeUtc) return false;
// next see if the data is the same size, i.e. byte count of record and byte count // if the database Ro.Fst is newer or if the files have identical DTS,
// of file. If different sizes, the date/time stamp check will hold. // assume that they are the same file.
// B2022-026 RO Memory reduction - new logic if (roFstInfo.DTS >= fiRofst.LastWriteTimeUtc) return false;
var bytes = ROFSTLookup.GetRofstLookupBytes(roFstInfo.ROFstID);
if (bytes != null && fiRofst.Length != bytes.Length) // next see if the data is the same size, i.e. byte count of record and byte count
return fiRofst.LastWriteTimeUtc > roFstInfo.DTS; // of file. If different sizes, the date/time stamp check will hold.
// B2022-026 RO Memory reduction - new logic
// if we can't tell by the DTS or size, compare the contents. Get all of the rodb's var bytes = ROFSTLookup.GetRofstLookupBytes(roFstInfo.ROFstID);
// rofsts of the size of the file & compare bytes.
return ROFstInfoList.ROFstDiffBySize(rofstPath, rdi.RODbID, (int)fiRofst.Length);
}
}
if (bytes != null && fiRofst.Length != bytes.Length)
return fiRofst.LastWriteTimeUtc > roFstInfo.DTS;
// if we can't tell by the DTS or size, compare the contents. Get all of the rodb's
// rofsts of the size of the file & compare bytes.
return ROFstInfoList.ROFstDiffBySize(rofstPath, rdi.RODbID, (int)fiRofst.Length);
} }
} }
public bool ROfstLastCompleted public bool ROfstLastCompleted

File diff suppressed because it is too large Load Diff

View File

@@ -2650,174 +2650,97 @@ namespace VEPROMS.CSLA.Library
firstTrans = false; firstTrans = false;
if (!CanDeleteObject()) if (!CanDeleteObject())
throw new System.Security.SecurityException("User not authorized to remove a Item"); throw new System.Security.SecurityException("User not authorized to remove a Item");
// B2016-009 check source and destination types and display message box if needed // B2016-009 check source and desintation types and display message box if needed
// C2022-017 moved the CheckSourceDestinationType call to btnPasteReplace_Click in StepTabRibbon // C2022-017 moved the CheckSourceDestinationType call to btnPasteReplace_Click in StepTabRibbon
// B2023-101 Handle Paste Replace when procedure to be replaced has Incoming Transitions, i.e. do a separate try/catch for this case // B2023-101 Handle Paste Replace when procedure to be replaced has Incoming Transitions, i.e. do a separate try/catch for this case
ItemInfo newItemInfo = null; ItemInfo newItemInfo = null;
using (ItemInfo copyItemInfo = ItemInfo.Get(copyStartID)) try
{ {
try // C2017-031: Support for paste/replace an enhanced step, if this is replacing enhanced, do a specific query
if (itemInfo.IsEnhancedStep)
{ {
// C2017-031: Support for paste/replace an enhanced step, if this is replacing enhanced, do a specific query newItemInfo = ItemInfo.CopyPasteReplaceEnhancedItemInfoFetch(copyStartID, itemInfo);
if (itemInfo.IsEnhancedStep) if (newItemInfo == null) return null;
{
newItemInfo = ItemInfo.CopyPasteReplaceEnhancedItemInfoFetch(copyStartID, itemInfo);
if (newItemInfo == null) return null;
}
//C2025-003 Enhanced Copy/Paste Upgrade - Added support for paste/replace on a master step
else if (itemInfo.HasEnhancedLinkedStep || copyItemInfo.HasEnhancedLinkedStep)
{
DialogResult rslt = DialogResult.No;
SectionConfig secCfg = itemInfo.ActiveSection.MyConfig as SectionConfig;
if (copyItemInfo.HasEnhancedLinkedStep && secCfg.MyEnhancedDocuments.Count > 0)
rslt = FlexibleMessageBox.Show("The step you are copying contains linked background documents." +
"\r\n\r\nDo you also wish to make a copy of the background documents?",
"Paste background documents", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
//unlink and remove any background documents attached to where you are copying to
//and then delete them
//if selected want to replace BG step (DialogResult.Yes)
if (itemInfo.HasEnhancedLinkedStep && rslt == DialogResult.Yes)
{
foreach (EnhancedDocument ed in itemInfo.GetMyEnhancedDocuments())
{
using (ItemInfo exEnh = ItemInfo.Get(ed.ItemID))
{
exEnh.DoUnlinkEnhanced(exEnh, 0, false);
DeleteItemAndChildren(exEnh);
}
}
}
//do copy/paste replace of the master step
newItemInfo = ItemInfo.CopyPasteReplaceItemInfoFetch(copyStartID, itemInfo);
if (newItemInfo == null) return null;
//copy any background documents
//if selected want to replace BG step (DialogResult.Yes)
if (copyItemInfo.HasEnhancedLinkedStep && rslt == DialogResult.Yes)
{
foreach (EnhancedDocument ed in copyItemInfo.GetMyEnhancedDocuments())
{
using (ItemInfo exEnh = newItemInfo.DoAddMissingEnhancedItems(ed.Type))
{
PasteReplace(exEnh, ed.ItemID, chgid, ref firstTrans);
}
}
}
else if (rslt == DialogResult.No)
{
//if selected didn't want to copy BG documents (DialogResult.No)
//need to unlink BG doc from old removed content (what was pasted over top of)
//re-link BG document to new paste replace master doc
//this should also auto update the text of the main linked item
//to match the new master doc wording
//get original BG documents
EnhancedDocuments orig_eds = itemInfo.GetMyEnhancedDocuments();
//remove link from pre-existing BG docs
foreach (EnhancedDocument ed in orig_eds)
{
using (ItemInfo exEnh = ItemInfo.Get(ed.ItemID))
{ exEnh.DoUnlinkEnhanced(exEnh, 0, false); }
}
//remove link from steps just copied
ItemInfo.PasteClearEnhanced(newItemInfo);
//re-link pre-existing BG docs to newly replaced master step
foreach (EnhancedDocument ed in orig_eds)
{
using (ItemInfo orig_ed_item = ItemInfo.Get(ed.ItemID))
{ newItemInfo.DoCreateLinksEnhancedSingleItem(orig_ed_item, ed.Type); }
}
}
}
else
{
newItemInfo = ItemInfo.CopyPasteReplaceItemInfoFetch(copyStartID, itemInfo); if (newItemInfo == null) return null;
}
} }
catch (Exception ex1) else
{ {
if (ex1.Message.Contains("has External Transitions and has no next step") newItemInfo = ItemInfo.CopyPasteReplaceItemInfoFetch(copyStartID, itemInfo); if (newItemInfo == null) return null;
}
}
catch (Exception ex1)
{
if (ex1.Message.Contains("has External Transitions and has no next step")
|| ex1.Message.Contains("has External Transitions to Procedure") || ex1.Message.Contains("has External Transitions to Procedure")
|| ex1.Message.Contains("has External Transitions to it's children")) || ex1.Message.Contains("has External Transitions to it's children"))
{
FlexibleMessageBox.Show("This procedure has external transition references to it that must be resolved before doing the Paste/Replace.\r\nRight Click on the procedure and select the Incoming Transitions menu option to find these references and resolve them.", "Paste Replace Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
return null;
}
}
try
{ {
// Delete business objects, including remove from tree FlexibleMessageBox.Show("This procedure has external transition references to it that must be resolved before doing the Paste/Replace.\r\nRight Click on the procedure and select the Incoming Transitions menu option to find these references and resolve them.", "Paste Replace Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
ItemInfo.DeleteItemInfoAndChildren(itemInfo.ItemID); // Dispose ItemInfo and Children return null;
using (Item item = Get(newItemInfo.ItemID)) ItemInfo.Refresh(item);
ItemInfo.PasteSetChangeId(newItemInfo, chgid);
if (!copyItemInfo.HasEnhancedLinkedStep && !itemInfo.HasEnhancedLinkedStep) ItemInfo.PasteClearEnhanced(newItemInfo);
if (newItemInfo.NextItem != null) using (Item item = newItemInfo.NextItem.Get()) ItemInfo.Refresh(item);
newItemInfo.RefreshNextItems();
// if inserting after a caution or note, refreshes tabs. This will adjust bullets
// of any previous cautions or notes.
if (newItemInfo.IsCaution || newItemInfo.IsNote) newItemInfo.ResetOrdinal();
newItemInfo.UpdateTransitionText();
newItemInfo.UpdateROText();
newItemInfo.UpdatePastedStepTransitionText();
// Add to tree
if (newItemInfo.NextItem != null)
{
using (ItemInfo itm = ItemInfo.GetNonCached(newItemInfo.NextItem.ItemID))
{
itm.OnNewSiblingBefore(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.Before));
}
}
else if (newItemInfo.PreviousID != null)
{
using (ItemInfo itm2 = ItemInfo.GetNonCached((int)newItemInfo.PreviousID))
{
itm2.OnNewSiblingAfter(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.After));
}
}
else
{
// B2024-045, 049 and 050: if not a single procedure replace, update user interface by using the 'OnNewChild'. Single
// procedure's MyParent is null because its parent is a working draft (docversion) since MyParent's type is iteminfo.
// For the single procedure case, the user interface code in vlntreeview will update the tree.
if (newItemInfo.MyParent != null)
newItemInfo.MyParent.OnNewChild(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.Child));
}
return newItemInfo;
} }
catch (Exception ex) }
try
{
// Delete business objects, including remove from tree
ItemInfo.DeleteItemInfoAndChildren(itemInfo.ItemID); // Dispose ItemInfo and Children
using (Item item = Get(newItemInfo.ItemID)) ItemInfo.Refresh(item);
ItemInfo.PasteSetChangeId(newItemInfo, chgid);
ItemInfo.PasteClearEnhanced(newItemInfo);
if (newItemInfo.NextItem != null) using (Item item = newItemInfo.NextItem.Get()) ItemInfo.Refresh(item);
newItemInfo.RefreshNextItems();
// if inserting after a caution or note, refreshes tabs. This will adjust bullets
// of any previous cautions or notes.
if (newItemInfo.IsCaution || newItemInfo.IsNote) newItemInfo.ResetOrdinal();
newItemInfo.UpdateTransitionText();
newItemInfo.UpdateROText();
newItemInfo.UpdatePastedStepTransitionText();
// Add to tree
if (newItemInfo.NextItem != null)
{ {
ItemInfo iii = itemInfo.HandleSqlExceptionOnDelete(ex); using (ItemInfo itm = ItemInfo.GetNonCached(newItemInfo.NextItem.ItemID))
if (iii == itemInfo) return null;// If self returned then return null
if (iii != null)
{ {
firstTrans = true; // B2017-179 set the firstTrans to true and return the itminfo of the first transition location that needs resolved itm.OnNewSiblingBefore(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.Before));
return iii;
} }
if (!HandleSqlExceptionOnCopy(ex))
{
if (ex.Message.Contains("has External Transitions and has no next step")
|| ex.Message.Contains("has External Transitions to Procedure")
|| ex.Message.Contains("has External Transitions to it's children")
|| ex.Message.Contains("This step has been deleted"))
throw ex;
FlexibleMessageBox.Show("Details were written to the Error Log.", "Paste Replace Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
return itemInfo;
}
else
return itemInfo;
} }
else if (newItemInfo.PreviousID != null)
{
using (ItemInfo itm2 = ItemInfo.GetNonCached((int)newItemInfo.PreviousID))
{
itm2.OnNewSiblingAfter(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.After));
}
}
else
{
// B2024-045, 049 and 050: if not a single procedure replace, update user interface by using the 'OnNewChild'. Single
// procedure's MyParent is null because its parent is a working draft (docversion) since MyParent's type is iteminfo.
// For the single procedure case, the user interface code in vlntreeview will update the tree.
if (newItemInfo.MyParent != null)
newItemInfo.MyParent.OnNewChild(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.Child));
}
return newItemInfo;
}
catch (Exception ex)
{
ItemInfo iii = itemInfo.HandleSqlExceptionOnDelete(ex);
if (iii == itemInfo) return null;// If self returned then return null
if (iii != null)
{
firstTrans = true; // B2017-179 set the firstTrans to true and return the itminfo of the first transition location that needs resolved
return iii;
}
if (!HandleSqlExceptionOnCopy(ex))
{
if (ex.Message.Contains("has External Transitions and has no next step")
|| ex.Message.Contains("has External Transitions to Procedure")
|| ex.Message.Contains("has External Transitions to it's children")
|| ex.Message.Contains("This step has been deleted")
)
throw ex;
FlexibleMessageBox.Show("Details were written to the Error Log.", "Paste Replace Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
return itemInfo;
}
else
return itemInfo;
} }
} }
#endregion #endregion

View File

@@ -84,6 +84,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("LastChanged", true);
return _LastChanged; return _LastChanged;
} }
set { _LastChanged = value; } set { _LastChanged = value; }

View File

@@ -80,6 +80,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("LastChanged", true);
return _LastChanged; return _LastChanged;
} }
set { _LastChanged = value; } set { _LastChanged = value; }

View File

@@ -676,47 +676,37 @@ namespace VEPROMS.CSLA.Library
} }
public void AppendPrefix() public void AppendPrefix()
{ {
if (Prefix == null) return; // no Prefix text to add if (HasText && Prefix != null)
if (HasText)
{ {
if (!_Results.ToString().EndsWith(_Prefix)) //existing transition text does not end with Prefix text, OK to append if (!_Results.ToString().EndsWith(_Prefix))
_Results.Append(Prefix); _Results.Append(Prefix);
_Prefix = null; _Prefix = null;
} }
else if (_TranType == 4 && _ToItem.MoreThanOneStepSection()) else if (_TranType == 4 && _ToItem.MoreThanOneStepSection())
{ {
// WEP (Point Beach) is no longer a customer - commented out if (!HasText && Prefix != null && Prefix.ToUpper().StartsWith(", STEP")
//if (!HasText && Prefix.ToUpper().StartsWith(", STEP") && _FromItem.ActiveFormat.Name.StartsWith("WEP"))
// && _FromItem.ActiveFormat.Name.StartsWith("WEP")) {
//{ Console.WriteLine("Format,'{0}'", _FromItem.ActiveFormat.Name);
// Console.WriteLine("Format,'{0}'", _FromItem.ActiveFormat.Name); _Prefix = null;
// _Prefix = null; return;
// return; }
//}
_Results.Append(Prefix); _Results.Append(Prefix);
_Prefix = null; _Prefix = null;
} }
else if (_TranType == 5 && Prefix != null)
{
if (!HasText && Prefix.StartsWith(", "))
_Results.Append(Prefix.TrimStart(", ".ToCharArray()));
else
_Results.Append(Prefix);
_Prefix = null;
}
// If the prefix contains an open paren, we want to add the open paren regardless // If the prefix contains an open paren, we want to add the open paren regardless
// of whether there already is text in the resulting string. // of whether there already is text in the resulting string.
else if (!HasText && Prefix.Contains("(")) else if (!HasText && Prefix != null && Prefix.Contains("("))
{ {
_Results.Append(Prefix.TrimStart(" ".ToCharArray())); // since no text in result, trim starting space. _Results.Append(Prefix.TrimStart(" ".ToCharArray())); // since no text in result, trim starting space.
_Prefix = null;
}
else if (!HasText && Prefix.StartsWith(", "))
{
_Results.Append(Prefix.TrimStart(", ".ToCharArray()));// no preceeding text, remove comma and space
_Prefix = null;
}
else if (!HasText && Prefix.StartsWith(","))
{
_Results.Append(Prefix.TrimStart(",".ToCharArray())); // no preceeding text, remove comma
_Prefix = null;
}
else
{
_Results.Append(Prefix); // append prefix as is
_Prefix = null;
} }
} }
public string OverridePrefix public string OverridePrefix

View File

@@ -2173,7 +2173,6 @@ namespace VEPROMS.CSLA.Library
} }
} }
} }
#endregion #endregion
#region CheckOff #region CheckOff
[TypeConverter(typeof(ExpandableObjectConverter))] [TypeConverter(typeof(ExpandableObjectConverter))]
@@ -2285,49 +2284,6 @@ namespace VEPROMS.CSLA.Library
} }
} }
#endregion #endregion
#region ShwRplWds
// C2029-025 Show or hide replace words. Can highlight replace words in editor.
public class ShwRplWds : vlnFormatItem, IVlnIndexedFormatItem
{
public ShwRplWds(XmlNode xmlNode) : base(xmlNode) { }
public ShwRplWds() : base() { }
private LazyLoad<int?> _Index;
public int? Index
{
get
{
return LazyLoad(ref _Index, "@Index");
}
}
// User Interface Mark (UIMark) is the deimal number of an ASCII character that is desplayed in the step editor
// to indicate the selected checkoff
private LazyLoad<int?> _UIMark;
public int? UIMark
{
get
{
return LazyLoad(ref _UIMark, "@UIMark");
}
}
//Descriptive text shown in the checkoff selection list
private LazyLoad<string> _MenuItem;
public string MenuItem
{
get
{
return LazyLoad(ref _MenuItem, "@MenuItem");
}
}
public override string ToString()
{
return MenuItem;
}
}
#endregion
#region CheckOffList #region CheckOffList
[TypeConverter(typeof(vlnIndexedListConverter<CheckOffList, CheckOff>))] [TypeConverter(typeof(vlnIndexedListConverter<CheckOffList, CheckOff>))]
public class CheckOffList : vlnIndexedFormatList<CheckOff> public class CheckOffList : vlnIndexedFormatList<CheckOff>
@@ -3219,17 +3175,6 @@ namespace VEPROMS.CSLA.Library
return LazyLoad(ref _ChangeFontUpperCaseIinArial, "@ChangeFontUpperCaseIinArial"); return LazyLoad(ref _ChangeFontUpperCaseIinArial, "@ChangeFontUpperCaseIinArial");
} }
} }
// F2024-080 South Texas
// Used to show if "Initial Line Disable" checkbox should show in the DisplayTab
private LazyLoad<bool> _ShowInitialLineDisable;
public bool ShowInitialLineDisable
{
get
{
return LazyLoad(ref _ShowInitialLineDisable, "@ShowInitialLineDisable");
}
}
} }
#endregion - StepSectionData #endregion - StepSectionData
#region TextTypeValue #region TextTypeValue
@@ -6257,36 +6202,6 @@ public StepData Equation // equation has a parent of embedded object.
} }
} }
// F2024-078 adjusts the the spacing before the Note/Caution tab - the space betwee the top of the box and the tab text
private LazyLoad<float?> _AdjSpB4Tab;
public float? AdjSpB4Tab
{
get
{
return LazyLoad(ref _AdjSpB4Tab, "@AdjSpB4Tab");
}
}
// F2024-078 adjusts the the spacing after the Note/Caution tab - the space betwee the tab text and the first line of of Note/Caution text
private LazyLoad<float?> _AdjSpAftTab;
public float? AdjSpAftTab
{
get
{
return LazyLoad(ref _AdjSpAftTab, "@AdjSpAftTab");
}
}
// F2024-078 adjusts the the spacing after the last line of Note/Caution text - between the last line of text and the bottom of the box
private LazyLoad<float?> _AdjLastBlnkLn;
public float? AdjLastBlnkLn
{
get
{
return LazyLoad(ref _AdjLastBlnkLn, "@AdjLastBlnkLn");
}
}
// this will adjust the line spacing when an extra thick line is used for a box, so that the text below the box doesn't hit up against the bottom of the box // this will adjust the line spacing when an extra thick line is used for a box, so that the text below the box doesn't hit up against the bottom of the box
private LazyLoad<bool> _ThickDouble; // F2021-026: Barakah single column 2 thick double lines around Warnings private LazyLoad<bool> _ThickDouble; // F2021-026: Barakah single column 2 thick double lines around Warnings
public bool ThickDouble public bool ThickDouble
@@ -6481,7 +6396,7 @@ public StepData Equation // equation has a parent of embedded object.
} }
public TransData(XmlNode xmlNode) : base(xmlNode) { } public TransData(XmlNode xmlNode) : base(xmlNode) { }
// a character that is placed before and after the procedure title that's in the transition text // a character that is placed before and after the title that's in the transition text
private LazyLoad<string> _DelimiterForTransitionTitle; private LazyLoad<string> _DelimiterForTransitionTitle;
public string DelimiterForTransitionTitle public string DelimiterForTransitionTitle
{ {
@@ -6758,9 +6673,7 @@ public StepData Equation // equation has a parent of embedded object.
} }
} }
// Holdover from 16bit, used to define whether transitions are range (types 2 & 3). // holdover from 16bit, used to define whether transitions are range (types 2 & 3). this is used in the logic for transitions with page numbers
// This is used in the logic for transitions with page numbers. This gets defined as "Type" in the code for the transition class.
// NOTE: the TransType you see in the code is actually the index into the list of transition definitions for given format.
private LazyLoad<int?> _Type; private LazyLoad<int?> _Type;
public int? Type public int? Type
{ {

View File

@@ -108,6 +108,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationID", true);
return _AnnotationID; return _AnnotationID;
} }
} }
@@ -117,6 +118,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("ItemID", true);
if (_MyItem != null) _ItemID = _MyItem.ItemID; if (_MyItem != null) _ItemID = _MyItem.ItemID;
return _ItemID; return _ItemID;
} }
@@ -127,12 +129,14 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyItem", true);
if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID); if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID);
return _MyItem; return _MyItem;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("MyItem", true);
if (_MyItem != value) if (_MyItem != value)
{ {
_MyItem = value; _MyItem = value;
@@ -147,6 +151,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("TypeID", true);
if (_MyAnnotationType != null) _TypeID = _MyAnnotationType.TypeID; if (_MyAnnotationType != null) _TypeID = _MyAnnotationType.TypeID;
return _TypeID; return _TypeID;
} }
@@ -157,12 +162,14 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyAnnotationType", true);
if (_MyAnnotationType == null && _TypeID != 0) _MyAnnotationType = AnnotationType.Get(_TypeID); if (_MyAnnotationType == null && _TypeID != 0) _MyAnnotationType = AnnotationType.Get(_TypeID);
return _MyAnnotationType; return _MyAnnotationType;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("MyAnnotationType", true);
if (_MyAnnotationType != value) if (_MyAnnotationType != value)
{ {
_MyAnnotationType = value; _MyAnnotationType = value;
@@ -177,11 +184,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("RtfText", true);
return _RtfText; return _RtfText;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("RtfText", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_RtfText != value) if (_RtfText != value)
{ {
@@ -196,11 +205,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("SearchText", true);
return _SearchText; return _SearchText;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("SearchText", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_SearchText != value) if (_SearchText != value)
{ {
@@ -215,11 +226,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Config", true);
return _Config; return _Config;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("Config", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_Config != value) if (_Config != value)
{ {
@@ -234,11 +247,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DTS", true);
return _DTS; return _DTS;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("DTS", true);
if (_DTS != value) if (_DTS != value)
{ {
_DTS = value; _DTS = value;
@@ -252,11 +267,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("UserID", true);
return _UserID; return _UserID;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("UserID", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_UserID != value) if (_UserID != value)
{ {

View File

@@ -106,6 +106,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AuditID", true);
return _AuditID; return _AuditID;
} }
} }
@@ -115,11 +116,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationID", true);
return _AnnotationID; return _AnnotationID;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("AnnotationID", true);
if (_AnnotationID != value) if (_AnnotationID != value)
{ {
_AnnotationID = value; _AnnotationID = value;
@@ -133,11 +136,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("ItemID", true);
return _ItemID; return _ItemID;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("ItemID", true);
if (_ItemID != value) if (_ItemID != value)
{ {
_ItemID = value; _ItemID = value;
@@ -151,11 +156,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("TypeID", true);
return _TypeID; return _TypeID;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("TypeID", true);
if (_TypeID != value) if (_TypeID != value)
{ {
_TypeID = value; _TypeID = value;
@@ -169,11 +176,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("RtfText", true);
return _RtfText; return _RtfText;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("RtfText", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_RtfText != value) if (_RtfText != value)
{ {
@@ -188,11 +197,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("SearchText", true);
return _SearchText; return _SearchText;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("SearchText", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_SearchText != value) if (_SearchText != value)
{ {
@@ -207,11 +218,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Config", true);
return _Config; return _Config;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("Config", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_Config != value) if (_Config != value)
{ {
@@ -226,11 +239,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DTS", true);
return _DTS; return _DTS;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("DTS", true);
if (_DTS != value) if (_DTS != value)
{ {
_DTS = value; _DTS = value;
@@ -244,11 +259,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("UserID", true);
return _UserID; return _UserID;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("UserID", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_UserID != value) if (_UserID != value)
{ {
@@ -263,11 +280,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DeleteStatus", true);
return _DeleteStatus; return _DeleteStatus;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("DeleteStatus", true);
if (_DeleteStatus != value) if (_DeleteStatus != value)
{ {
_DeleteStatus = value; _DeleteStatus = value;

View File

@@ -96,6 +96,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AuditID", true);
return _AuditID; return _AuditID;
} }
} }
@@ -105,6 +106,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationID", true);
return _AnnotationID; return _AnnotationID;
} }
} }
@@ -114,6 +116,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("ItemID", true);
return _ItemID; return _ItemID;
} }
} }
@@ -123,6 +126,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("TypeID", true);
return _TypeID; return _TypeID;
} }
} }
@@ -132,6 +136,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("RtfText", true);
return _RtfText; return _RtfText;
} }
} }
@@ -141,6 +146,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("SearchText", true);
return _SearchText; return _SearchText;
} }
} }
@@ -150,6 +156,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Config", true);
return _Config; return _Config;
} }
} }
@@ -159,6 +166,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DTS", true);
return _DTS; return _DTS;
} }
} }
@@ -168,6 +176,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("UserID", true);
return _UserID; return _UserID;
} }
} }
@@ -177,6 +186,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DeleteStatus", true);
return _DeleteStatus; return _DeleteStatus;
} }
} }

View File

@@ -109,6 +109,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationID", true);
return _AnnotationID; return _AnnotationID;
} }
} }
@@ -118,6 +119,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("ItemID", true);
if (_MyItem != null) _ItemID = _MyItem.ItemID; if (_MyItem != null) _ItemID = _MyItem.ItemID;
return _ItemID; return _ItemID;
} }
@@ -128,6 +130,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyItem", true);
if (_MyItem == null && _ItemID != 0) _MyItem = ItemInfo.Get(_ItemID); if (_MyItem == null && _ItemID != 0) _MyItem = ItemInfo.Get(_ItemID);
return _MyItem; return _MyItem;
} }
@@ -138,6 +141,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("TypeID", true);
if (_MyAnnotationType != null) _TypeID = _MyAnnotationType.TypeID; if (_MyAnnotationType != null) _TypeID = _MyAnnotationType.TypeID;
return _TypeID; return _TypeID;
} }
@@ -148,6 +152,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyAnnotationType", true);
if (_MyAnnotationType == null && _TypeID != 0) _MyAnnotationType = AnnotationTypeInfo.Get(_TypeID); if (_MyAnnotationType == null && _TypeID != 0) _MyAnnotationType = AnnotationTypeInfo.Get(_TypeID);
return _MyAnnotationType; return _MyAnnotationType;
} }
@@ -158,6 +163,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("RtfText", true);
return _RtfText; return _RtfText;
} }
} }
@@ -167,6 +173,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("SearchText", true);
return _SearchText; return _SearchText;
} }
} }
@@ -176,6 +183,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Config", true);
return _Config; return _Config;
} }
} }
@@ -185,6 +193,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DTS", true);
return _DTS; return _DTS;
} }
} }
@@ -194,6 +203,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("UserID", true);
return _UserID; return _UserID;
} }
} }

View File

@@ -129,6 +129,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("TypeID", true);
return _TypeID; return _TypeID;
} }
} }
@@ -138,11 +139,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Name", true);
return _Name; return _Name;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("Name", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_Name != value) if (_Name != value)
{ {
@@ -157,11 +160,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Config", true);
return _Config; return _Config;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("Config", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_Config != value) if (_Config != value)
{ {
@@ -176,11 +181,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DTS", true);
return _DTS; return _DTS;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("DTS", true);
if (_DTS != value) if (_DTS != value)
{ {
_DTS = value; _DTS = value;
@@ -194,11 +201,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("UserID", true);
return _UserID; return _UserID;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("UserID", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_UserID != value) if (_UserID != value)
{ {
@@ -217,6 +226,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationTypeAnnotationCount", true);
return _AnnotationTypeAnnotationCount; return _AnnotationTypeAnnotationCount;
} }
} }
@@ -230,6 +240,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationTypeAnnotations", true);
if (_AnnotationTypeAnnotationCount < 0 || (_AnnotationTypeAnnotationCount > 0 && _AnnotationTypeAnnotations == null)) if (_AnnotationTypeAnnotationCount < 0 || (_AnnotationTypeAnnotationCount > 0 && _AnnotationTypeAnnotations == null))
_AnnotationTypeAnnotations = AnnotationTypeAnnotations.GetByTypeID(TypeID); _AnnotationTypeAnnotations = AnnotationTypeAnnotations.GetByTypeID(TypeID);
if (_AnnotationTypeAnnotationCount < 0 ) if (_AnnotationTypeAnnotationCount < 0 )

View File

@@ -43,6 +43,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationID", true);
if (_MyAnnotation != null) _AnnotationID = _MyAnnotation.AnnotationID; if (_MyAnnotation != null) _AnnotationID = _MyAnnotation.AnnotationID;
return _AnnotationID; return _AnnotationID;
} }
@@ -54,6 +55,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyAnnotation", true);
if (_MyAnnotation == null && _AnnotationID != 0) _MyAnnotation = Annotation.Get(_AnnotationID); if (_MyAnnotation == null && _AnnotationID != 0) _MyAnnotation = Annotation.Get(_AnnotationID);
return _MyAnnotation; return _MyAnnotation;
} }
@@ -64,6 +66,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("ItemID", true);
if (_MyItem != null) _ItemID = _MyItem.ItemID; if (_MyItem != null) _ItemID = _MyItem.ItemID;
return _ItemID; return _ItemID;
} }
@@ -74,12 +77,14 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyItem", true);
if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID); if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID);
return _MyItem; return _MyItem;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("MyItem", true);
if (_MyItem != value) if (_MyItem != value)
{ {
_MyItem = value; _MyItem = value;
@@ -94,11 +99,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("RtfText", true);
return _RtfText; return _RtfText;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("RtfText", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_RtfText != value) if (_RtfText != value)
{ {
@@ -113,11 +120,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("SearchText", true);
return _SearchText; return _SearchText;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("SearchText", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_SearchText != value) if (_SearchText != value)
{ {
@@ -132,11 +141,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Config", true);
return _Config; return _Config;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("Config", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_Config != value) if (_Config != value)
{ {
@@ -151,11 +162,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DTS", true);
return _DTS; return _DTS;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("DTS", true);
if (_DTS != value) if (_DTS != value)
{ {
_DTS = value; _DTS = value;
@@ -169,11 +182,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("UserID", true);
return _UserID; return _UserID;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("UserID", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_UserID != value) if (_UserID != value)
{ {
@@ -189,6 +204,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Item_PreviousID", true);
return _Item_PreviousID; return _Item_PreviousID;
} }
} }
@@ -198,6 +214,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Item_ContentID", true);
return _Item_ContentID; return _Item_ContentID;
} }
} }
@@ -207,6 +224,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Item_DTS", true);
return _Item_DTS; return _Item_DTS;
} }
} }
@@ -216,6 +234,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Item_UserID", true);
return _Item_UserID; return _Item_UserID;
} }
} }

View File

@@ -96,6 +96,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("TypeID", true);
return _TypeID; return _TypeID;
} }
} }
@@ -105,6 +106,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Name", true);
return _Name; return _Name;
} }
} }
@@ -114,6 +116,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("Config", true);
return _Config; return _Config;
} }
} }
@@ -123,6 +126,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DTS", true);
return _DTS; return _DTS;
} }
} }
@@ -132,6 +136,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("UserID", true);
return _UserID; return _UserID;
} }
} }
@@ -144,6 +149,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationTypeAnnotationCount", true);
if (_AnnotationTypeAnnotationCount < 0) if (_AnnotationTypeAnnotationCount < 0)
_AnnotationTypeAnnotationCount = AnnotationTypeAnnotations.Count; _AnnotationTypeAnnotationCount = AnnotationTypeAnnotations.Count;
return _AnnotationTypeAnnotationCount; return _AnnotationTypeAnnotationCount;
@@ -156,6 +162,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AnnotationTypeAnnotations", true);
if (_AnnotationTypeAnnotationCount < 0 || (_AnnotationTypeAnnotationCount > 0 && _AnnotationTypeAnnotations == null)) if (_AnnotationTypeAnnotationCount < 0 || (_AnnotationTypeAnnotationCount > 0 && _AnnotationTypeAnnotations == null))
_AnnotationTypeAnnotations = AnnotationInfoList.GetByTypeID(_TypeID); _AnnotationTypeAnnotations = AnnotationInfoList.GetByTypeID(_TypeID);
if (_AnnotationTypeAnnotationCount < 0) if (_AnnotationTypeAnnotationCount < 0)

View File

@@ -109,6 +109,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("AID", true);
return _AID; return _AID;
} }
} }
@@ -118,6 +119,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("GID", true);
if (_MyGroup != null) _GID = _MyGroup.GID; if (_MyGroup != null) _GID = _MyGroup.GID;
return _GID; return _GID;
} }
@@ -128,12 +130,14 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyGroup", true);
if (_MyGroup == null && _GID != 0) _MyGroup = Group.Get(_GID); if (_MyGroup == null && _GID != 0) _MyGroup = Group.Get(_GID);
return _MyGroup; return _MyGroup;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("MyGroup", true);
if (_MyGroup != value) if (_MyGroup != value)
{ {
_MyGroup = value; _MyGroup = value;
@@ -148,6 +152,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("RID", true);
if (_MyRole != null) _RID = _MyRole.RID; if (_MyRole != null) _RID = _MyRole.RID;
return _RID; return _RID;
} }
@@ -158,12 +163,14 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyRole", true);
if (_MyRole == null && _RID != 0) _MyRole = Role.Get(_RID); if (_MyRole == null && _RID != 0) _MyRole = Role.Get(_RID);
return _MyRole; return _MyRole;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("MyRole", true);
if (_MyRole != value) if (_MyRole != value)
{ {
_MyRole = value; _MyRole = value;
@@ -178,6 +185,7 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("FolderID", true);
if (_MyFolder != null) _FolderID = _MyFolder.FolderID; if (_MyFolder != null) _FolderID = _MyFolder.FolderID;
return _FolderID; return _FolderID;
} }
@@ -188,12 +196,14 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("MyFolder", true);
if (_MyFolder == null && _FolderID != 0) _MyFolder = Folder.Get(_FolderID); if (_MyFolder == null && _FolderID != 0) _MyFolder = Folder.Get(_FolderID);
return _MyFolder; return _MyFolder;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("MyFolder", true);
if (_MyFolder != value) if (_MyFolder != value)
{ {
_MyFolder = value; _MyFolder = value;
@@ -208,11 +218,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("StartDate", true);
return _StartDate; return _StartDate;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("StartDate", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
_StartDate = value; _StartDate = value;
try try
@@ -236,11 +248,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("EndDate", true);
return _EndDate; return _EndDate;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("EndDate", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
_EndDate = value; _EndDate = value;
try try
@@ -264,11 +278,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("DTS", true);
return _DTS; return _DTS;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("DTS", true);
if (_DTS != value) if (_DTS != value)
{ {
_DTS = value; _DTS = value;
@@ -282,11 +298,13 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
CanReadProperty("UsrID", true);
return _UsrID; return _UsrID;
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set set
{ {
CanWriteProperty("UsrID", true);
if (value == null) value = string.Empty; if (value == null) value = string.Empty;
if (_UsrID != value) if (_UsrID != value)
{ {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -19,424 +19,432 @@ using System.ComponentModel;
using System.Collections.Generic; using System.Collections.Generic;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
public delegate void AssociationInfoEvent(object sender); public delegate void AssociationInfoEvent(object sender);
/// <summary> /// <summary>
/// AssociationInfo Generated by MyGeneration using the CSLA Object Mapping template /// AssociationInfo Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(AssociationInfoConverter))] [TypeConverter(typeof(AssociationInfoConverter))]
public partial class AssociationInfo : ReadOnlyBase<AssociationInfo>, IDisposable public partial class AssociationInfo : ReadOnlyBase<AssociationInfo>, IDisposable
{ {
public event AssociationInfoEvent Changed; public event AssociationInfoEvent Changed;
private void OnChange() private void OnChange()
{ {
if (Changed != null) Changed(this); if (Changed != null) Changed(this);
} }
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Collection #region Collection
private static List<AssociationInfo> _CacheList = new List<AssociationInfo>(); private static List<AssociationInfo> _CacheList = new List<AssociationInfo>();
protected static void AddToCache(AssociationInfo associationInfo) protected static void AddToCache(AssociationInfo associationInfo)
{ {
if (!_CacheList.Contains(associationInfo)) _CacheList.Add(associationInfo); // In AddToCache if (!_CacheList.Contains(associationInfo)) _CacheList.Add(associationInfo); // In AddToCache
} }
protected static void RemoveFromCache(AssociationInfo associationInfo) protected static void RemoveFromCache(AssociationInfo associationInfo)
{ {
while (_CacheList.Contains(associationInfo)) _CacheList.Remove(associationInfo); // In RemoveFromCache while (_CacheList.Contains(associationInfo)) _CacheList.Remove(associationInfo); // In RemoveFromCache
} }
private static Dictionary<string, List<AssociationInfo>> _CacheByPrimaryKey = new Dictionary<string, List<AssociationInfo>>(); private static Dictionary<string, List<AssociationInfo>> _CacheByPrimaryKey = new Dictionary<string, List<AssociationInfo>>();
private static void ConvertListToDictionary() private static void ConvertListToDictionary()
{ {
while (_CacheList.Count > 0) // Move AssociationInfo(s) from temporary _CacheList to _CacheByPrimaryKey while (_CacheList.Count > 0) // Move AssociationInfo(s) from temporary _CacheList to _CacheByPrimaryKey
{ {
AssociationInfo tmp = _CacheList[0]; // Get the first AssociationInfo AssociationInfo tmp = _CacheList[0]; // Get the first AssociationInfo
string pKey = tmp.AssociationID.ToString(); string pKey = tmp.AssociationID.ToString();
if (!_CacheByPrimaryKey.ContainsKey(pKey)) if (!_CacheByPrimaryKey.ContainsKey(pKey))
{ {
_CacheByPrimaryKey[pKey] = new List<AssociationInfo>(); // Add new list for PrimaryKey _CacheByPrimaryKey[pKey] = new List<AssociationInfo>(); // Add new list for PrimaryKey
} }
_CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list _CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list
_CacheList.RemoveAt(0); // Remove the first AssociationInfo _CacheList.RemoveAt(0); // Remove the first AssociationInfo
} }
} }
internal static void AddList(AssociationInfoList lst) internal static void AddList(AssociationInfoList lst)
{ {
foreach (AssociationInfo item in lst) AddToCache(item); foreach (AssociationInfo item in lst) AddToCache(item);
} }
protected static AssociationInfo GetCachedByPrimaryKey(int associationID) protected static AssociationInfo GetCachedByPrimaryKey(int associationID)
{ {
ConvertListToDictionary(); ConvertListToDictionary();
string key = associationID.ToString(); string key = associationID.ToString();
if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0]; if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0];
return null; return null;
} }
#endregion #endregion
#region Business Methods #region Business Methods
private string _ErrorMessage = string.Empty; private string _ErrorMessage = string.Empty;
public string ErrorMessage public string ErrorMessage
{ {
get { return _ErrorMessage; } get { return _ErrorMessage; }
} }
protected Association _Editable; protected Association _Editable;
private IVEHasBrokenRules HasBrokenRules private IVEHasBrokenRules HasBrokenRules
{ {
get get
{ {
IVEHasBrokenRules hasBrokenRules = null; IVEHasBrokenRules hasBrokenRules = null;
if (_Editable != null) if (_Editable != null)
hasBrokenRules = _Editable.HasBrokenRules; hasBrokenRules = _Editable.HasBrokenRules;
return hasBrokenRules; return hasBrokenRules;
} }
} }
private int _AssociationID; private int _AssociationID;
[System.ComponentModel.DataObjectField(true, true)] [System.ComponentModel.DataObjectField(true, true)]
public int AssociationID public int AssociationID
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
return _AssociationID; CanReadProperty("AssociationID", true);
} return _AssociationID;
} }
private int _VersionID; }
public int VersionID private int _VersionID;
{ public int VersionID
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
if (_MyDocVersion != null) _VersionID = _MyDocVersion.VersionID; {
return _VersionID; CanReadProperty("VersionID", true);
} if (_MyDocVersion != null) _VersionID = _MyDocVersion.VersionID;
} return _VersionID;
private DocVersionInfo _MyDocVersion; }
public DocVersionInfo MyDocVersion }
{ private DocVersionInfo _MyDocVersion;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] public DocVersionInfo MyDocVersion
get {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
if (_MyDocVersion == null && _VersionID != 0) _MyDocVersion = DocVersionInfo.Get(_VersionID); get
return _MyDocVersion; {
} CanReadProperty("MyDocVersion", true);
} if (_MyDocVersion == null && _VersionID != 0) _MyDocVersion = DocVersionInfo.Get(_VersionID);
private int _ROFstID; return _MyDocVersion;
public int ROFstID }
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] private int _ROFstID;
get public int ROFstID
{ {
if (_MyROFst != null) _ROFstID = _MyROFst.ROFstID; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
return _ROFstID; get
} {
} CanReadProperty("ROFstID", true);
private ROFstInfo _MyROFst; if (_MyROFst != null) _ROFstID = _MyROFst.ROFstID;
public ROFstInfo MyROFst return _ROFstID;
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get private ROFstInfo _MyROFst;
{ public ROFstInfo MyROFst
//if (_MyROFst == null && _ROFstID != 0) _MyROFst = ROFstInfo.Get(_ROFstID); {
if (_MyROFst == null && _ROFstID != 0) _MyROFst = ROFstInfo.GetJustROFst(_ROFstID);// Improve performance by not loading all ROImages [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
return _MyROFst; get
} {
} CanReadProperty("MyROFst", true);
private string _Config = string.Empty; //if (_MyROFst == null && _ROFstID != 0) _MyROFst = ROFstInfo.Get(_ROFstID);
public string Config if (_MyROFst == null && _ROFstID != 0) _MyROFst = ROFstInfo.GetJustROFst(_ROFstID);// Improve performance by not loading all ROImages
{ return _MyROFst;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get }
{ private string _Config = string.Empty;
return _Config; public string Config
} {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
private DateTime _DTS = new DateTime(); get
public DateTime DTS {
{ CanReadProperty("Config", true);
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] return _Config;
get }
{ }
return _DTS; private DateTime _DTS = new DateTime();
} public DateTime DTS
} {
private string _UserID = string.Empty; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
public string UserID get
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] CanReadProperty("DTS", true);
get return _DTS;
{ }
return _UserID; }
} private string _UserID = string.Empty;
} public string UserID
// CSLATODO: Replace base AssociationInfo.ToString function as necessary {
/// <summary> [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
/// Overrides Base ToString get
/// </summary> {
/// <returns>A string representation of current AssociationInfo</returns> CanReadProperty("UserID", true);
//public override string ToString() return _UserID;
//{ }
// return base.ToString(); }
//} // CSLATODO: Replace base AssociationInfo.ToString function as necessary
// CSLATODO: Check AssociationInfo.GetIdValue to assure that the ID returned is unique /// <summary>
/// <summary> /// Overrides Base ToString
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality /// </summary>
/// </summary> /// <returns>A string representation of current AssociationInfo</returns>
/// <returns>A Unique ID for the current AssociationInfo</returns> //public override string ToString()
protected override object GetIdValue() //{
{ // return base.ToString();
return MyAssociationInfoUnique; // Absolutely Unique ID //}
} // CSLATODO: Check AssociationInfo.GetIdValue to assure that the ID returned is unique
#endregion /// <summary>
#region Factory Methods /// Overrides Base GetIdValue - Used internally by CSLA to determine equality
private static int _AssociationInfoUnique = 0; /// </summary>
private static int AssociationInfoUnique /// <returns>A Unique ID for the current AssociationInfo</returns>
{ get { return ++_AssociationInfoUnique; } } protected override object GetIdValue()
private int _MyAssociationInfoUnique = AssociationInfoUnique; {
public int MyAssociationInfoUnique // Absolutely Unique ID - Info return MyAssociationInfoUnique; // Absolutely Unique ID
{ get { return _MyAssociationInfoUnique; } } }
protected AssociationInfo() #endregion
{/* require use of factory methods */ #region Factory Methods
AddToCache(this); private static int _AssociationInfoUnique = 0;
} private static int AssociationInfoUnique
private bool _Disposed = false; { get { return ++_AssociationInfoUnique; } }
private static int _CountCreated = 0; private int _MyAssociationInfoUnique = AssociationInfoUnique;
private static int _CountDisposed = 0; public int MyAssociationInfoUnique // Absolutely Unique ID - Info
private static int _CountFinalized = 0; { get { return _MyAssociationInfoUnique; } }
private static int IncrementCountCreated protected AssociationInfo()
{ get { return ++_CountCreated; } } {/* require use of factory methods */
private int _CountWhenCreated = IncrementCountCreated; AddToCache(this);
public static int CountCreated }
{ get { return _CountCreated; } } private bool _Disposed = false;
public static int CountNotDisposed private static int _CountCreated = 0;
{ get { return _CountCreated - _CountDisposed; } } private static int _CountDisposed = 0;
public static int CountNotFinalized private static int _CountFinalized = 0;
{ get { return _CountCreated - _CountFinalized; } } private static int IncrementCountCreated
~AssociationInfo() { get { return ++_CountCreated; } }
{ private int _CountWhenCreated = IncrementCountCreated;
_CountFinalized++; public static int CountCreated
} { get { return _CountCreated; } }
public void Dispose() public static int CountNotDisposed
{ { get { return _CountCreated - _CountDisposed; } }
if (_Disposed) return; public static int CountNotFinalized
_CountDisposed++; { get { return _CountCreated - _CountFinalized; } }
_Disposed = true; ~AssociationInfo()
RemoveFromCache(this); {
if (!_CacheByPrimaryKey.ContainsKey(AssociationID.ToString())) return; _CountFinalized++;
List<AssociationInfo> listAssociationInfo = _CacheByPrimaryKey[AssociationID.ToString()]; // Get the list of items }
while (listAssociationInfo.Contains(this)) listAssociationInfo.Remove(this); // Remove the item from the list public void Dispose()
if (listAssociationInfo.Count == 0) // If there are no items left in the list {
_CacheByPrimaryKey.Remove(AssociationID.ToString()); // remove the list if (_Disposed) return;
} _CountDisposed++;
public virtual Association Get() _Disposed = true;
{ RemoveFromCache(this);
return _Editable = Association.Get(_AssociationID); if (!_CacheByPrimaryKey.ContainsKey(AssociationID.ToString())) return;
} List<AssociationInfo> listAssociationInfo = _CacheByPrimaryKey[AssociationID.ToString()]; // Get the list of items
public static void Refresh(Association tmp) while (listAssociationInfo.Contains(this)) listAssociationInfo.Remove(this); // Remove the item from the list
{ if (listAssociationInfo.Count == 0) // If there are no items left in the list
string key = tmp.AssociationID.ToString(); _CacheByPrimaryKey.Remove(AssociationID.ToString()); // remove the list
ConvertListToDictionary(); }
if (_CacheByPrimaryKey.ContainsKey(key)) public virtual Association Get()
foreach (AssociationInfo tmpInfo in _CacheByPrimaryKey[key]) {
tmpInfo.RefreshFields(tmp); return _Editable = Association.Get(_AssociationID);
} }
protected virtual void RefreshFields(Association tmp) public static void Refresh(Association tmp)
{ {
if (_VersionID != tmp.VersionID) string key = tmp.AssociationID.ToString();
{ ConvertListToDictionary();
if (MyDocVersion != null) MyDocVersion.RefreshDocVersionAssociations(); // Update List for old value if (_CacheByPrimaryKey.ContainsKey(key))
_VersionID = tmp.VersionID; // Update the value foreach (AssociationInfo tmpInfo in _CacheByPrimaryKey[key])
} tmpInfo.RefreshFields(tmp);
_MyDocVersion = null; // Reset list so that the next line gets a new list }
if (MyDocVersion != null) MyDocVersion.RefreshDocVersionAssociations(); // Update List for new value protected virtual void RefreshFields(Association tmp)
if (_ROFstID != tmp.ROFstID) {
{ if (_VersionID != tmp.VersionID)
if (MyROFst != null) MyROFst.RefreshROFstAssociations(); // Update List for old value {
_ROFstID = tmp.ROFstID; // Update the value if (MyDocVersion != null) MyDocVersion.RefreshDocVersionAssociations(); // Update List for old value
} _VersionID = tmp.VersionID; // Update the value
_MyROFst = null; // Reset list so that the next line gets a new list }
if (MyROFst != null) MyROFst.RefreshROFstAssociations(); // Update List for new value _MyDocVersion = null; // Reset list so that the next line gets a new list
_Config = tmp.Config; if (MyDocVersion != null) MyDocVersion.RefreshDocVersionAssociations(); // Update List for new value
_DTS = tmp.DTS; if (_ROFstID != tmp.ROFstID)
_UserID = tmp.UserID; {
_AssociationInfoExtension.Refresh(this); if (MyROFst != null) MyROFst.RefreshROFstAssociations(); // Update List for old value
OnChange();// raise an event _ROFstID = tmp.ROFstID; // Update the value
} }
public static void Refresh(DocVersionAssociation tmp) _MyROFst = null; // Reset list so that the next line gets a new list
{ if (MyROFst != null) MyROFst.RefreshROFstAssociations(); // Update List for new value
string key = tmp.AssociationID.ToString(); _Config = tmp.Config;
ConvertListToDictionary(); _DTS = tmp.DTS;
if (_CacheByPrimaryKey.ContainsKey(key)) _UserID = tmp.UserID;
foreach (AssociationInfo tmpInfo in _CacheByPrimaryKey[key]) _AssociationInfoExtension.Refresh(this);
tmpInfo.RefreshFields(tmp); OnChange();// raise an event
} }
protected virtual void RefreshFields(DocVersionAssociation tmp) public static void Refresh(DocVersionAssociation tmp)
{ {
if (_ROFstID != tmp.ROFstID) string key = tmp.AssociationID.ToString();
{ ConvertListToDictionary();
if (MyROFst != null) MyROFst.RefreshROFstAssociations(); // Update List for old value if (_CacheByPrimaryKey.ContainsKey(key))
_ROFstID = tmp.ROFstID; // Update the value foreach (AssociationInfo tmpInfo in _CacheByPrimaryKey[key])
} tmpInfo.RefreshFields(tmp);
_MyROFst = null; // Reset list so that the next line gets a new list }
if (MyROFst != null) MyROFst.RefreshROFstAssociations(); // Update List for new value protected virtual void RefreshFields(DocVersionAssociation tmp)
_Config = tmp.Config; {
_DTS = tmp.DTS; if (_ROFstID != tmp.ROFstID)
_UserID = tmp.UserID; {
_AssociationInfoExtension.Refresh(this); if (MyROFst != null) MyROFst.RefreshROFstAssociations(); // Update List for old value
OnChange();// raise an event _ROFstID = tmp.ROFstID; // Update the value
} }
public static void Refresh(ROFstAssociation tmp) _MyROFst = null; // Reset list so that the next line gets a new list
{ if (MyROFst != null) MyROFst.RefreshROFstAssociations(); // Update List for new value
string key = tmp.AssociationID.ToString(); _Config = tmp.Config;
ConvertListToDictionary(); _DTS = tmp.DTS;
if (_CacheByPrimaryKey.ContainsKey(key)) _UserID = tmp.UserID;
foreach (AssociationInfo tmpInfo in _CacheByPrimaryKey[key]) _AssociationInfoExtension.Refresh(this);
tmpInfo.RefreshFields(tmp); OnChange();// raise an event
} }
protected virtual void RefreshFields(ROFstAssociation tmp) public static void Refresh(ROFstAssociation tmp)
{ {
if (_VersionID != tmp.VersionID) string key = tmp.AssociationID.ToString();
{ ConvertListToDictionary();
if (MyDocVersion != null) MyDocVersion.RefreshDocVersionAssociations(); // Update List for old value if (_CacheByPrimaryKey.ContainsKey(key))
_VersionID = tmp.VersionID; // Update the value foreach (AssociationInfo tmpInfo in _CacheByPrimaryKey[key])
} tmpInfo.RefreshFields(tmp);
_MyDocVersion = null; // Reset list so that the next line gets a new list }
if (MyDocVersion != null) MyDocVersion.RefreshDocVersionAssociations(); // Update List for new value protected virtual void RefreshFields(ROFstAssociation tmp)
_Config = tmp.Config; {
_DTS = tmp.DTS; if (_VersionID != tmp.VersionID)
_UserID = tmp.UserID; {
_AssociationInfoExtension.Refresh(this); if (MyDocVersion != null) MyDocVersion.RefreshDocVersionAssociations(); // Update List for old value
OnChange();// raise an event _VersionID = tmp.VersionID; // Update the value
} }
public static AssociationInfo Get(int associationID) _MyDocVersion = null; // Reset list so that the next line gets a new list
{ if (MyDocVersion != null) MyDocVersion.RefreshDocVersionAssociations(); // Update List for new value
//if (!CanGetObject()) _Config = tmp.Config;
// throw new System.Security.SecurityException("User not authorized to view a Association"); _DTS = tmp.DTS;
try _UserID = tmp.UserID;
{ _AssociationInfoExtension.Refresh(this);
AssociationInfo tmp = GetCachedByPrimaryKey(associationID); OnChange();// raise an event
if (tmp == null) }
{ public static AssociationInfo Get(int associationID)
tmp = DataPortal.Fetch<AssociationInfo>(new PKCriteria(associationID)); {
AddToCache(tmp); //if (!CanGetObject())
} // throw new System.Security.SecurityException("User not authorized to view a Association");
if (tmp.ErrorMessage == "No Record Found") try
{ {
tmp.Dispose(); // Clean-up AssociationInfo AssociationInfo tmp = GetCachedByPrimaryKey(associationID);
tmp = null; if (tmp == null)
} {
return tmp; tmp = DataPortal.Fetch<AssociationInfo>(new PKCriteria(associationID));
} AddToCache(tmp);
catch (Exception ex) }
{ if (tmp.ErrorMessage == "No Record Found")
throw new DbCslaException("Error on AssociationInfo.Get", ex); {
} tmp.Dispose(); // Clean-up AssociationInfo
} tmp = null;
#endregion }
#region Data Access Portal return tmp;
internal AssociationInfo(SafeDataReader dr) }
{ catch (Exception ex)
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AssociationInfo.Constructor", GetHashCode()); {
try throw new DbCslaException("Error on AssociationInfo.Get", ex);
{ }
ReadData(dr); }
} #endregion
catch (Exception ex) #region Data Access Portal
{ internal AssociationInfo(SafeDataReader dr)
if (_MyLog.IsErrorEnabled) _MyLog.Error("AssociationInfo.Constructor", ex); {
throw new DbCslaException("AssociationInfo.Constructor", ex); if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AssociationInfo.Constructor", GetHashCode());
} try
} {
[Serializable()] ReadData(dr);
protected class PKCriteria }
{ catch (Exception ex)
private int _AssociationID; {
public int AssociationID if (_MyLog.IsErrorEnabled) _MyLog.Error("AssociationInfo.Constructor", ex);
{ get { return _AssociationID; } } throw new DbCslaException("AssociationInfo.Constructor", ex);
public PKCriteria(int associationID) }
{ }
_AssociationID = associationID; [Serializable()]
} protected class PKCriteria
} {
private void ReadData(SafeDataReader dr) private int _AssociationID;
{ public int AssociationID
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AssociationInfo.ReadData", GetHashCode()); { get { return _AssociationID; } }
try public PKCriteria(int associationID)
{ {
_AssociationID = dr.GetInt32("AssociationID"); _AssociationID = associationID;
_VersionID = dr.GetInt32("VersionID"); }
_ROFstID = dr.GetInt32("ROFstID"); }
_Config = dr.GetString("Config"); private void ReadData(SafeDataReader dr)
_DTS = dr.GetDateTime("DTS"); {
_UserID = dr.GetString("UserID"); if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AssociationInfo.ReadData", GetHashCode());
} try
catch (Exception ex) {
{ _AssociationID = dr.GetInt32("AssociationID");
if (_MyLog.IsErrorEnabled) _MyLog.Error("AssociationInfo.ReadData", ex); _VersionID = dr.GetInt32("VersionID");
_ErrorMessage = ex.Message; _ROFstID = dr.GetInt32("ROFstID");
throw new DbCslaException("AssociationInfo.ReadData", ex); _Config = dr.GetString("Config");
} _DTS = dr.GetDateTime("DTS");
} _UserID = dr.GetString("UserID");
private void DataPortal_Fetch(PKCriteria criteria) }
{ catch (Exception ex)
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AssociationInfo.DataPortal_Fetch", GetHashCode()); {
try if (_MyLog.IsErrorEnabled) _MyLog.Error("AssociationInfo.ReadData", ex);
{ _ErrorMessage = ex.Message;
using (SqlConnection cn = Database.VEPROMS_SqlConnection) throw new DbCslaException("AssociationInfo.ReadData", ex);
{ }
ApplicationContext.LocalContext["cn"] = cn; }
using (SqlCommand cm = cn.CreateCommand()) private void DataPortal_Fetch(PKCriteria criteria)
{ {
cm.CommandType = CommandType.StoredProcedure; if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AssociationInfo.DataPortal_Fetch", GetHashCode());
cm.CommandText = "getAssociation"; try
cm.Parameters.AddWithValue("@AssociationID", criteria.AssociationID); {
cm.CommandTimeout = Database.DefaultTimeout; using (SqlConnection cn = Database.VEPROMS_SqlConnection)
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) {
{ ApplicationContext.LocalContext["cn"] = cn;
if (!dr.Read()) using (SqlCommand cm = cn.CreateCommand())
{ {
_ErrorMessage = "No Record Found"; cm.CommandType = CommandType.StoredProcedure;
return; cm.CommandText = "getAssociation";
} cm.Parameters.AddWithValue("@AssociationID", criteria.AssociationID);
ReadData(dr); cm.CommandTimeout = Database.DefaultTimeout;
} using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
} {
// removing of item only needed for local data portal if (!dr.Read())
if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client) {
ApplicationContext.LocalContext.Remove("cn"); _ErrorMessage = "No Record Found";
} return;
} }
catch (Exception ex) ReadData(dr);
{ }
if (_MyLog.IsErrorEnabled) _MyLog.Error("AssociationInfo.DataPortal_Fetch", ex); }
_ErrorMessage = ex.Message; // removing of item only needed for local data portal
throw new DbCslaException("AssociationInfo.DataPortal_Fetch", ex); if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client)
} ApplicationContext.LocalContext.Remove("cn");
} }
#endregion }
// Standard Refresh catch (Exception ex)
#region extension {
AssociationInfoExtension _AssociationInfoExtension = new AssociationInfoExtension(); if (_MyLog.IsErrorEnabled) _MyLog.Error("AssociationInfo.DataPortal_Fetch", ex);
[Serializable()] _ErrorMessage = ex.Message;
partial class AssociationInfoExtension : extensionBase { } throw new DbCslaException("AssociationInfo.DataPortal_Fetch", ex);
[Serializable()] }
class extensionBase }
{ #endregion
// Default Refresh // Standard Refresh
public virtual void Refresh(AssociationInfo tmp) { } #region extension
} AssociationInfoExtension _AssociationInfoExtension = new AssociationInfoExtension();
#endregion [Serializable()]
} // Class partial class AssociationInfoExtension : extensionBase { }
#region Converter [Serializable()]
internal class AssociationInfoConverter : ExpandableObjectConverter class extensionBase
{ {
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) // Default Refresh
{ public virtual void Refresh(AssociationInfo tmp) { }
if (destType == typeof(string) && value is AssociationInfo) }
{ #endregion
// Return the ToString value } // Class
return ((AssociationInfo)value).ToString(); #region Converter
} internal class AssociationInfoConverter : ExpandableObjectConverter
return base.ConvertTo(context, culture, value, destType); {
} public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
} {
#endregion if (destType == typeof(string) && value is AssociationInfo)
{
// Return the ToString value
return ((AssociationInfo)value).ToString();
}
return base.ConvertTo(context, culture, value, destType);
}
}
#endregion
} // Namespace } // Namespace

File diff suppressed because it is too large Load Diff

View File

@@ -19,423 +19,431 @@ using System.ComponentModel;
using System.Collections.Generic; using System.Collections.Generic;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
public delegate void CheckInfoEvent(object sender); public delegate void CheckInfoEvent(object sender);
/// <summary> /// <summary>
/// CheckInfo Generated by MyGeneration using the CSLA Object Mapping template /// CheckInfo Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(CheckInfoConverter))] [TypeConverter(typeof(CheckInfoConverter))]
public partial class CheckInfo : ReadOnlyBase<CheckInfo>, IDisposable public partial class CheckInfo : ReadOnlyBase<CheckInfo>, IDisposable
{ {
public event CheckInfoEvent Changed; public event CheckInfoEvent Changed;
private void OnChange() private void OnChange()
{ {
if (Changed != null) Changed(this); if (Changed != null) Changed(this);
} }
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Collection #region Collection
private static List<CheckInfo> _CacheList = new List<CheckInfo>(); private static List<CheckInfo> _CacheList = new List<CheckInfo>();
protected static void AddToCache(CheckInfo checkInfo) protected static void AddToCache(CheckInfo checkInfo)
{ {
if (!_CacheList.Contains(checkInfo)) _CacheList.Add(checkInfo); // In AddToCache if (!_CacheList.Contains(checkInfo)) _CacheList.Add(checkInfo); // In AddToCache
} }
protected static void RemoveFromCache(CheckInfo checkInfo) protected static void RemoveFromCache(CheckInfo checkInfo)
{ {
while (_CacheList.Contains(checkInfo)) _CacheList.Remove(checkInfo); // In RemoveFromCache while (_CacheList.Contains(checkInfo)) _CacheList.Remove(checkInfo); // In RemoveFromCache
} }
private static Dictionary<string, List<CheckInfo>> _CacheByPrimaryKey = new Dictionary<string, List<CheckInfo>>(); private static Dictionary<string, List<CheckInfo>> _CacheByPrimaryKey = new Dictionary<string, List<CheckInfo>>();
private static void ConvertListToDictionary() private static void ConvertListToDictionary()
{ {
while (_CacheList.Count > 0) // Move CheckInfo(s) from temporary _CacheList to _CacheByPrimaryKey while (_CacheList.Count > 0) // Move CheckInfo(s) from temporary _CacheList to _CacheByPrimaryKey
{ {
CheckInfo tmp = _CacheList[0]; // Get the first CheckInfo CheckInfo tmp = _CacheList[0]; // Get the first CheckInfo
string pKey = tmp.CheckID.ToString(); string pKey = tmp.CheckID.ToString();
if (!_CacheByPrimaryKey.ContainsKey(pKey)) if (!_CacheByPrimaryKey.ContainsKey(pKey))
{ {
_CacheByPrimaryKey[pKey] = new List<CheckInfo>(); // Add new list for PrimaryKey _CacheByPrimaryKey[pKey] = new List<CheckInfo>(); // Add new list for PrimaryKey
} }
_CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list _CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list
_CacheList.RemoveAt(0); // Remove the first CheckInfo _CacheList.RemoveAt(0); // Remove the first CheckInfo
} }
} }
internal static void AddList(CheckInfoList lst) internal static void AddList(CheckInfoList lst)
{ {
foreach (CheckInfo item in lst) AddToCache(item); foreach (CheckInfo item in lst) AddToCache(item);
} }
protected static CheckInfo GetCachedByPrimaryKey(int checkID) protected static CheckInfo GetCachedByPrimaryKey(int checkID)
{ {
ConvertListToDictionary(); ConvertListToDictionary();
string key = checkID.ToString(); string key = checkID.ToString();
if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0]; if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0];
return null; return null;
} }
#endregion #endregion
#region Business Methods #region Business Methods
private string _ErrorMessage = string.Empty; private string _ErrorMessage = string.Empty;
public string ErrorMessage public string ErrorMessage
{ {
get { return _ErrorMessage; } get { return _ErrorMessage; }
} }
protected Check _Editable; protected Check _Editable;
private IVEHasBrokenRules HasBrokenRules private IVEHasBrokenRules HasBrokenRules
{ {
get get
{ {
IVEHasBrokenRules hasBrokenRules = null; IVEHasBrokenRules hasBrokenRules = null;
if (_Editable != null) if (_Editable != null)
hasBrokenRules = _Editable.HasBrokenRules; hasBrokenRules = _Editable.HasBrokenRules;
return hasBrokenRules; return hasBrokenRules;
} }
} }
private int _CheckID; private int _CheckID;
[System.ComponentModel.DataObjectField(true, true)] [System.ComponentModel.DataObjectField(true, true)]
public int CheckID public int CheckID
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
return _CheckID; CanReadProperty("CheckID", true);
} return _CheckID;
} }
private int _RevisionID; }
public int RevisionID private int _RevisionID;
{ public int RevisionID
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
if (_MyRevision != null) _RevisionID = _MyRevision.RevisionID; {
return _RevisionID; CanReadProperty("RevisionID", true);
} if (_MyRevision != null) _RevisionID = _MyRevision.RevisionID;
} return _RevisionID;
private RevisionInfo _MyRevision; }
public RevisionInfo MyRevision }
{ private RevisionInfo _MyRevision;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] public RevisionInfo MyRevision
get {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
if (_MyRevision == null && _RevisionID != 0) _MyRevision = RevisionInfo.Get(_RevisionID); get
return _MyRevision; {
} CanReadProperty("MyRevision", true);
} if (_MyRevision == null && _RevisionID != 0) _MyRevision = RevisionInfo.Get(_RevisionID);
private int _StageID; return _MyRevision;
public int StageID }
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] private int _StageID;
get public int StageID
{ {
if (_MyStage != null) _StageID = _MyStage.StageID; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
return _StageID; get
} {
} CanReadProperty("StageID", true);
private StageInfo _MyStage; if (_MyStage != null) _StageID = _MyStage.StageID;
public StageInfo MyStage return _StageID;
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get private StageInfo _MyStage;
{ public StageInfo MyStage
if (_MyStage == null && _StageID != 0) _MyStage = StageInfo.GetJustStage(_StageID); {
return _MyStage; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
} {
private string _ConsistencyChecks = string.Empty; CanReadProperty("MyStage", true);
public string ConsistencyChecks if (_MyStage == null && _StageID != 0) _MyStage = StageInfo.GetJustStage(_StageID);
{ return _MyStage;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get }
{ private string _ConsistencyChecks = string.Empty;
return _ConsistencyChecks; public string ConsistencyChecks
} {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
private DateTime _DTS = new DateTime(); get
public DateTime DTS {
{ CanReadProperty("ConsistencyChecks", true);
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] return _ConsistencyChecks;
get }
{ }
return _DTS; private DateTime _DTS = new DateTime();
} public DateTime DTS
} {
private string _UserID = string.Empty; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
public string UserID get
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] CanReadProperty("DTS", true);
get return _DTS;
{ }
return _UserID; }
} private string _UserID = string.Empty;
} public string UserID
// CSLATODO: Replace base CheckInfo.ToString function as necessary {
/// <summary> [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
/// Overrides Base ToString get
/// </summary> {
/// <returns>A string representation of current CheckInfo</returns> CanReadProperty("UserID", true);
//public override string ToString() return _UserID;
//{ }
// return base.ToString(); }
//} // CSLATODO: Replace base CheckInfo.ToString function as necessary
// CSLATODO: Check CheckInfo.GetIdValue to assure that the ID returned is unique /// <summary>
/// <summary> /// Overrides Base ToString
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality /// </summary>
/// </summary> /// <returns>A string representation of current CheckInfo</returns>
/// <returns>A Unique ID for the current CheckInfo</returns> //public override string ToString()
protected override object GetIdValue() //{
{ // return base.ToString();
return MyCheckInfoUnique; // Absolutely Unique ID //}
} // CSLATODO: Check CheckInfo.GetIdValue to assure that the ID returned is unique
#endregion /// <summary>
#region Factory Methods /// Overrides Base GetIdValue - Used internally by CSLA to determine equality
private static int _CheckInfoUnique = 0; /// </summary>
private static int CheckInfoUnique /// <returns>A Unique ID for the current CheckInfo</returns>
{ get { return ++_CheckInfoUnique; } } protected override object GetIdValue()
private int _MyCheckInfoUnique = CheckInfoUnique; {
public int MyCheckInfoUnique // Absolutely Unique ID - Info return MyCheckInfoUnique; // Absolutely Unique ID
{ get { return _MyCheckInfoUnique; } } }
protected CheckInfo() #endregion
{/* require use of factory methods */ #region Factory Methods
AddToCache(this); private static int _CheckInfoUnique = 0;
} private static int CheckInfoUnique
private bool _Disposed = false; { get { return ++_CheckInfoUnique; } }
private static int _CountCreated = 0; private int _MyCheckInfoUnique = CheckInfoUnique;
private static int _CountDisposed = 0; public int MyCheckInfoUnique // Absolutely Unique ID - Info
private static int _CountFinalized = 0; { get { return _MyCheckInfoUnique; } }
private static int IncrementCountCreated protected CheckInfo()
{ get { return ++_CountCreated; } } {/* require use of factory methods */
private int _CountWhenCreated = IncrementCountCreated; AddToCache(this);
public static int CountCreated }
{ get { return _CountCreated; } } private bool _Disposed = false;
public static int CountNotDisposed private static int _CountCreated = 0;
{ get { return _CountCreated - _CountDisposed; } } private static int _CountDisposed = 0;
public static int CountNotFinalized private static int _CountFinalized = 0;
{ get { return _CountCreated - _CountFinalized; } } private static int IncrementCountCreated
~CheckInfo() { get { return ++_CountCreated; } }
{ private int _CountWhenCreated = IncrementCountCreated;
_CountFinalized++; public static int CountCreated
} { get { return _CountCreated; } }
public void Dispose() public static int CountNotDisposed
{ { get { return _CountCreated - _CountDisposed; } }
if (_Disposed) return; public static int CountNotFinalized
_CountDisposed++; { get { return _CountCreated - _CountFinalized; } }
_Disposed = true; ~CheckInfo()
RemoveFromCache(this); {
if (!_CacheByPrimaryKey.ContainsKey(CheckID.ToString())) return; _CountFinalized++;
List<CheckInfo> listCheckInfo = _CacheByPrimaryKey[CheckID.ToString()]; // Get the list of items }
while (listCheckInfo.Contains(this)) listCheckInfo.Remove(this); // Remove the item from the list public void Dispose()
if (listCheckInfo.Count == 0) // If there are no items left in the list {
_CacheByPrimaryKey.Remove(CheckID.ToString()); // remove the list if (_Disposed) return;
} _CountDisposed++;
public virtual Check Get() _Disposed = true;
{ RemoveFromCache(this);
return _Editable = Check.Get(_CheckID); if (!_CacheByPrimaryKey.ContainsKey(CheckID.ToString())) return;
} List<CheckInfo> listCheckInfo = _CacheByPrimaryKey[CheckID.ToString()]; // Get the list of items
public static void Refresh(Check tmp) while (listCheckInfo.Contains(this)) listCheckInfo.Remove(this); // Remove the item from the list
{ if (listCheckInfo.Count == 0) // If there are no items left in the list
string key = tmp.CheckID.ToString(); _CacheByPrimaryKey.Remove(CheckID.ToString()); // remove the list
ConvertListToDictionary(); }
if (_CacheByPrimaryKey.ContainsKey(key)) public virtual Check Get()
foreach (CheckInfo tmpInfo in _CacheByPrimaryKey[key]) {
tmpInfo.RefreshFields(tmp); return _Editable = Check.Get(_CheckID);
} }
protected virtual void RefreshFields(Check tmp) public static void Refresh(Check tmp)
{ {
if (_RevisionID != tmp.RevisionID) string key = tmp.CheckID.ToString();
{ ConvertListToDictionary();
if (MyRevision != null) MyRevision.RefreshRevisionChecks(); // Update List for old value if (_CacheByPrimaryKey.ContainsKey(key))
_RevisionID = tmp.RevisionID; // Update the value foreach (CheckInfo tmpInfo in _CacheByPrimaryKey[key])
} tmpInfo.RefreshFields(tmp);
_MyRevision = null; // Reset list so that the next line gets a new list }
if (MyRevision != null) MyRevision.RefreshRevisionChecks(); // Update List for new value protected virtual void RefreshFields(Check tmp)
if (_StageID != tmp.StageID) {
{ if (_RevisionID != tmp.RevisionID)
if (MyStage != null) MyStage.RefreshStageChecks(); // Update List for old value {
_StageID = tmp.StageID; // Update the value if (MyRevision != null) MyRevision.RefreshRevisionChecks(); // Update List for old value
} _RevisionID = tmp.RevisionID; // Update the value
_MyStage = null; // Reset list so that the next line gets a new list }
if (MyStage != null) MyStage.RefreshStageChecks(); // Update List for new value _MyRevision = null; // Reset list so that the next line gets a new list
_ConsistencyChecks = tmp.ConsistencyChecks; if (MyRevision != null) MyRevision.RefreshRevisionChecks(); // Update List for new value
_DTS = tmp.DTS; if (_StageID != tmp.StageID)
_UserID = tmp.UserID; {
_CheckInfoExtension.Refresh(this); if (MyStage != null) MyStage.RefreshStageChecks(); // Update List for old value
OnChange();// raise an event _StageID = tmp.StageID; // Update the value
} }
public static void Refresh(RevisionCheck tmp) _MyStage = null; // Reset list so that the next line gets a new list
{ if (MyStage != null) MyStage.RefreshStageChecks(); // Update List for new value
string key = tmp.CheckID.ToString(); _ConsistencyChecks = tmp.ConsistencyChecks;
ConvertListToDictionary(); _DTS = tmp.DTS;
if (_CacheByPrimaryKey.ContainsKey(key)) _UserID = tmp.UserID;
foreach (CheckInfo tmpInfo in _CacheByPrimaryKey[key]) _CheckInfoExtension.Refresh(this);
tmpInfo.RefreshFields(tmp); OnChange();// raise an event
} }
protected virtual void RefreshFields(RevisionCheck tmp) public static void Refresh(RevisionCheck tmp)
{ {
if (_StageID != tmp.StageID) string key = tmp.CheckID.ToString();
{ ConvertListToDictionary();
if (MyStage != null) MyStage.RefreshStageChecks(); // Update List for old value if (_CacheByPrimaryKey.ContainsKey(key))
_StageID = tmp.StageID; // Update the value foreach (CheckInfo tmpInfo in _CacheByPrimaryKey[key])
} tmpInfo.RefreshFields(tmp);
_MyStage = null; // Reset list so that the next line gets a new list }
if (MyStage != null) MyStage.RefreshStageChecks(); // Update List for new value protected virtual void RefreshFields(RevisionCheck tmp)
_ConsistencyChecks = tmp.ConsistencyChecks; {
_DTS = tmp.DTS; if (_StageID != tmp.StageID)
_UserID = tmp.UserID; {
_CheckInfoExtension.Refresh(this); if (MyStage != null) MyStage.RefreshStageChecks(); // Update List for old value
OnChange();// raise an event _StageID = tmp.StageID; // Update the value
} }
public static void Refresh(StageCheck tmp) _MyStage = null; // Reset list so that the next line gets a new list
{ if (MyStage != null) MyStage.RefreshStageChecks(); // Update List for new value
string key = tmp.CheckID.ToString(); _ConsistencyChecks = tmp.ConsistencyChecks;
ConvertListToDictionary(); _DTS = tmp.DTS;
if (_CacheByPrimaryKey.ContainsKey(key)) _UserID = tmp.UserID;
foreach (CheckInfo tmpInfo in _CacheByPrimaryKey[key]) _CheckInfoExtension.Refresh(this);
tmpInfo.RefreshFields(tmp); OnChange();// raise an event
} }
protected virtual void RefreshFields(StageCheck tmp) public static void Refresh(StageCheck tmp)
{ {
if (_RevisionID != tmp.RevisionID) string key = tmp.CheckID.ToString();
{ ConvertListToDictionary();
if (MyRevision != null) MyRevision.RefreshRevisionChecks(); // Update List for old value if (_CacheByPrimaryKey.ContainsKey(key))
_RevisionID = tmp.RevisionID; // Update the value foreach (CheckInfo tmpInfo in _CacheByPrimaryKey[key])
} tmpInfo.RefreshFields(tmp);
_MyRevision = null; // Reset list so that the next line gets a new list }
if (MyRevision != null) MyRevision.RefreshRevisionChecks(); // Update List for new value protected virtual void RefreshFields(StageCheck tmp)
_ConsistencyChecks = tmp.ConsistencyChecks; {
_DTS = tmp.DTS; if (_RevisionID != tmp.RevisionID)
_UserID = tmp.UserID; {
_CheckInfoExtension.Refresh(this); if (MyRevision != null) MyRevision.RefreshRevisionChecks(); // Update List for old value
OnChange();// raise an event _RevisionID = tmp.RevisionID; // Update the value
} }
public static CheckInfo Get(int checkID) _MyRevision = null; // Reset list so that the next line gets a new list
{ if (MyRevision != null) MyRevision.RefreshRevisionChecks(); // Update List for new value
//if (!CanGetObject()) _ConsistencyChecks = tmp.ConsistencyChecks;
// throw new System.Security.SecurityException("User not authorized to view a Check"); _DTS = tmp.DTS;
try _UserID = tmp.UserID;
{ _CheckInfoExtension.Refresh(this);
CheckInfo tmp = GetCachedByPrimaryKey(checkID); OnChange();// raise an event
if (tmp == null) }
{ public static CheckInfo Get(int checkID)
tmp = DataPortal.Fetch<CheckInfo>(new PKCriteria(checkID)); {
AddToCache(tmp); //if (!CanGetObject())
} // throw new System.Security.SecurityException("User not authorized to view a Check");
if (tmp.ErrorMessage == "No Record Found") try
{ {
tmp.Dispose(); // Clean-up CheckInfo CheckInfo tmp = GetCachedByPrimaryKey(checkID);
tmp = null; if (tmp == null)
} {
return tmp; tmp = DataPortal.Fetch<CheckInfo>(new PKCriteria(checkID));
} AddToCache(tmp);
catch (Exception ex) }
{ if (tmp.ErrorMessage == "No Record Found")
throw new DbCslaException("Error on CheckInfo.Get", ex); {
} tmp.Dispose(); // Clean-up CheckInfo
} tmp = null;
#endregion }
#region Data Access Portal return tmp;
internal CheckInfo(SafeDataReader dr) }
{ catch (Exception ex)
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] CheckInfo.Constructor", GetHashCode()); {
try throw new DbCslaException("Error on CheckInfo.Get", ex);
{ }
ReadData(dr); }
} #endregion
catch (Exception ex) #region Data Access Portal
{ internal CheckInfo(SafeDataReader dr)
if (_MyLog.IsErrorEnabled) _MyLog.Error("CheckInfo.Constructor", ex); {
throw new DbCslaException("CheckInfo.Constructor", ex); if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] CheckInfo.Constructor", GetHashCode());
} try
} {
[Serializable()] ReadData(dr);
protected class PKCriteria }
{ catch (Exception ex)
private int _CheckID; {
public int CheckID if (_MyLog.IsErrorEnabled) _MyLog.Error("CheckInfo.Constructor", ex);
{ get { return _CheckID; } } throw new DbCslaException("CheckInfo.Constructor", ex);
public PKCriteria(int checkID) }
{ }
_CheckID = checkID; [Serializable()]
} protected class PKCriteria
} {
private void ReadData(SafeDataReader dr) private int _CheckID;
{ public int CheckID
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] CheckInfo.ReadData", GetHashCode()); { get { return _CheckID; } }
try public PKCriteria(int checkID)
{ {
_CheckID = dr.GetInt32("CheckID"); _CheckID = checkID;
_RevisionID = dr.GetInt32("RevisionID"); }
_StageID = dr.GetInt32("StageID"); }
_ConsistencyChecks = dr.GetString("ConsistencyChecks"); private void ReadData(SafeDataReader dr)
_DTS = dr.GetDateTime("DTS"); {
_UserID = dr.GetString("UserID"); if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] CheckInfo.ReadData", GetHashCode());
} try
catch (Exception ex) {
{ _CheckID = dr.GetInt32("CheckID");
if (_MyLog.IsErrorEnabled) _MyLog.Error("CheckInfo.ReadData", ex); _RevisionID = dr.GetInt32("RevisionID");
_ErrorMessage = ex.Message; _StageID = dr.GetInt32("StageID");
throw new DbCslaException("CheckInfo.ReadData", ex); _ConsistencyChecks = dr.GetString("ConsistencyChecks");
} _DTS = dr.GetDateTime("DTS");
} _UserID = dr.GetString("UserID");
private void DataPortal_Fetch(PKCriteria criteria) }
{ catch (Exception ex)
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] CheckInfo.DataPortal_Fetch", GetHashCode()); {
try if (_MyLog.IsErrorEnabled) _MyLog.Error("CheckInfo.ReadData", ex);
{ _ErrorMessage = ex.Message;
using (SqlConnection cn = Database.VEPROMS_SqlConnection) throw new DbCslaException("CheckInfo.ReadData", ex);
{ }
ApplicationContext.LocalContext["cn"] = cn; }
using (SqlCommand cm = cn.CreateCommand()) private void DataPortal_Fetch(PKCriteria criteria)
{ {
cm.CommandType = CommandType.StoredProcedure; if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] CheckInfo.DataPortal_Fetch", GetHashCode());
cm.CommandText = "getCheck"; try
cm.Parameters.AddWithValue("@CheckID", criteria.CheckID); {
cm.CommandTimeout = Database.DefaultTimeout; using (SqlConnection cn = Database.VEPROMS_SqlConnection)
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) {
{ ApplicationContext.LocalContext["cn"] = cn;
if (!dr.Read()) using (SqlCommand cm = cn.CreateCommand())
{ {
_ErrorMessage = "No Record Found"; cm.CommandType = CommandType.StoredProcedure;
return; cm.CommandText = "getCheck";
} cm.Parameters.AddWithValue("@CheckID", criteria.CheckID);
ReadData(dr); cm.CommandTimeout = Database.DefaultTimeout;
} using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
} {
// removing of item only needed for local data portal if (!dr.Read())
if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client) {
ApplicationContext.LocalContext.Remove("cn"); _ErrorMessage = "No Record Found";
} return;
} }
catch (Exception ex) ReadData(dr);
{ }
if (_MyLog.IsErrorEnabled) _MyLog.Error("CheckInfo.DataPortal_Fetch", ex); }
_ErrorMessage = ex.Message; // removing of item only needed for local data portal
throw new DbCslaException("CheckInfo.DataPortal_Fetch", ex); if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client)
} ApplicationContext.LocalContext.Remove("cn");
} }
#endregion }
// Standard Refresh catch (Exception ex)
#region extension {
CheckInfoExtension _CheckInfoExtension = new CheckInfoExtension(); if (_MyLog.IsErrorEnabled) _MyLog.Error("CheckInfo.DataPortal_Fetch", ex);
[Serializable()] _ErrorMessage = ex.Message;
partial class CheckInfoExtension : extensionBase { } throw new DbCslaException("CheckInfo.DataPortal_Fetch", ex);
[Serializable()] }
class extensionBase }
{ #endregion
// Default Refresh // Standard Refresh
public virtual void Refresh(CheckInfo tmp) { } #region extension
} CheckInfoExtension _CheckInfoExtension = new CheckInfoExtension();
#endregion [Serializable()]
} // Class partial class CheckInfoExtension : extensionBase { }
#region Converter [Serializable()]
internal class CheckInfoConverter : ExpandableObjectConverter class extensionBase
{ {
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) // Default Refresh
{ public virtual void Refresh(CheckInfo tmp) { }
if (destType == typeof(string) && value is CheckInfo) }
{ #endregion
// Return the ToString value } // Class
return ((CheckInfo)value).ToString(); #region Converter
} internal class CheckInfoConverter : ExpandableObjectConverter
return base.ConvertTo(context, culture, value, destType); {
} public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
} {
#endregion if (destType == typeof(string) && value is CheckInfo)
{
// Return the ToString value
return ((CheckInfo)value).ToString();
}
return base.ConvertTo(context, culture, value, destType);
}
}
#endregion
} // Namespace } // Namespace

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -19,405 +19,415 @@ using System.ComponentModel;
using System.Collections.Generic; using System.Collections.Generic;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
public delegate void ConnectionInfoEvent(object sender); public delegate void ConnectionInfoEvent(object sender);
/// <summary> /// <summary>
/// ConnectionInfo Generated by MyGeneration using the CSLA Object Mapping template /// ConnectionInfo Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ConnectionInfoConverter))] [TypeConverter(typeof(ConnectionInfoConverter))]
public partial class ConnectionInfo : ReadOnlyBase<ConnectionInfo>, IDisposable public partial class ConnectionInfo : ReadOnlyBase<ConnectionInfo>, IDisposable
{ {
public event ConnectionInfoEvent Changed; public event ConnectionInfoEvent Changed;
private void OnChange() private void OnChange()
{ {
if (Changed != null) Changed(this); if (Changed != null) Changed(this);
} }
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Collection #region Collection
private static List<ConnectionInfo> _CacheList = new List<ConnectionInfo>(); private static List<ConnectionInfo> _CacheList = new List<ConnectionInfo>();
protected static void AddToCache(ConnectionInfo connectionInfo) protected static void AddToCache(ConnectionInfo connectionInfo)
{ {
if (!_CacheList.Contains(connectionInfo)) _CacheList.Add(connectionInfo); // In AddToCache if (!_CacheList.Contains(connectionInfo)) _CacheList.Add(connectionInfo); // In AddToCache
} }
protected static void RemoveFromCache(ConnectionInfo connectionInfo) protected static void RemoveFromCache(ConnectionInfo connectionInfo)
{ {
while (_CacheList.Contains(connectionInfo)) _CacheList.Remove(connectionInfo); // In RemoveFromCache while (_CacheList.Contains(connectionInfo)) _CacheList.Remove(connectionInfo); // In RemoveFromCache
} }
private static Dictionary<string, List<ConnectionInfo>> _CacheByPrimaryKey = new Dictionary<string, List<ConnectionInfo>>(); private static Dictionary<string, List<ConnectionInfo>> _CacheByPrimaryKey = new Dictionary<string, List<ConnectionInfo>>();
private static void ConvertListToDictionary() private static void ConvertListToDictionary()
{ {
while (_CacheList.Count > 0) // Move ConnectionInfo(s) from temporary _CacheList to _CacheByPrimaryKey while (_CacheList.Count > 0) // Move ConnectionInfo(s) from temporary _CacheList to _CacheByPrimaryKey
{ {
ConnectionInfo tmp = _CacheList[0]; // Get the first ConnectionInfo ConnectionInfo tmp = _CacheList[0]; // Get the first ConnectionInfo
string pKey = tmp.DBID.ToString(); string pKey = tmp.DBID.ToString();
if (!_CacheByPrimaryKey.ContainsKey(pKey)) if (!_CacheByPrimaryKey.ContainsKey(pKey))
{ {
_CacheByPrimaryKey[pKey] = new List<ConnectionInfo>(); // Add new list for PrimaryKey _CacheByPrimaryKey[pKey] = new List<ConnectionInfo>(); // Add new list for PrimaryKey
} }
_CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list _CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list
_CacheList.RemoveAt(0); // Remove the first ConnectionInfo _CacheList.RemoveAt(0); // Remove the first ConnectionInfo
} }
} }
internal static void AddList(ConnectionInfoList lst) internal static void AddList(ConnectionInfoList lst)
{ {
foreach (ConnectionInfo item in lst) AddToCache(item); foreach (ConnectionInfo item in lst) AddToCache(item);
} }
protected static ConnectionInfo GetCachedByPrimaryKey(int dbid) protected static ConnectionInfo GetCachedByPrimaryKey(int dbid)
{ {
ConvertListToDictionary(); ConvertListToDictionary();
string key = dbid.ToString(); string key = dbid.ToString();
if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0]; if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0];
return null; return null;
} }
#endregion #endregion
#region Business Methods #region Business Methods
private string _ErrorMessage = string.Empty; private string _ErrorMessage = string.Empty;
public string ErrorMessage public string ErrorMessage
{ {
get { return _ErrorMessage; } get { return _ErrorMessage; }
} }
protected Connection _Editable; protected Connection _Editable;
private IVEHasBrokenRules HasBrokenRules private IVEHasBrokenRules HasBrokenRules
{ {
get get
{ {
IVEHasBrokenRules hasBrokenRules = null; IVEHasBrokenRules hasBrokenRules = null;
if (_Editable != null) if (_Editable != null)
hasBrokenRules = _Editable.HasBrokenRules; hasBrokenRules = _Editable.HasBrokenRules;
return hasBrokenRules; return hasBrokenRules;
} }
} }
private int _DBID; private int _DBID;
[System.ComponentModel.DataObjectField(true, true)] [System.ComponentModel.DataObjectField(true, true)]
public int DBID public int DBID
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
return _DBID; CanReadProperty("DBID", true);
} return _DBID;
} }
private string _Name = string.Empty; }
public string Name private string _Name = string.Empty;
{ public string Name
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
return _Name; {
} CanReadProperty("Name", true);
} return _Name;
private string _Title = string.Empty; }
public string Title }
{ private string _Title = string.Empty;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] public string Title
get {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
return _Title; get
} {
} CanReadProperty("Title", true);
private string _ConnectionString = string.Empty; return _Title;
public string ConnectionString }
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] private string _ConnectionString = string.Empty;
get public string ConnectionString
{ {
return _ConnectionString; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
} {
private int _ServerType; CanReadProperty("ConnectionString", true);
/// <summary> return _ConnectionString;
/// 0 SQL Server }
/// </summary> }
public int ServerType private int _ServerType;
{ /// <summary>
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] /// 0 SQL Server
get /// </summary>
{ public int ServerType
return _ServerType; {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
private string _Config = string.Empty; {
public string Config CanReadProperty("ServerType", true);
{ return _ServerType;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get }
{ private string _Config = string.Empty;
return _Config; public string Config
} {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
private DateTime _DTS = new DateTime(); get
public DateTime DTS {
{ CanReadProperty("Config", true);
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] return _Config;
get }
{ }
return _DTS; private DateTime _DTS = new DateTime();
} public DateTime DTS
} {
private string _UsrID = string.Empty; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
public string UsrID get
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] CanReadProperty("DTS", true);
get return _DTS;
{ }
return _UsrID; }
} private string _UsrID = string.Empty;
} public string UsrID
private int _ConnectionFolderCount = 0; {
/// <summary> [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
/// Count of ConnectionFolders for this Connection get
/// </summary> {
public int ConnectionFolderCount CanReadProperty("UsrID", true);
{ return _UsrID;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get }
{ private int _ConnectionFolderCount = 0;
if (_ConnectionFolderCount < 0) /// <summary>
_ConnectionFolderCount = ConnectionFolders.Count; /// Count of ConnectionFolders for this Connection
return _ConnectionFolderCount; /// </summary>
} public int ConnectionFolderCount
} {
private FolderInfoList _ConnectionFolders = null; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[TypeConverter(typeof(FolderInfoListConverter))] get
public FolderInfoList ConnectionFolders {
{ CanReadProperty("ConnectionFolderCount", true);
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] if (_ConnectionFolderCount < 0)
get _ConnectionFolderCount = ConnectionFolders.Count;
{ return _ConnectionFolderCount;
if (_ConnectionFolderCount < 0 || (_ConnectionFolderCount > 0 && _ConnectionFolders == null)) }
_ConnectionFolders = FolderInfoList.GetByDBID(_DBID); }
if (_ConnectionFolderCount < 0) private FolderInfoList _ConnectionFolders = null;
_ConnectionFolderCount = _ConnectionFolders.Count; [TypeConverter(typeof(FolderInfoListConverter))]
return _ConnectionFolders; public FolderInfoList ConnectionFolders
} {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
public void RefreshConnectionFolders() get
{ {
_ConnectionFolderCount = -1; CanReadProperty("ConnectionFolders", true);
ConvertListToDictionary(); if (_ConnectionFolderCount < 0 || (_ConnectionFolderCount > 0 && _ConnectionFolders == null))
if (_CacheByPrimaryKey.ContainsKey(_DBID.ToString())) _ConnectionFolders = FolderInfoList.GetByDBID(_DBID);
foreach (ConnectionInfo tmp in _CacheByPrimaryKey[_DBID.ToString()]) if (_ConnectionFolderCount < 0)
tmp._ConnectionFolderCount = -1; // This will cause the data to be requeried _ConnectionFolderCount = _ConnectionFolders.Count;
} return _ConnectionFolders;
// CSLATODO: Replace base ConnectionInfo.ToString function as necessary }
/// <summary> }
/// Overrides Base ToString public void RefreshConnectionFolders()
/// </summary> {
/// <returns>A string representation of current ConnectionInfo</returns> _ConnectionFolderCount = -1;
//public override string ToString() ConvertListToDictionary();
//{ if (_CacheByPrimaryKey.ContainsKey(_DBID.ToString()))
// return base.ToString(); foreach (ConnectionInfo tmp in _CacheByPrimaryKey[_DBID.ToString()])
//} tmp._ConnectionFolderCount = -1; // This will cause the data to be requeried
// CSLATODO: Check ConnectionInfo.GetIdValue to assure that the ID returned is unique }
/// <summary> // CSLATODO: Replace base ConnectionInfo.ToString function as necessary
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality /// <summary>
/// </summary> /// Overrides Base ToString
/// <returns>A Unique ID for the current ConnectionInfo</returns> /// </summary>
protected override object GetIdValue() /// <returns>A string representation of current ConnectionInfo</returns>
{ //public override string ToString()
return MyConnectionInfoUnique; // Absolutely Unique ID //{
} // return base.ToString();
#endregion //}
#region Factory Methods // CSLATODO: Check ConnectionInfo.GetIdValue to assure that the ID returned is unique
private static int _ConnectionInfoUnique = 0; /// <summary>
private static int ConnectionInfoUnique /// Overrides Base GetIdValue - Used internally by CSLA to determine equality
{ get { return ++_ConnectionInfoUnique; } } /// </summary>
private int _MyConnectionInfoUnique = ConnectionInfoUnique; /// <returns>A Unique ID for the current ConnectionInfo</returns>
public int MyConnectionInfoUnique // Absolutely Unique ID - Info protected override object GetIdValue()
{ get { return _MyConnectionInfoUnique; } } {
protected ConnectionInfo() return MyConnectionInfoUnique; // Absolutely Unique ID
{/* require use of factory methods */ }
AddToCache(this); #endregion
} #region Factory Methods
private bool _Disposed = false; private static int _ConnectionInfoUnique = 0;
private static int _CountCreated = 0; private static int ConnectionInfoUnique
private static int _CountDisposed = 0; { get { return ++_ConnectionInfoUnique; } }
private static int _CountFinalized = 0; private int _MyConnectionInfoUnique = ConnectionInfoUnique;
private static int IncrementCountCreated public int MyConnectionInfoUnique // Absolutely Unique ID - Info
{ get { return ++_CountCreated; } } { get { return _MyConnectionInfoUnique; } }
private int _CountWhenCreated = IncrementCountCreated; protected ConnectionInfo()
public static int CountCreated {/* require use of factory methods */
{ get { return _CountCreated; } } AddToCache(this);
public static int CountNotDisposed }
{ get { return _CountCreated - _CountDisposed; } } private bool _Disposed = false;
public static int CountNotFinalized private static int _CountCreated = 0;
{ get { return _CountCreated - _CountFinalized; } } private static int _CountDisposed = 0;
~ConnectionInfo() private static int _CountFinalized = 0;
{ private static int IncrementCountCreated
_CountFinalized++; { get { return ++_CountCreated; } }
} private int _CountWhenCreated = IncrementCountCreated;
public void Dispose() public static int CountCreated
{ { get { return _CountCreated; } }
if (_Disposed) return; public static int CountNotDisposed
_CountDisposed++; { get { return _CountCreated - _CountDisposed; } }
_Disposed = true; public static int CountNotFinalized
RemoveFromCache(this); { get { return _CountCreated - _CountFinalized; } }
if (!_CacheByPrimaryKey.ContainsKey(DBID.ToString())) return; ~ConnectionInfo()
List<ConnectionInfo> listConnectionInfo = _CacheByPrimaryKey[DBID.ToString()]; // Get the list of items {
while (listConnectionInfo.Contains(this)) listConnectionInfo.Remove(this); // Remove the item from the list _CountFinalized++;
if (listConnectionInfo.Count == 0) // If there are no items left in the list }
_CacheByPrimaryKey.Remove(DBID.ToString()); // remove the list public void Dispose()
} {
public virtual Connection Get() if (_Disposed) return;
{ _CountDisposed++;
return _Editable = Connection.Get(_DBID); _Disposed = true;
} RemoveFromCache(this);
public static void Refresh(Connection tmp) if (!_CacheByPrimaryKey.ContainsKey(DBID.ToString())) return;
{ List<ConnectionInfo> listConnectionInfo = _CacheByPrimaryKey[DBID.ToString()]; // Get the list of items
string key = tmp.DBID.ToString(); while (listConnectionInfo.Contains(this)) listConnectionInfo.Remove(this); // Remove the item from the list
ConvertListToDictionary(); if (listConnectionInfo.Count == 0) // If there are no items left in the list
if (_CacheByPrimaryKey.ContainsKey(key)) _CacheByPrimaryKey.Remove(DBID.ToString()); // remove the list
foreach (ConnectionInfo tmpInfo in _CacheByPrimaryKey[key]) }
tmpInfo.RefreshFields(tmp); public virtual Connection Get()
} {
protected virtual void RefreshFields(Connection tmp) return _Editable = Connection.Get(_DBID);
{ }
_Name = tmp.Name; public static void Refresh(Connection tmp)
_Title = tmp.Title; {
_ConnectionString = tmp.ConnectionString; string key = tmp.DBID.ToString();
_ServerType = tmp.ServerType; ConvertListToDictionary();
_Config = tmp.Config; if (_CacheByPrimaryKey.ContainsKey(key))
_DTS = tmp.DTS; foreach (ConnectionInfo tmpInfo in _CacheByPrimaryKey[key])
_UsrID = tmp.UsrID; tmpInfo.RefreshFields(tmp);
_ConnectionInfoExtension.Refresh(this); }
OnChange();// raise an event protected virtual void RefreshFields(Connection tmp)
} {
public static ConnectionInfo Get(int dbid) _Name = tmp.Name;
{ _Title = tmp.Title;
//if (!CanGetObject()) _ConnectionString = tmp.ConnectionString;
// throw new System.Security.SecurityException("User not authorized to view a Connection"); _ServerType = tmp.ServerType;
try _Config = tmp.Config;
{ _DTS = tmp.DTS;
ConnectionInfo tmp = GetCachedByPrimaryKey(dbid); _UsrID = tmp.UsrID;
if (tmp == null) _ConnectionInfoExtension.Refresh(this);
{ OnChange();// raise an event
tmp = DataPortal.Fetch<ConnectionInfo>(new PKCriteria(dbid)); }
AddToCache(tmp); public static ConnectionInfo Get(int dbid)
} {
if (tmp.ErrorMessage == "No Record Found") //if (!CanGetObject())
{ // throw new System.Security.SecurityException("User not authorized to view a Connection");
tmp.Dispose(); // Clean-up ConnectionInfo try
tmp = null; {
} ConnectionInfo tmp = GetCachedByPrimaryKey(dbid);
return tmp; if (tmp == null)
} {
catch (Exception ex) tmp = DataPortal.Fetch<ConnectionInfo>(new PKCriteria(dbid));
{ AddToCache(tmp);
throw new DbCslaException("Error on ConnectionInfo.Get", ex); }
} if (tmp.ErrorMessage == "No Record Found")
} {
#endregion tmp.Dispose(); // Clean-up ConnectionInfo
#region Data Access Portal tmp = null;
internal ConnectionInfo(SafeDataReader dr) }
{ return tmp;
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ConnectionInfo.Constructor", GetHashCode()); }
try catch (Exception ex)
{ {
ReadData(dr); throw new DbCslaException("Error on ConnectionInfo.Get", ex);
} }
catch (Exception ex) }
{ #endregion
if (_MyLog.IsErrorEnabled) _MyLog.Error("ConnectionInfo.Constructor", ex); #region Data Access Portal
throw new DbCslaException("ConnectionInfo.Constructor", ex); internal ConnectionInfo(SafeDataReader dr)
} {
} if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ConnectionInfo.Constructor", GetHashCode());
[Serializable()] try
protected class PKCriteria {
{ ReadData(dr);
private int _DBID; }
public int DBID catch (Exception ex)
{ get { return _DBID; } } {
public PKCriteria(int dbid) if (_MyLog.IsErrorEnabled) _MyLog.Error("ConnectionInfo.Constructor", ex);
{ throw new DbCslaException("ConnectionInfo.Constructor", ex);
_DBID = dbid; }
} }
} [Serializable()]
private void ReadData(SafeDataReader dr) protected class PKCriteria
{ {
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ConnectionInfo.ReadData", GetHashCode()); private int _DBID;
try public int DBID
{ { get { return _DBID; } }
_DBID = dr.GetInt32("DBID"); public PKCriteria(int dbid)
_Name = dr.GetString("Name"); {
_Title = dr.GetString("Title"); _DBID = dbid;
_ConnectionString = dr.GetString("ConnectionString"); }
_ServerType = dr.GetInt32("ServerType"); }
_Config = dr.GetString("Config"); private void ReadData(SafeDataReader dr)
_DTS = dr.GetDateTime("DTS"); {
_UsrID = dr.GetString("UsrID"); if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ConnectionInfo.ReadData", GetHashCode());
_ConnectionFolderCount = dr.GetInt32("FolderCount"); try
} {
catch (Exception ex) _DBID = dr.GetInt32("DBID");
{ _Name = dr.GetString("Name");
if (_MyLog.IsErrorEnabled) _MyLog.Error("ConnectionInfo.ReadData", ex); _Title = dr.GetString("Title");
_ErrorMessage = ex.Message; _ConnectionString = dr.GetString("ConnectionString");
throw new DbCslaException("ConnectionInfo.ReadData", ex); _ServerType = dr.GetInt32("ServerType");
} _Config = dr.GetString("Config");
} _DTS = dr.GetDateTime("DTS");
private void DataPortal_Fetch(PKCriteria criteria) _UsrID = dr.GetString("UsrID");
{ _ConnectionFolderCount = dr.GetInt32("FolderCount");
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ConnectionInfo.DataPortal_Fetch", GetHashCode()); }
try catch (Exception ex)
{ {
using (SqlConnection cn = Database.VEPROMS_SqlConnection) if (_MyLog.IsErrorEnabled) _MyLog.Error("ConnectionInfo.ReadData", ex);
{ _ErrorMessage = ex.Message;
ApplicationContext.LocalContext["cn"] = cn; throw new DbCslaException("ConnectionInfo.ReadData", ex);
using (SqlCommand cm = cn.CreateCommand()) }
{ }
cm.CommandType = CommandType.StoredProcedure; private void DataPortal_Fetch(PKCriteria criteria)
cm.CommandText = "getConnection"; {
cm.Parameters.AddWithValue("@DBID", criteria.DBID); if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ConnectionInfo.DataPortal_Fetch", GetHashCode());
cm.CommandTimeout = Database.DefaultTimeout; try
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) {
{ using (SqlConnection cn = Database.VEPROMS_SqlConnection)
if (!dr.Read()) {
{ ApplicationContext.LocalContext["cn"] = cn;
_ErrorMessage = "No Record Found"; using (SqlCommand cm = cn.CreateCommand())
return; {
} cm.CommandType = CommandType.StoredProcedure;
ReadData(dr); cm.CommandText = "getConnection";
} cm.Parameters.AddWithValue("@DBID", criteria.DBID);
} cm.CommandTimeout = Database.DefaultTimeout;
// removing of item only needed for local data portal using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client) {
ApplicationContext.LocalContext.Remove("cn"); if (!dr.Read())
} {
} _ErrorMessage = "No Record Found";
catch (Exception ex) return;
{ }
if (_MyLog.IsErrorEnabled) _MyLog.Error("ConnectionInfo.DataPortal_Fetch", ex); ReadData(dr);
_ErrorMessage = ex.Message; }
throw new DbCslaException("ConnectionInfo.DataPortal_Fetch", ex); }
} // removing of item only needed for local data portal
} if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client)
#endregion ApplicationContext.LocalContext.Remove("cn");
// Standard Refresh }
#region extension }
ConnectionInfoExtension _ConnectionInfoExtension = new ConnectionInfoExtension(); catch (Exception ex)
[Serializable()] {
partial class ConnectionInfoExtension : extensionBase { } if (_MyLog.IsErrorEnabled) _MyLog.Error("ConnectionInfo.DataPortal_Fetch", ex);
[Serializable()] _ErrorMessage = ex.Message;
class extensionBase throw new DbCslaException("ConnectionInfo.DataPortal_Fetch", ex);
{ }
// Default Refresh }
public virtual void Refresh(ConnectionInfo tmp) { } #endregion
} // Standard Refresh
#endregion #region extension
} // Class ConnectionInfoExtension _ConnectionInfoExtension = new ConnectionInfoExtension();
#region Converter [Serializable()]
internal class ConnectionInfoConverter : ExpandableObjectConverter partial class ConnectionInfoExtension : extensionBase { }
{ [Serializable()]
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) class extensionBase
{ {
if (destType == typeof(string) && value is ConnectionInfo) // Default Refresh
{ public virtual void Refresh(ConnectionInfo tmp) { }
// Return the ToString value }
return ((ConnectionInfo)value).ToString(); #endregion
} } // Class
return base.ConvertTo(context, culture, value, destType); #region Converter
} internal class ConnectionInfoConverter : ExpandableObjectConverter
} {
#endregion public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
{
if (destType == typeof(string) && value is ConnectionInfo)
{
// Return the ToString value
return ((ConnectionInfo)value).ToString();
}
return base.ConvertTo(context, culture, value, destType);
}
}
#endregion
} // Namespace } // Namespace

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -19,387 +19,397 @@ using System.ComponentModel;
using System.Collections.Generic; using System.Collections.Generic;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
public delegate void ContentAuditInfoEvent(object sender); public delegate void ContentAuditInfoEvent(object sender);
/// <summary> /// <summary>
/// ContentAuditInfo Generated by MyGeneration using the CSLA Object Mapping template /// ContentAuditInfo Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentAuditInfoConverter))] [TypeConverter(typeof(ContentAuditInfoConverter))]
public partial class ContentAuditInfo : ReadOnlyBase<ContentAuditInfo>, IDisposable public partial class ContentAuditInfo : ReadOnlyBase<ContentAuditInfo>, IDisposable
{ {
public event ContentAuditInfoEvent Changed; public event ContentAuditInfoEvent Changed;
private void OnChange() private void OnChange()
{ {
if (Changed != null) Changed(this); if (Changed != null) Changed(this);
} }
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Collection #region Collection
private static List<ContentAuditInfo> _CacheList = new List<ContentAuditInfo>(); private static List<ContentAuditInfo> _CacheList = new List<ContentAuditInfo>();
protected static void AddToCache(ContentAuditInfo contentAuditInfo) protected static void AddToCache(ContentAuditInfo contentAuditInfo)
{ {
if (!_CacheList.Contains(contentAuditInfo)) _CacheList.Add(contentAuditInfo); // In AddToCache if (!_CacheList.Contains(contentAuditInfo)) _CacheList.Add(contentAuditInfo); // In AddToCache
} }
protected static void RemoveFromCache(ContentAuditInfo contentAuditInfo) protected static void RemoveFromCache(ContentAuditInfo contentAuditInfo)
{ {
while (_CacheList.Contains(contentAuditInfo)) _CacheList.Remove(contentAuditInfo); // In RemoveFromCache while (_CacheList.Contains(contentAuditInfo)) _CacheList.Remove(contentAuditInfo); // In RemoveFromCache
} }
private static Dictionary<string, List<ContentAuditInfo>> _CacheByPrimaryKey = new Dictionary<string, List<ContentAuditInfo>>(); private static Dictionary<string, List<ContentAuditInfo>> _CacheByPrimaryKey = new Dictionary<string, List<ContentAuditInfo>>();
private static void ConvertListToDictionary() private static void ConvertListToDictionary()
{ {
while (_CacheList.Count > 0) // Move ContentAuditInfo(s) from temporary _CacheList to _CacheByPrimaryKey while (_CacheList.Count > 0) // Move ContentAuditInfo(s) from temporary _CacheList to _CacheByPrimaryKey
{ {
ContentAuditInfo tmp = _CacheList[0]; // Get the first ContentAuditInfo ContentAuditInfo tmp = _CacheList[0]; // Get the first ContentAuditInfo
string pKey = tmp.AuditID.ToString(); string pKey = tmp.AuditID.ToString();
if (!_CacheByPrimaryKey.ContainsKey(pKey)) if (!_CacheByPrimaryKey.ContainsKey(pKey))
{ {
_CacheByPrimaryKey[pKey] = new List<ContentAuditInfo>(); // Add new list for PrimaryKey _CacheByPrimaryKey[pKey] = new List<ContentAuditInfo>(); // Add new list for PrimaryKey
} }
_CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list _CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list
_CacheList.RemoveAt(0); // Remove the first ContentAuditInfo _CacheList.RemoveAt(0); // Remove the first ContentAuditInfo
} }
} }
internal static void AddList(ContentAuditInfoList lst) internal static void AddList(ContentAuditInfoList lst)
{ {
foreach (ContentAuditInfo item in lst) AddToCache(item); foreach (ContentAuditInfo item in lst) AddToCache(item);
} }
protected static ContentAuditInfo GetCachedByPrimaryKey(long auditID) protected static ContentAuditInfo GetCachedByPrimaryKey(long auditID)
{ {
ConvertListToDictionary(); ConvertListToDictionary();
string key = auditID.ToString(); string key = auditID.ToString();
if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0]; if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0];
return null; return null;
} }
#endregion #endregion
#region Business Methods #region Business Methods
private string _ErrorMessage = string.Empty; private string _ErrorMessage = string.Empty;
public string ErrorMessage public string ErrorMessage
{ {
get { return _ErrorMessage; } get { return _ErrorMessage; }
} }
protected ContentAudit _Editable; protected ContentAudit _Editable;
private IVEHasBrokenRules HasBrokenRules private IVEHasBrokenRules HasBrokenRules
{ {
get get
{ {
IVEHasBrokenRules hasBrokenRules = null; IVEHasBrokenRules hasBrokenRules = null;
if (_Editable != null) if (_Editable != null)
hasBrokenRules = _Editable.HasBrokenRules; hasBrokenRules = _Editable.HasBrokenRules;
return hasBrokenRules; return hasBrokenRules;
} }
} }
private long _AuditID; private long _AuditID;
[System.ComponentModel.DataObjectField(true, true)] [System.ComponentModel.DataObjectField(true, true)]
public long AuditID public long AuditID
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
return _AuditID; CanReadProperty("AuditID", true);
} return _AuditID;
} }
private int _ContentID; }
public int ContentID private int _ContentID;
{ public int ContentID
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
return _ContentID; {
} CanReadProperty("ContentID", true);
} return _ContentID;
private string _Number = string.Empty; }
public string Number }
{ private string _Number = string.Empty;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] public string Number
get {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
return _Number; get
} {
} CanReadProperty("Number", true);
private string _Text = string.Empty; return _Number;
public string Text }
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] private string _Text = string.Empty;
get public string Text
{ {
return _Text; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
} {
private int? _Type; CanReadProperty("Text", true);
public int? Type return _Text;
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get private int? _Type;
{ public int? Type
return _Type; {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
private int? _FormatID; {
public int? FormatID CanReadProperty("Type", true);
{ return _Type;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get }
{ private int? _FormatID;
return _FormatID; public int? FormatID
} {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
private string _Config = string.Empty; get
public string Config {
{ CanReadProperty("FormatID", true);
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] return _FormatID;
get }
{ }
return _Config; private string _Config = string.Empty;
} public string Config
} {
private DateTime _DTS = new DateTime(); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
public DateTime DTS get
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] CanReadProperty("Config", true);
get return _Config;
{ }
return _DTS; }
} private DateTime _DTS = new DateTime();
} public DateTime DTS
private string _UserID = string.Empty; {
public string UserID [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get CanReadProperty("DTS", true);
{ return _DTS;
return _UserID; }
} }
} private string _UserID = string.Empty;
private int _DeleteStatus; public string UserID
public int DeleteStatus {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get
get {
{ CanReadProperty("UserID", true);
return _DeleteStatus; return _UserID;
} }
} }
// CSLATODO: Replace base ContentAuditInfo.ToString function as necessary private int _DeleteStatus;
/// <summary> public int DeleteStatus
/// Overrides Base ToString {
/// </summary> [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
/// <returns>A string representation of current ContentAuditInfo</returns> get
//public override string ToString() {
//{ CanReadProperty("DeleteStatus", true);
// return base.ToString(); return _DeleteStatus;
//} }
// CSLATODO: Check ContentAuditInfo.GetIdValue to assure that the ID returned is unique }
/// <summary> // CSLATODO: Replace base ContentAuditInfo.ToString function as necessary
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality /// <summary>
/// </summary> /// Overrides Base ToString
/// <returns>A Unique ID for the current ContentAuditInfo</returns> /// </summary>
protected override object GetIdValue() /// <returns>A string representation of current ContentAuditInfo</returns>
{ //public override string ToString()
return MyContentAuditInfoUnique; // Absolutely Unique ID //{
} // return base.ToString();
#endregion //}
#region Factory Methods // CSLATODO: Check ContentAuditInfo.GetIdValue to assure that the ID returned is unique
private static int _ContentAuditInfoUnique = 0; /// <summary>
private static int ContentAuditInfoUnique /// Overrides Base GetIdValue - Used internally by CSLA to determine equality
{ get { return ++_ContentAuditInfoUnique; } } /// </summary>
private int _MyContentAuditInfoUnique = ContentAuditInfoUnique; /// <returns>A Unique ID for the current ContentAuditInfo</returns>
public int MyContentAuditInfoUnique // Absolutely Unique ID - Info protected override object GetIdValue()
{ get { return _MyContentAuditInfoUnique; } } {
protected ContentAuditInfo() return MyContentAuditInfoUnique; // Absolutely Unique ID
{/* require use of factory methods */ }
AddToCache(this); #endregion
} #region Factory Methods
private bool _Disposed = false; private static int _ContentAuditInfoUnique = 0;
private static int _CountCreated = 0; private static int ContentAuditInfoUnique
private static int _CountDisposed = 0; { get { return ++_ContentAuditInfoUnique; } }
private static int _CountFinalized = 0; private int _MyContentAuditInfoUnique = ContentAuditInfoUnique;
private static int IncrementCountCreated public int MyContentAuditInfoUnique // Absolutely Unique ID - Info
{ get { return ++_CountCreated; } } { get { return _MyContentAuditInfoUnique; } }
private int _CountWhenCreated = IncrementCountCreated; protected ContentAuditInfo()
public static int CountCreated {/* require use of factory methods */
{ get { return _CountCreated; } } AddToCache(this);
public static int CountNotDisposed }
{ get { return _CountCreated - _CountDisposed; } } private bool _Disposed = false;
public static int CountNotFinalized private static int _CountCreated = 0;
{ get { return _CountCreated - _CountFinalized; } } private static int _CountDisposed = 0;
~ContentAuditInfo() private static int _CountFinalized = 0;
{ private static int IncrementCountCreated
_CountFinalized++; { get { return ++_CountCreated; } }
} private int _CountWhenCreated = IncrementCountCreated;
public void Dispose() public static int CountCreated
{ { get { return _CountCreated; } }
if (_Disposed) return; public static int CountNotDisposed
_CountDisposed++; { get { return _CountCreated - _CountDisposed; } }
_Disposed = true; public static int CountNotFinalized
RemoveFromCache(this); { get { return _CountCreated - _CountFinalized; } }
if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return; ~ContentAuditInfo()
List<ContentAuditInfo> listContentAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items {
while (listContentAuditInfo.Contains(this)) listContentAuditInfo.Remove(this); // Remove the item from the list _CountFinalized++;
if (listContentAuditInfo.Count == 0) // If there are no items left in the list }
_CacheByPrimaryKey.Remove(AuditID.ToString()); // remove the list public void Dispose()
} {
public virtual ContentAudit Get() if (_Disposed) return;
{ _CountDisposed++;
return _Editable = ContentAudit.Get(_AuditID); _Disposed = true;
} RemoveFromCache(this);
public static void Refresh(ContentAudit tmp) if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return;
{ List<ContentAuditInfo> listContentAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items
string key = tmp.AuditID.ToString(); while (listContentAuditInfo.Contains(this)) listContentAuditInfo.Remove(this); // Remove the item from the list
ConvertListToDictionary(); if (listContentAuditInfo.Count == 0) // If there are no items left in the list
if (_CacheByPrimaryKey.ContainsKey(key)) _CacheByPrimaryKey.Remove(AuditID.ToString()); // remove the list
foreach (ContentAuditInfo tmpInfo in _CacheByPrimaryKey[key]) }
tmpInfo.RefreshFields(tmp); public virtual ContentAudit Get()
} {
protected virtual void RefreshFields(ContentAudit tmp) return _Editable = ContentAudit.Get(_AuditID);
{ }
_ContentID = tmp.ContentID; public static void Refresh(ContentAudit tmp)
_Number = tmp.Number; {
_Text = tmp.Text; string key = tmp.AuditID.ToString();
_Type = tmp.Type; ConvertListToDictionary();
_FormatID = tmp.FormatID; if (_CacheByPrimaryKey.ContainsKey(key))
_Config = tmp.Config; foreach (ContentAuditInfo tmpInfo in _CacheByPrimaryKey[key])
_DTS = tmp.DTS; tmpInfo.RefreshFields(tmp);
_UserID = tmp.UserID; }
_DeleteStatus = tmp.DeleteStatus; protected virtual void RefreshFields(ContentAudit tmp)
_ContentAuditInfoExtension.Refresh(this); {
OnChange();// raise an event _ContentID = tmp.ContentID;
} _Number = tmp.Number;
public static ContentAuditInfo Get(long auditID) _Text = tmp.Text;
{ _Type = tmp.Type;
//if (!CanGetObject()) _FormatID = tmp.FormatID;
// throw new System.Security.SecurityException("User not authorized to view a ContentAudit"); _Config = tmp.Config;
try _DTS = tmp.DTS;
{ _UserID = tmp.UserID;
ContentAuditInfo tmp = GetCachedByPrimaryKey(auditID); _DeleteStatus = tmp.DeleteStatus;
if (tmp == null) _ContentAuditInfoExtension.Refresh(this);
{ OnChange();// raise an event
tmp = DataPortal.Fetch<ContentAuditInfo>(new PKCriteria(auditID)); }
AddToCache(tmp); public static ContentAuditInfo Get(long auditID)
} {
if (tmp.ErrorMessage == "No Record Found") //if (!CanGetObject())
{ // throw new System.Security.SecurityException("User not authorized to view a ContentAudit");
tmp.Dispose(); // Clean-up ContentAuditInfo try
tmp = null; {
} ContentAuditInfo tmp = GetCachedByPrimaryKey(auditID);
return tmp; if (tmp == null)
} {
catch (Exception ex) tmp = DataPortal.Fetch<ContentAuditInfo>(new PKCriteria(auditID));
{ AddToCache(tmp);
throw new DbCslaException("Error on ContentAuditInfo.Get", ex); }
} if (tmp.ErrorMessage == "No Record Found")
} {
#endregion tmp.Dispose(); // Clean-up ContentAuditInfo
#region Data Access Portal tmp = null;
internal ContentAuditInfo(SafeDataReader dr) }
{ return tmp;
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentAuditInfo.Constructor", GetHashCode()); }
try catch (Exception ex)
{ {
ReadData(dr); throw new DbCslaException("Error on ContentAuditInfo.Get", ex);
} }
catch (Exception ex) }
{ #endregion
if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentAuditInfo.Constructor", ex); #region Data Access Portal
throw new DbCslaException("ContentAuditInfo.Constructor", ex); internal ContentAuditInfo(SafeDataReader dr)
} {
} if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentAuditInfo.Constructor", GetHashCode());
[Serializable()] try
protected class PKCriteria {
{ ReadData(dr);
private long _AuditID; }
public long AuditID catch (Exception ex)
{ get { return _AuditID; } } {
public PKCriteria(long auditID) if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentAuditInfo.Constructor", ex);
{ throw new DbCslaException("ContentAuditInfo.Constructor", ex);
_AuditID = auditID; }
} }
} [Serializable()]
private void ReadData(SafeDataReader dr) protected class PKCriteria
{ {
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentAuditInfo.ReadData", GetHashCode()); private long _AuditID;
try public long AuditID
{ { get { return _AuditID; } }
_AuditID = dr.GetInt64("AuditID"); public PKCriteria(long auditID)
_ContentID = dr.GetInt32("ContentID"); {
_Number = dr.GetString("Number"); _AuditID = auditID;
_Text = dr.GetString("Text"); }
_Type = (int?)dr.GetValue("Type"); }
_FormatID = (int?)dr.GetValue("FormatID"); private void ReadData(SafeDataReader dr)
_Config = dr.GetString("Config"); {
_DTS = dr.GetDateTime("DTS"); if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentAuditInfo.ReadData", GetHashCode());
_UserID = dr.GetString("UserID"); try
_DeleteStatus = dr.GetInt32("DeleteStatus"); {
} _AuditID = dr.GetInt64("AuditID");
catch (Exception ex) _ContentID = dr.GetInt32("ContentID");
{ _Number = dr.GetString("Number");
if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentAuditInfo.ReadData", ex); _Text = dr.GetString("Text");
_ErrorMessage = ex.Message; _Type = (int?)dr.GetValue("Type");
throw new DbCslaException("ContentAuditInfo.ReadData", ex); _FormatID = (int?)dr.GetValue("FormatID");
} _Config = dr.GetString("Config");
} _DTS = dr.GetDateTime("DTS");
private void DataPortal_Fetch(PKCriteria criteria) _UserID = dr.GetString("UserID");
{ _DeleteStatus = dr.GetInt32("DeleteStatus");
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentAuditInfo.DataPortal_Fetch", GetHashCode()); }
try catch (Exception ex)
{ {
using (SqlConnection cn = Database.VEPROMS_SqlConnection) if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentAuditInfo.ReadData", ex);
{ _ErrorMessage = ex.Message;
ApplicationContext.LocalContext["cn"] = cn; throw new DbCslaException("ContentAuditInfo.ReadData", ex);
using (SqlCommand cm = cn.CreateCommand()) }
{ }
cm.CommandType = CommandType.StoredProcedure; private void DataPortal_Fetch(PKCriteria criteria)
cm.CommandText = "getContentAudit"; {
cm.Parameters.AddWithValue("@AuditID", criteria.AuditID); if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentAuditInfo.DataPortal_Fetch", GetHashCode());
cm.CommandTimeout = Database.DefaultTimeout; try
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) {
{ using (SqlConnection cn = Database.VEPROMS_SqlConnection)
if (!dr.Read()) {
{ ApplicationContext.LocalContext["cn"] = cn;
_ErrorMessage = "No Record Found"; using (SqlCommand cm = cn.CreateCommand())
return; {
} cm.CommandType = CommandType.StoredProcedure;
ReadData(dr); cm.CommandText = "getContentAudit";
} cm.Parameters.AddWithValue("@AuditID", criteria.AuditID);
} cm.CommandTimeout = Database.DefaultTimeout;
// removing of item only needed for local data portal using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client) {
ApplicationContext.LocalContext.Remove("cn"); if (!dr.Read())
} {
} _ErrorMessage = "No Record Found";
catch (Exception ex) return;
{ }
if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentAuditInfo.DataPortal_Fetch", ex); ReadData(dr);
_ErrorMessage = ex.Message; }
throw new DbCslaException("ContentAuditInfo.DataPortal_Fetch", ex); }
} // removing of item only needed for local data portal
} if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client)
#endregion ApplicationContext.LocalContext.Remove("cn");
// Standard Refresh }
#region extension }
ContentAuditInfoExtension _ContentAuditInfoExtension = new ContentAuditInfoExtension(); catch (Exception ex)
[Serializable()] {
partial class ContentAuditInfoExtension : extensionBase { } if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentAuditInfo.DataPortal_Fetch", ex);
[Serializable()] _ErrorMessage = ex.Message;
class extensionBase throw new DbCslaException("ContentAuditInfo.DataPortal_Fetch", ex);
{ }
// Default Refresh }
public virtual void Refresh(ContentAuditInfo tmp) { } #endregion
} // Standard Refresh
#endregion #region extension
} // Class ContentAuditInfoExtension _ContentAuditInfoExtension = new ContentAuditInfoExtension();
#region Converter [Serializable()]
internal class ContentAuditInfoConverter : ExpandableObjectConverter partial class ContentAuditInfoExtension : extensionBase { }
{ [Serializable()]
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) class extensionBase
{ {
if (destType == typeof(string) && value is ContentAuditInfo) // Default Refresh
{ public virtual void Refresh(ContentAuditInfo tmp) { }
// Return the ToString value }
return ((ContentAuditInfo)value).ToString(); #endregion
} } // Class
return base.ConvertTo(context, culture, value, destType); #region Converter
} internal class ContentAuditInfoConverter : ExpandableObjectConverter
} {
#endregion public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
{
if (destType == typeof(string) && value is ContentAuditInfo)
{
// Return the ToString value
return ((ContentAuditInfo)value).ToString();
}
return base.ConvertTo(context, culture, value, destType);
}
}
#endregion
} // Namespace } // Namespace

View File

@@ -20,444 +20,456 @@ using System.Collections.Generic;
using Csla.Validation; using Csla.Validation;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
/// <summary> /// <summary>
/// ContentDetail Generated by MyGeneration using the CSLA Object Mapping template /// ContentDetail Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentDetailConverter))] [TypeConverter(typeof(ContentDetailConverter))]
public partial class ContentDetail : BusinessBase<ContentDetail>, IVEHasBrokenRules, IDisposable public partial class ContentDetail : BusinessBase<ContentDetail>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Business Methods #region Business Methods
private string _ErrorMessage = string.Empty; private string _ErrorMessage = string.Empty;
public string ErrorMessage public string ErrorMessage
{ {
get { return _ErrorMessage; } get { return _ErrorMessage; }
} }
private int _DetailID; private int _DetailID;
[System.ComponentModel.DataObjectField(true, true)] [System.ComponentModel.DataObjectField(true, true)]
public int DetailID public int DetailID
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
if (_MyDetail != null) _DetailID = _MyDetail.DetailID; CanReadProperty("DetailID", true);
return _DetailID; if (_MyDetail != null) _DetailID = _MyDetail.DetailID;
} return _DetailID;
} }
private Detail _MyDetail; }
[System.ComponentModel.DataObjectField(true, true)] private Detail _MyDetail;
public Detail MyDetail [System.ComponentModel.DataObjectField(true, true)]
{ public Detail MyDetail
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
if (_MyDetail == null && _DetailID != 0) _MyDetail = Detail.Get(_DetailID); {
return _MyDetail; CanReadProperty("MyDetail", true);
} if (_MyDetail == null && _DetailID != 0) _MyDetail = Detail.Get(_DetailID);
} return _MyDetail;
private int _ItemType; }
public int ItemType }
{ private int _ItemType;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] public int ItemType
get {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
return _ItemType; get
} {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] CanReadProperty("ItemType", true);
set return _ItemType;
{ }
if (_ItemType != value) [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ set
_ItemType = value; {
PropertyHasChanged(); CanWriteProperty("ItemType", true);
} if (_ItemType != value)
} {
} _ItemType = value;
private string _Text = string.Empty; PropertyHasChanged();
public string Text }
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get private string _Text = string.Empty;
{ public string Text
return _Text; {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get
set {
{ CanReadProperty("Text", true);
if (value == null) value = string.Empty; return _Text;
if (_Text != value) }
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
_Text = value; set
PropertyHasChanged(); {
} CanWriteProperty("Text", true);
} if (value == null) value = string.Empty;
} if (_Text != value)
private string _Config = string.Empty; {
public string Config _Text = value;
{ PropertyHasChanged();
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get }
{ }
return _Config; private string _Config = string.Empty;
} public string Config
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
set [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
if (value == null) value = string.Empty; {
if (_Config != value) CanReadProperty("Config", true);
{ return _Config;
_Config = value; }
PropertyHasChanged(); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} set
} {
} CanWriteProperty("Config", true);
private DateTime _DTS = new DateTime(); if (value == null) value = string.Empty;
public DateTime DTS if (_Config != value)
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] _Config = value;
get PropertyHasChanged();
{ }
return _DTS; }
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] private DateTime _DTS = new DateTime();
set public DateTime DTS
{ {
if (_DTS != value) [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
_DTS = value; {
PropertyHasChanged(); CanReadProperty("DTS", true);
} return _DTS;
} }
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
private string _UserID = string.Empty; set
public string UserID {
{ CanWriteProperty("DTS", true);
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] if (_DTS != value)
get {
{ _DTS = value;
return _UserID; PropertyHasChanged();
} }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
set }
{ private string _UserID = string.Empty;
if (value == null) value = string.Empty; public string UserID
if (_UserID != value) {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
_UserID = value; get
PropertyHasChanged(); {
} CanReadProperty("UserID", true);
} return _UserID;
} }
private byte[] _LastChanged = new byte[8];//timestamp [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
// CSLATODO: Check ContentDetail.GetIdValue to assure that the ID returned is unique set
/// <summary> {
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality CanWriteProperty("UserID", true);
/// </summary> if (value == null) value = string.Empty;
/// <returns>A Unique ID for the current ContentDetail</returns> if (_UserID != value)
protected override object GetIdValue() {
{ _UserID = value;
return MyContentDetailUnique; // Absolutely Unique ID PropertyHasChanged();
} }
// CSLATODO: Replace base ContentDetail.ToString function as necessary }
/// <summary> }
/// Overrides Base ToString private byte[] _LastChanged = new byte[8];//timestamp
/// </summary> // CSLATODO: Check ContentDetail.GetIdValue to assure that the ID returned is unique
/// <returns>A string representation of current ContentDetail</returns> /// <summary>
//public override string ToString() /// Overrides Base GetIdValue - Used internally by CSLA to determine equality
//{ /// </summary>
// return base.ToString(); /// <returns>A Unique ID for the current ContentDetail</returns>
//} protected override object GetIdValue()
public override bool IsDirty {
{ return MyContentDetailUnique; // Absolutely Unique ID
get { return base.IsDirty; } }
} // CSLATODO: Replace base ContentDetail.ToString function as necessary
public bool IsDirtyList(List<object> list) /// <summary>
{ /// Overrides Base ToString
return base.IsDirty; /// </summary>
} /// <returns>A string representation of current ContentDetail</returns>
public override bool IsValid //public override string ToString()
{ //{
get { return (IsNew && !IsDirty) ? true : base.IsValid; } // return base.ToString();
} //}
public bool IsValidList(List<object> list) public override bool IsDirty
{ {
return (IsNew && !IsDirty) ? true : base.IsValid; get { return base.IsDirty; }
} }
#endregion public bool IsDirtyList(List<object> list)
#region ValidationRules {
[NonSerialized] return base.IsDirty;
private bool _CheckingBrokenRules = false; }
public IVEHasBrokenRules HasBrokenRules public override bool IsValid
{ {
get get { return (IsNew && !IsDirty) ? true : base.IsValid; }
{ }
if (_CheckingBrokenRules) return null; public bool IsValidList(List<object> list)
if (BrokenRulesCollection.Count > 0) return this; {
try return (IsNew && !IsDirty) ? true : base.IsValid;
{ }
_CheckingBrokenRules = true; #endregion
IVEHasBrokenRules hasBrokenRules = null; #region ValidationRules
return hasBrokenRules; [NonSerialized]
} private bool _CheckingBrokenRules = false;
finally public IVEHasBrokenRules HasBrokenRules
{ {
_CheckingBrokenRules = false; get
} {
} if (_CheckingBrokenRules) return null;
} if (BrokenRulesCollection.Count > 0) return this;
public BrokenRulesCollection BrokenRules try
{ {
get _CheckingBrokenRules = true;
{ IVEHasBrokenRules hasBrokenRules = null;
IVEHasBrokenRules hasBrokenRules = HasBrokenRules; return hasBrokenRules;
if (this.Equals(hasBrokenRules)) return BrokenRulesCollection; }
return (hasBrokenRules != null ? hasBrokenRules.BrokenRules : null); finally
} {
} _CheckingBrokenRules = false;
protected override void AddBusinessRules() }
{ }
ValidationRules.AddRule( }
Csla.Validation.CommonRules.StringRequired, "Text"); public BrokenRulesCollection BrokenRules
ValidationRules.AddRule( {
Csla.Validation.CommonRules.StringMaxLength, get
new Csla.Validation.CommonRules.MaxLengthRuleArgs("Text", 1073741823)); {
ValidationRules.AddRule( IVEHasBrokenRules hasBrokenRules = HasBrokenRules;
Csla.Validation.CommonRules.StringMaxLength, if (this.Equals(hasBrokenRules)) return BrokenRulesCollection;
new Csla.Validation.CommonRules.MaxLengthRuleArgs("Config", 1073741823)); return (hasBrokenRules != null ? hasBrokenRules.BrokenRules : null);
ValidationRules.AddRule( }
Csla.Validation.CommonRules.StringRequired, "UserID"); }
ValidationRules.AddRule( protected override void AddBusinessRules()
Csla.Validation.CommonRules.StringMaxLength, {
new Csla.Validation.CommonRules.MaxLengthRuleArgs("UserID", 100)); ValidationRules.AddRule(
// CSLATODO: Add other validation rules Csla.Validation.CommonRules.StringRequired, "Text");
} ValidationRules.AddRule(
// Sample data comparison validation rule Csla.Validation.CommonRules.StringMaxLength,
//private bool StartDateGTEndDate(object target, Csla.Validation.RuleArgs e) new Csla.Validation.CommonRules.MaxLengthRuleArgs("Text", 1073741823));
//{ ValidationRules.AddRule(
// if (_started > _ended) Csla.Validation.CommonRules.StringMaxLength,
// { new Csla.Validation.CommonRules.MaxLengthRuleArgs("Config", 1073741823));
// e.Description = "Start date can't be after end date"; ValidationRules.AddRule(
// return false; Csla.Validation.CommonRules.StringRequired, "UserID");
// } ValidationRules.AddRule(
// else Csla.Validation.CommonRules.StringMaxLength,
// return true; new Csla.Validation.CommonRules.MaxLengthRuleArgs("UserID", 100));
//} // CSLATODO: Add other validation rules
#endregion }
#region Authorization Rules // Sample data comparison validation rule
protected override void AddAuthorizationRules() //private bool StartDateGTEndDate(object target, Csla.Validation.RuleArgs e)
{ //{
//CSLATODO: Who can read/write which fields // if (_started > _ended)
//AuthorizationRules.AllowRead(DetailID, "<Role(s)>"); // {
//AuthorizationRules.AllowRead(ItemType, "<Role(s)>"); // e.Description = "Start date can't be after end date";
//AuthorizationRules.AllowWrite(ItemType, "<Role(s)>"); // return false;
//AuthorizationRules.AllowRead(Text, "<Role(s)>"); // }
//AuthorizationRules.AllowWrite(Text, "<Role(s)>"); // else
//AuthorizationRules.AllowRead(Config, "<Role(s)>"); // return true;
//AuthorizationRules.AllowWrite(Config, "<Role(s)>"); //}
//AuthorizationRules.AllowRead(DTS, "<Role(s)>"); #endregion
//AuthorizationRules.AllowWrite(DTS, "<Role(s)>"); #region Authorization Rules
//AuthorizationRules.AllowRead(UserID, "<Role(s)>"); protected override void AddAuthorizationRules()
//AuthorizationRules.AllowWrite(UserID, "<Role(s)>"); {
} //CSLATODO: Who can read/write which fields
public static bool CanAddObject() //AuthorizationRules.AllowRead(DetailID, "<Role(s)>");
{ //AuthorizationRules.AllowRead(ItemType, "<Role(s)>");
// CSLATODO: Can Add Authorization //AuthorizationRules.AllowWrite(ItemType, "<Role(s)>");
//return Csla.ApplicationContext.User.IsInRole("ProjectManager"); //AuthorizationRules.AllowRead(Text, "<Role(s)>");
return true; //AuthorizationRules.AllowWrite(Text, "<Role(s)>");
} //AuthorizationRules.AllowRead(Config, "<Role(s)>");
public static bool CanGetObject() //AuthorizationRules.AllowWrite(Config, "<Role(s)>");
{ //AuthorizationRules.AllowRead(DTS, "<Role(s)>");
// CSLATODO: CanGet Authorization //AuthorizationRules.AllowWrite(DTS, "<Role(s)>");
return true; //AuthorizationRules.AllowRead(UserID, "<Role(s)>");
} //AuthorizationRules.AllowWrite(UserID, "<Role(s)>");
public static bool CanDeleteObject() }
{ public static bool CanAddObject()
// CSLATODO: CanDelete Authorization {
//bool result = false; // CSLATODO: Can Add Authorization
//if (Csla.ApplicationContext.User.IsInRole("ProjectManager"))result = true; //return Csla.ApplicationContext.User.IsInRole("ProjectManager");
//if (Csla.ApplicationContext.User.IsInRole("Administrator"))result = true; return true;
//return result; }
return true; public static bool CanGetObject()
} {
public static bool CanEditObject() // CSLATODO: CanGet Authorization
{ return true;
// CSLATODO: CanEdit Authorization }
//return Csla.ApplicationContext.User.IsInRole("ProjectManager"); public static bool CanDeleteObject()
return true; {
} // CSLATODO: CanDelete Authorization
#endregion //bool result = false;
#region Factory Methods //if (Csla.ApplicationContext.User.IsInRole("ProjectManager"))result = true;
public int CurrentEditLevel //if (Csla.ApplicationContext.User.IsInRole("Administrator"))result = true;
{ get { return EditLevel; } } //return result;
private static int _ContentDetailUnique = 0; return true;
private static int ContentDetailUnique }
{ get { return ++_ContentDetailUnique; } } public static bool CanEditObject()
private int _MyContentDetailUnique = ContentDetailUnique; {
public int MyContentDetailUnique // Absolutely Unique ID - Editable FK // CSLATODO: CanEdit Authorization
{ get { return _MyContentDetailUnique; } } //return Csla.ApplicationContext.User.IsInRole("ProjectManager");
internal static ContentDetail New(int itemType, string text) return true;
{ }
return new ContentDetail(itemType, text); #endregion
} #region Factory Methods
internal static ContentDetail Get(SafeDataReader dr) public int CurrentEditLevel
{ { get { return EditLevel; } }
return new ContentDetail(dr); private static int _ContentDetailUnique = 0;
} private static int ContentDetailUnique
public ContentDetail() { get { return ++_ContentDetailUnique; } }
{ private int _MyContentDetailUnique = ContentDetailUnique;
MarkAsChild(); public int MyContentDetailUnique // Absolutely Unique ID - Editable FK
_DetailID = Detail.NextDetailID; { get { return _MyContentDetailUnique; } }
_DTS = _ContentDetailExtension.DefaultDTS; internal static ContentDetail New(int itemType, string text)
_UserID = _ContentDetailExtension.DefaultUserID; {
ValidationRules.CheckRules(); return new ContentDetail(itemType, text);
} }
private ContentDetail(int itemType, string text) internal static ContentDetail Get(SafeDataReader dr)
{ {
MarkAsChild(); return new ContentDetail(dr);
// CSLATODO: Add any initialization & defaults }
_DetailID = Detail.NextDetailID; public ContentDetail()
_DTS = _ContentDetailExtension.DefaultDTS; {
_UserID = _ContentDetailExtension.DefaultUserID; MarkAsChild();
_ItemType = itemType; _DetailID = Detail.NextDetailID;
_Text = text; _DTS = _ContentDetailExtension.DefaultDTS;
ValidationRules.CheckRules(); _UserID = _ContentDetailExtension.DefaultUserID;
} ValidationRules.CheckRules();
internal ContentDetail(SafeDataReader dr) }
{ private ContentDetail(int itemType, string text)
MarkAsChild(); {
Fetch(dr); MarkAsChild();
} // CSLATODO: Add any initialization & defaults
private bool _Disposed = false; _DetailID = Detail.NextDetailID;
private static int _CountCreated = 0; _DTS = _ContentDetailExtension.DefaultDTS;
private static int _CountDisposed = 0; _UserID = _ContentDetailExtension.DefaultUserID;
private static int _CountFinalized = 0; _ItemType = itemType;
private static int IncrementCountCreated _Text = text;
{ get { return ++_CountCreated; } } ValidationRules.CheckRules();
private int _CountWhenCreated = IncrementCountCreated; }
public static int CountCreated internal ContentDetail(SafeDataReader dr)
{ get { return _CountCreated; } } {
public static int CountNotDisposed MarkAsChild();
{ get { return _CountCreated - _CountDisposed; } } Fetch(dr);
public static int CountNotFinalized }
{ get { return _CountCreated - _CountFinalized; } } private bool _Disposed = false;
~ContentDetail() private static int _CountCreated = 0;
{ private static int _CountDisposed = 0;
_CountFinalized++; private static int _CountFinalized = 0;
} private static int IncrementCountCreated
public void Dispose() { get { return ++_CountCreated; } }
{ private int _CountWhenCreated = IncrementCountCreated;
if (_Disposed) return; public static int CountCreated
_CountDisposed++; { get { return _CountCreated; } }
_Disposed = true; public static int CountNotDisposed
} { get { return _CountCreated - _CountDisposed; } }
#endregion public static int CountNotFinalized
#region Data Access Portal { get { return _CountCreated - _CountFinalized; } }
private void Fetch(SafeDataReader dr) ~ContentDetail()
{ {
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentDetail.FetchDR", GetHashCode()); _CountFinalized++;
try }
{ public void Dispose()
_DetailID = dr.GetInt32("DetailID"); {
_ItemType = dr.GetInt32("ItemType"); if (_Disposed) return;
_Text = dr.GetString("Text"); _CountDisposed++;
_Config = dr.GetString("Config"); _Disposed = true;
_DTS = dr.GetDateTime("DTS"); }
_UserID = dr.GetString("UserID"); #endregion
dr.GetBytes("LastChanged", 0, _LastChanged, 0, 8); #region Data Access Portal
} private void Fetch(SafeDataReader dr)
catch (Exception ex) // FKItem Fetch {
{ if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentDetail.FetchDR", GetHashCode());
if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentDetail.FetchDR", ex); try
throw new DbCslaException("ContentDetail.Fetch", ex); {
} _DetailID = dr.GetInt32("DetailID");
MarkOld(); _ItemType = dr.GetInt32("ItemType");
} _Text = dr.GetString("Text");
internal void Insert(Content myContent) _Config = dr.GetString("Config");
{ _DTS = dr.GetDateTime("DTS");
// if we're not dirty then don't update the database _UserID = dr.GetString("UserID");
if (!this.IsDirty) return; dr.GetBytes("LastChanged", 0, _LastChanged, 0, 8);
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; }
_LastChanged = Detail.Add(cn, ref _DetailID, myContent, _ItemType, _Text, _Config, _DTS, _UserID); catch (Exception ex) // FKItem Fetch
MarkOld(); {
} if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentDetail.FetchDR", ex);
internal void Update(Content myContent) throw new DbCslaException("ContentDetail.Fetch", ex);
{ }
// if we're not dirty then don't update the database MarkOld();
if (!this.IsDirty) return; }
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; internal void Insert(Content myContent)
_LastChanged = Detail.Update(cn, ref _DetailID, myContent.ContentID, _ItemType, _Text, _Config, _DTS, _UserID, ref _LastChanged); {
MarkOld(); // if we're not dirty then don't update the database
} if (!this.IsDirty) return;
internal void DeleteSelf(Content myContent) SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
{ _LastChanged = Detail.Add(cn, ref _DetailID, myContent, _ItemType, _Text, _Config, _DTS, _UserID);
// if we're not dirty then don't update the database MarkOld();
if (!this.IsDirty) return; }
// if we're new then don't update the database internal void Update(Content myContent)
if (this.IsNew) return; {
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; // if we're not dirty then don't update the database
Detail.Remove(cn, _DetailID); if (!this.IsDirty) return;
MarkNew(); SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
} _LastChanged = Detail.Update(cn, ref _DetailID, myContent.ContentID, _ItemType, _Text, _Config, _DTS, _UserID, ref _LastChanged);
#endregion MarkOld();
// Standard Default Code }
#region extension internal void DeleteSelf(Content myContent)
ContentDetailExtension _ContentDetailExtension = new ContentDetailExtension(); {
[Serializable()] // if we're not dirty then don't update the database
partial class ContentDetailExtension : extensionBase if (!this.IsDirty) return;
{ // if we're new then don't update the database
} if (this.IsNew) return;
[Serializable()] SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
class extensionBase Detail.Remove(cn, _DetailID);
{ MarkNew();
// Default Values }
public virtual DateTime DefaultDTS #endregion
{ // Standard Default Code
get { return DateTime.Now; } #region extension
} ContentDetailExtension _ContentDetailExtension = new ContentDetailExtension();
public virtual string DefaultUserID [Serializable()]
{ partial class ContentDetailExtension : extensionBase
get { return Volian.Base.Library.VlnSettings.UserID; } {
} }
// Authorization Rules [Serializable()]
public virtual void AddAuthorizationRules(Csla.Security.AuthorizationRules rules) class extensionBase
{ {
// Needs to be overriden to add new authorization rules // Default Values
} public virtual DateTime DefaultDTS
// Instance Authorization Rules {
public virtual void AddInstanceAuthorizationRules(Csla.Security.AuthorizationRules rules) get { return DateTime.Now; }
{ }
// Needs to be overriden to add new authorization rules public virtual string DefaultUserID
} {
// Validation Rules get { return Volian.Base.Library.VlnSettings.UserID; }
public virtual void AddValidationRules(Csla.Validation.ValidationRules rules) }
{ // Authorization Rules
// Needs to be overriden to add new validation rules public virtual void AddAuthorizationRules(Csla.Security.AuthorizationRules rules)
} {
// InstanceValidation Rules // Needs to be overriden to add new authorization rules
public virtual void AddInstanceValidationRules(Csla.Validation.ValidationRules rules) }
{ // Instance Authorization Rules
// Needs to be overriden to add new validation rules public virtual void AddInstanceAuthorizationRules(Csla.Security.AuthorizationRules rules)
} {
} // Needs to be overriden to add new authorization rules
#endregion }
} // Class // Validation Rules
#region Converter public virtual void AddValidationRules(Csla.Validation.ValidationRules rules)
internal class ContentDetailConverter : ExpandableObjectConverter {
{ // Needs to be overriden to add new validation rules
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) }
{ // InstanceValidation Rules
if (destType == typeof(string) && value is ContentDetail) public virtual void AddInstanceValidationRules(Csla.Validation.ValidationRules rules)
{ {
// Return the ToString value // Needs to be overriden to add new validation rules
return ((ContentDetail)value).ToString(); }
} }
return base.ConvertTo(context, culture, value, destType); #endregion
} } // Class
} #region Converter
#endregion internal class ContentDetailConverter : ExpandableObjectConverter
{
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
{
if (destType == typeof(string) && value is ContentDetail)
{
// Return the ToString value
return ((ContentDetail)value).ToString();
}
return base.ConvertTo(context, culture, value, destType);
}
}
#endregion
} // Namespace } // Namespace

File diff suppressed because it is too large Load Diff

View File

@@ -20,394 +20,403 @@ using System.Collections.Generic;
using Csla.Validation; using Csla.Validation;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
/// <summary> /// <summary>
/// ContentItem Generated by MyGeneration using the CSLA Object Mapping template /// ContentItem Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentItemConverter))] [TypeConverter(typeof(ContentItemConverter))]
public partial class ContentItem : BusinessBase<ContentItem>, IVEHasBrokenRules, IDisposable public partial class ContentItem : BusinessBase<ContentItem>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Business Methods #region Business Methods
private string _ErrorMessage = string.Empty; private string _ErrorMessage = string.Empty;
public string ErrorMessage public string ErrorMessage
{ {
get { return _ErrorMessage; } get { return _ErrorMessage; }
} }
private int _ItemID; private int _ItemID;
[System.ComponentModel.DataObjectField(true, true)] [System.ComponentModel.DataObjectField(true, true)]
public int ItemID public int ItemID
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
if (_MyItem != null) _ItemID = _MyItem.ItemID; CanReadProperty("ItemID", true);
return _ItemID; if (_MyItem != null) _ItemID = _MyItem.ItemID;
} return _ItemID;
} }
private Item _MyItem; }
[System.ComponentModel.DataObjectField(true, true)] private Item _MyItem;
public Item MyItem [System.ComponentModel.DataObjectField(true, true)]
{ public Item MyItem
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID); {
return _MyItem; CanReadProperty("MyItem", true);
} if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID);
} return _MyItem;
private int? _PreviousID; }
public int? PreviousID }
{ private int? _PreviousID;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] public int? PreviousID
get {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
if (_MyPrevious != null) _PreviousID = _MyPrevious.ItemID; get
return _PreviousID; {
} CanReadProperty("PreviousID", true);
} if (_MyPrevious != null) _PreviousID = _MyPrevious.ItemID;
private Item _MyPrevious; return _PreviousID;
public Item MyPrevious }
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] private Item _MyPrevious;
get public Item MyPrevious
{ {
if (_MyPrevious == null && _PreviousID != null) _MyPrevious = Item.Get((int)_PreviousID); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
return _MyPrevious; get
} {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] CanReadProperty("MyPrevious", true);
set if (_MyPrevious == null && _PreviousID != null) _MyPrevious = Item.Get((int)_PreviousID);
{ return _MyPrevious;
if ((_MyPrevious == null ? _PreviousID : (int?)_MyPrevious.ItemID) != (value == null ? null : (int?)value.ItemID)) }
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
_MyPrevious = value; set
_PreviousID = (value == null ? null : (int?)value.ItemID); {
PropertyHasChanged(); CanWriteProperty("MyPrevious", true);
} if ((_MyPrevious == null ? _PreviousID : (int?)_MyPrevious.ItemID) != (value == null ? null : (int?)value.ItemID))
} {
} _MyPrevious = value;
private DateTime _DTS = new DateTime(); _PreviousID = (value == null ? null : (int?)value.ItemID);
public DateTime DTS PropertyHasChanged();
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get }
{ private DateTime _DTS = new DateTime();
return _DTS; public DateTime DTS
} {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set get
{ {
if (_DTS != value) CanReadProperty("DTS", true);
{ return _DTS;
_DTS = value; }
PropertyHasChanged(); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} set
} {
} CanWriteProperty("DTS", true);
private string _UserID = string.Empty; if (_DTS != value)
public string UserID {
{ _DTS = value;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] PropertyHasChanged();
get }
{ }
return _UserID; }
} private string _UserID = string.Empty;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] public string UserID
set {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
if (value == null) value = string.Empty; get
if (_UserID != value) {
{ CanReadProperty("UserID", true);
_UserID = value; return _UserID;
PropertyHasChanged(); }
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} set
} {
private byte[] _LastChanged = new byte[8];//timestamp CanWriteProperty("UserID", true);
// CSLATODO: Check ContentItem.GetIdValue to assure that the ID returned is unique if (value == null) value = string.Empty;
/// <summary> if (_UserID != value)
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality {
/// </summary> _UserID = value;
/// <returns>A Unique ID for the current ContentItem</returns> PropertyHasChanged();
protected override object GetIdValue() }
{ }
return MyContentItemUnique; // Absolutely Unique ID }
} private byte[] _LastChanged = new byte[8];//timestamp
// CSLATODO: Replace base ContentItem.ToString function as necessary // CSLATODO: Check ContentItem.GetIdValue to assure that the ID returned is unique
/// <summary> /// <summary>
/// Overrides Base ToString /// Overrides Base GetIdValue - Used internally by CSLA to determine equality
/// </summary> /// </summary>
/// <returns>A string representation of current ContentItem</returns> /// <returns>A Unique ID for the current ContentItem</returns>
//public override string ToString() protected override object GetIdValue()
//{ {
// return base.ToString(); return MyContentItemUnique; // Absolutely Unique ID
//} }
public override bool IsDirty // CSLATODO: Replace base ContentItem.ToString function as necessary
{ /// <summary>
get { return base.IsDirty; } /// Overrides Base ToString
} /// </summary>
public bool IsDirtyList(List<object> list) /// <returns>A string representation of current ContentItem</returns>
{ //public override string ToString()
return base.IsDirty; //{
} // return base.ToString();
public override bool IsValid //}
{ public override bool IsDirty
get { return (IsNew && !IsDirty) ? true : base.IsValid; } {
} get { return base.IsDirty; }
public bool IsValidList(List<object> list) }
{ public bool IsDirtyList(List<object> list)
return (IsNew && !IsDirty) ? true : base.IsValid; {
} return base.IsDirty;
#endregion }
#region ValidationRules public override bool IsValid
[NonSerialized] {
private bool _CheckingBrokenRules = false; get { return (IsNew && !IsDirty) ? true : base.IsValid; }
public IVEHasBrokenRules HasBrokenRules }
{ public bool IsValidList(List<object> list)
get {
{ return (IsNew && !IsDirty) ? true : base.IsValid;
if (_CheckingBrokenRules) return null; }
if (BrokenRulesCollection.Count > 0) return this; #endregion
try #region ValidationRules
{ [NonSerialized]
_CheckingBrokenRules = true; private bool _CheckingBrokenRules = false;
IVEHasBrokenRules hasBrokenRules = null; public IVEHasBrokenRules HasBrokenRules
if (_MyItem != null && (hasBrokenRules = _MyItem.HasBrokenRules) != null) return hasBrokenRules; {
return hasBrokenRules; get
} {
finally if (_CheckingBrokenRules) return null;
{ if (BrokenRulesCollection.Count > 0) return this;
_CheckingBrokenRules = false; try
} {
} _CheckingBrokenRules = true;
} IVEHasBrokenRules hasBrokenRules = null;
public BrokenRulesCollection BrokenRules if (_MyItem != null && (hasBrokenRules = _MyItem.HasBrokenRules) != null) return hasBrokenRules;
{ return hasBrokenRules;
get }
{ finally
IVEHasBrokenRules hasBrokenRules = HasBrokenRules; {
if (this.Equals(hasBrokenRules)) return BrokenRulesCollection; _CheckingBrokenRules = false;
return (hasBrokenRules != null ? hasBrokenRules.BrokenRules : null); }
} }
} }
protected override void AddBusinessRules() public BrokenRulesCollection BrokenRules
{ {
ValidationRules.AddRule( get
Csla.Validation.CommonRules.StringRequired, "UserID"); {
ValidationRules.AddRule( IVEHasBrokenRules hasBrokenRules = HasBrokenRules;
Csla.Validation.CommonRules.StringMaxLength, if (this.Equals(hasBrokenRules)) return BrokenRulesCollection;
new Csla.Validation.CommonRules.MaxLengthRuleArgs("UserID", 100)); return (hasBrokenRules != null ? hasBrokenRules.BrokenRules : null);
// CSLATODO: Add other validation rules }
} }
// Sample data comparison validation rule protected override void AddBusinessRules()
//private bool StartDateGTEndDate(object target, Csla.Validation.RuleArgs e) {
//{ ValidationRules.AddRule(
// if (_started > _ended) Csla.Validation.CommonRules.StringRequired, "UserID");
// { ValidationRules.AddRule(
// e.Description = "Start date can't be after end date"; Csla.Validation.CommonRules.StringMaxLength,
// return false; new Csla.Validation.CommonRules.MaxLengthRuleArgs("UserID", 100));
// } // CSLATODO: Add other validation rules
// else }
// return true; // Sample data comparison validation rule
//} //private bool StartDateGTEndDate(object target, Csla.Validation.RuleArgs e)
#endregion //{
#region Authorization Rules // if (_started > _ended)
protected override void AddAuthorizationRules() // {
{ // e.Description = "Start date can't be after end date";
//CSLATODO: Who can read/write which fields // return false;
//AuthorizationRules.AllowRead(ItemID, "<Role(s)>"); // }
//AuthorizationRules.AllowRead(PreviousID, "<Role(s)>"); // else
//AuthorizationRules.AllowWrite(PreviousID, "<Role(s)>"); // return true;
//AuthorizationRules.AllowRead(DTS, "<Role(s)>"); //}
//AuthorizationRules.AllowWrite(DTS, "<Role(s)>"); #endregion
//AuthorizationRules.AllowRead(UserID, "<Role(s)>"); #region Authorization Rules
//AuthorizationRules.AllowWrite(UserID, "<Role(s)>"); protected override void AddAuthorizationRules()
} {
public static bool CanAddObject() //CSLATODO: Who can read/write which fields
{ //AuthorizationRules.AllowRead(ItemID, "<Role(s)>");
// CSLATODO: Can Add Authorization //AuthorizationRules.AllowRead(PreviousID, "<Role(s)>");
//return Csla.ApplicationContext.User.IsInRole("ProjectManager"); //AuthorizationRules.AllowWrite(PreviousID, "<Role(s)>");
return true; //AuthorizationRules.AllowRead(DTS, "<Role(s)>");
} //AuthorizationRules.AllowWrite(DTS, "<Role(s)>");
public static bool CanGetObject() //AuthorizationRules.AllowRead(UserID, "<Role(s)>");
{ //AuthorizationRules.AllowWrite(UserID, "<Role(s)>");
// CSLATODO: CanGet Authorization }
return true; public static bool CanAddObject()
} {
public static bool CanDeleteObject() // CSLATODO: Can Add Authorization
{ //return Csla.ApplicationContext.User.IsInRole("ProjectManager");
// CSLATODO: CanDelete Authorization return true;
//bool result = false; }
//if (Csla.ApplicationContext.User.IsInRole("ProjectManager"))result = true; public static bool CanGetObject()
//if (Csla.ApplicationContext.User.IsInRole("Administrator"))result = true; {
//return result; // CSLATODO: CanGet Authorization
return true; return true;
} }
public static bool CanEditObject() public static bool CanDeleteObject()
{ {
// CSLATODO: CanEdit Authorization // CSLATODO: CanDelete Authorization
//return Csla.ApplicationContext.User.IsInRole("ProjectManager"); //bool result = false;
return true; //if (Csla.ApplicationContext.User.IsInRole("ProjectManager"))result = true;
} //if (Csla.ApplicationContext.User.IsInRole("Administrator"))result = true;
#endregion //return result;
#region Factory Methods return true;
public int CurrentEditLevel }
{ get { return EditLevel; } } public static bool CanEditObject()
private static int _ContentItemUnique = 0; {
private static int ContentItemUnique // CSLATODO: CanEdit Authorization
{ get { return ++_ContentItemUnique; } } //return Csla.ApplicationContext.User.IsInRole("ProjectManager");
private int _MyContentItemUnique = ContentItemUnique; return true;
public int MyContentItemUnique // Absolutely Unique ID - Editable FK }
{ get { return _MyContentItemUnique; } } #endregion
internal static ContentItem New() #region Factory Methods
{ public int CurrentEditLevel
return new ContentItem(); { get { return EditLevel; } }
} private static int _ContentItemUnique = 0;
internal static ContentItem Get(SafeDataReader dr) private static int ContentItemUnique
{ { get { return ++_ContentItemUnique; } }
return new ContentItem(dr); private int _MyContentItemUnique = ContentItemUnique;
} public int MyContentItemUnique // Absolutely Unique ID - Editable FK
public ContentItem() { get { return _MyContentItemUnique; } }
{ internal static ContentItem New()
MarkAsChild(); {
_ItemID = Item.NextItemID; return new ContentItem();
_DTS = _ContentItemExtension.DefaultDTS; }
_UserID = _ContentItemExtension.DefaultUserID; internal static ContentItem Get(SafeDataReader dr)
ValidationRules.CheckRules(); {
} return new ContentItem(dr);
internal ContentItem(SafeDataReader dr) }
{ public ContentItem()
MarkAsChild(); {
Fetch(dr); MarkAsChild();
} _ItemID = Item.NextItemID;
private bool _Disposed = false; _DTS = _ContentItemExtension.DefaultDTS;
private static int _CountCreated = 0; _UserID = _ContentItemExtension.DefaultUserID;
private static int _CountDisposed = 0; ValidationRules.CheckRules();
private static int _CountFinalized = 0; }
private static int IncrementCountCreated internal ContentItem(SafeDataReader dr)
{ get { return ++_CountCreated; } } {
private int _CountWhenCreated = IncrementCountCreated; MarkAsChild();
public static int CountCreated Fetch(dr);
{ get { return _CountCreated; } } }
public static int CountNotDisposed private bool _Disposed = false;
{ get { return _CountCreated - _CountDisposed; } } private static int _CountCreated = 0;
public static int CountNotFinalized private static int _CountDisposed = 0;
{ get { return _CountCreated - _CountFinalized; } } private static int _CountFinalized = 0;
~ContentItem() private static int IncrementCountCreated
{ { get { return ++_CountCreated; } }
_CountFinalized++; private int _CountWhenCreated = IncrementCountCreated;
} public static int CountCreated
public void Dispose() { get { return _CountCreated; } }
{ public static int CountNotDisposed
if (_Disposed) return; { get { return _CountCreated - _CountDisposed; } }
_CountDisposed++; public static int CountNotFinalized
_Disposed = true; { get { return _CountCreated - _CountFinalized; } }
} ~ContentItem()
#endregion {
#region Data Access Portal _CountFinalized++;
private void Fetch(SafeDataReader dr) }
{ public void Dispose()
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentItem.FetchDR", GetHashCode()); {
try if (_Disposed) return;
{ _CountDisposed++;
_ItemID = dr.GetInt32("ItemID"); _Disposed = true;
_PreviousID = (int?)dr.GetValue("PreviousID"); }
_DTS = dr.GetDateTime("DTS"); #endregion
_UserID = dr.GetString("UserID"); #region Data Access Portal
dr.GetBytes("LastChanged", 0, _LastChanged, 0, 8); private void Fetch(SafeDataReader dr)
} {
catch (Exception ex) // FKItem Fetch if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentItem.FetchDR", GetHashCode());
{ try
if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentItem.FetchDR", ex); {
throw new DbCslaException("ContentItem.Fetch", ex); _ItemID = dr.GetInt32("ItemID");
} _PreviousID = (int?)dr.GetValue("PreviousID");
MarkOld(); _DTS = dr.GetDateTime("DTS");
} _UserID = dr.GetString("UserID");
internal void Insert(Content myContent) dr.GetBytes("LastChanged", 0, _LastChanged, 0, 8);
{ }
// if we're not dirty then don't update the database catch (Exception ex) // FKItem Fetch
if (!this.IsDirty) return; {
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentItem.FetchDR", ex);
_LastChanged = Item.Add(cn, ref _ItemID, Item.Get((int)_PreviousID), myContent, _DTS, _UserID); throw new DbCslaException("ContentItem.Fetch", ex);
MarkOld(); }
} MarkOld();
internal void Update(Content myContent) }
{ internal void Insert(Content myContent)
// if we're not dirty then don't update the database {
if (!this.IsDirty) return; // if we're not dirty then don't update the database
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; if (!this.IsDirty) return;
_LastChanged = Item.Update(cn, ref _ItemID, _PreviousID, myContent.ContentID, _DTS, _UserID, ref _LastChanged); SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
MarkOld(); _LastChanged = Item.Add(cn, ref _ItemID, Item.Get((int)_PreviousID), myContent, _DTS, _UserID);
} MarkOld();
internal void DeleteSelf(Content myContent) }
{ internal void Update(Content myContent)
// if we're not dirty then don't update the database {
if (!this.IsDirty) return; // if we're not dirty then don't update the database
// if we're new then don't update the database if (!this.IsDirty) return;
if (this.IsNew) return; SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; _LastChanged = Item.Update(cn, ref _ItemID, _PreviousID, myContent.ContentID, _DTS, _UserID, ref _LastChanged);
Item.Remove(cn, _ItemID); MarkOld();
MarkNew(); }
} internal void DeleteSelf(Content myContent)
#endregion {
// Standard Default Code // if we're not dirty then don't update the database
#region extension if (!this.IsDirty) return;
ContentItemExtension _ContentItemExtension = new ContentItemExtension(); // if we're new then don't update the database
[Serializable()] if (this.IsNew) return;
partial class ContentItemExtension : extensionBase SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
{ Item.Remove(cn, _ItemID);
} MarkNew();
[Serializable()] }
class extensionBase #endregion
{ // Standard Default Code
// Default Values #region extension
public virtual DateTime DefaultDTS ContentItemExtension _ContentItemExtension = new ContentItemExtension();
{ [Serializable()]
get { return DateTime.Now; } partial class ContentItemExtension : extensionBase
} {
public virtual string DefaultUserID }
{ [Serializable()]
get { return Volian.Base.Library.VlnSettings.UserID; } class extensionBase
} {
// Authorization Rules // Default Values
public virtual void AddAuthorizationRules(Csla.Security.AuthorizationRules rules) public virtual DateTime DefaultDTS
{ {
// Needs to be overriden to add new authorization rules get { return DateTime.Now; }
} }
// Instance Authorization Rules public virtual string DefaultUserID
public virtual void AddInstanceAuthorizationRules(Csla.Security.AuthorizationRules rules) {
{ get { return Volian.Base.Library.VlnSettings.UserID; }
// Needs to be overriden to add new authorization rules }
} // Authorization Rules
// Validation Rules public virtual void AddAuthorizationRules(Csla.Security.AuthorizationRules rules)
public virtual void AddValidationRules(Csla.Validation.ValidationRules rules) {
{ // Needs to be overriden to add new authorization rules
// Needs to be overriden to add new validation rules }
} // Instance Authorization Rules
// InstanceValidation Rules public virtual void AddInstanceAuthorizationRules(Csla.Security.AuthorizationRules rules)
public virtual void AddInstanceValidationRules(Csla.Validation.ValidationRules rules) {
{ // Needs to be overriden to add new authorization rules
// Needs to be overriden to add new validation rules }
} // Validation Rules
} public virtual void AddValidationRules(Csla.Validation.ValidationRules rules)
#endregion {
} // Class // Needs to be overriden to add new validation rules
#region Converter }
internal class ContentItemConverter : ExpandableObjectConverter // InstanceValidation Rules
{ public virtual void AddInstanceValidationRules(Csla.Validation.ValidationRules rules)
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) {
{ // Needs to be overriden to add new validation rules
if (destType == typeof(string) && value is ContentItem) }
{ }
// Return the ToString value #endregion
return ((ContentItem)value).ToString(); } // Class
} #region Converter
return base.ConvertTo(context, culture, value, destType); internal class ContentItemConverter : ExpandableObjectConverter
} {
} public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
#endregion {
if (destType == typeof(string) && value is ContentItem)
{
// Return the ToString value
return ((ContentItem)value).ToString();
}
return base.ConvertTo(context, culture, value, destType);
}
}
#endregion
} // Namespace } // Namespace

View File

@@ -20,458 +20,470 @@ using System.Collections.Generic;
using Csla.Validation; using Csla.Validation;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
/// <summary> /// <summary>
/// ContentPart Generated by MyGeneration using the CSLA Object Mapping template /// ContentPart Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentPartConverter))] [TypeConverter(typeof(ContentPartConverter))]
public partial class ContentPart : BusinessBase<ContentPart>, IVEHasBrokenRules, IDisposable public partial class ContentPart : BusinessBase<ContentPart>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Business Methods #region Business Methods
private string _ErrorMessage = string.Empty; private string _ErrorMessage = string.Empty;
public string ErrorMessage public string ErrorMessage
{ {
get { return _ErrorMessage; } get { return _ErrorMessage; }
} }
private int _FromType; private int _FromType;
[System.ComponentModel.DataObjectField(true, true)] [System.ComponentModel.DataObjectField(true, true)]
public int FromType public int FromType
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
return _FromType; CanReadProperty("FromType", true);
} return _FromType;
} }
private int _ItemID; }
public int ItemID private int _ItemID;
{ public int ItemID
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
if (_MyItem != null) _ItemID = _MyItem.ItemID; {
return _ItemID; CanReadProperty("ItemID", true);
} if (_MyItem != null) _ItemID = _MyItem.ItemID;
} return _ItemID;
private Item _MyItem; }
public Item MyItem }
{ private Item _MyItem;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] public Item MyItem
get {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID); get
return _MyItem; {
} CanReadProperty("MyItem", true);
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID);
set return _MyItem;
{ }
if (_MyItem != value) [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ set
_MyItem = value; {
_ItemID = value.ItemID;// Update underlying data field CanWriteProperty("MyItem", true);
PropertyHasChanged(); if (_MyItem != value)
} {
} _MyItem = value;
} _ItemID = value.ItemID;// Update underlying data field
private DateTime _DTS = new DateTime(); PropertyHasChanged();
public DateTime DTS }
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get private DateTime _DTS = new DateTime();
{ public DateTime DTS
return _DTS; {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get
set {
{ CanReadProperty("DTS", true);
if (_DTS != value) return _DTS;
{ }
_DTS = value; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
PropertyHasChanged(); set
} {
} CanWriteProperty("DTS", true);
} if (_DTS != value)
private string _UserID = string.Empty; {
public string UserID _DTS = value;
{ PropertyHasChanged();
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get }
{ }
return _UserID; private string _UserID = string.Empty;
} public string UserID
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
set [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
if (value == null) value = string.Empty; {
if (_UserID != value) CanReadProperty("UserID", true);
{ return _UserID;
_UserID = value; }
PropertyHasChanged(); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} set
} {
} CanWriteProperty("UserID", true);
private byte[] _LastChanged = new byte[8];//timestamp if (value == null) value = string.Empty;
private int? _Item_PreviousID; if (_UserID != value)
public int? Item_PreviousID {
{ _UserID = value;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] PropertyHasChanged();
get }
{ }
return _Item_PreviousID; }
} private byte[] _LastChanged = new byte[8];//timestamp
} private int? _Item_PreviousID;
private int _Item_ContentID; public int? Item_PreviousID
public int Item_ContentID {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get
get {
{ CanReadProperty("Item_PreviousID", true);
return _Item_ContentID; return _Item_PreviousID;
} }
} }
private DateTime _Item_DTS = new DateTime(); private int _Item_ContentID;
public DateTime Item_DTS public int Item_ContentID
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
return _Item_DTS; CanReadProperty("Item_ContentID", true);
} return _Item_ContentID;
} }
private string _Item_UserID = string.Empty; }
public string Item_UserID private DateTime _Item_DTS = new DateTime();
{ public DateTime Item_DTS
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
return _Item_UserID; {
} CanReadProperty("Item_DTS", true);
} return _Item_DTS;
// CSLATODO: Check ContentPart.GetIdValue to assure that the ID returned is unique }
/// <summary> }
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality private string _Item_UserID = string.Empty;
/// </summary> public string Item_UserID
/// <returns>A Unique ID for the current ContentPart</returns> {
protected override object GetIdValue() [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
return MyContentPartUnique; // Absolutely Unique ID {
} CanReadProperty("Item_UserID", true);
// CSLATODO: Replace base ContentPart.ToString function as necessary return _Item_UserID;
/// <summary> }
/// Overrides Base ToString }
/// </summary> // CSLATODO: Check ContentPart.GetIdValue to assure that the ID returned is unique
/// <returns>A string representation of current ContentPart</returns> /// <summary>
//public override string ToString() /// Overrides Base GetIdValue - Used internally by CSLA to determine equality
//{ /// </summary>
// return base.ToString(); /// <returns>A Unique ID for the current ContentPart</returns>
//} protected override object GetIdValue()
public override bool IsDirty {
{ return MyContentPartUnique; // Absolutely Unique ID
get }
{ // CSLATODO: Replace base ContentPart.ToString function as necessary
if (base.IsDirty) /// <summary>
return true; /// Overrides Base ToString
return IsDirtyList(new List<object>()); /// </summary>
} /// <returns>A string representation of current ContentPart</returns>
} //public override string ToString()
public bool IsDirtyList(List<object> list) //{
{ // return base.ToString();
if (base.IsDirty || list.Contains(this)) //}
return base.IsDirty; public override bool IsDirty
list.Add(this); {
return base.IsDirty || (_MyItem == null ? false : _MyItem.IsDirtyList(list)); get
} {
public override bool IsValid if ( base.IsDirty )
{ return true;
get { return IsValidList(new List<object>()); } return IsDirtyList(new List<object>());
} }
public bool IsValidList(List<object> list) }
{ public bool IsDirtyList(List<object> list)
if (list.Contains(this)) {
return (IsNew && !IsDirty) ? true : base.IsValid; if (base.IsDirty || list.Contains(this))
list.Add(this); return base.IsDirty;
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyItem == null ? true : _MyItem.IsValidList(list)); list.Add(this);
} return base.IsDirty || (_MyItem == null ? false : _MyItem.IsDirtyList(list));
#endregion }
#region ValidationRules public override bool IsValid
[NonSerialized] {
private bool _CheckingBrokenRules = false; get { return IsValidList(new List<object>()); }
public IVEHasBrokenRules HasBrokenRules }
{ public bool IsValidList(List<object> list)
get {
{ if(list.Contains(this))
if (_CheckingBrokenRules) return null; return (IsNew && !IsDirty) ? true : base.IsValid;
if (BrokenRulesCollection.Count > 0) return this; list.Add(this);
try return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyItem == null ? true : _MyItem.IsValidList(list));
{ }
_CheckingBrokenRules = true; #endregion
IVEHasBrokenRules hasBrokenRules = null; #region ValidationRules
if (_MyItem != null && (hasBrokenRules = _MyItem.HasBrokenRules) != null) return hasBrokenRules; [NonSerialized]
return hasBrokenRules; private bool _CheckingBrokenRules = false;
} public IVEHasBrokenRules HasBrokenRules
finally {
{ get
_CheckingBrokenRules = false; {
} if (_CheckingBrokenRules) return null;
} if (BrokenRulesCollection.Count > 0) return this;
} try
public BrokenRulesCollection BrokenRules {
{ _CheckingBrokenRules = true;
get IVEHasBrokenRules hasBrokenRules = null;
{ if (_MyItem != null && (hasBrokenRules = _MyItem.HasBrokenRules) != null) return hasBrokenRules;
IVEHasBrokenRules hasBrokenRules = HasBrokenRules; return hasBrokenRules;
if (this.Equals(hasBrokenRules)) return BrokenRulesCollection; }
return (hasBrokenRules != null ? hasBrokenRules.BrokenRules : null); finally
} {
} _CheckingBrokenRules = false;
protected override void AddBusinessRules() }
{ }
ValidationRules.AddRule<ContentPart>(MyItemRequired, "MyItem"); }
ValidationRules.AddRule( public BrokenRulesCollection BrokenRules
Csla.Validation.CommonRules.StringRequired, "UserID"); {
ValidationRules.AddRule( get
Csla.Validation.CommonRules.StringMaxLength, {
new Csla.Validation.CommonRules.MaxLengthRuleArgs("UserID", 100)); IVEHasBrokenRules hasBrokenRules = HasBrokenRules;
// CSLATODO: Add other validation rules if (this.Equals(hasBrokenRules)) return BrokenRulesCollection;
} return (hasBrokenRules != null ? hasBrokenRules.BrokenRules : null);
private static bool MyItemRequired(ContentPart target, Csla.Validation.RuleArgs e) }
{ }
if (target._ItemID == 0 && target._MyItem == null) // Required field missing protected override void AddBusinessRules()
{ {
e.Description = "Required"; ValidationRules.AddRule<ContentPart>(MyItemRequired, "MyItem");
return false; ValidationRules.AddRule(
} Csla.Validation.CommonRules.StringRequired, "UserID");
return true; ValidationRules.AddRule(
} Csla.Validation.CommonRules.StringMaxLength,
// Sample data comparison validation rule new Csla.Validation.CommonRules.MaxLengthRuleArgs("UserID", 100));
//private bool StartDateGTEndDate(object target, Csla.Validation.RuleArgs e) // CSLATODO: Add other validation rules
//{ }
// if (_started > _ended) private static bool MyItemRequired(ContentPart target, Csla.Validation.RuleArgs e)
// { {
// e.Description = "Start date can't be after end date"; if (target._ItemID == 0 && target._MyItem == null) // Required field missing
// return false; {
// } e.Description = "Required";
// else return false;
// return true; }
//} return true;
#endregion }
#region Authorization Rules // Sample data comparison validation rule
protected override void AddAuthorizationRules() //private bool StartDateGTEndDate(object target, Csla.Validation.RuleArgs e)
{ //{
//CSLATODO: Who can read/write which fields // if (_started > _ended)
//AuthorizationRules.AllowRead(FromType, "<Role(s)>"); // {
//AuthorizationRules.AllowRead(ItemID, "<Role(s)>"); // e.Description = "Start date can't be after end date";
//AuthorizationRules.AllowWrite(ItemID, "<Role(s)>"); // return false;
//AuthorizationRules.AllowRead(DTS, "<Role(s)>"); // }
//AuthorizationRules.AllowWrite(DTS, "<Role(s)>"); // else
//AuthorizationRules.AllowRead(UserID, "<Role(s)>"); // return true;
//AuthorizationRules.AllowWrite(UserID, "<Role(s)>"); //}
} #endregion
public static bool CanAddObject() #region Authorization Rules
{ protected override void AddAuthorizationRules()
// CSLATODO: Can Add Authorization {
//return Csla.ApplicationContext.User.IsInRole("ProjectManager"); //CSLATODO: Who can read/write which fields
return true; //AuthorizationRules.AllowRead(FromType, "<Role(s)>");
} //AuthorizationRules.AllowRead(ItemID, "<Role(s)>");
public static bool CanGetObject() //AuthorizationRules.AllowWrite(ItemID, "<Role(s)>");
{ //AuthorizationRules.AllowRead(DTS, "<Role(s)>");
// CSLATODO: CanGet Authorization //AuthorizationRules.AllowWrite(DTS, "<Role(s)>");
return true; //AuthorizationRules.AllowRead(UserID, "<Role(s)>");
} //AuthorizationRules.AllowWrite(UserID, "<Role(s)>");
public static bool CanDeleteObject() }
{ public static bool CanAddObject()
// CSLATODO: CanDelete Authorization {
//bool result = false; // CSLATODO: Can Add Authorization
//if (Csla.ApplicationContext.User.IsInRole("ProjectManager"))result = true; //return Csla.ApplicationContext.User.IsInRole("ProjectManager");
//if (Csla.ApplicationContext.User.IsInRole("Administrator"))result = true; return true;
//return result; }
return true; public static bool CanGetObject()
} {
public static bool CanEditObject() // CSLATODO: CanGet Authorization
{ return true;
// CSLATODO: CanEdit Authorization }
//return Csla.ApplicationContext.User.IsInRole("ProjectManager"); public static bool CanDeleteObject()
return true; {
} // CSLATODO: CanDelete Authorization
#endregion //bool result = false;
#region Factory Methods //if (Csla.ApplicationContext.User.IsInRole("ProjectManager"))result = true;
public int CurrentEditLevel //if (Csla.ApplicationContext.User.IsInRole("Administrator"))result = true;
{ get { return EditLevel; } } //return result;
private static int _ContentPartUnique = 0; return true;
private static int ContentPartUnique }
{ get { return ++_ContentPartUnique; } } public static bool CanEditObject()
private int _MyContentPartUnique = ContentPartUnique; {
public int MyContentPartUnique // Absolutely Unique ID - Editable FK // CSLATODO: CanEdit Authorization
{ get { return _MyContentPartUnique; } } //return Csla.ApplicationContext.User.IsInRole("ProjectManager");
internal static ContentPart New(int fromType, Item myItem) return true;
{ }
return new ContentPart(fromType, myItem); #endregion
} #region Factory Methods
internal static ContentPart Get(SafeDataReader dr) public int CurrentEditLevel
{ { get { return EditLevel; } }
return new ContentPart(dr); private static int _ContentPartUnique = 0;
} private static int ContentPartUnique
public ContentPart() { get { return ++_ContentPartUnique; } }
{ private int _MyContentPartUnique = ContentPartUnique;
MarkAsChild(); public int MyContentPartUnique // Absolutely Unique ID - Editable FK
{ get { return _MyContentPartUnique; } }
internal static ContentPart New(int fromType, Item myItem)
{
return new ContentPart(fromType, myItem);
}
internal static ContentPart Get(SafeDataReader dr)
{
return new ContentPart(dr);
}
public ContentPart()
{
MarkAsChild();
_DTS = _ContentPartExtension.DefaultDTS; _DTS = _ContentPartExtension.DefaultDTS;
_UserID = _ContentPartExtension.DefaultUserID; _UserID = _ContentPartExtension.DefaultUserID;
ValidationRules.CheckRules(); ValidationRules.CheckRules();
} }
private ContentPart(int fromType, Item myItem) private ContentPart(int fromType, Item myItem)
{ {
MarkAsChild(); MarkAsChild();
// CSLATODO: Add any initialization & defaults // CSLATODO: Add any initialization & defaults
_DTS = _ContentPartExtension.DefaultDTS; _DTS = _ContentPartExtension.DefaultDTS;
_UserID = _ContentPartExtension.DefaultUserID; _UserID = _ContentPartExtension.DefaultUserID;
_FromType = fromType; _FromType = fromType;
_MyItem = myItem; _MyItem = myItem;
ValidationRules.CheckRules(); ValidationRules.CheckRules();
} }
internal ContentPart(SafeDataReader dr) internal ContentPart(SafeDataReader dr)
{ {
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false; private bool _Disposed = false;
private static int _CountCreated = 0; private static int _CountCreated = 0;
private static int _CountDisposed = 0; private static int _CountDisposed = 0;
private static int _CountFinalized = 0; private static int _CountFinalized = 0;
private static int IncrementCountCreated private static int IncrementCountCreated
{ get { return ++_CountCreated; } } { get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated; private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated public static int CountCreated
{ get { return _CountCreated; } } { get { return _CountCreated; } }
public static int CountNotDisposed public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } } { get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } } { get { return _CountCreated - _CountFinalized; } }
~ContentPart() ~ContentPart()
{ {
_CountFinalized++; _CountFinalized++;
} }
public void Dispose() public void Dispose()
{ {
if (_Disposed) return; if (_Disposed) return;
_CountDisposed++; _CountDisposed++;
_Disposed = true; _Disposed = true;
if (_MyItem != null) if (_MyItem != null)
{ {
_MyItem.Dispose(); _MyItem.Dispose();
_MyItem = null; _MyItem = null;
} }
} }
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)
{ {
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentPart.FetchDR", GetHashCode()); if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentPart.FetchDR", GetHashCode());
try try
{ {
_FromType = dr.GetInt32("FromType"); _FromType = dr.GetInt32("FromType");
_ItemID = dr.GetInt32("ItemID"); _ItemID = dr.GetInt32("ItemID");
_DTS = dr.GetDateTime("DTS"); _DTS = dr.GetDateTime("DTS");
_UserID = dr.GetString("UserID"); _UserID = dr.GetString("UserID");
dr.GetBytes("LastChanged", 0, _LastChanged, 0, 8); dr.GetBytes("LastChanged", 0, _LastChanged, 0, 8);
_Item_PreviousID = (int?)dr.GetValue("Item_PreviousID"); _Item_PreviousID = (int?)dr.GetValue("Item_PreviousID");
_Item_ContentID = dr.GetInt32("Item_ContentID"); _Item_ContentID = dr.GetInt32("Item_ContentID");
_Item_DTS = dr.GetDateTime("Item_DTS"); _Item_DTS = dr.GetDateTime("Item_DTS");
_Item_UserID = dr.GetString("Item_UserID"); _Item_UserID = dr.GetString("Item_UserID");
} }
catch (Exception ex) // FKItem Fetch catch (Exception ex) // FKItem Fetch
{ {
if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentPart.FetchDR", ex); if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentPart.FetchDR", ex);
throw new DbCslaException("ContentPart.Fetch", ex); throw new DbCslaException("ContentPart.Fetch", ex);
} }
MarkOld(); MarkOld();
} }
internal void Insert(Content myContent) internal void Insert(Content myContent)
{ {
// if we're not dirty then don't update the database // if we're not dirty then don't update the database
if (!this.IsDirty) return; if (!this.IsDirty) return;
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
_LastChanged = Part.Add(cn, myContent, _FromType, _MyItem, _DTS, _UserID); _LastChanged = Part.Add(cn, myContent, _FromType, _MyItem, _DTS, _UserID);
MarkOld(); MarkOld();
} }
internal void Update(Content myContent) internal void Update(Content myContent)
{ {
// if we're not dirty then don't update the database // if we're not dirty then don't update the database
if (!this.IsDirty) return; if (!this.IsDirty) return;
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
_LastChanged = Part.Update(cn, myContent.ContentID, _FromType, _ItemID, _DTS, _UserID, ref _LastChanged); _LastChanged = Part.Update(cn, myContent.ContentID, _FromType, _ItemID, _DTS, _UserID, ref _LastChanged);
MarkOld(); MarkOld();
} }
internal void DeleteSelf(Content myContent) internal void DeleteSelf(Content myContent)
{ {
// if we're not dirty then don't update the database // if we're not dirty then don't update the database
if (!this.IsDirty) return; if (!this.IsDirty) return;
// if we're new then don't update the database // if we're new then don't update the database
if (this.IsNew) return; if (this.IsNew) return;
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
Part.Remove(cn, myContent.ContentID, _FromType); Part.Remove(cn, myContent.ContentID, _FromType);
MarkNew(); MarkNew();
} }
#endregion #endregion
// Standard Default Code // Standard Default Code
#region extension #region extension
ContentPartExtension _ContentPartExtension = new ContentPartExtension(); ContentPartExtension _ContentPartExtension = new ContentPartExtension();
[Serializable()] [Serializable()]
partial class ContentPartExtension : extensionBase partial class ContentPartExtension : extensionBase
{ {
} }
[Serializable()] [Serializable()]
class extensionBase class extensionBase
{ {
// Default Values // Default Values
public virtual DateTime DefaultDTS public virtual DateTime DefaultDTS
{ {
get { return DateTime.Now; } get { return DateTime.Now; }
} }
public virtual string DefaultUserID public virtual string DefaultUserID
{ {
get { return Volian.Base.Library.VlnSettings.UserID; } get { return Volian.Base.Library.VlnSettings.UserID; }
} }
// Authorization Rules // Authorization Rules
public virtual void AddAuthorizationRules(Csla.Security.AuthorizationRules rules) public virtual void AddAuthorizationRules(Csla.Security.AuthorizationRules rules)
{ {
// Needs to be overriden to add new authorization rules // Needs to be overriden to add new authorization rules
} }
// Instance Authorization Rules // Instance Authorization Rules
public virtual void AddInstanceAuthorizationRules(Csla.Security.AuthorizationRules rules) public virtual void AddInstanceAuthorizationRules(Csla.Security.AuthorizationRules rules)
{ {
// Needs to be overriden to add new authorization rules // Needs to be overriden to add new authorization rules
} }
// Validation Rules // Validation Rules
public virtual void AddValidationRules(Csla.Validation.ValidationRules rules) public virtual void AddValidationRules(Csla.Validation.ValidationRules rules)
{ {
// Needs to be overriden to add new validation rules // Needs to be overriden to add new validation rules
} }
// InstanceValidation Rules // InstanceValidation Rules
public virtual void AddInstanceValidationRules(Csla.Validation.ValidationRules rules) public virtual void AddInstanceValidationRules(Csla.Validation.ValidationRules rules)
{ {
// Needs to be overriden to add new validation rules // Needs to be overriden to add new validation rules
} }
} }
#endregion #endregion
} // Class } // Class
#region Converter #region Converter
internal class ContentPartConverter : ExpandableObjectConverter internal class ContentPartConverter : ExpandableObjectConverter
{ {
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
{ {
if (destType == typeof(string) && value is ContentPart) if (destType == typeof(string) && value is ContentPart)
{ {
// Return the ToString value // Return the ToString value
return ((ContentPart)value).ToString(); return ((ContentPart)value).ToString();
} }
return base.ConvertTo(context, culture, value, destType); return base.ConvertTo(context, culture, value, destType);
} }
} }
#endregion #endregion
} // Namespace } // Namespace

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -19,366 +19,376 @@ using System.ComponentModel;
using System.Collections.Generic; using System.Collections.Generic;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
public delegate void AnnotationAuditInfoEvent(object sender); public delegate void AnnotationAuditInfoEvent(object sender);
/// <summary> /// <summary>
/// AnnotationAuditInfo Generated by MyGeneration using the CSLA Object Mapping template /// AnnotationAuditInfo Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(AnnotationAuditInfoConverter))] [TypeConverter(typeof(AnnotationAuditInfoConverter))]
public partial class AnnotationAuditInfo : ReadOnlyBase<AnnotationAuditInfo>, IDisposable public partial class AnnotationAuditInfo : ReadOnlyBase<AnnotationAuditInfo>, IDisposable
{ {
public event AnnotationAuditInfoEvent Changed; public event AnnotationAuditInfoEvent Changed;
private void OnChange() private void OnChange()
{ {
if (Changed != null) Changed(this); if (Changed != null) Changed(this);
} }
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion #endregion
#region Collection #region Collection
private static List<AnnotationAuditInfo> _CacheList = new List<AnnotationAuditInfo>(); private static List<AnnotationAuditInfo> _CacheList = new List<AnnotationAuditInfo>();
protected static void AddToCache(AnnotationAuditInfo annotationAuditInfo) protected static void AddToCache(AnnotationAuditInfo annotationAuditInfo)
{ {
if (!_CacheList.Contains(annotationAuditInfo)) _CacheList.Add(annotationAuditInfo); // In AddToCache if (!_CacheList.Contains(annotationAuditInfo)) _CacheList.Add(annotationAuditInfo); // In AddToCache
} }
protected static void RemoveFromCache(AnnotationAuditInfo annotationAuditInfo) protected static void RemoveFromCache(AnnotationAuditInfo annotationAuditInfo)
{ {
while (_CacheList.Contains(annotationAuditInfo)) _CacheList.Remove(annotationAuditInfo); // In RemoveFromCache while (_CacheList.Contains(annotationAuditInfo)) _CacheList.Remove(annotationAuditInfo); // In RemoveFromCache
} }
private static Dictionary<string, List<AnnotationAuditInfo>> _CacheByPrimaryKey = new Dictionary<string, List<AnnotationAuditInfo>>(); private static Dictionary<string, List<AnnotationAuditInfo>> _CacheByPrimaryKey = new Dictionary<string, List<AnnotationAuditInfo>>();
private static void ConvertListToDictionary() private static void ConvertListToDictionary()
{ {
while (_CacheList.Count > 0) // Move AnnotationAuditInfo(s) from temporary _CacheList to _CacheByPrimaryKey while (_CacheList.Count > 0) // Move AnnotationAuditInfo(s) from temporary _CacheList to _CacheByPrimaryKey
{ {
AnnotationAuditInfo tmp = _CacheList[0]; // Get the first AnnotationAuditInfo AnnotationAuditInfo tmp = _CacheList[0]; // Get the first AnnotationAuditInfo
string pKey = tmp.AuditID.ToString(); string pKey = tmp.AuditID.ToString();
if (!_CacheByPrimaryKey.ContainsKey(pKey)) if (!_CacheByPrimaryKey.ContainsKey(pKey))
{ {
_CacheByPrimaryKey[pKey] = new List<AnnotationAuditInfo>(); // Add new list for PrimaryKey _CacheByPrimaryKey[pKey] = new List<AnnotationAuditInfo>(); // Add new list for PrimaryKey
} }
_CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list _CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list
_CacheList.RemoveAt(0); // Remove the first AnnotationAuditInfo _CacheList.RemoveAt(0); // Remove the first AnnotationAuditInfo
} }
} }
internal static void AddList(AnnotationAuditInfoList lst) internal static void AddList(AnnotationAuditInfoList lst)
{ {
foreach (AnnotationAuditInfo item in lst) AddToCache(item); foreach (AnnotationAuditInfo item in lst) AddToCache(item);
} }
protected static AnnotationAuditInfo GetCachedByPrimaryKey(long auditID) protected static AnnotationAuditInfo GetCachedByPrimaryKey(long auditID)
{ {
ConvertListToDictionary(); ConvertListToDictionary();
string key = auditID.ToString(); string key = auditID.ToString();
if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0]; if (_CacheByPrimaryKey.ContainsKey(key)) return _CacheByPrimaryKey[key][0];
return null; return null;
} }
#endregion #endregion
#region Business Methods #region Business Methods
private string _ErrorMessage = string.Empty; private string _ErrorMessage = string.Empty;
public string ErrorMessage public string ErrorMessage
{ {
get { return _ErrorMessage; } get { return _ErrorMessage; }
} }
protected AnnotationAudit _Editable; protected AnnotationAudit _Editable;
private IVEHasBrokenRules HasBrokenRules private IVEHasBrokenRules HasBrokenRules
{ {
get get
{ {
IVEHasBrokenRules hasBrokenRules = null; IVEHasBrokenRules hasBrokenRules = null;
if (_Editable != null) if (_Editable != null)
hasBrokenRules = _Editable.HasBrokenRules; hasBrokenRules = _Editable.HasBrokenRules;
return hasBrokenRules; return hasBrokenRules;
} }
} }
private long _AuditID; private long _AuditID;
[System.ComponentModel.DataObjectField(true, true)] [System.ComponentModel.DataObjectField(true, true)]
public long AuditID public long AuditID
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get get
{ {
return _AuditID; CanReadProperty("AuditID", true);
} return _AuditID;
} }
private int _AnnotationID; }
public int AnnotationID private int _AnnotationID;
{ public int AnnotationID
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
return _AnnotationID; {
} CanReadProperty("AnnotationID", true);
} return _AnnotationID;
private int _ItemID; }
public int ItemID }
{ private int _ItemID;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] public int ItemID
get {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
return _ItemID; get
} {
} CanReadProperty("ItemID", true);
private int _TypeID; return _ItemID;
public int TypeID }
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] private int _TypeID;
get public int TypeID
{ {
return _TypeID; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
} {
private string _RtfText = string.Empty; CanReadProperty("TypeID", true);
public string RtfText return _TypeID;
{ }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get private string _RtfText = string.Empty;
{ public string RtfText
return _RtfText; {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
} get
private string _SearchText = string.Empty; {
public string SearchText CanReadProperty("RtfText", true);
{ return _RtfText;
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] }
get }
{ private string _SearchText = string.Empty;
return _SearchText; public string SearchText
} {
} [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
private string _Config = string.Empty; get
public string Config {
{ CanReadProperty("SearchText", true);
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] return _SearchText;
get }
{ }
return _Config; private string _Config = string.Empty;
} public string Config
} {
private DateTime _DTS = new DateTime(); [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
public DateTime DTS get
{ {
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] CanReadProperty("Config", true);
get return _Config;
{ }
return _DTS; }
} private DateTime _DTS = new DateTime();
} public DateTime DTS
private string _UserID = string.Empty; {
public string UserID [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
{ get
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] {
get CanReadProperty("DTS", true);
{ return _DTS;
return _UserID; }
} }
} private string _UserID = string.Empty;
private int _DeleteStatus; public string UserID
public int DeleteStatus {
{ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get
get {
{ CanReadProperty("UserID", true);
return _DeleteStatus; return _UserID;
} }
} }
// CSLATODO: Replace base AnnotationAuditInfo.ToString function as necessary private int _DeleteStatus;
/// <summary> public int DeleteStatus
/// Overrides Base ToString {
/// </summary> [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
/// <returns>A string representation of current AnnotationAuditInfo</returns> get
//public override string ToString() {
//{ CanReadProperty("DeleteStatus", true);
// return base.ToString(); return _DeleteStatus;
//} }
// CSLATODO: Check AnnotationAuditInfo.GetIdValue to assure that the ID returned is unique }
/// <summary> // CSLATODO: Replace base AnnotationAuditInfo.ToString function as necessary
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality /// <summary>
/// </summary> /// Overrides Base ToString
/// <returns>A Unique ID for the current AnnotationAuditInfo</returns> /// </summary>
protected override object GetIdValue() /// <returns>A string representation of current AnnotationAuditInfo</returns>
{ //public override string ToString()
return MyAnnotationAuditInfoUnique; // Absolutely Unique ID //{
} // return base.ToString();
#endregion //}
#region Factory Methods // CSLATODO: Check AnnotationAuditInfo.GetIdValue to assure that the ID returned is unique
private static int _AnnotationAuditInfoUnique = 0; /// <summary>
private static int AnnotationAuditInfoUnique /// Overrides Base GetIdValue - Used internally by CSLA to determine equality
{ get { return ++_AnnotationAuditInfoUnique; } } /// </summary>
private int _MyAnnotationAuditInfoUnique = AnnotationAuditInfoUnique; /// <returns>A Unique ID for the current AnnotationAuditInfo</returns>
public int MyAnnotationAuditInfoUnique // Absolutely Unique ID - Info protected override object GetIdValue()
{ get { return _MyAnnotationAuditInfoUnique; } } {
protected AnnotationAuditInfo() return MyAnnotationAuditInfoUnique; // Absolutely Unique ID
{/* require use of factory methods */ }
AddToCache(this); #endregion
} #region Factory Methods
public void Dispose() private static int _AnnotationAuditInfoUnique = 0;
{ private static int AnnotationAuditInfoUnique
RemoveFromCache(this); { get { return ++_AnnotationAuditInfoUnique; } }
if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return; private int _MyAnnotationAuditInfoUnique = AnnotationAuditInfoUnique;
List<AnnotationAuditInfo> listAnnotationAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items public int MyAnnotationAuditInfoUnique // Absolutely Unique ID - Info
while (listAnnotationAuditInfo.Contains(this)) listAnnotationAuditInfo.Remove(this); // Remove the item from the list { get { return _MyAnnotationAuditInfoUnique; } }
if (listAnnotationAuditInfo.Count == 0) // If there are no items left in the list protected AnnotationAuditInfo()
_CacheByPrimaryKey.Remove(AuditID.ToString()); // remove the list {/* require use of factory methods */
} AddToCache(this);
public virtual AnnotationAudit Get() }
{ public void Dispose()
return _Editable = AnnotationAudit.Get(_AuditID); {
} RemoveFromCache(this);
public static void Refresh(AnnotationAudit tmp) if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return;
{ List<AnnotationAuditInfo> listAnnotationAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items
string key = tmp.AuditID.ToString(); while (listAnnotationAuditInfo.Contains(this)) listAnnotationAuditInfo.Remove(this); // Remove the item from the list
ConvertListToDictionary(); if (listAnnotationAuditInfo.Count == 0) // If there are no items left in the list
if (_CacheByPrimaryKey.ContainsKey(key)) _CacheByPrimaryKey.Remove(AuditID.ToString()); // remove the list
foreach (AnnotationAuditInfo tmpInfo in _CacheByPrimaryKey[key]) }
tmpInfo.RefreshFields(tmp); public virtual AnnotationAudit Get()
} {
protected virtual void RefreshFields(AnnotationAudit tmp) return _Editable = AnnotationAudit.Get(_AuditID);
{ }
_AnnotationID = tmp.AnnotationID; public static void Refresh(AnnotationAudit tmp)
_ItemID = tmp.ItemID; {
_TypeID = tmp.TypeID; string key = tmp.AuditID.ToString();
_RtfText = tmp.RtfText; ConvertListToDictionary();
_SearchText = tmp.SearchText; if (_CacheByPrimaryKey.ContainsKey(key))
_Config = tmp.Config; foreach (AnnotationAuditInfo tmpInfo in _CacheByPrimaryKey[key])
_DTS = tmp.DTS; tmpInfo.RefreshFields(tmp);
_UserID = tmp.UserID; }
_DeleteStatus = tmp.DeleteStatus; protected virtual void RefreshFields(AnnotationAudit tmp)
_AnnotationAuditInfoExtension.Refresh(this); {
OnChange();// raise an event _AnnotationID = tmp.AnnotationID;
} _ItemID = tmp.ItemID;
public static AnnotationAuditInfo Get(long auditID) _TypeID = tmp.TypeID;
{ _RtfText = tmp.RtfText;
//if (!CanGetObject()) _SearchText = tmp.SearchText;
// throw new System.Security.SecurityException("User not authorized to view a AnnotationAudit"); _Config = tmp.Config;
try _DTS = tmp.DTS;
{ _UserID = tmp.UserID;
AnnotationAuditInfo tmp = GetCachedByPrimaryKey(auditID); _DeleteStatus = tmp.DeleteStatus;
if (tmp == null) _AnnotationAuditInfoExtension.Refresh(this);
{ OnChange();// raise an event
tmp = DataPortal.Fetch<AnnotationAuditInfo>(new PKCriteria(auditID)); }
AddToCache(tmp); public static AnnotationAuditInfo Get(long auditID)
} {
if (tmp.ErrorMessage == "No Record Found") //if (!CanGetObject())
{ // throw new System.Security.SecurityException("User not authorized to view a AnnotationAudit");
tmp.Dispose(); // Clean-up AnnotationAuditInfo try
tmp = null; {
} AnnotationAuditInfo tmp = GetCachedByPrimaryKey(auditID);
return tmp; if (tmp == null)
} {
catch (Exception ex) tmp = DataPortal.Fetch<AnnotationAuditInfo>(new PKCriteria(auditID));
{ AddToCache(tmp);
throw new DbCslaException("Error on AnnotationAuditInfo.Get", ex); }
} if (tmp.ErrorMessage == "No Record Found")
} {
#endregion tmp.Dispose(); // Clean-up AnnotationAuditInfo
#region Data Access Portal tmp = null;
internal AnnotationAuditInfo(SafeDataReader dr) }
{ return tmp;
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AnnotationAuditInfo.Constructor", GetHashCode()); }
try catch (Exception ex)
{ {
ReadData(dr); throw new DbCslaException("Error on AnnotationAuditInfo.Get", ex);
} }
catch (Exception ex) }
{ #endregion
if (_MyLog.IsErrorEnabled) _MyLog.Error("AnnotationAuditInfo.Constructor", ex); #region Data Access Portal
throw new DbCslaException("AnnotationAuditInfo.Constructor", ex); internal AnnotationAuditInfo(SafeDataReader dr)
} {
} if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AnnotationAuditInfo.Constructor", GetHashCode());
[Serializable()] try
protected class PKCriteria {
{ ReadData(dr);
private long _AuditID; }
public long AuditID catch (Exception ex)
{ get { return _AuditID; } } {
public PKCriteria(long auditID) if (_MyLog.IsErrorEnabled) _MyLog.Error("AnnotationAuditInfo.Constructor", ex);
{ throw new DbCslaException("AnnotationAuditInfo.Constructor", ex);
_AuditID = auditID; }
} }
} [Serializable()]
private void ReadData(SafeDataReader dr) protected class PKCriteria
{ {
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AnnotationAuditInfo.ReadData", GetHashCode()); private long _AuditID;
try public long AuditID
{ { get { return _AuditID; } }
_AuditID = dr.GetInt64("AuditID"); public PKCriteria(long auditID)
_AnnotationID = dr.GetInt32("AnnotationID"); {
_ItemID = dr.GetInt32("ItemID"); _AuditID = auditID;
_TypeID = dr.GetInt32("TypeID"); }
_RtfText = dr.GetString("RtfText"); }
_SearchText = dr.GetString("SearchText"); private void ReadData(SafeDataReader dr)
_Config = dr.GetString("Config"); {
_DTS = dr.GetDateTime("DTS"); if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AnnotationAuditInfo.ReadData", GetHashCode());
_UserID = dr.GetString("UserID"); try
_DeleteStatus = dr.GetInt32("DeleteStatus"); {
} _AuditID = dr.GetInt64("AuditID");
catch (Exception ex) _AnnotationID = dr.GetInt32("AnnotationID");
{ _ItemID = dr.GetInt32("ItemID");
if (_MyLog.IsErrorEnabled) _MyLog.Error("AnnotationAuditInfo.ReadData", ex); _TypeID = dr.GetInt32("TypeID");
_ErrorMessage = ex.Message; _RtfText = dr.GetString("RtfText");
throw new DbCslaException("AnnotationAuditInfo.ReadData", ex); _SearchText = dr.GetString("SearchText");
} _Config = dr.GetString("Config");
} _DTS = dr.GetDateTime("DTS");
private void DataPortal_Fetch(PKCriteria criteria) _UserID = dr.GetString("UserID");
{ _DeleteStatus = dr.GetInt32("DeleteStatus");
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AnnotationAuditInfo.DataPortal_Fetch", GetHashCode()); }
try catch (Exception ex)
{ {
using (SqlConnection cn = Database.VEPROMS_SqlConnection) if (_MyLog.IsErrorEnabled) _MyLog.Error("AnnotationAuditInfo.ReadData", ex);
{ _ErrorMessage = ex.Message;
ApplicationContext.LocalContext["cn"] = cn; throw new DbCslaException("AnnotationAuditInfo.ReadData", ex);
using (SqlCommand cm = cn.CreateCommand()) }
{ }
cm.CommandType = CommandType.StoredProcedure; private void DataPortal_Fetch(PKCriteria criteria)
cm.CommandText = "getAnnotationAudit"; {
cm.Parameters.AddWithValue("@AuditID", criteria.AuditID); if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AnnotationAuditInfo.DataPortal_Fetch", GetHashCode());
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) try
{ {
if (!dr.Read()) using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{ {
_ErrorMessage = "No Record Found"; ApplicationContext.LocalContext["cn"] = cn;
return; using (SqlCommand cm = cn.CreateCommand())
} {
ReadData(dr); cm.CommandType = CommandType.StoredProcedure;
} cm.CommandText = "getAnnotationAudit";
} cm.Parameters.AddWithValue("@AuditID", criteria.AuditID);
// removing of item only needed for local data portal using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client) {
ApplicationContext.LocalContext.Remove("cn"); if (!dr.Read())
} {
} _ErrorMessage = "No Record Found";
catch (Exception ex) return;
{ }
if (_MyLog.IsErrorEnabled) _MyLog.Error("AnnotationAuditInfo.DataPortal_Fetch", ex); ReadData(dr);
_ErrorMessage = ex.Message; }
throw new DbCslaException("AnnotationAuditInfo.DataPortal_Fetch", ex); }
} // removing of item only needed for local data portal
} if (ApplicationContext.ExecutionLocation == ApplicationContext.ExecutionLocations.Client)
#endregion ApplicationContext.LocalContext.Remove("cn");
// Standard Refresh }
#region extension }
AnnotationAuditInfoExtension _AnnotationAuditInfoExtension = new AnnotationAuditInfoExtension(); catch (Exception ex)
[Serializable()] {
partial class AnnotationAuditInfoExtension : extensionBase { } if (_MyLog.IsErrorEnabled) _MyLog.Error("AnnotationAuditInfo.DataPortal_Fetch", ex);
[Serializable()] _ErrorMessage = ex.Message;
class extensionBase throw new DbCslaException("AnnotationAuditInfo.DataPortal_Fetch", ex);
{ }
// Default Refresh }
public virtual void Refresh(AnnotationAuditInfo tmp) { } #endregion
} // Standard Refresh
#endregion #region extension
} // Class AnnotationAuditInfoExtension _AnnotationAuditInfoExtension = new AnnotationAuditInfoExtension();
#region Converter [Serializable()]
internal class AnnotationAuditInfoConverter : ExpandableObjectConverter partial class AnnotationAuditInfoExtension : extensionBase { }
{ [Serializable()]
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) class extensionBase
{ {
if (destType == typeof(string) && value is AnnotationAuditInfo) // Default Refresh
{ public virtual void Refresh(AnnotationAuditInfo tmp) { }
// Return the ToString value }
return ((AnnotationAuditInfo)value).ToString(); #endregion
} } // Class
return base.ConvertTo(context, culture, value, destType); #region Converter
} internal class AnnotationAuditInfoConverter : ExpandableObjectConverter
} {
#endregion public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
{
if (destType == typeof(string) && value is AnnotationAuditInfo)
{
// Return the ToString value
return ((AnnotationAuditInfo)value).ToString();
}
return base.ConvertTo(context, culture, value, destType);
}
}
#endregion
} // Namespace } // Namespace

Some files were not shown because too many files have changed in this diff Show More