diff --git a/AyaNovaQBI/AyaNovaQBI.csproj b/AyaNovaQBI/AyaNovaQBI.csproj index 1f558d8..6eabd9d 100644 --- a/AyaNovaQBI/AyaNovaQBI.csproj +++ b/AyaNovaQBI/AyaNovaQBI.csproj @@ -205,6 +205,12 @@ Waiting.cs + + Form + + + SetQBImportInventoryAccounts.cs + ApproveCompanyFile.cs @@ -254,6 +260,9 @@ SetQBClass.cs + + SetQBImportInventoryAccounts.cs + SetQBImportServiceRateAccounts.cs diff --git a/AyaNovaQBI/SetQBImportInventoryAccounts.Designer.cs b/AyaNovaQBI/SetQBImportInventoryAccounts.Designer.cs new file mode 100644 index 0000000..9d1c261 --- /dev/null +++ b/AyaNovaQBI/SetQBImportInventoryAccounts.Designer.cs @@ -0,0 +1,197 @@ +namespace AyaNovaQBI +{ + partial class SetQBImportInventoryAccounts + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.cbIncome = new System.Windows.Forms.ComboBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.btnOK = new System.Windows.Forms.Button(); + this.btnCancel = new System.Windows.Forms.Button(); + this.cbCogs = new System.Windows.Forms.ComboBox(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.cbAsset = new System.Windows.Forms.ComboBox(); + this.label6 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // cbIncome + // + this.cbIncome.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbIncome.FormattingEnabled = true; + this.cbIncome.Location = new System.Drawing.Point(12, 211); + this.cbIncome.Name = "cbIncome"; + this.cbIncome.Size = new System.Drawing.Size(407, 21); + this.cbIncome.TabIndex = 27; + // + // label2 + // + this.label2.Location = new System.Drawing.Point(12, 191); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(407, 18); + this.label2.TabIndex = 26; + this.label2.Text = "Income account"; + // + // label3 + // + this.label3.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.Location = new System.Drawing.Point(12, 170); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(407, 21); + this.label3.TabIndex = 25; + this.label3.Text = "Sales information:"; + // + // label1 + // + this.label1.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(12, 16); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(407, 32); + this.label1.TabIndex = 24; + this.label1.Text = "Default accounts"; + // + // btnOK + // + this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnOK.Location = new System.Drawing.Point(350, 410); + this.btnOK.Name = "btnOK"; + this.btnOK.Size = new System.Drawing.Size(75, 23); + this.btnOK.TabIndex = 23; + this.btnOK.Text = "OK"; + this.btnOK.UseVisualStyleBackColor = true; + // + // btnCancel + // + this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(12, 410); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 23); + this.btnCancel.TabIndex = 22; + this.btnCancel.Text = "Cancel"; + this.btnCancel.UseVisualStyleBackColor = true; + // + // cbCogs + // + this.cbCogs.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbCogs.FormattingEnabled = true; + this.cbCogs.Location = new System.Drawing.Point(12, 117); + this.cbCogs.Name = "cbCogs"; + this.cbCogs.Size = new System.Drawing.Size(403, 21); + this.cbCogs.TabIndex = 31; + // + // label4 + // + this.label4.Location = new System.Drawing.Point(12, 94); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(403, 18); + this.label4.TabIndex = 30; + this.label4.Text = "COGS account"; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.Location = new System.Drawing.Point(12, 66); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(403, 20); + this.label5.TabIndex = 29; + this.label5.Text = "Purchase information:"; + // + // cbAsset + // + this.cbAsset.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbAsset.FormattingEnabled = true; + this.cbAsset.Location = new System.Drawing.Point(12, 316); + this.cbAsset.Name = "cbAsset"; + this.cbAsset.Size = new System.Drawing.Size(407, 21); + this.cbAsset.TabIndex = 34; + // + // label6 + // + this.label6.Location = new System.Drawing.Point(12, 296); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(407, 18); + this.label6.TabIndex = 33; + this.label6.Text = "Asset account"; + // + // label7 + // + this.label7.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label7.Location = new System.Drawing.Point(12, 274); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(407, 20); + this.label7.TabIndex = 32; + this.label7.Text = "Inventory information:"; + // + // SetQBImportInventoryAccounts + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(435, 445); + this.ControlBox = false; + this.Controls.Add(this.cbAsset); + this.Controls.Add(this.label6); + this.Controls.Add(this.label7); + this.Controls.Add(this.cbCogs); + this.Controls.Add(this.label4); + this.Controls.Add(this.label5); + this.Controls.Add(this.cbIncome); + this.Controls.Add(this.label2); + this.Controls.Add(this.label3); + this.Controls.Add(this.label1); + this.Controls.Add(this.btnOK); + this.Controls.Add(this.btnCancel); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "SetQBImportInventoryAccounts"; + this.ShowInTaskbar = false; + this.Text = "Import inventory items"; + this.Load += new System.EventHandler(this.SetQBImportInventoryAccounts_Load); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ComboBox cbIncome; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button btnOK; + private System.Windows.Forms.Button btnCancel; + private System.Windows.Forms.ComboBox cbCogs; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.ComboBox cbAsset; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label7; + } +} \ No newline at end of file diff --git a/AyaNovaQBI/SetQBImportInventoryAccounts.cs b/AyaNovaQBI/SetQBImportInventoryAccounts.cs new file mode 100644 index 0000000..d5d6c2a --- /dev/null +++ b/AyaNovaQBI/SetQBImportInventoryAccounts.cs @@ -0,0 +1,45 @@ +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 SetQBImportInventoryAccounts : Form + { + public SetQBImportInventoryAccounts() + { + InitializeComponent(); + } + + private void SetQBImportInventoryAccounts_Load(object sender, EventArgs e) + { + //Fill combo's and select defaults + cbAsset.BindingContext = new BindingContext();//Ensure unique binding context so multiple combo boxes bound to same datasource can be selected independantly + cbAsset.DisplayMember = "FullName"; + cbAsset.ValueMember = "ID"; + cbAsset.DataSource = util.QBAccounts; + if (!string.IsNullOrEmpty(util.QDat.QBInventoryAssetAccountRef)) + cbAsset.SelectedValue = util.QDat.QBInventoryAssetAccountRef; + + cbCogs.BindingContext = new BindingContext(); + cbCogs.DisplayMember = "FullName"; + cbCogs.ValueMember = "ID"; + cbCogs.DataSource = util.QBAccounts; + if (!string.IsNullOrEmpty(util.QDat.QBInventoryCOGSAccountRef)) + cbCogs.SelectedValue = util.QDat.QBInventoryCOGSAccountRef; + + cbIncome.BindingContext = new BindingContext(); + cbIncome.DisplayMember = "FullName"; + cbIncome.ValueMember = "ID"; + cbIncome.DataSource = util.QBAccounts; + if (!string.IsNullOrEmpty(util.QDat.QBInventoryIncomeAccountReference)) + cbIncome.SelectedValue = util.QDat.QBInventoryIncomeAccountReference; + } + } +} diff --git a/AyaNovaQBI/SetQBImportInventoryAccounts.resx b/AyaNovaQBI/SetQBImportInventoryAccounts.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/AyaNovaQBI/SetQBImportInventoryAccounts.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file