private void btnSales_Click(object sender, EventArgs e) { SaleView saleView = SaleView.GetInstance(); saleView.IdEmployee = Convert.ToInt32(this.IdEmployee); openViewInPanel(saleView); }
public static SaleView GetInstance() { if (_Instance == null) { _Instance = new SaleView(); } return(_Instance); }
private void ventasToolStripMenuItem1_Click(object sender, EventArgs e) { SaleView saleView = SaleView.GetInstance(); saleView.MdiParent = this; saleView.Show(); saleView.IdEmployee = Convert.ToInt32(this.IdEmployee); }
private void dataList_DoubleClick(object sender, EventArgs e) { SaleView saleView = SaleView.GetInstance(); string idCustomer = Convert.ToString(this.dataList.CurrentRow.Cells["id_cliente"].Value); string name = Convert.ToString(this.dataList.CurrentRow.Cells["apellidos"].Value) + " " + Convert.ToString(this.dataList.CurrentRow.Cells["nombre"].Value); saleView.setCustomer(idCustomer, name); this.Hide(); }
private void dataList_DoubleClick(object sender, EventArgs e) { SaleView saleView = SaleView.GetInstance(); string idEntryDetail = Convert.ToString(this.dataList.CurrentRow.Cells["id_detalle_entrada"].Value); string name = Convert.ToString(this.dataList.CurrentRow.Cells["nombre"].Value); decimal priceBuy = Convert.ToDecimal(this.dataList.CurrentRow.Cells["precio_compra"].Value); decimal priceSale = Convert.ToDecimal(this.dataList.CurrentRow.Cells["precio_venta"].Value); int currentStock = Convert.ToInt32(this.dataList.CurrentRow.Cells["stock_actual"].Value); saleView.setItem(idEntryDetail, name, priceBuy, priceSale, currentStock); this.Hide(); }
private void SaleView_FormClosing(object sender, FormClosingEventArgs e) { _Instance = null; }