This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using static AyaNovaQBI.util;
|
||||||
|
|
||||||
namespace AyaNovaQBI
|
namespace AyaNovaQBI
|
||||||
{
|
{
|
||||||
@@ -19,16 +21,25 @@ namespace AyaNovaQBI
|
|||||||
|
|
||||||
private void FixInvoiceProblems_Load(object sender, EventArgs e)
|
private void FixInvoiceProblems_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
grid.DataSource = MisMatches;
|
BindDataSource();
|
||||||
btnOK.Text = util.AyaTranslations["OK"];
|
btnOK.Text = util.AyaTranslations["OK"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void BindDataSource()
|
||||||
|
{
|
||||||
|
|
||||||
|
var bindingList = new BindingList<util.MisMatch>(MisMatches);
|
||||||
|
var source = new BindingSource(bindingList, null);
|
||||||
|
grid.DataSource = source;
|
||||||
|
}
|
||||||
|
|
||||||
private void btnOK_Click(object sender, EventArgs e)
|
private void btnOK_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DialogResult = DialogResult.OK;
|
DialogResult = DialogResult.OK;
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TODO: Test each possible route through this below before moving on to invoice testing
|
||||||
private async void grid_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
private async void grid_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||||
{
|
{
|
||||||
var senderGrid = (DataGridView)sender;
|
var senderGrid = (DataGridView)sender;
|
||||||
@@ -107,13 +118,13 @@ namespace AyaNovaQBI
|
|||||||
}
|
}
|
||||||
|
|
||||||
//remove the object from the grid as it's now dealt with
|
//remove the object from the grid as it's now dealt with
|
||||||
|
|
||||||
MisMatches.RemoveAt(e.RowIndex);
|
MisMatches.RemoveAt(e.RowIndex);
|
||||||
ChangesMade = true;
|
ChangesMade = true;
|
||||||
//If all done then close up
|
//If all done then close up
|
||||||
if (MisMatches.Count == 0)
|
if (MisMatches.Count == 0)
|
||||||
Close();
|
Close();
|
||||||
else
|
|
||||||
grid.DataSource = MisMatches;//rebind to refresh the grid
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -255,13 +266,15 @@ namespace AyaNovaQBI
|
|||||||
|
|
||||||
REMOVEITEMS:
|
REMOVEITEMS:
|
||||||
//remove the object from the grid as it's now dealt with
|
//remove the object from the grid as it's now dealt with
|
||||||
|
// grid.Rows.RemoveAt(e.RowIndex);
|
||||||
|
//grid.DataSource = typeof(List<util.MisMatch>);
|
||||||
MisMatches.RemoveAt(e.RowIndex);
|
MisMatches.RemoveAt(e.RowIndex);
|
||||||
|
BindDataSource();
|
||||||
ChangesMade = true;
|
ChangesMade = true;
|
||||||
//If all done then close up
|
//If all done then close up
|
||||||
if (MisMatches.Count == 0)
|
if (MisMatches.Count == 0)
|
||||||
Close();
|
Close();
|
||||||
else
|
|
||||||
grid.DataSource = MisMatches;//rebind to refresh the grid
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
1
AyaNovaQBI/FixPriceDifference.Designer.cs
generated
1
AyaNovaQBI/FixPriceDifference.Designer.cs
generated
@@ -150,6 +150,7 @@
|
|||||||
this.Controls.Add(this.lblTitle);
|
this.Controls.Add(this.lblTitle);
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||||
this.Name = "FixPriceDifference";
|
this.Name = "FixPriceDifference";
|
||||||
|
this.ShowInTaskbar = false;
|
||||||
this.Text = "Resolve AyaNova object price";
|
this.Text = "Resolve AyaNova object price";
|
||||||
this.Load += new System.EventHandler(this.SetQBClass_load);
|
this.Load += new System.EventHandler(this.SetQBClass_load);
|
||||||
this.groupBox1.ResumeLayout(false);
|
this.groupBox1.ResumeLayout(false);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace AyaNovaQBI
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return ((DataRowView)cbQBItems.SelectedItem).Row[0].ToString();
|
return ((DataRowView)cbQBItems.SelectedItem).Row[1].ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ namespace AyaNovaQBI
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return ((DataRowView)cbQBItems.SelectedItem).Row[1].ToString();
|
return ((DataRowView)cbQBItems.SelectedItem).Row[0].ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
docs/docs/img/fix-problems-price-dialog.png
Normal file
BIN
docs/docs/img/fix-problems-price-dialog.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 30 KiB |
Reference in New Issue
Block a user