After code cleanup
This commit is contained in:
@@ -1,11 +1,4 @@
|
|||||||
using System;
|
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;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
@@ -16,34 +9,34 @@ namespace AyaNovaQBI
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
private string _CompanyName;
|
private string _CompanyName;
|
||||||
private string _CompanyPath;
|
private string _CompanyPath;
|
||||||
public string QBCompanyName
|
public string QBCompanyName
|
||||||
{
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_CompanyName = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public string QBCompanyPath
|
|
||||||
{
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_CompanyPath = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private void ApproveCompanyFile_Load(object sender, EventArgs e)
|
|
||||||
{
|
{
|
||||||
this.btnCancel.Text = util.AyaTranslations["Cancel"];
|
set
|
||||||
this.btnOK.Text = util.AyaTranslations["OK"];
|
{
|
||||||
this.lblCompany.Text = _CompanyName;
|
_CompanyName = value;
|
||||||
this.lblPath.Text = _CompanyPath;
|
}
|
||||||
}
|
}
|
||||||
|
public string QBCompanyPath
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_CompanyPath = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void ApproveCompanyFile_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.btnCancel.Text = util.AyaTranslations["Cancel"];
|
||||||
|
this.btnOK.Text = util.AyaTranslations["OK"];
|
||||||
|
this.lblCompany.Text = _CompanyName;
|
||||||
|
this.lblPath.Text = _CompanyPath;
|
||||||
|
}
|
||||||
|
|
||||||
private void btnOK_Click(object sender, EventArgs e)
|
private void btnOK_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
namespace AyaNovaQBI
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
namespace AyaNovaQBI
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// All AyaNova types and their attributes indicating what features that type will support (tagging, attachments etc)
|
/// All AyaNova types and their attributes indicating what features that type will support (tagging, attachments etc)
|
||||||
|
|||||||
@@ -1,11 +1,4 @@
|
|||||||
using System;
|
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;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
@@ -16,7 +9,7 @@ namespace AyaNovaQBI
|
|||||||
public CopyableMessageBox(string Display)
|
public CopyableMessageBox(string Display)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
mDisplay=Display;
|
mDisplay = Display;
|
||||||
Icon = AyaNovaQBI.Properties.Resources.logo;
|
Icon = AyaNovaQBI.Properties.Resources.logo;
|
||||||
btnOK.Text = util.AyaTranslations["OK"];
|
btnOK.Text = util.AyaTranslations["OK"];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,4 @@
|
|||||||
using System;
|
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;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
@@ -68,7 +61,7 @@ namespace AyaNovaQBI
|
|||||||
if (!menutag.StartsWith("Set"))//skip the two permanently visible ones
|
if (!menutag.StartsWith("Set"))//skip the two permanently visible ones
|
||||||
{
|
{
|
||||||
t.Visible = edittag == menutag;
|
t.Visible = edittag == menutag;
|
||||||
// System.Diagnostics.Debug.WriteLine($"editField_Enter setting menu item {menutag} to visible= {t.Visible}");
|
// System.Diagnostics.Debug.WriteLine($"editField_Enter setting menu item {menutag} to visible= {t.Visible}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -78,7 +71,7 @@ namespace AyaNovaQBI
|
|||||||
if (e.ClickedItem.Tag == null) return;//probably just a container menu item / not a special menu item
|
if (e.ClickedItem.Tag == null) return;//probably just a container menu item / not a special menu item
|
||||||
|
|
||||||
string tag = e.ClickedItem.Tag.ToString();
|
string tag = e.ClickedItem.Tag.ToString();
|
||||||
// System.Diagnostics.Debug.WriteLine($"you clicked on {tag}");
|
// System.Diagnostics.Debug.WriteLine($"you clicked on {tag}");
|
||||||
if (tag.StartsWith("~"))
|
if (tag.StartsWith("~"))
|
||||||
_CurrentTextEditor.Text = _CurrentTextEditor.Text.Insert(_CurrentTextEditor.SelectionStart, tag);
|
_CurrentTextEditor.Text = _CurrentTextEditor.Text.Insert(_CurrentTextEditor.SelectionStart, tag);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,29 +1,23 @@
|
|||||||
using System;
|
namespace AyaNovaQBI
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
|
||||||
{
|
{
|
||||||
internal class InvoiceableItem
|
internal class InvoiceableItem
|
||||||
{
|
{
|
||||||
public string Customer { get; set; }
|
public string Customer { get; set; }
|
||||||
public string Status { get; set; }
|
public string Status { get; set; }
|
||||||
public string ServiceNumber { get; set; }
|
public string ServiceNumber { get; set; }
|
||||||
public string ServiceDate { get; set; }
|
public string ServiceDate { get; set; }
|
||||||
public string Project { get; set; }
|
public string Project { get; set; }
|
||||||
public string StatusColor { get; set; }
|
public string StatusColor { get; set; }
|
||||||
|
|
||||||
public long WorkorderId { get; set; }
|
public long WorkorderId { get; set; }
|
||||||
public bool Linked { get; set; }
|
public bool Linked { get; set; }
|
||||||
public long CustomerId { get; set; }
|
public long CustomerId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
grid.DisplayLayout.Bands[0].Columns["WorkingID"].Hidden=true;
|
grid.DisplayLayout.Bands[0].Columns["WorkingID"].Hidden=true;
|
||||||
grid.DisplayLayout.Bands[0].Columns["ClientID"].Hidden=true;
|
grid.DisplayLayout.Bands[0].Columns["ClientID"].Hidden=true;
|
||||||
grid.DisplayLayout.Bands[0].Columns["Linked"].Hidden=true;
|
grid.DisplayLayout.Bands[0].Columns["Linked"].Hidden=true;
|
||||||
@@ -34,6 +28,6 @@ namespace AyaNovaQBI
|
|||||||
grid.DisplayLayout.Bands[1].Columns["StatusARGB"].Hidden=true;
|
grid.DisplayLayout.Bands[1].Columns["StatusARGB"].Hidden=true;
|
||||||
grid.DisplayLayout.Bands[1].Columns["Linked"].Hidden=true;
|
grid.DisplayLayout.Bands[1].Columns["Linked"].Hidden=true;
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -20,7 +18,7 @@ namespace AyaNovaQBI
|
|||||||
Icon = AyaNovaQBI.Properties.Resources.logo;
|
Icon = AyaNovaQBI.Properties.Resources.logo;
|
||||||
}
|
}
|
||||||
|
|
||||||
async private void MainForm_Load(object sender, EventArgs e)
|
private async void MainForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
//Initialize
|
//Initialize
|
||||||
@@ -465,7 +463,7 @@ namespace AyaNovaQBI
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// grid.DisplayLayout.Rows.CollapseAll(false);
|
// grid.DisplayLayout.Rows.CollapseAll(false);
|
||||||
//foreach (UltraGridRow r in grid.Rows)
|
//foreach (UltraGridRow r in grid.Rows)
|
||||||
//{
|
//{
|
||||||
// foreach (UltraGridRow rr in r.ChildBands[0].Rows)
|
// foreach (UltraGridRow rr in r.ChildBands[0].Rows)
|
||||||
|
|||||||
@@ -1,11 +1,4 @@
|
|||||||
using System;
|
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;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
@@ -19,7 +12,9 @@ namespace AyaNovaQBI
|
|||||||
|
|
||||||
public bool ShowUpdatePriceCostOnlyCheckBox { get; set; } = false;
|
public bool ShowUpdatePriceCostOnlyCheckBox { get; set; } = false;
|
||||||
|
|
||||||
public bool PriceOnly { get
|
public bool PriceOnly
|
||||||
|
{
|
||||||
|
get
|
||||||
{
|
{
|
||||||
return ckUpdatePriceCostOnly.Checked;
|
return ckUpdatePriceCostOnly.Checked;
|
||||||
}
|
}
|
||||||
@@ -29,7 +24,7 @@ namespace AyaNovaQBI
|
|||||||
private void MapApproveUpdateSelectedItems_Load(object sender, EventArgs e)
|
private void MapApproveUpdateSelectedItems_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ckUpdatePriceCostOnly.Visible = ShowUpdatePriceCostOnlyCheckBox;
|
ckUpdatePriceCostOnly.Visible = ShowUpdatePriceCostOnlyCheckBox;
|
||||||
lblUpdateMessage.Text=UpdateMessage;
|
lblUpdateMessage.Text = UpdateMessage;
|
||||||
btnCancel.Text = util.AyaTranslations["Cancel"];
|
btnCancel.Text = util.AyaTranslations["Cancel"];
|
||||||
btnOK.Text = util.AyaTranslations["OK"];
|
btnOK.Text = util.AyaTranslations["OK"];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace AyaNovaQBI
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
|
||||||
{
|
{
|
||||||
public class NameIdActiveChargeCostItem
|
public class NameIdActiveChargeCostItem
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace AyaNovaQBI
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
|
||||||
{
|
{
|
||||||
public class NameIdActiveItem
|
public class NameIdActiveItem
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace AyaNovaQBI
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
|
||||||
{
|
{
|
||||||
|
|
||||||
public class NameIdItem
|
public class NameIdItem
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace AyaNovaQBI
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
|
||||||
{
|
{
|
||||||
public class PartStockLevel
|
public class PartStockLevel
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Data;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Data;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Data;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
|
|||||||
@@ -1,11 +1,4 @@
|
|||||||
using System;
|
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;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
|
|||||||
@@ -1,11 +1,4 @@
|
|||||||
using System;
|
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;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Data;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace AyaNovaQBI
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// AyaNova User types
|
/// AyaNova User types
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,12 +1,4 @@
|
|||||||
using System;
|
using System.Windows.Forms;
|
||||||
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 AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
@@ -17,23 +9,23 @@ namespace AyaNovaQBI
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Ops
|
public string Ops
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
lblOps.Text = value;
|
lblOps.Text = value;
|
||||||
this.Refresh();
|
this.Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Step
|
public string Step
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
lblStep.Text = value;
|
lblStep.Text = value;
|
||||||
this.Refresh();
|
this.Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
@@ -85,7 +82,7 @@ namespace AyaNovaQBI
|
|||||||
public decimal? Longitude { get; set; }
|
public decimal? Longitude { get; set; }
|
||||||
|
|
||||||
public List<WorkOrderItem> Items { get; set; } = new List<WorkOrderItem>();
|
public List<WorkOrderItem> Items { get; set; } = new List<WorkOrderItem>();
|
||||||
// public List<WorkOrderState> States { get; set; } = new List<WorkOrderState>();
|
// public List<WorkOrderState> States { get; set; } = new List<WorkOrderState>();
|
||||||
|
|
||||||
|
|
||||||
//UTILITY FIELDS
|
//UTILITY FIELDS
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
@@ -10,15 +6,15 @@ namespace AyaNovaQBI
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// DTO object to receive list from server of billable workorders
|
/// DTO object to receive list from server of billable workorders
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class WorkOrderAccountingListItem
|
public class WorkOrderAccountingListItem
|
||||||
{
|
{
|
||||||
internal long id { get; set; }
|
public long id { get; set; }
|
||||||
internal long customerId { get; set; }
|
public long customerId { get; set; }
|
||||||
internal string customerName { get; set; }
|
public string customerName { get; set; }
|
||||||
internal string workorderStatusName { get; set; }
|
public string workorderStatusName { get; set; }
|
||||||
internal long serial { get; set; }
|
public long serial { get; set; }
|
||||||
internal DateTime? serviceDate { get; set; }
|
public DateTime? serviceDate { get; set; }
|
||||||
internal string color { get; set; }
|
public string color { get; set; }
|
||||||
internal string projectName { get; set; }
|
public string projectName { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,21 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Working list for selection by user in grid
|
/// Working list for selection by user in grid
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class WorkOrderGridListItem
|
public class WorkOrderGridListItem
|
||||||
{
|
{
|
||||||
internal long Id { get; set; }
|
public long Id { get; set; }
|
||||||
internal long CustomerId { get; set; }
|
public long CustomerId { get; set; }
|
||||||
internal string CustomerName { get; set; }
|
public string CustomerName { get; set; }
|
||||||
internal string WorkorderStatusName { get; set; }
|
public string WorkorderStatusName { get; set; }
|
||||||
internal long Serial { get; set; }
|
public long Serial { get; set; }
|
||||||
internal DateTime? ServiceDate { get; set; }
|
public DateTime? ServiceDate { get; set; }
|
||||||
internal string Color { get; set; }
|
public string Color { get; set; }
|
||||||
internal string ProjectName { get; set; }
|
public string ProjectName { get; set; }
|
||||||
|
|
||||||
internal bool Linked { get; set; }
|
public bool Linked { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
@@ -50,11 +47,11 @@ namespace AyaNovaQBI
|
|||||||
public List<WorkOrderItemLabor> Labors { get; set; } = new List<WorkOrderItemLabor>();
|
public List<WorkOrderItemLabor> Labors { get; set; } = new List<WorkOrderItemLabor>();
|
||||||
public List<WorkOrderItemLoan> Loans { get; set; } = new List<WorkOrderItemLoan>();
|
public List<WorkOrderItemLoan> Loans { get; set; } = new List<WorkOrderItemLoan>();
|
||||||
public List<WorkOrderItemPart> Parts { get; set; } = new List<WorkOrderItemPart>();
|
public List<WorkOrderItemPart> Parts { get; set; } = new List<WorkOrderItemPart>();
|
||||||
// public List<WorkOrderItemPartRequest> PartRequests { get; set; } = new List<WorkOrderItemPartRequest>();
|
// public List<WorkOrderItemPartRequest> PartRequests { get; set; } = new List<WorkOrderItemPartRequest>();
|
||||||
// public List<WorkOrderItemScheduledUser> ScheduledUsers { get; set; } = new List<WorkOrderItemScheduledUser>();
|
// public List<WorkOrderItemScheduledUser> ScheduledUsers { get; set; } = new List<WorkOrderItemScheduledUser>();
|
||||||
// public List<WorkOrderItemTask> Tasks { get; set; } = new List<WorkOrderItemTask>();
|
// public List<WorkOrderItemTask> Tasks { get; set; } = new List<WorkOrderItemTask>();
|
||||||
public List<WorkOrderItemTravel> Travels { get; set; } = new List<WorkOrderItemTravel>();
|
public List<WorkOrderItemTravel> Travels { get; set; } = new List<WorkOrderItemTravel>();
|
||||||
// public List<WorkOrderItemUnit> Units { get; set; } = new List<WorkOrderItemUnit>();
|
// public List<WorkOrderItemUnit> Units { get; set; } = new List<WorkOrderItemUnit>();
|
||||||
public List<WorkOrderItemOutsideService> OutsideServices { get; set; } = new List<WorkOrderItemOutsideService>();
|
public List<WorkOrderItemOutsideService> OutsideServices { get; set; } = new List<WorkOrderItemOutsideService>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace AyaNovaQBI
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
|
||||||
{
|
{
|
||||||
internal class WorkOrderItemExpense
|
internal class WorkOrderItemExpense
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace AyaNovaQBI
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
|
||||||
{
|
{
|
||||||
internal class WorkOrderStatus
|
internal class WorkOrderStatus
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -65,11 +65,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;
|
||||||
|
|||||||
@@ -1,11 +1,4 @@
|
|||||||
using System;
|
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;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
using System;
|
using Interop.QBFC15;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using Newtonsoft.Json.Linq;
|
using System.Text;
|
||||||
using Interop.QBFC15;
|
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Data;
|
|
||||||
using System.Collections;
|
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
@@ -91,7 +90,7 @@ namespace AyaNovaQBI
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public async static Task<bool> AuthenticateAsync(string login, string password = null)
|
public static async Task<bool> AuthenticateAsync(string login, string password = null)
|
||||||
{
|
{
|
||||||
InitClient();
|
InitClient();
|
||||||
|
|
||||||
@@ -202,7 +201,7 @@ namespace AyaNovaQBI
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public async static Task<ApiResponse> GetAsync(string route)
|
public static async Task<ApiResponse> GetAsync(string route)
|
||||||
{
|
{
|
||||||
Exception FirstException = null;
|
Exception FirstException = null;
|
||||||
|
|
||||||
@@ -224,7 +223,7 @@ namespace AyaNovaQBI
|
|||||||
throw new Exception($"API call failed after {MAX_TRIES.ToString()} attempts", FirstException);
|
throw new Exception($"API call failed after {MAX_TRIES.ToString()} attempts", FirstException);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async static Task<ApiResponse> TryGetAsync(string route)
|
private static async Task<ApiResponse> TryGetAsync(string route)
|
||||||
{
|
{
|
||||||
var requestMessage = new HttpRequestMessage(HttpMethod.Get, ApiBaseUrl + route);
|
var requestMessage = new HttpRequestMessage(HttpMethod.Get, ApiBaseUrl + route);
|
||||||
|
|
||||||
@@ -258,7 +257,7 @@ namespace AyaNovaQBI
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public async static Task<ApiResponse> PostAsync(string route, dynamic d)
|
public static async Task<ApiResponse> PostAsync(string route, dynamic d)
|
||||||
{
|
{
|
||||||
Exception FirstException = null;
|
Exception FirstException = null;
|
||||||
|
|
||||||
@@ -280,7 +279,7 @@ namespace AyaNovaQBI
|
|||||||
throw new Exception($"API call failed after {MAX_TRIES.ToString()} attempts", FirstException);
|
throw new Exception($"API call failed after {MAX_TRIES.ToString()} attempts", FirstException);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async static Task<ApiResponse> PostAsync(string route, string s = null)
|
public static async Task<ApiResponse> PostAsync(string route, string s = null)
|
||||||
{
|
{
|
||||||
Exception FirstException = null;
|
Exception FirstException = null;
|
||||||
|
|
||||||
@@ -303,7 +302,7 @@ namespace AyaNovaQBI
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
internal async static Task<ApiResponse> TryPostAsync(string route, string postJson = null)
|
internal static async Task<ApiResponse> TryPostAsync(string route, string postJson = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
var requestMessage = new HttpRequestMessage(HttpMethod.Post, ApiBaseUrl + route);
|
var requestMessage = new HttpRequestMessage(HttpMethod.Post, ApiBaseUrl + route);
|
||||||
@@ -367,7 +366,7 @@ namespace AyaNovaQBI
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public async static Task<ApiResponse> PutAsync(string route, dynamic d)
|
public static async Task<ApiResponse> PutAsync(string route, dynamic d)
|
||||||
{
|
{
|
||||||
Exception FirstException = null;
|
Exception FirstException = null;
|
||||||
|
|
||||||
@@ -389,7 +388,7 @@ namespace AyaNovaQBI
|
|||||||
throw new Exception($"API call failed after {MAX_TRIES.ToString()} attempts", FirstException);
|
throw new Exception($"API call failed after {MAX_TRIES.ToString()} attempts", FirstException);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async static Task<ApiResponse> PutAsync(string route, string s = null)
|
public static async Task<ApiResponse> PutAsync(string route, string s = null)
|
||||||
{
|
{
|
||||||
Exception FirstException = null;
|
Exception FirstException = null;
|
||||||
|
|
||||||
@@ -411,7 +410,7 @@ namespace AyaNovaQBI
|
|||||||
throw new Exception($"API call failed after {MAX_TRIES.ToString()} attempts", FirstException);
|
throw new Exception($"API call failed after {MAX_TRIES.ToString()} attempts", FirstException);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async static Task<ApiResponse> PutAsync(string route)
|
public static async Task<ApiResponse> PutAsync(string route)
|
||||||
{
|
{
|
||||||
Exception FirstException = null;
|
Exception FirstException = null;
|
||||||
|
|
||||||
@@ -433,7 +432,7 @@ namespace AyaNovaQBI
|
|||||||
throw new Exception($"API call failed after {MAX_TRIES.ToString()} attempts", FirstException);
|
throw new Exception($"API call failed after {MAX_TRIES.ToString()} attempts", FirstException);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async static Task<ApiResponse> TryPutAsync(string route, string putJson = null)
|
public static async Task<ApiResponse> TryPutAsync(string route, string putJson = null)
|
||||||
{
|
{
|
||||||
var requestMessage = new HttpRequestMessage(HttpMethod.Put, ApiBaseUrl + route);
|
var requestMessage = new HttpRequestMessage(HttpMethod.Put, ApiBaseUrl + route);
|
||||||
|
|
||||||
@@ -1384,7 +1383,7 @@ namespace AyaNovaQBI
|
|||||||
/// gather info required for future
|
/// gather info required for future
|
||||||
/// transactions
|
/// transactions
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public async static Task<pfstat> QBValidate()
|
public static async Task<pfstat> QBValidate()
|
||||||
{
|
{
|
||||||
// We want to know if we begun a session so we can end it if an
|
// We want to know if we begun a session so we can end it if an
|
||||||
// error happens
|
// error happens
|
||||||
@@ -1750,7 +1749,7 @@ namespace AyaNovaQBI
|
|||||||
/// Populate the cached qb data
|
/// Populate the cached qb data
|
||||||
/// billable
|
/// billable
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal async static Task PopulateQBItemCacheAsync()
|
internal static async Task PopulateQBItemCacheAsync()
|
||||||
{
|
{
|
||||||
if (_dtQBItems == null)
|
if (_dtQBItems == null)
|
||||||
{
|
{
|
||||||
@@ -3144,7 +3143,7 @@ namespace AyaNovaQBI
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Populate the cached qb terms list data
|
/// Populate the cached qb terms list data
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private async static Task PopulateQBTermsCache()
|
private static async Task PopulateQBTermsCache()
|
||||||
{
|
{
|
||||||
if (_dtQBTerms == null)
|
if (_dtQBTerms == null)
|
||||||
{
|
{
|
||||||
@@ -3411,7 +3410,7 @@ namespace AyaNovaQBI
|
|||||||
#endregion QB api helper methods end
|
#endregion QB api helper methods end
|
||||||
|
|
||||||
#region AyaNova cached lists
|
#region AyaNova cached lists
|
||||||
public async static Task PopulateAyaListCache()
|
public static async Task PopulateAyaListCache()
|
||||||
{
|
{
|
||||||
//Get the cached QB data
|
//Get the cached QB data
|
||||||
Waiting w = new Waiting();
|
Waiting w = new Waiting();
|
||||||
@@ -5965,7 +5964,7 @@ namespace AyaNovaQBI
|
|||||||
#endregion qbi stuff (anything not api)
|
#endregion qbi stuff (anything not api)
|
||||||
|
|
||||||
#region general utils
|
#region general utils
|
||||||
static public void OpenWebURL(object oUrl)
|
public static void OpenWebURL(object oUrl)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (oUrl == null) return;
|
if (oUrl == null) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user