public void infolistCellForNewDeliveryOrder(object sender, EventArgs e) { CommodityInfoforSearch commodityInfoforSearch = sender as CommodityInfoforSearch; string strTableName = "hypos_GOODSLST as hg left outer join HyLicence as hl on hg.licType =hl.licType and hg.domManufId =hl.licNo"; string strWhereClause = "hg.GDSNO ={0} AND ((hg.ISWS ='Y' and hg.CLA1NO ='0302' and hg.licType = hl.licType and hg.domManufId = hl.licNo) OR (hg.ISWS ='N' and hg.CLA1NO ='0302') OR hg.CLA1NO ='0303' OR hg.CLA1NO ='0305' OR hg.CLA1NO ='0308') AND (hl.isDelete='N' or hl.isDelete is null) "; DataTable dataTable = (DataTable)DataBaseUtilities.DBOperation(Program.ConnectionString, TableOperation.Select, "hg.inventory,hg.GDSNO,hg.spec,hg.capacity,hg.GDName,hg.formCode,hg.CName,hg.contents,hg.brandName,hg.CLA1NO,hg.ISWS", strTableName, strWhereClause, "", null, new string[1] { commodityInfoforSearch.barcode }, CommandOperationType.ExecuteReaderReturnDataTable); DialogResult dialogResult = DialogResult.None; if (dataTable.Rows.Count > 0 && "0302".Equals(dataTable.Rows[0]["CLA1NO"].ToString()) && "Y".Equals(dataTable.Rows[0]["ISWS"].ToString())) { dialogResult = new dialogSetBatchNoAndMFGdate2(frmD, commodityInfoforSearch.barcode).ShowDialog(); } else { frmD.addOnecommodity(sender, e, commodityInfoforSearch.barcode); frmD.Show(); Close(); } if (dialogResult == DialogResult.Yes) { frmD.addOnecommodity(sender, e, commodityInfoforSearch.barcode); frmD.Show(); Close(); } }
public void infolistCell(object sender, EventArgs e) { CommodityInfoforSearch commodityInfoforSearch = sender as CommodityInfoforSearch; frsm.addOnecommodity(commodityInfoforSearch.barcode, "", "", "", ""); frsm.Show(); Close(); }
public void viewMemberInfo(object sender, EventArgs s) { CommodityInfoforSearch commodityInfoforSearch = sender as CommodityInfoforSearch; if (Program.SystemMode == 1) { frshyscorp frshyscorp = new frshyscorp(frs, commodityInfoforSearch.barcode, commodityInfoforSearch.getcommodityName()); frshyscorp.Location = new Point(base.Location.X, base.Location.Y); frshyscorp.setSearchResult(this); frshyscorp.ShowDialog(); } else { frshyscorp frshyscorp2 = new frshyscorp(frsm, commodityInfoforSearch.barcode, commodityInfoforSearch.getcommodityName()); frshyscorp2.Location = new Point(base.Location.X, base.Location.Y); frshyscorp2.setSearchResult(this); frshyscorp2.ShowDialog(); } }
private void InitializeComponent() { uC_Member1 = new POS_Client.CommodityInfoforSearch(); uC_Member2 = new POS_Client.CommodityInfoforSearch(); uC_Member3 = new POS_Client.CommodityInfoforSearch(); uC_Member4 = new POS_Client.CommodityInfoforSearch(); uC_Member5 = new POS_Client.CommodityInfoforSearch(); uC_Member6 = new POS_Client.CommodityInfoforSearch(); uC_Member7 = new POS_Client.CommodityInfoforSearch(); uC_Member8 = new POS_Client.CommodityInfoforSearch(); btn_pageRight = new System.Windows.Forms.Button(); btn_pageLeft = new System.Windows.Forms.Button(); l_memberList = new System.Windows.Forms.Label(); l_pageInfo = new System.Windows.Forms.Label(); btn_firstPage = new System.Windows.Forms.Button(); btn_previousPage = new System.Windows.Forms.Button(); btn_nextPage = new System.Windows.Forms.Button(); btn_lastPage = new System.Windows.Forms.Button(); l_pageNow = new System.Windows.Forms.Label(); uC_Member9 = new POS_Client.CommodityInfoforSearch(); uC_Member10 = new POS_Client.CommodityInfoforSearch(); conditionBarcode = new System.Windows.Forms.Label(); conditionName = new System.Windows.Forms.Label(); conditionClass = new System.Windows.Forms.Label(); search = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)pb_virtualKeyBoard).BeginInit(); SuspendLayout(); uC_Member1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; uC_Member1.Cursor = System.Windows.Forms.Cursors.Hand; uC_Member1.Location = new System.Drawing.Point(89, 88); uC_Member1.MaximumSize = new System.Drawing.Size(398, 102); uC_Member1.MinimumSize = new System.Drawing.Size(398, 102); uC_Member1.Name = "uC_Member1"; uC_Member1.Size = new System.Drawing.Size(398, 102); uC_Member1.TabIndex = 33; uC_Member2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; uC_Member2.Cursor = System.Windows.Forms.Cursors.Hand; uC_Member2.Location = new System.Drawing.Point(495, 88); uC_Member2.MaximumSize = new System.Drawing.Size(398, 102); uC_Member2.MinimumSize = new System.Drawing.Size(398, 102); uC_Member2.Name = "uC_Member2"; uC_Member2.Size = new System.Drawing.Size(398, 102); uC_Member2.TabIndex = 34; uC_Member3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; uC_Member3.Cursor = System.Windows.Forms.Cursors.Hand; uC_Member3.Location = new System.Drawing.Point(89, 189); uC_Member3.MaximumSize = new System.Drawing.Size(398, 102); uC_Member3.MinimumSize = new System.Drawing.Size(398, 102); uC_Member3.Name = "uC_Member3"; uC_Member3.Size = new System.Drawing.Size(398, 102); uC_Member3.TabIndex = 35; uC_Member4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; uC_Member4.Cursor = System.Windows.Forms.Cursors.Hand; uC_Member4.Location = new System.Drawing.Point(495, 189); uC_Member4.MaximumSize = new System.Drawing.Size(398, 102); uC_Member4.MinimumSize = new System.Drawing.Size(398, 102); uC_Member4.Name = "uC_Member4"; uC_Member4.Size = new System.Drawing.Size(398, 102); uC_Member4.TabIndex = 36; uC_Member5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; uC_Member5.Cursor = System.Windows.Forms.Cursors.Hand; uC_Member5.Location = new System.Drawing.Point(89, 290); uC_Member5.MaximumSize = new System.Drawing.Size(398, 102); uC_Member5.MinimumSize = new System.Drawing.Size(398, 102); uC_Member5.Name = "uC_Member5"; uC_Member5.Size = new System.Drawing.Size(398, 102); uC_Member5.TabIndex = 37; uC_Member6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; uC_Member6.Cursor = System.Windows.Forms.Cursors.Hand; uC_Member6.Location = new System.Drawing.Point(495, 290); uC_Member6.MaximumSize = new System.Drawing.Size(398, 102); uC_Member6.MinimumSize = new System.Drawing.Size(398, 102); uC_Member6.Name = "uC_Member6"; uC_Member6.Size = new System.Drawing.Size(398, 102); uC_Member6.TabIndex = 38; uC_Member7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; uC_Member7.Cursor = System.Windows.Forms.Cursors.Hand; uC_Member7.Location = new System.Drawing.Point(89, 391); uC_Member7.MaximumSize = new System.Drawing.Size(398, 102); uC_Member7.MinimumSize = new System.Drawing.Size(398, 102); uC_Member7.Name = "uC_Member7"; uC_Member7.Size = new System.Drawing.Size(398, 102); uC_Member7.TabIndex = 39; uC_Member8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; uC_Member8.Cursor = System.Windows.Forms.Cursors.Hand; uC_Member8.Location = new System.Drawing.Point(495, 391); uC_Member8.MaximumSize = new System.Drawing.Size(398, 102); uC_Member8.MinimumSize = new System.Drawing.Size(398, 102); uC_Member8.Name = "uC_Member8"; uC_Member8.Size = new System.Drawing.Size(398, 102); uC_Member8.TabIndex = 40; btn_pageRight.FlatAppearance.BorderSize = 0; btn_pageRight.FlatStyle = System.Windows.Forms.FlatStyle.Flat; btn_pageRight.Image = POS_Client.Properties.Resources.right; btn_pageRight.Location = new System.Drawing.Point(934, 209); btn_pageRight.Name = "btn_pageRight"; btn_pageRight.Size = new System.Drawing.Size(48, 371); btn_pageRight.TabIndex = 41; btn_pageRight.UseVisualStyleBackColor = true; btn_pageRight.Click += new System.EventHandler(btn_pageRight_Click); btn_pageLeft.FlatAppearance.BorderSize = 0; btn_pageLeft.FlatStyle = System.Windows.Forms.FlatStyle.Flat; btn_pageLeft.Image = POS_Client.Properties.Resources.left; btn_pageLeft.Location = new System.Drawing.Point(1, 209); btn_pageLeft.Name = "btn_pageLeft"; btn_pageLeft.Size = new System.Drawing.Size(48, 371); btn_pageLeft.TabIndex = 42; btn_pageLeft.UseVisualStyleBackColor = true; btn_pageLeft.Click += new System.EventHandler(btn_pageLeft_Click); l_memberList.AutoSize = true; l_memberList.Font = new System.Drawing.Font("微軟正黑體", 14.25f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 136); l_memberList.Image = POS_Client.Properties.Resources.oblique; l_memberList.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; l_memberList.Location = new System.Drawing.Point(12, 52); l_memberList.Name = "l_memberList"; l_memberList.Size = new System.Drawing.Size(101, 24); l_memberList.TabIndex = 51; l_memberList.Text = " 商品查詢"; l_pageInfo.AutoSize = true; l_pageInfo.Font = new System.Drawing.Font("微軟正黑體", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 136); l_pageInfo.Location = new System.Drawing.Point(658, 52); l_pageInfo.Name = "l_pageInfo"; l_pageInfo.RightToLeft = System.Windows.Forms.RightToLeft.Yes; l_pageInfo.Size = new System.Drawing.Size(216, 20); l_pageInfo.TabIndex = 58; l_pageInfo.Text = "共{0}筆.{1}頁|目前在第1頁\r\n"; l_pageInfo.TextAlign = System.Drawing.ContentAlignment.MiddleRight; btn_firstPage.BackColor = System.Drawing.Color.White; btn_firstPage.FlatStyle = System.Windows.Forms.FlatStyle.Flat; btn_firstPage.Font = new System.Drawing.Font("微軟正黑體", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 136); btn_firstPage.Location = new System.Drawing.Point(308, 598); btn_firstPage.Name = "btn_firstPage"; btn_firstPage.Size = new System.Drawing.Size(69, 29); btn_firstPage.TabIndex = 59; btn_firstPage.Text = "|<<"; btn_firstPage.UseVisualStyleBackColor = false; btn_firstPage.Click += new System.EventHandler(btn_firstPage_Click); btn_previousPage.BackColor = System.Drawing.Color.White; btn_previousPage.FlatStyle = System.Windows.Forms.FlatStyle.Flat; btn_previousPage.Font = new System.Drawing.Font("微軟正黑體", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 136); btn_previousPage.Location = new System.Drawing.Point(383, 598); btn_previousPage.Name = "btn_previousPage"; btn_previousPage.Size = new System.Drawing.Size(69, 29); btn_previousPage.TabIndex = 60; btn_previousPage.Text = "上一頁"; btn_previousPage.UseVisualStyleBackColor = false; btn_previousPage.Click += new System.EventHandler(btn_pageLeft_Click); btn_nextPage.BackColor = System.Drawing.Color.White; btn_nextPage.FlatStyle = System.Windows.Forms.FlatStyle.Flat; btn_nextPage.Font = new System.Drawing.Font("微軟正黑體", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 136); btn_nextPage.Location = new System.Drawing.Point(554, 598); btn_nextPage.Name = "btn_nextPage"; btn_nextPage.Size = new System.Drawing.Size(69, 29); btn_nextPage.TabIndex = 62; btn_nextPage.Text = "下一頁"; btn_nextPage.UseVisualStyleBackColor = false; btn_nextPage.Click += new System.EventHandler(btn_pageRight_Click); btn_lastPage.BackColor = System.Drawing.Color.White; btn_lastPage.FlatStyle = System.Windows.Forms.FlatStyle.Flat; btn_lastPage.Font = new System.Drawing.Font("微軟正黑體", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 136); btn_lastPage.Location = new System.Drawing.Point(629, 598); btn_lastPage.Name = "btn_lastPage"; btn_lastPage.Size = new System.Drawing.Size(69, 29); btn_lastPage.TabIndex = 63; btn_lastPage.Text = ">>|"; btn_lastPage.UseVisualStyleBackColor = false; btn_lastPage.Click += new System.EventHandler(btn_lastPage_Click); l_pageNow.BackColor = System.Drawing.Color.Red; l_pageNow.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; l_pageNow.Font = new System.Drawing.Font("微軟正黑體", 14.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 136); l_pageNow.ForeColor = System.Drawing.Color.White; l_pageNow.Location = new System.Drawing.Point(458, 598); l_pageNow.Name = "l_pageNow"; l_pageNow.Size = new System.Drawing.Size(90, 29); l_pageNow.TabIndex = 64; l_pageNow.Text = "第{0}頁"; l_pageNow.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; uC_Member9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; uC_Member9.Cursor = System.Windows.Forms.Cursors.Hand; uC_Member9.Location = new System.Drawing.Point(89, 492); uC_Member9.MaximumSize = new System.Drawing.Size(398, 102); uC_Member9.MinimumSize = new System.Drawing.Size(398, 102); uC_Member9.Name = "uC_Member9"; uC_Member9.Size = new System.Drawing.Size(398, 102); uC_Member9.TabIndex = 65; uC_Member10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; uC_Member10.Cursor = System.Windows.Forms.Cursors.Hand; uC_Member10.Location = new System.Drawing.Point(495, 491); uC_Member10.MaximumSize = new System.Drawing.Size(398, 102); uC_Member10.MinimumSize = new System.Drawing.Size(398, 102); uC_Member10.Name = "uC_Member10"; uC_Member10.Size = new System.Drawing.Size(398, 102); uC_Member10.TabIndex = 66; conditionBarcode.AutoSize = true; conditionBarcode.Font = new System.Drawing.Font("微軟正黑體", 15f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 136); conditionBarcode.Location = new System.Drawing.Point(127, 52); conditionBarcode.Name = "conditionBarcode"; conditionBarcode.Size = new System.Drawing.Size(97, 25); conditionBarcode.TabIndex = 67; conditionBarcode.Text = "商品條碼:"; conditionName.AutoSize = true; conditionName.Font = new System.Drawing.Font("微軟正黑體", 15f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 136); conditionName.Location = new System.Drawing.Point(340, 51); conditionName.Name = "conditionName"; conditionName.Size = new System.Drawing.Size(97, 25); conditionName.TabIndex = 68; conditionName.Text = "商品名稱:"; conditionClass.AutoSize = true; conditionClass.Font = new System.Drawing.Font("微軟正黑體", 15f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 136); conditionClass.Location = new System.Drawing.Point(502, 52); conditionClass.Name = "conditionClass"; conditionClass.Size = new System.Drawing.Size(97, 25); conditionClass.TabIndex = 69; conditionClass.Text = "商品類型:"; search.BackColor = System.Drawing.Color.FromArgb(54, 168, 182); search.FlatStyle = System.Windows.Forms.FlatStyle.Flat; search.Font = new System.Drawing.Font("微軟正黑體", 11.25f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 136); search.ForeColor = System.Drawing.Color.White; search.Location = new System.Drawing.Point(880, 42); search.Name = "search"; search.Size = new System.Drawing.Size(94, 36); search.TabIndex = 70; search.Text = "重新查詢"; search.UseVisualStyleBackColor = false; search.Click += new System.EventHandler(search_Click); base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.ClientSize = new System.Drawing.Size(981, 661); base.Controls.Add(search); base.Controls.Add(conditionClass); base.Controls.Add(conditionName); base.Controls.Add(conditionBarcode); base.Controls.Add(uC_Member10); base.Controls.Add(uC_Member9); base.Controls.Add(l_pageNow); base.Controls.Add(btn_lastPage); base.Controls.Add(btn_nextPage); base.Controls.Add(btn_previousPage); base.Controls.Add(btn_firstPage); base.Controls.Add(l_pageInfo); base.Controls.Add(l_memberList); base.Controls.Add(btn_pageLeft); base.Controls.Add(btn_pageRight); base.Controls.Add(uC_Member8); base.Controls.Add(uC_Member7); base.Controls.Add(uC_Member6); base.Controls.Add(uC_Member5); base.Controls.Add(uC_Member4); base.Controls.Add(uC_Member3); base.Controls.Add(uC_Member2); base.Controls.Add(uC_Member1); base.Name = "frmCommdityList"; base.StartPosition = System.Windows.Forms.FormStartPosition.Manual; Text = "農委會防檢局POS系統"; base.Load += new System.EventHandler(frmMemberMangement_Load); base.Controls.SetChildIndex(pb_virtualKeyBoard, 0); base.Controls.SetChildIndex(uC_Member1, 0); base.Controls.SetChildIndex(uC_Member2, 0); base.Controls.SetChildIndex(uC_Member3, 0); base.Controls.SetChildIndex(uC_Member4, 0); base.Controls.SetChildIndex(uC_Member5, 0); base.Controls.SetChildIndex(uC_Member6, 0); base.Controls.SetChildIndex(uC_Member7, 0); base.Controls.SetChildIndex(uC_Member8, 0); base.Controls.SetChildIndex(btn_pageRight, 0); base.Controls.SetChildIndex(btn_pageLeft, 0); base.Controls.SetChildIndex(l_memberList, 0); base.Controls.SetChildIndex(l_pageInfo, 0); base.Controls.SetChildIndex(btn_firstPage, 0); base.Controls.SetChildIndex(btn_previousPage, 0); base.Controls.SetChildIndex(btn_nextPage, 0); base.Controls.SetChildIndex(btn_lastPage, 0); base.Controls.SetChildIndex(l_pageNow, 0); base.Controls.SetChildIndex(uC_Member9, 0); base.Controls.SetChildIndex(uC_Member10, 0); base.Controls.SetChildIndex(conditionBarcode, 0); base.Controls.SetChildIndex(conditionName, 0); base.Controls.SetChildIndex(conditionClass, 0); base.Controls.SetChildIndex(search, 0); ((System.ComponentModel.ISupportInitialize)pb_virtualKeyBoard).EndInit(); ResumeLayout(false); PerformLayout(); }