private void sales_Click(object sender, EventArgs e) { SalesForm salesForm = new SalesForm(); salesForm.ShowDialog(); }
private void ribbonButton3_Click(object sender, EventArgs e) { SalesForm frm = new SalesForm(); frm.ShowDialog(); }
private void salesToolStripMenuItem_Click(object sender, EventArgs e) { SalesForm sf = new SalesForm(); sf.ShowDialog(); }
private void button1_Click(object sender, EventArgs e) { SalesForm sf = new SalesForm(); sf.ShowDialog(); }
//clicks eg buttons #region ui_clicks private void UI_BTN_CLICKS(object sender, EventArgs e) { Button input = (Button)sender; switch (input.Name) {// case "salesBtn": { SalesForm sform = new SalesForm(); sform.ShowDialog(); break; } case "refreshRecentlyListBtn": { currentListOfProducts = productController.getStartUpProductsFromStore(); this.renderProductsUI(); break; } case "switchDisplayFormatBtn": { this.switchCurrentDisplayFormat(); this.searchKeyTxt.Text = ""; currentListOfProducts = productController.getStartUpProductsFromStore(); this.renderProductsUI(); break; } case "goToDashBoardBtn": { //F_OrdersMaintainer pf = (F_OrdersMaintainer)this.ParentForm; //pf.Connector_2_dashboard(); break; } case "searchBtn": { //currentListOfProducts = productController.getProductsBasedOnSearchKey(searchKeyTxt.Text); if (searchKeyTxt.Text == "") { currentListOfProducts = productController.getStartUpProductsFromStore(); } else { currentListOfProducts = productController.getProductsBasedOnSearchKey(searchKeyTxt.Text); } this.renderProductsUI(); if (this.autoSelectItemCheckBox.Checked == true && currentListOfProducts.Count == 1) { //MessageBox.Show("Auto select"); G_POS.POS.Forms.POSForm pf = (G_POS.POS.Forms.POSForm) this.ParentForm; pf.connect_store_n_receipt_send_this_item(currentListOfProducts[0]); this.putSearchOnFocus(); this.searchKeyTxt.Text = ""; } break; } case "btnClearSearchBox": { this.searchKeyTxt.Text = ""; currentListOfProducts = productController.getStartUpProductsFromStore(); this.renderProductsUI(); break; } case "EXITBtn": //clearReceiptSectBtn { pollDisplay("0"); Application.Exit(); /*F_OrdersMaintainer pf = (F_OrdersMaintainer)this.ParentForm; * pf.Connector_store_2_receipt_clear_receipt_items(); * //hide table no show * tableNoLbl.Visible = false; * tableNoTxt.Visible = false; * tableNoTxt.Text = -1 + ""; * this.TABLE_NO_SHOW = 0;*/ //this.putSearchOnFocus(); break; } case "forTableBtn": { if ((tableNoLbl.Visible == true) && (tableNoTxt.Visible = true)) { tableNoLbl.Visible = false; tableNoTxt.Visible = false; this.TABLE_NO_SHOW = 0; } else { tableNoLbl.Visible = true; tableNoTxt.Visible = true; this.TABLE_NO_SHOW = 1; } break; } //prev and next btn case "nextBtn": { int max_page = (this.currentListOfProducts.Count / this.COUNTS_PER_PAGE); if (this.CURRENT_PAGE == max_page) { this.COUNTS_REMAINDER = (this.currentListOfProducts.Count % this.COUNTS_PER_PAGE); } if (this.COUNTS_REMAINDER != 0) { max_page += 1; } //MessageBox.Show("items :" + currentListOfProducts.Count + "\nmax:" + max_page + "\nCurr:" + this.CURRENT_PAGE + "\nRemainder" + this.COUNTS_REMAINDER); //check if (!(this.CURRENT_PAGE >= max_page)) { this.CURRENT_PAGE += 1; this.renderProductsUI(); } else { } //max page this.putSearchOnFocus(); break; } case "prevBtn": { this.COUNTS_REMAINDER = 0; //basic if (!(this.CURRENT_PAGE - 1 == 0)) { this.CURRENT_PAGE -= 1; this.renderProductsUI(); } else { } //-1 this.putSearchOnFocus(); break; } case "currentOrdersBtn": //MyRestaurant.Restaurant.Controls.OrdersFlow.CurrentOrders.CurrentOrdersForm fm = new MyRestaurant.Restaurant.Controls.OrdersFlow.CurrentOrders.CurrentOrdersForm(); //fm.ShowDialog(); break; case "x": break; } }