This commit is contained in:
6
AyaNovaQBI/MainForm.Designer.cs
generated
6
AyaNovaQBI/MainForm.Designer.cs
generated
@@ -171,19 +171,19 @@
|
|||||||
//
|
//
|
||||||
this.onlineManualToolStripMenuItem.Name = "onlineManualToolStripMenuItem";
|
this.onlineManualToolStripMenuItem.Name = "onlineManualToolStripMenuItem";
|
||||||
this.onlineManualToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
|
this.onlineManualToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
|
||||||
this.onlineManualToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
this.onlineManualToolStripMenuItem.Size = new System.Drawing.Size(171, 22);
|
||||||
this.onlineManualToolStripMenuItem.Text = "&Online manual";
|
this.onlineManualToolStripMenuItem.Text = "&Online manual";
|
||||||
//
|
//
|
||||||
// technicalsupportToolStripMenuItem
|
// technicalsupportToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.technicalsupportToolStripMenuItem.Name = "technicalsupportToolStripMenuItem";
|
this.technicalsupportToolStripMenuItem.Name = "technicalsupportToolStripMenuItem";
|
||||||
this.technicalsupportToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
this.technicalsupportToolStripMenuItem.Size = new System.Drawing.Size(171, 22);
|
||||||
this.technicalsupportToolStripMenuItem.Text = "Technical &support";
|
this.technicalsupportToolStripMenuItem.Text = "Technical &support";
|
||||||
//
|
//
|
||||||
// aboutToolStripMenuItem
|
// aboutToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
|
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
|
||||||
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(171, 22);
|
||||||
this.aboutToolStripMenuItem.Text = "&About";
|
this.aboutToolStripMenuItem.Text = "&About";
|
||||||
//
|
//
|
||||||
// exitToolStripMenuItem
|
// exitToolStripMenuItem
|
||||||
|
|||||||
@@ -21,8 +21,11 @@ namespace AyaNovaQBI
|
|||||||
{
|
{
|
||||||
|
|
||||||
//Initialize
|
//Initialize
|
||||||
if(await util.InitializeQBI() == false)
|
StringBuilder initErrors = new StringBuilder();
|
||||||
|
if (await util.InitializeQBI(initErrors) == false)
|
||||||
{
|
{
|
||||||
|
if (initErrors.Length>0)
|
||||||
|
await Task.Run(() => MessageBox.Show($"AyaNova QBI was unable to start:\r\n{initErrors.ToString()}"));
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,7 +42,8 @@ namespace AyaNovaQBI
|
|||||||
if (!isLinked)
|
if (!isLinked)
|
||||||
{
|
{
|
||||||
grid.Rows[e.RowIndex].ErrorText = "Not invoiceable: use \"Invoice\" -> \"Fix problems\" to resolve";
|
grid.Rows[e.RowIndex].ErrorText = "Not invoiceable: use \"Invoice\" -> \"Fix problems\" to resolve";
|
||||||
}else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
grid.Rows[e.RowIndex].ErrorText = null;
|
grid.Rows[e.RowIndex].ErrorText = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,11 +72,11 @@ namespace AyaNovaQBI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageBox.Show($@"TEST - LOGIN SUCCEEDED: \r\
|
// MessageBox.Show($@"TEST - LOGIN SUCCEEDED: \r\
|
||||||
AyaNovaUserName: {util.AyaNovaUserName}\r\n
|
//AyaNovaUserName: {util.AyaNovaUserName}\r\n
|
||||||
JWT: {util.JWT}\r\n
|
//JWT: {util.JWT}\r\n
|
||||||
AyaNovaUserRoles: {util.AyaNovaUserRoles}\r\n
|
//AyaNovaUserRoles: {util.AyaNovaUserRoles}\r\n
|
||||||
AyaNovaUserType: {util.AyaNovaUserType}");
|
//AyaNovaUserType: {util.AyaNovaUserType}");
|
||||||
|
|
||||||
|
|
||||||
btnLogin.Enabled = btnTest.Enabled = true;
|
btnLogin.Enabled = btnTest.Enabled = true;
|
||||||
|
|||||||
@@ -449,7 +449,7 @@ namespace AyaNovaQBI
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static async Task<bool> InitializeQBI()
|
public static async Task<bool> InitializeQBI(StringBuilder initErrors)
|
||||||
{
|
{
|
||||||
//COPY most of this code from qbi v7 becuase it has a lot of edge cases in it and it's complex and thorough, but break it into abstracted bits so can be replicated in other accounting add-on's more easily
|
//COPY most of this code from qbi v7 becuase it has a lot of edge cases in it and it's complex and thorough, but break it into abstracted bits so can be replicated in other accounting add-on's more easily
|
||||||
|
|
||||||
@@ -459,11 +459,14 @@ namespace AyaNovaQBI
|
|||||||
if (d.ShowDialog() == System.Windows.Forms.DialogResult.Cancel)
|
if (d.ShowDialog() == System.Windows.Forms.DialogResult.Cancel)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
//Fetch AyaNova license
|
|
||||||
var r=await GetAsync("license");
|
|
||||||
todo: need to be able to check via route if has licensefeature, code is already in license biz object, just need exposed to route for logged in users only under license/has-feature
|
|
||||||
|
|
||||||
//Check if licensed
|
//Check if licensed
|
||||||
|
var r = await GetAsync("license/has-feature/XQBI");
|
||||||
|
if (!r.ObjectResponse["data"].Value<bool>())
|
||||||
|
{
|
||||||
|
initErrors.AppendLine("This AyaNova server is not licensed to use QBI");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//check if build date is within licensed date (how did I do that automated build date thing?)
|
//check if build date is within licensed date (how did I do that automated build date thing?)
|
||||||
// copy timestamp.cs and the createtimestamp.exe utility from v7 qbi and create build event to run it here and do same thing
|
// copy timestamp.cs and the createtimestamp.exe utility from v7 qbi and create build event to run it here and do same thing
|
||||||
//check that AyaNova version matches required minimum for this QBI (
|
//check that AyaNova version matches required minimum for this QBI (
|
||||||
|
|||||||
Reference in New Issue
Block a user