private void tsmCloseCashierPeriod_Click(object sender, EventArgs e) { try { GlobalVariables.CashierPeriodId = ""; CashierPeriod loCashierPeriod = new CashierPeriod(); foreach (DataRow _dr in loCashierPeriod.getCashierPeriodOpen().Rows) { GlobalVariables.CashierPeriodId = _dr[0].ToString(); } if (GlobalVariables.CashierPeriodId == "") { MessageBoxUI _mb = new MessageBoxUI("Cashier Period is already close!", GlobalVariables.Icons.Error, GlobalVariables.Buttons.OK); _mb.showDialog(); return; } else { CloseCashierPeriodUI loCloseCashierPeriod = new CloseCashierPeriodUI(); loCloseCashierPeriod.ParentList = this; loCloseCashierPeriod.ShowDialog(); } } catch (Exception ex) { ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "tsmCloseCashierPeriod_Click"); em.ShowDialog(); return; } }
private void btnReturnedItem_Click(object sender, EventArgs e) { DataTable _dt = loCashierPeriod.getCashierPeriodOpen(); if (_dt.Rows.Count > 0) { loReturnItemdDetail.ShowDialog(); if (loReturnItemdDetail.lFromSave) { MessageBoxUI _mb = new MessageBoxUI("Item has been returned successfully!", GlobalVariables.Icons.Save, GlobalVariables.Buttons.OK); _mb.showDialog(); } } else { MessageBoxUI _mb = new MessageBoxUI("Cashier Period must be Open!", GlobalVariables.Icons.Error, GlobalVariables.Buttons.OK); _mb.showDialog(); return; } }
private void tsmPOSOrdering_Click(object sender, EventArgs e) { try { foreach (TabPage _tab in this.tbcNSites_V.TabPages) { if (_tab.Text == "POS-Ordering") { tbcNSites_V.SelectedTab = _tab; return; } } GlobalVariables.CashierPeriodId = ""; CashierPeriod loCashierPeriod = new CashierPeriod(); foreach (DataRow _dr in loCashierPeriod.getCashierPeriodOpen().Rows) { GlobalVariables.CashierPeriodId = _dr[0].ToString(); } if (GlobalVariables.CashierId == "") { MessageBoxUI _mb = new MessageBoxUI("Cashier Period must be Open!", GlobalVariables.Icons.Error, GlobalVariables.Buttons.OK); _mb.showDialog(); return; } else { POSOrderingUI _POSOrdering = new POSOrderingUI(); TabPage _ListFormTab = new TabPage(); _ListFormTab.ImageIndex = 33; _POSOrdering.ParentList = this; displayControlOnTab(_POSOrdering, _ListFormTab); } } catch (Exception ex) { ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "tsmPOSOrdering_Click"); em.ShowDialog(); return; } }
public DataTable getCashierPeriodOpen() { return(loCashierPeriod.getCashierPeriodOpen()); }