Compare commits
No commits in common. "28e4bdda29775261eb00bfdfb7ddb64bf2b9142e" and "caec6adf8d67d488b8af5b7f3c834148611cb381" have entirely different histories.
28e4bdda29
...
caec6adf8d
@ -504,7 +504,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 +527,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 +555,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 +577,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,7 +740,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;
|
||||||
@ -845,7 +845,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;
|
||||||
@ -1196,8 +1196,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 ||
|
||||||
@ -1213,10 +1212,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)
|
||||||
{
|
{
|
||||||
@ -1230,28 +1225,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}>");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1261,7 +1248,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1275,11 +1262,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)
|
||||||
@ -1513,7 +1497,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
|
||||||
//
|
//
|
||||||
@ -1536,28 +1519,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 && !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;
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -339,7 +339,7 @@ namespace RODBInterface
|
|||||||
public abstract bool RODB_WriteRO(VlnXmlElement ro);
|
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);
|
||||||
@ -2294,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;
|
||||||
|
@ -1744,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;
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user