UpgradeSelectionDlg : Cutom button with an action that is commented out, ver. 2.26.1555
This commit is contained in:
@@ -11,6 +11,7 @@ using NHibernate;
|
||||
using Results;
|
||||
using Results.Entities;
|
||||
using TBF.Resources;
|
||||
using System.Text;
|
||||
|
||||
namespace TBF.UI.Settings
|
||||
{
|
||||
@@ -1041,5 +1042,56 @@ namespace TBF.UI.Settings
|
||||
"Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
|
||||
private void customButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ActivityStart();
|
||||
|
||||
try
|
||||
{
|
||||
//ISession session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
|
||||
|
||||
//var proceduresToModify = session.QueryOver<Config.Entities.Procedure>()
|
||||
// .Where(x => (x.ProcedureState == Config.Entities.ProcedureState.Active))
|
||||
// .OrderBy(x => x.ItemNr).Asc
|
||||
// .List<Config.Entities.Procedure>();
|
||||
|
||||
//foreach (var proc in proceduresToModify)
|
||||
//{
|
||||
// if (!string.IsNullOrEmpty(proc.ResultsWriter) && proc.ResultsWriter.Contains("IperlLogger"))
|
||||
// {
|
||||
// Console.WriteLine("{0} ... {1}", proc.Name, proc.ResultsWriter);
|
||||
// string[] writers = proc.ResultsWriter.Split(new char[] { '~' });
|
||||
// StringBuilder sb = new StringBuilder();
|
||||
// for (int i = 0; i < writers.Length; i++)
|
||||
// {
|
||||
// if (writers[i].Contains("IperlLogger"))
|
||||
// {
|
||||
// sb.Append("IperlLogger");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// sb.Append(writers[i]);
|
||||
// }
|
||||
|
||||
// if (i != writers.Length - 1) sb.Append("~");
|
||||
// }
|
||||
// proc.ResultsWriter = sb.ToString();
|
||||
|
||||
// session.SaveOrUpdate(proc);
|
||||
// }
|
||||
//}
|
||||
|
||||
//session.Flush();
|
||||
ActivityEnd();
|
||||
MessageBox.Show("Upgrade completed", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
ActivityEnd();
|
||||
MessageBox.Show(string.Format("Upgrade failed:\r\n{0}", exc.Message),
|
||||
"Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user