Breaking Changes. Upgrade Script in Sql directory. Deployed

This commit is contained in:
unknown
2011-02-18 22:24:48 +05:30
parent d4cfa92848
commit 9ed5843dbd
86 changed files with 2616 additions and 2358 deletions

View File

@ -32,14 +32,10 @@
this.Label4 = new System.Windows.Forms.Label();
this.txtSalePrice = new System.Windows.Forms.TextBox();
this.bsProducts = new System.Windows.Forms.BindingSource(this.components);
this.GroupBox1 = new System.Windows.Forms.GroupBox();
this.btnAddCategory = new System.Windows.Forms.Button();
this.cmbProductTypes = new System.Windows.Forms.ComboBox();
this.bsTypes = new System.Windows.Forms.BindingSource(this.components);
this.cmbUnits = new System.Windows.Forms.ComboBox();
this.bsUnits = new System.Windows.Forms.BindingSource(this.components);
this.btnAddProductGroup = new System.Windows.Forms.Button();
this.cmbProductGroup = new System.Windows.Forms.ComboBox();
this.bsProductGroups = new System.Windows.Forms.BindingSource(this.components);
this.Label7 = new System.Windows.Forms.Label();
this.Label3 = new System.Windows.Forms.Label();
this.txtName = new System.Windows.Forms.TextBox();
this.Label2 = new System.Windows.Forms.Label();
this.btnNavFirst = new System.Windows.Forms.Button();
@ -54,34 +50,38 @@
this.btnUpdate = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
this.chkDiscontinued = new System.Windows.Forms.CheckBox();
this.cmbSalesLedger = new System.Windows.Forms.ComboBox();
this.label5 = new System.Windows.Forms.Label();
this.cmbSalesTax = new System.Windows.Forms.ComboBox();
this.bsSalesTax = new System.Windows.Forms.BindingSource(this.components);
this.label10 = new System.Windows.Forms.Label();
this.bsTax = new System.Windows.Forms.BindingSource(this.components);
this.label5 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.txtProductID = new System.Windows.Forms.TextBox();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.txtUnits = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.bsProducts)).BeginInit();
this.GroupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bsTypes)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bsUnits)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bsSalesTax)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bsProductGroups)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bsTax)).BeginInit();
this.tableLayoutPanel1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.SuspendLayout();
//
// Label4
//
this.Label4.AutoSize = true;
this.Label4.Location = new System.Drawing.Point(13, 148);
this.Label4.Location = new System.Drawing.Point(3, 105);
this.Label4.Name = "Label4";
this.Label4.Size = new System.Drawing.Size(60, 13);
this.Label4.Size = new System.Drawing.Size(84, 13);
this.Label4.TabIndex = 59;
this.Label4.Text = "Sales Price";
this.Label4.Text = "Sale Price / Tax";
//
// txtSalePrice
//
this.txtSalePrice.AccessibleName = "Phone 1";
this.txtSalePrice.AccessibleName = "";
this.txtSalePrice.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsProducts, "SalePrice", true));
this.txtSalePrice.Location = new System.Drawing.Point(13, 164);
this.txtSalePrice.Dock = System.Windows.Forms.DockStyle.Top;
this.txtSalePrice.Location = new System.Drawing.Point(106, 108);
this.txtSalePrice.Name = "txtSalePrice";
this.txtSalePrice.Size = new System.Drawing.Size(74, 20);
this.txtSalePrice.Size = new System.Drawing.Size(149, 20);
this.txtSalePrice.TabIndex = 53;
this.txtSalePrice.Text = "0";
//
@ -91,122 +91,89 @@
this.bsProducts.AddingNew += new System.ComponentModel.AddingNewEventHandler(this.bsProducts_AddingNew);
this.bsProducts.PositionChanged += new System.EventHandler(this.bsProducts_PositionChanged);
//
// GroupBox1
// btnAddProductGroup
//
this.GroupBox1.Controls.Add(this.btnAddCategory);
this.GroupBox1.Controls.Add(this.cmbProductTypes);
this.GroupBox1.Controls.Add(this.cmbUnits);
this.GroupBox1.Controls.Add(this.Label7);
this.GroupBox1.Controls.Add(this.Label3);
this.GroupBox1.Controls.Add(this.txtName);
this.GroupBox1.Controls.Add(this.Label2);
this.GroupBox1.Location = new System.Drawing.Point(12, 37);
this.GroupBox1.Name = "GroupBox1";
this.GroupBox1.Size = new System.Drawing.Size(312, 102);
this.GroupBox1.TabIndex = 52;
this.GroupBox1.TabStop = false;
this.btnAddProductGroup.Dock = System.Windows.Forms.DockStyle.Top;
this.btnAddProductGroup.Location = new System.Drawing.Point(261, 73);
this.btnAddProductGroup.Name = "btnAddProductGroup";
this.btnAddProductGroup.Size = new System.Drawing.Size(151, 21);
this.btnAddProductGroup.TabIndex = 37;
this.btnAddProductGroup.Text = "Add Group";
this.btnAddProductGroup.Click += new System.EventHandler(this.btnAddCategory_Click);
//
// btnAddCategory
// cmbProductGroup
//
this.btnAddCategory.Location = new System.Drawing.Point(281, 72);
this.btnAddCategory.Name = "btnAddCategory";
this.btnAddCategory.Size = new System.Drawing.Size(25, 21);
this.btnAddCategory.TabIndex = 37;
this.btnAddCategory.Text = "+";
this.btnAddCategory.Click += new System.EventHandler(this.btnAddCategory_Click);
this.cmbProductGroup.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsProducts, "ProductGroup", true));
this.cmbProductGroup.DataSource = this.bsProductGroups;
this.cmbProductGroup.DisplayMember = "Name";
this.cmbProductGroup.Dock = System.Windows.Forms.DockStyle.Top;
this.cmbProductGroup.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbProductGroup.Location = new System.Drawing.Point(106, 73);
this.cmbProductGroup.Name = "cmbProductGroup";
this.cmbProductGroup.Size = new System.Drawing.Size(149, 21);
this.cmbProductGroup.TabIndex = 35;
this.cmbProductGroup.ValueMember = "ProductTypeID";
//
// cmbProductTypes
// bsProductGroups
//
this.cmbProductTypes.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsProducts, "ProductTypeID", true));
this.cmbProductTypes.DataSource = this.bsTypes;
this.cmbProductTypes.DisplayMember = "Name";
this.cmbProductTypes.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbProductTypes.Location = new System.Drawing.Point(94, 72);
this.cmbProductTypes.Name = "cmbProductTypes";
this.cmbProductTypes.Size = new System.Drawing.Size(181, 21);
this.cmbProductTypes.TabIndex = 35;
this.cmbProductTypes.ValueMember = "ProductTypeID";
//
// bsTypes
//
this.bsTypes.DataSource = typeof(Tanshu.Accounts.Entities.ProductGroup);
//
// cmbUnits
//
this.cmbUnits.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsProducts, "Units", true));
this.cmbUnits.DataSource = this.bsUnits;
this.cmbUnits.DisplayMember = "Description";
this.cmbUnits.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbUnits.Location = new System.Drawing.Point(94, 45);
this.cmbUnits.Name = "cmbUnits";
this.cmbUnits.Size = new System.Drawing.Size(212, 21);
this.cmbUnits.TabIndex = 34;
this.cmbUnits.ValueMember = "Description";
//
// bsUnits
//
this.bsUnits.DataSource = typeof(Tanshu.Accounts.Helpers.StringType);
this.bsProductGroups.DataSource = typeof(Tanshu.Accounts.Entities.ProductGroup);
//
// Label7
//
this.Label7.AutoSize = true;
this.Label7.Location = new System.Drawing.Point(12, 75);
this.Label7.Location = new System.Drawing.Point(3, 70);
this.Label7.Name = "Label7";
this.Label7.Size = new System.Drawing.Size(76, 13);
this.Label7.TabIndex = 33;
this.Label7.Text = "Product Types";
//
// Label3
//
this.Label3.AutoSize = true;
this.Label3.Location = new System.Drawing.Point(57, 48);
this.Label3.Name = "Label3";
this.Label3.Size = new System.Drawing.Size(31, 13);
this.Label3.TabIndex = 30;
this.Label3.Text = "Units";
this.Label7.Text = "Product Group";
//
// txtName
//
this.txtName.AccessibleName = "";
this.txtName.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsProducts, "Name", true));
this.txtName.Location = new System.Drawing.Point(94, 19);
this.txtName.Dock = System.Windows.Forms.DockStyle.Top;
this.txtName.Location = new System.Drawing.Point(106, 38);
this.txtName.Name = "txtName";
this.txtName.Size = new System.Drawing.Size(212, 20);
this.txtName.Size = new System.Drawing.Size(149, 20);
this.txtName.TabIndex = 0;
//
// Label2
//
this.Label2.AutoSize = true;
this.Label2.Location = new System.Drawing.Point(53, 22);
this.Label2.Location = new System.Drawing.Point(3, 35);
this.Label2.Name = "Label2";
this.Label2.Size = new System.Drawing.Size(35, 13);
this.Label2.Size = new System.Drawing.Size(70, 13);
this.Label2.TabIndex = 28;
this.Label2.Text = "Name";
this.Label2.Text = "Name / Units";
//
// btnNavFirst
//
this.btnNavFirst.Location = new System.Drawing.Point(40, 334);
this.btnNavFirst.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnNavFirst.Location = new System.Drawing.Point(3, 53);
this.btnNavFirst.Name = "btnNavFirst";
this.btnNavFirst.Size = new System.Drawing.Size(40, 23);
this.btnNavFirst.Size = new System.Drawing.Size(97, 44);
this.btnNavFirst.TabIndex = 44;
this.btnNavFirst.Text = "<<";
this.btnNavFirst.Click += new System.EventHandler(this.btnNavFirst_Click);
//
// btnNavPrev
//
this.btnNavPrev.Location = new System.Drawing.Point(86, 334);
this.btnNavPrev.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnNavPrev.Location = new System.Drawing.Point(106, 53);
this.btnNavPrev.Name = "btnNavPrev";
this.btnNavPrev.Size = new System.Drawing.Size(35, 23);
this.btnNavPrev.Size = new System.Drawing.Size(97, 44);
this.btnNavPrev.TabIndex = 45;
this.btnNavPrev.Text = "<";
this.btnNavPrev.Click += new System.EventHandler(this.btnNavPrev_Click);
//
// lblNavLocation
//
this.lblNavLocation.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblNavLocation.BackColor = System.Drawing.Color.White;
this.lblNavLocation.Location = new System.Drawing.Point(118, 334);
this.lblNavLocation.Location = new System.Drawing.Point(12, 186);
this.lblNavLocation.Name = "lblNavLocation";
this.lblNavLocation.Size = new System.Drawing.Size(95, 23);
this.lblNavLocation.Size = new System.Drawing.Size(391, 23);
this.lblNavLocation.TabIndex = 46;
this.lblNavLocation.Text = "No Records";
this.lblNavLocation.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -214,39 +181,40 @@
//
// btnNavNext
//
this.btnNavNext.Location = new System.Drawing.Point(214, 334);
this.btnNavNext.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnNavNext.Location = new System.Drawing.Point(209, 53);
this.btnNavNext.Name = "btnNavNext";
this.btnNavNext.Size = new System.Drawing.Size(35, 23);
this.btnNavNext.Size = new System.Drawing.Size(97, 44);
this.btnNavNext.TabIndex = 47;
this.btnNavNext.Text = ">";
this.btnNavNext.Click += new System.EventHandler(this.btnNavNext_Click);
//
// btnLast
//
this.btnLast.Location = new System.Drawing.Point(254, 334);
this.btnLast.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnLast.Location = new System.Drawing.Point(312, 53);
this.btnLast.Name = "btnLast";
this.btnLast.Size = new System.Drawing.Size(40, 23);
this.btnLast.Size = new System.Drawing.Size(100, 44);
this.btnLast.TabIndex = 48;
this.btnLast.Text = ">>";
this.btnLast.Click += new System.EventHandler(this.btnLast_Click);
//
// txtUniqueID
//
this.txtUniqueID.AccessibleName = "Unique ID";
this.txtUniqueID.AccessibleName = "";
this.txtUniqueID.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsProducts, "Code", true));
this.txtUniqueID.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.bsProducts, "ProductID", true));
this.txtUniqueID.Dock = System.Windows.Forms.DockStyle.Top;
this.txtUniqueID.Enabled = false;
this.txtUniqueID.Location = new System.Drawing.Point(75, 12);
this.txtUniqueID.Location = new System.Drawing.Point(261, 3);
this.txtUniqueID.Name = "txtUniqueID";
this.txtUniqueID.Size = new System.Drawing.Size(249, 20);
this.txtUniqueID.Size = new System.Drawing.Size(151, 20);
this.txtUniqueID.TabIndex = 37;
this.txtUniqueID.Text = "UniqueID";
this.txtUniqueID.WordWrap = false;
//
// Label1
//
this.Label1.AutoSize = true;
this.Label1.Location = new System.Drawing.Point(37, 15);
this.Label1.Location = new System.Drawing.Point(3, 0);
this.Label1.Name = "Label1";
this.Label1.Size = new System.Drawing.Size(32, 13);
this.Label1.TabIndex = 36;
@ -255,18 +223,20 @@
//
// btnAdd
//
this.btnAdd.Location = new System.Drawing.Point(9, 300);
this.btnAdd.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnAdd.Location = new System.Drawing.Point(3, 3);
this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(75, 23);
this.btnAdd.Size = new System.Drawing.Size(97, 44);
this.btnAdd.TabIndex = 72;
this.btnAdd.Text = "&Add";
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// btnDelete
//
this.btnDelete.Location = new System.Drawing.Point(91, 300);
this.btnDelete.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnDelete.Location = new System.Drawing.Point(106, 3);
this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(75, 23);
this.btnDelete.Size = new System.Drawing.Size(97, 44);
this.btnDelete.TabIndex = 73;
this.btnDelete.Text = "&Delete";
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
@ -274,9 +244,10 @@
// btnUpdate
//
this.btnUpdate.AccessibleName = "Done";
this.btnUpdate.Location = new System.Drawing.Point(173, 300);
this.btnUpdate.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnUpdate.Location = new System.Drawing.Point(209, 3);
this.btnUpdate.Name = "btnUpdate";
this.btnUpdate.Size = new System.Drawing.Size(72, 24);
this.btnUpdate.Size = new System.Drawing.Size(97, 44);
this.btnUpdate.TabIndex = 71;
this.btnUpdate.Text = "&Update";
this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click);
@ -284,9 +255,10 @@
// btnExit
//
this.btnExit.AccessibleName = "Done";
this.btnExit.Location = new System.Drawing.Point(252, 300);
this.btnExit.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnExit.Location = new System.Drawing.Point(312, 3);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(72, 24);
this.btnExit.Size = new System.Drawing.Size(100, 44);
this.btnExit.TabIndex = 70;
this.btnExit.Text = "E&xit";
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
@ -295,82 +267,138 @@
//
this.chkDiscontinued.AutoSize = true;
this.chkDiscontinued.DataBindings.Add(new System.Windows.Forms.Binding("Checked", this.bsProducts, "Discontinued", true));
this.chkDiscontinued.Location = new System.Drawing.Point(236, 190);
this.chkDiscontinued.Dock = System.Windows.Forms.DockStyle.Top;
this.chkDiscontinued.Location = new System.Drawing.Point(261, 143);
this.chkDiscontinued.Name = "chkDiscontinued";
this.chkDiscontinued.Size = new System.Drawing.Size(88, 17);
this.chkDiscontinued.Size = new System.Drawing.Size(151, 17);
this.chkDiscontinued.TabIndex = 78;
this.chkDiscontinued.Text = "Discontinued";
this.chkDiscontinued.UseVisualStyleBackColor = true;
//
// cmbSalesLedger
// cmbSalesTax
//
this.cmbSalesLedger.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsProducts, "SaleLedgerID", true));
this.cmbSalesLedger.DisplayMember = "LedgerID";
this.cmbSalesLedger.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbSalesLedger.Location = new System.Drawing.Point(93, 163);
this.cmbSalesLedger.Name = "cmbSalesLedger";
this.cmbSalesLedger.Size = new System.Drawing.Size(137, 21);
this.cmbSalesLedger.TabIndex = 80;
this.cmbSalesLedger.ValueMember = "LedgerID";
this.cmbSalesTax.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsProducts, "Tax", true));
this.cmbSalesTax.DataSource = this.bsTax;
this.cmbSalesTax.DisplayMember = "Name";
this.cmbSalesTax.Dock = System.Windows.Forms.DockStyle.Top;
this.cmbSalesTax.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbSalesTax.Location = new System.Drawing.Point(261, 108);
this.cmbSalesTax.Name = "cmbSalesTax";
this.cmbSalesTax.Size = new System.Drawing.Size(151, 21);
this.cmbSalesTax.TabIndex = 82;
this.cmbSalesTax.ValueMember = "LedgerID";
//
// bsTax
//
this.bsTax.DataSource = typeof(Tanshu.Accounts.Entities.Tax);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(98, 148);
this.label5.Location = new System.Drawing.Point(3, 140);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(69, 13);
this.label5.TabIndex = 79;
this.label5.Text = "Sales Ledger";
this.label5.Size = new System.Drawing.Size(80, 13);
this.label5.TabIndex = 84;
this.label5.Text = "Service Charge";
//
// cmbSalesTax
// textBox1
//
this.cmbSalesTax.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsProducts, "SaleTaxID", true));
this.cmbSalesTax.DataSource = this.bsSalesTax;
this.cmbSalesTax.DisplayMember = "Name";
this.cmbSalesTax.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbSalesTax.Location = new System.Drawing.Point(236, 163);
this.cmbSalesTax.Name = "cmbSalesTax";
this.cmbSalesTax.Size = new System.Drawing.Size(91, 21);
this.cmbSalesTax.TabIndex = 82;
this.cmbSalesTax.ValueMember = "LedgerID";
this.textBox1.AccessibleName = "Phone 1";
this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsProducts, "ServiceCharge", true));
this.textBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.textBox1.Location = new System.Drawing.Point(106, 143);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(149, 20);
this.textBox1.TabIndex = 83;
this.textBox1.Text = "0";
//
// bsSalesTax
// tableLayoutPanel1
//
this.bsSalesTax.DataSource = typeof(Tanshu.Accounts.Entities.Tax);
this.tableLayoutPanel1.ColumnCount = 3;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 37.5F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 37.5F));
this.tableLayoutPanel1.Controls.Add(this.txtUnits, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.txtProductID, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.chkDiscontinued, 2, 4);
this.tableLayoutPanel1.Controls.Add(this.label5, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.txtSalePrice, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.textBox1, 1, 4);
this.tableLayoutPanel1.Controls.Add(this.btnAddProductGroup, 2, 2);
this.tableLayoutPanel1.Controls.Add(this.Label1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.cmbSalesTax, 2, 3);
this.tableLayoutPanel1.Controls.Add(this.cmbProductGroup, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.txtUniqueID, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.Label7, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.Label2, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.txtName, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.Label4, 0, 3);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 5;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(415, 175);
this.tableLayoutPanel1.TabIndex = 85;
//
// label10
// txtProductID
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(241, 148);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(54, 13);
this.label10.TabIndex = 81;
this.label10.Text = "Sales Tax";
this.txtProductID.AccessibleName = "";
this.txtProductID.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsProducts, "ProductID", true));
this.txtProductID.Dock = System.Windows.Forms.DockStyle.Top;
this.txtProductID.Enabled = false;
this.txtProductID.Location = new System.Drawing.Point(106, 3);
this.txtProductID.Name = "txtProductID";
this.txtProductID.Size = new System.Drawing.Size(149, 20);
this.txtProductID.TabIndex = 83;
this.txtProductID.WordWrap = false;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 4;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel2.Controls.Add(this.btnAdd, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.btnDelete, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.btnNavPrev, 1, 1);
this.tableLayoutPanel2.Controls.Add(this.btnLast, 3, 1);
this.tableLayoutPanel2.Controls.Add(this.btnNavNext, 2, 1);
this.tableLayoutPanel2.Controls.Add(this.btnNavFirst, 0, 1);
this.tableLayoutPanel2.Controls.Add(this.btnExit, 3, 0);
this.tableLayoutPanel2.Controls.Add(this.btnUpdate, 2, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 212);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 2;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(415, 100);
this.tableLayoutPanel2.TabIndex = 86;
//
// txtUnits
//
this.txtUnits.AccessibleName = "";
this.txtUnits.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsProducts, "Units", true));
this.txtUnits.Dock = System.Windows.Forms.DockStyle.Top;
this.txtUnits.Location = new System.Drawing.Point(261, 38);
this.txtUnits.Name = "txtUnits";
this.txtUnits.Size = new System.Drawing.Size(151, 20);
this.txtUnits.TabIndex = 85;
//
// ProductsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(336, 365);
this.Controls.Add(this.cmbSalesTax);
this.Controls.Add(this.Label1);
this.Controls.Add(this.label10);
this.Controls.Add(this.cmbSalesLedger);
this.Controls.Add(this.label5);
this.Controls.Add(this.chkDiscontinued);
this.Controls.Add(this.btnAdd);
this.Controls.Add(this.btnDelete);
this.Controls.Add(this.btnUpdate);
this.Controls.Add(this.btnExit);
this.Controls.Add(this.Label4);
this.Controls.Add(this.txtSalePrice);
this.Controls.Add(this.GroupBox1);
this.Controls.Add(this.btnNavFirst);
this.Controls.Add(this.btnNavPrev);
this.ClientSize = new System.Drawing.Size(415, 312);
this.Controls.Add(this.tableLayoutPanel2);
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.lblNavLocation);
this.Controls.Add(this.btnNavNext);
this.Controls.Add(this.btnLast);
this.Controls.Add(this.txtUniqueID);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ProductsForm";
@ -378,13 +406,12 @@
this.Text = "Products";
this.Load += new System.EventHandler(this.Products_Load);
((System.ComponentModel.ISupportInitialize)(this.bsProducts)).EndInit();
this.GroupBox1.ResumeLayout(false);
this.GroupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.bsTypes)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bsUnits)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bsSalesTax)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bsProductGroups)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bsTax)).EndInit();
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.tableLayoutPanel2.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
@ -392,12 +419,9 @@
internal System.Windows.Forms.Label Label4;
internal System.Windows.Forms.TextBox txtSalePrice;
internal System.Windows.Forms.GroupBox GroupBox1;
internal System.Windows.Forms.Button btnAddCategory;
internal System.Windows.Forms.ComboBox cmbProductTypes;
internal System.Windows.Forms.ComboBox cmbUnits;
internal System.Windows.Forms.Button btnAddProductGroup;
internal System.Windows.Forms.ComboBox cmbProductGroup;
internal System.Windows.Forms.Label Label7;
internal System.Windows.Forms.Label Label3;
internal System.Windows.Forms.TextBox txtName;
internal System.Windows.Forms.Label Label2;
internal System.Windows.Forms.Button btnNavFirst;
@ -412,13 +436,15 @@
internal System.Windows.Forms.Button btnUpdate;
internal System.Windows.Forms.Button btnExit;
private System.Windows.Forms.CheckBox chkDiscontinued;
internal System.Windows.Forms.ComboBox cmbSalesLedger;
internal System.Windows.Forms.Label label5;
internal System.Windows.Forms.ComboBox cmbSalesTax;
internal System.Windows.Forms.Label label10;
private System.Windows.Forms.BindingSource bsProducts;
private System.Windows.Forms.BindingSource bsUnits;
private System.Windows.Forms.BindingSource bsTypes;
private System.Windows.Forms.BindingSource bsSalesTax;
private System.Windows.Forms.BindingSource bsProductGroups;
private System.Windows.Forms.BindingSource bsTax;
internal System.Windows.Forms.Label label5;
internal System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
internal System.Windows.Forms.TextBox txtProductID;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
internal System.Windows.Forms.TextBox txtUnits;
}
}

View File

@ -32,29 +32,8 @@ namespace Tanshu.Accounts.PointOfSale
private void FillCombos()
{
bsUnits.DataSource = new StringType[17] {new StringType ( "Cms"),
new StringType ("Meter"),
new StringType ("Quintal"),
new StringType ("Can"),
new StringType ("Gms"),
new StringType ("Rs."),
new StringType ("Piece"),
new StringType ("Petti"),
new StringType ("No.'s"),
new StringType ("Liter"),
new StringType ("Box"),
new StringType ("Tin"),
new StringType ("Dibbi"),
new StringType ("Plate"),
new StringType ("Kg."),
new StringType ("Bottle"),
new StringType ("Pack" )};
bsTypes.DataSource = new ProductGroupBI().GetProductGroups();
//bsPurchaseLedgers.DataSource = new LedgerBI().GetLedgersOfType('P');
//bsSalesLedgers.DataSource = new LedgerBI().GetLedgersOfType('X');
//bsSalesTax.DataSource = new LedgerBI().GetLedgersOfType('T');
//bsPurchaseTax.DataSource = new LedgerBI().GetLedgersOfType('T');
bsProductGroups.DataSource = new ProductGroupBI().GetProductGroups();
bsTax.DataSource = TaxBI.GetTaxes();
}
#endregion
@ -129,23 +108,24 @@ namespace Tanshu.Accounts.PointOfSale
#region Add / Edit / Delete
private bool ValidateValues()
{
bool returnType;
returnType = (bool)(txtName.Text.Trim().Length > 0 ? true : false);
returnType = (cmbSalesLedger.SelectedValue == null ? false : true);
returnType = (cmbSalesTax.SelectedValue == null ? false : true);
return returnType;
if (txtName.Text.Trim().Length == 0)
return false;
if (cmbProductGroup.SelectedValue == null)
return false;
if (cmbSalesTax.SelectedValue == null)
return false;
return true;
}
private bool Save(bool addNew)
{
#region Setup Products
User user = Session.User;
Product product = new Product();
if (!addNew)
product = ProductBI.GetProduct(productList.ElementAt(bsProducts.Position).ProductID);
product = (Product)bsProducts.Current;
product.Name = txtName.Text;
product.Units = cmbUnits.Text;
product.ProductGroup = new ProductGroupBI().GetProductGroup((int)cmbProductTypes.SelectedValue);
product.Units = txtUnits.Text;
product.ProductGroup = new ProductGroupBI().GetProductGroup((int)cmbProductGroup.SelectedValue);
product.SalePrice = Convert.ToDecimal(txtSalePrice.Text);
product.Discontinued = chkDiscontinued.Checked;
product.Tax = new Tax();
@ -190,7 +170,7 @@ namespace Tanshu.Accounts.PointOfSale
frm.ShowDialog();
frm.Dispose();
FillCombos();
cmbProductTypes.SelectedIndex = 0;
cmbProductGroup.SelectedIndex = 0;
}

View File

@ -120,26 +120,11 @@
<metadata name="bsProducts.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="bsProducts.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
<metadata name="bsProductGroups.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>211, 17</value>
</metadata>
<metadata name="bsTypes.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>251, 17</value>
</metadata>
<metadata name="bsTypes.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>251, 17</value>
</metadata>
<metadata name="bsUnits.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>123, 17</value>
</metadata>
<metadata name="bsUnits.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>123, 17</value>
</metadata>
<metadata name="bsSalesTax.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>145, 54</value>
</metadata>
<metadata name="bsSalesTax.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>145, 54</value>
<metadata name="bsTax.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>129, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>102</value>