This commit is contained in:
@@ -105,6 +105,12 @@
|
|||||||
<Compile Include="Map.Designer.cs">
|
<Compile Include="Map.Designer.cs">
|
||||||
<DependentUpon>Map.cs</DependentUpon>
|
<DependentUpon>Map.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="MapSelectQBItem.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MapSelectQBItem.Designer.cs">
|
||||||
|
<DependentUpon>MapSelectQBItem.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="NameIdActiveChargeCostItem.cs" />
|
<Compile Include="NameIdActiveChargeCostItem.cs" />
|
||||||
<Compile Include="NameIdActiveItem.cs" />
|
<Compile Include="NameIdActiveItem.cs" />
|
||||||
<Compile Include="NameIdItem.cs" />
|
<Compile Include="NameIdItem.cs" />
|
||||||
@@ -196,6 +202,9 @@
|
|||||||
<EmbeddedResource Include="Map.resx">
|
<EmbeddedResource Include="Map.resx">
|
||||||
<DependentUpon>Map.cs</DependentUpon>
|
<DependentUpon>Map.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="MapSelectQBItem.resx">
|
||||||
|
<DependentUpon>MapSelectQBItem.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
|||||||
23
AyaNovaQBI/Map.Designer.cs
generated
23
AyaNovaQBI/Map.Designer.cs
generated
@@ -44,7 +44,6 @@
|
|||||||
this.autoLinkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.autoLinkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.updateAyaNovaPricesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.updateAyaNovaPricesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.mapSelectedItemsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.mapSelectedItemsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.unmapSelectedItemsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
|
||||||
this.grid = new System.Windows.Forms.DataGridView();
|
this.grid = new System.Windows.Forms.DataGridView();
|
||||||
this.AyaName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.AyaName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.QBName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.QBName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
@@ -61,8 +60,7 @@
|
|||||||
this.showToolStripMenuItem,
|
this.showToolStripMenuItem,
|
||||||
this.autoLinkToolStripMenuItem,
|
this.autoLinkToolStripMenuItem,
|
||||||
this.updateAyaNovaPricesToolStripMenuItem,
|
this.updateAyaNovaPricesToolStripMenuItem,
|
||||||
this.mapSelectedItemsToolStripMenuItem,
|
this.mapSelectedItemsToolStripMenuItem});
|
||||||
this.unmapSelectedItemsToolStripMenuItem});
|
|
||||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||||
this.menuStrip1.Name = "menuStrip1";
|
this.menuStrip1.Name = "menuStrip1";
|
||||||
this.menuStrip1.Size = new System.Drawing.Size(800, 24);
|
this.menuStrip1.Size = new System.Drawing.Size(800, 24);
|
||||||
@@ -84,35 +82,35 @@
|
|||||||
// customersToolStripMenuItem
|
// customersToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.customersToolStripMenuItem.Name = "customersToolStripMenuItem";
|
this.customersToolStripMenuItem.Name = "customersToolStripMenuItem";
|
||||||
this.customersToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
|
this.customersToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
this.customersToolStripMenuItem.Text = "&Customers";
|
this.customersToolStripMenuItem.Text = "&Customers";
|
||||||
this.customersToolStripMenuItem.Click += new System.EventHandler(this.customersToolStripMenuItem_Click);
|
this.customersToolStripMenuItem.Click += new System.EventHandler(this.customersToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// serviceRatesToolStripMenuItem
|
// serviceRatesToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.serviceRatesToolStripMenuItem.Name = "serviceRatesToolStripMenuItem";
|
this.serviceRatesToolStripMenuItem.Name = "serviceRatesToolStripMenuItem";
|
||||||
this.serviceRatesToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
|
this.serviceRatesToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
this.serviceRatesToolStripMenuItem.Text = "&Service rates";
|
this.serviceRatesToolStripMenuItem.Text = "&Service rates";
|
||||||
this.serviceRatesToolStripMenuItem.Click += new System.EventHandler(this.serviceRatesToolStripMenuItem_Click);
|
this.serviceRatesToolStripMenuItem.Click += new System.EventHandler(this.serviceRatesToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// travelRatesToolStripMenuItem
|
// travelRatesToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.travelRatesToolStripMenuItem.Name = "travelRatesToolStripMenuItem";
|
this.travelRatesToolStripMenuItem.Name = "travelRatesToolStripMenuItem";
|
||||||
this.travelRatesToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
|
this.travelRatesToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
this.travelRatesToolStripMenuItem.Text = "&Travel rates";
|
this.travelRatesToolStripMenuItem.Text = "&Travel rates";
|
||||||
this.travelRatesToolStripMenuItem.Click += new System.EventHandler(this.travelRatesToolStripMenuItem_Click);
|
this.travelRatesToolStripMenuItem.Click += new System.EventHandler(this.travelRatesToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// partsToolStripMenuItem
|
// partsToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.partsToolStripMenuItem.Name = "partsToolStripMenuItem";
|
this.partsToolStripMenuItem.Name = "partsToolStripMenuItem";
|
||||||
this.partsToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
|
this.partsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
this.partsToolStripMenuItem.Text = "&Parts";
|
this.partsToolStripMenuItem.Text = "&Parts";
|
||||||
this.partsToolStripMenuItem.Click += new System.EventHandler(this.partsToolStripMenuItem_Click);
|
this.partsToolStripMenuItem.Click += new System.EventHandler(this.partsToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// vendorsToolStripMenuItem
|
// vendorsToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.vendorsToolStripMenuItem.Name = "vendorsToolStripMenuItem";
|
this.vendorsToolStripMenuItem.Name = "vendorsToolStripMenuItem";
|
||||||
this.vendorsToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
|
this.vendorsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
this.vendorsToolStripMenuItem.Text = "&Vendors";
|
this.vendorsToolStripMenuItem.Text = "&Vendors";
|
||||||
this.vendorsToolStripMenuItem.Click += new System.EventHandler(this.vendorsToolStripMenuItem_Click);
|
this.vendorsToolStripMenuItem.Click += new System.EventHandler(this.vendorsToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
@@ -172,14 +170,6 @@
|
|||||||
this.mapSelectedItemsToolStripMenuItem.Visible = false;
|
this.mapSelectedItemsToolStripMenuItem.Visible = false;
|
||||||
this.mapSelectedItemsToolStripMenuItem.Click += new System.EventHandler(this.mapSelectedItemsToolStripMenuItem_Click);
|
this.mapSelectedItemsToolStripMenuItem.Click += new System.EventHandler(this.mapSelectedItemsToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// unmapSelectedItemsToolStripMenuItem
|
|
||||||
//
|
|
||||||
this.unmapSelectedItemsToolStripMenuItem.Name = "unmapSelectedItemsToolStripMenuItem";
|
|
||||||
this.unmapSelectedItemsToolStripMenuItem.Size = new System.Drawing.Size(136, 20);
|
|
||||||
this.unmapSelectedItemsToolStripMenuItem.Text = "&Unmap selected items";
|
|
||||||
this.unmapSelectedItemsToolStripMenuItem.Visible = false;
|
|
||||||
this.unmapSelectedItemsToolStripMenuItem.Click += new System.EventHandler(this.unmapSelectedItemsToolStripMenuItem_Click);
|
|
||||||
//
|
|
||||||
// grid
|
// grid
|
||||||
//
|
//
|
||||||
this.grid.AllowUserToAddRows = false;
|
this.grid.AllowUserToAddRows = false;
|
||||||
@@ -280,7 +270,6 @@
|
|||||||
private System.Windows.Forms.ToolStripMenuItem updateAyaNovaPricesToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem updateAyaNovaPricesToolStripMenuItem;
|
||||||
private System.Windows.Forms.DataGridView grid;
|
private System.Windows.Forms.DataGridView grid;
|
||||||
private System.Windows.Forms.ToolStripMenuItem mapSelectedItemsToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem mapSelectedItemsToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem unmapSelectedItemsToolStripMenuItem;
|
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn AyaName;
|
private System.Windows.Forms.DataGridViewTextBoxColumn AyaName;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn QBName;
|
private System.Windows.Forms.DataGridViewTextBoxColumn QBName;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn qbid;
|
private System.Windows.Forms.DataGridViewTextBoxColumn qbid;
|
||||||
|
|||||||
@@ -43,10 +43,9 @@ namespace AyaNovaQBI
|
|||||||
|
|
||||||
_qb = new DataTable("QuickBooks");
|
_qb = new DataTable("QuickBooks");
|
||||||
_qb.Columns.Add("ID", typeof(string));
|
_qb.Columns.Add("ID", typeof(string));
|
||||||
_qb.Columns.Add("Name", typeof(string));
|
_qb.Columns.Add("FullName", typeof(string));
|
||||||
_qb.Columns.Add("Linked", typeof(bool));
|
|
||||||
//Case 339
|
//Case 339
|
||||||
_qb.DefaultView.Sort = "Name asc";
|
_qb.DefaultView.Sort = "FullName asc";
|
||||||
grid.DataSource = _aya;
|
grid.DataSource = _aya;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,9 +119,9 @@ namespace AyaNovaQBI
|
|||||||
//Fill QB table with QB Customers from prefetched table
|
//Fill QB table with QB Customers from prefetched table
|
||||||
foreach (DataRow dr in util.QBClients.Rows)
|
foreach (DataRow dr in util.QBClients.Rows)
|
||||||
{
|
{
|
||||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString());
|
//bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString());
|
||||||
if (DisplayRow(bLinked))
|
//if (DisplayRow(bLinked))
|
||||||
_qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString(), bLinked });
|
_qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString() });
|
||||||
}
|
}
|
||||||
#endregion client
|
#endregion client
|
||||||
break;
|
break;
|
||||||
@@ -147,9 +146,9 @@ namespace AyaNovaQBI
|
|||||||
//Fill QB table with QB Customers from prefetched table
|
//Fill QB table with QB Customers from prefetched table
|
||||||
foreach (DataRow dr in util.QBVendors.Rows)
|
foreach (DataRow dr in util.QBVendors.Rows)
|
||||||
{
|
{
|
||||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString());
|
//bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString());
|
||||||
if (DisplayRow(bLinked))
|
//if (DisplayRow(bLinked))
|
||||||
_qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString(), bLinked });
|
_qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString() });
|
||||||
}
|
}
|
||||||
#endregion Vendor
|
#endregion Vendor
|
||||||
break;
|
break;
|
||||||
@@ -188,9 +187,9 @@ namespace AyaNovaQBI
|
|||||||
{
|
{
|
||||||
if ((util.qbitemtype)dr["Type"] == util.qbitemtype.Service || (util.qbitemtype)dr["Type"] == util.qbitemtype.OtherCharge)
|
if ((util.qbitemtype)dr["Type"] == util.qbitemtype.Service || (util.qbitemtype)dr["Type"] == util.qbitemtype.OtherCharge)
|
||||||
{
|
{
|
||||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString());
|
//bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString());
|
||||||
if (DisplayRow(bLinked))
|
//if (DisplayRow(bLinked))
|
||||||
_qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString(), bLinked });
|
_qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString() });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion Rate
|
#endregion Rate
|
||||||
@@ -231,9 +230,9 @@ namespace AyaNovaQBI
|
|||||||
{
|
{
|
||||||
if ((util.qbitemtype)dr["Type"] == util.qbitemtype.Service || (util.qbitemtype)dr["Type"] == util.qbitemtype.OtherCharge)
|
if ((util.qbitemtype)dr["Type"] == util.qbitemtype.Service || (util.qbitemtype)dr["Type"] == util.qbitemtype.OtherCharge)
|
||||||
{
|
{
|
||||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString());
|
//bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString());
|
||||||
if (DisplayRow(bLinked))
|
//if (DisplayRow(bLinked))
|
||||||
_qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString(), bLinked });
|
_qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString() });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion Rate
|
#endregion Rate
|
||||||
@@ -267,9 +266,9 @@ namespace AyaNovaQBI
|
|||||||
{
|
{
|
||||||
if ((util.qbitemtype)dr["Type"] == util.qbitemtype.Inventory || (util.qbitemtype)dr["Type"] == util.qbitemtype.NonInventory || (util.qbitemtype)dr["Type"] == util.qbitemtype.Assembly)
|
if ((util.qbitemtype)dr["Type"] == util.qbitemtype.Inventory || (util.qbitemtype)dr["Type"] == util.qbitemtype.NonInventory || (util.qbitemtype)dr["Type"] == util.qbitemtype.Assembly)
|
||||||
{
|
{
|
||||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString());
|
//bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString());
|
||||||
if (DisplayRow(bLinked))
|
//if (DisplayRow(bLinked))
|
||||||
_qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString(), bLinked });
|
_qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString() });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion Part
|
#endregion Part
|
||||||
@@ -307,21 +306,30 @@ namespace AyaNovaQBI
|
|||||||
|
|
||||||
private void mapSelectedItemsToolStripMenuItem_Click(object sender, EventArgs e)
|
private void mapSelectedItemsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var selection = grid.SelectedRows;
|
if(grid.SelectedRows.Count==0) return;
|
||||||
|
|
||||||
|
//we have selection now get qb item
|
||||||
|
MapSelectQBItem s = new MapSelectQBItem();
|
||||||
|
s.DialogTitle = "AyaNova QBI setup - Charge outside service as?";
|
||||||
|
|
||||||
|
s.QBItems = _qb;
|
||||||
|
|
||||||
|
if (s.ShowDialog() == DialogResult.Cancel)
|
||||||
|
return ;
|
||||||
|
else
|
||||||
|
QDat.OutsideServiceChargeAs = s.SelectedQBItem;
|
||||||
|
s.Dispose();
|
||||||
|
s = null;
|
||||||
|
|
||||||
var selectedAyaNovaIndexes = new List<long>();
|
var selectedAyaNovaIndexes = new List<long>();
|
||||||
//.grid.SelectedRows[0].Cells[0].Value
|
|
||||||
foreach(DataGridViewRow r in grid.SelectedRows)
|
foreach(DataGridViewRow r in grid.SelectedRows)
|
||||||
{
|
{
|
||||||
selectedAyaNovaIndexes.Add((long)r.Cells[0].Value);
|
selectedAyaNovaIndexes.Add((long)r.Cells[0].Value);
|
||||||
}
|
}
|
||||||
MessageBox.Show($"MAP: selected row count {selection.Count}");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void unmapSelectedItemsToolStripMenuItem_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
var selection = grid.SelectedRows;
|
|
||||||
MessageBox.Show($"UNMAP: selected row count {selection.Count}");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void customersToolStripMenuItem_Click(object sender, EventArgs e)
|
private void customersToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|||||||
104
AyaNovaQBI/MapSelectQBItem.Designer.cs
generated
Normal file
104
AyaNovaQBI/MapSelectQBItem.Designer.cs
generated
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
namespace AyaNovaQBI
|
||||||
|
{
|
||||||
|
partial class MapSelectQBItem
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.cbQBItems = new System.Windows.Forms.ComboBox();
|
||||||
|
this.btnOK = new System.Windows.Forms.Button();
|
||||||
|
this.btnCancel = new System.Windows.Forms.Button();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
|
this.label1.Location = new System.Drawing.Point(16, 16);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(715, 13);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Map selected AyaNova items to:";
|
||||||
|
//
|
||||||
|
// cbQBItems
|
||||||
|
//
|
||||||
|
this.cbQBItems.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
|
this.cbQBItems.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.cbQBItems.FormattingEnabled = true;
|
||||||
|
this.cbQBItems.Location = new System.Drawing.Point(16, 29);
|
||||||
|
this.cbQBItems.Name = "cbQBItems";
|
||||||
|
this.cbQBItems.Size = new System.Drawing.Size(715, 21);
|
||||||
|
this.cbQBItems.TabIndex = 12;
|
||||||
|
//
|
||||||
|
// btnOK
|
||||||
|
//
|
||||||
|
this.btnOK.Location = new System.Drawing.Point(656, 106);
|
||||||
|
this.btnOK.Name = "btnOK";
|
||||||
|
this.btnOK.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.btnOK.TabIndex = 14;
|
||||||
|
this.btnOK.Text = "OK";
|
||||||
|
this.btnOK.UseVisualStyleBackColor = true;
|
||||||
|
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||||
|
//
|
||||||
|
// btnCancel
|
||||||
|
//
|
||||||
|
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
|
this.btnCancel.Location = new System.Drawing.Point(19, 106);
|
||||||
|
this.btnCancel.Name = "btnCancel";
|
||||||
|
this.btnCancel.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.btnCancel.TabIndex = 13;
|
||||||
|
this.btnCancel.Text = "Cancel";
|
||||||
|
this.btnCancel.UseVisualStyleBackColor = true;
|
||||||
|
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||||
|
//
|
||||||
|
// MapSelectQBItem
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.CancelButton = this.btnCancel;
|
||||||
|
this.ClientSize = new System.Drawing.Size(747, 150);
|
||||||
|
this.Controls.Add(this.btnOK);
|
||||||
|
this.Controls.Add(this.btnCancel);
|
||||||
|
this.Controls.Add(this.cbQBItems);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||||
|
this.Name = "MapSelectQBItem";
|
||||||
|
this.Padding = new System.Windows.Forms.Padding(16);
|
||||||
|
this.ShowInTaskbar = false;
|
||||||
|
this.Text = "QB Items";
|
||||||
|
this.Load += new System.EventHandler(this.MapSelectQBItem_Load);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.ComboBox cbQBItems;
|
||||||
|
private System.Windows.Forms.Button btnOK;
|
||||||
|
private System.Windows.Forms.Button btnCancel;
|
||||||
|
}
|
||||||
|
}
|
||||||
42
AyaNovaQBI/MapSelectQBItem.cs
Normal file
42
AyaNovaQBI/MapSelectQBItem.cs
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
namespace AyaNovaQBI
|
||||||
|
{
|
||||||
|
public partial class MapSelectQBItem : Form
|
||||||
|
{
|
||||||
|
public MapSelectQBItem()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
public string SelectedQBItem => cbQBItems.SelectedValue.ToString();
|
||||||
|
public DataTable QBItems { get; set; }
|
||||||
|
private void MapSelectQBItem_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
cbQBItems.DataSource = QBItems;
|
||||||
|
cbQBItems.DisplayMember = "FullName";
|
||||||
|
cbQBItems.ValueMember = "ID";
|
||||||
|
btnCancel.Text = util.AyaTranslations["Cancel"];
|
||||||
|
btnOK.Text = util.AyaTranslations["OK"];
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnCancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnOK_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
AyaNovaQBI/MapSelectQBItem.resx
Normal file
120
AyaNovaQBI/MapSelectQBItem.resx
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
Reference in New Issue
Block a user