This commit is contained in:
2022-07-01 20:58:53 +00:00
parent e86992f295
commit ffea1fa9eb
5 changed files with 26 additions and 16 deletions

View File

@@ -101,7 +101,7 @@
this.Padding = new System.Windows.Forms.Padding(16);
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "ApproveCompanyFile";
this.Text = "QuickBooks Company file";
this.Load += new System.EventHandler(this.ApproveCompanyFile_Load);
this.ResumeLayout(false);

View File

@@ -26,8 +26,19 @@ namespace AyaNovaQBI
public DataTable QBItems { get; set; }
public string SelectedQBItem { get => (string)cbQBItems.SelectedValue; set { } }
//private string _selectedQBItem;
public string SelectedQBItem
{
get
{
return _selectedQBItem;
}
set
{
_selectedQBItem = value;
}
}
private string _selectedQBItem;
private void SetQBChargeAsLoad(object sender, EventArgs e)
{
@@ -42,13 +53,14 @@ namespace AyaNovaQBI
this.cbQBItems.DataSource = QBItems;
this.cbQBItems.DisplayMember = "FullName";
this.cbQBItems.ValueMember = "ID";
if (SelectedQBItem == "")
cbQBItems.SelectedIndex = 0;
else
this.cbQBItems.SelectedValue = SelectedQBItem;
this.lblStatus.Text = "QuickBooks item:";
if (string.IsNullOrWhiteSpace(_selectedQBItem))
cbQBItems.SelectedIndex = 0;
else
this.cbQBItems.SelectedValue = _selectedQBItem;
////NVCHANGED
//GenericNVList ls = GenericNVList.GetList("aWorkorderStatus", "aID", "aName", true, false, false);

View File

@@ -64,6 +64,7 @@
this.Cursor = System.Windows.Forms.Cursors.AppStarting;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "Waiting";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Processing";
this.TopMost = true;

View File

@@ -1,3 +1,4 @@
TODO:
Test persisted form settings for server url
Docs should not refer to autoclose anymore, it's status driven now
disable menu on boot until ready for action

View File

@@ -364,7 +364,7 @@ namespace AyaNovaQBI
}
public async static Task<ApiResponse> PutAsync(string route, dynamic d)
{
Exception FirstException = null;
@@ -387,7 +387,7 @@ namespace AyaNovaQBI
throw new Exception($"API call failed after {MAX_TRIES.ToString()} attempts", FirstException);
}
public async static Task<ApiResponse> PutAsync(string route, string s=null)
public async static Task<ApiResponse> PutAsync(string route, string s = null)
{
Exception FirstException = null;
@@ -790,9 +790,9 @@ namespace AyaNovaQBI
await IntegrationLog("ValidateSettings: there are no QBI settings made - prompting user for all preferences now");
}
if(ForceReset)
if (ForceReset)
await IntegrationLog("ValidateSettings: forced reset of all QBI settings initiated");
#region confirm company file
@@ -828,7 +828,7 @@ namespace AyaNovaQBI
goto PRESTATUSOK;
}
//We've arrived here because there is no valid setting for Pre workorder status
//or it's the first time through and needs to be selected on way or another
SetWOStatus s1 = new SetWOStatus();
@@ -920,12 +920,8 @@ namespace AyaNovaQBI
"This setting is mandatory / required.";
s2.QBItems = QBItems;
s2.SelectedQBItem = QDat.OutsideServiceChargeAs;
//s2.SelectedQBItem=QDat.PreWOStatus;
if (s2.ShowDialog() == DialogResult.Cancel)
{
return pfstat.Cancel;
}
else
QDat.OutsideServiceChargeAs = s2.SelectedQBItem;
s2.Dispose();