private void btn_VentasGrabar_Click(object sender, EventArgs e) { dtFechaHoy = Convert.ToDateTime(DateTime.Now.ToString("d-M-yyyy")); if (bDttrue == false) { con.Open(); cmd = new SqlCommand("proc_ventas", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@iVentaid", 0); cmd.Parameters.AddWithValue("@iClienteid", cmb_VentaCliente.Text); cmd.Parameters.AddWithValue("@cClienteNombre", ""); cmd.Parameters.AddWithValue("@cArticuloNombre", ""); cmd.Parameters.AddWithValue("@iArticuloid", 0); cmd.Parameters.AddWithValue("@iTotalVenta", txt_VentaTotal.Text); cmd.Parameters.AddWithValue("@iFechaVenta", dtFechaHoy); cmd.Parameters.AddWithValue("@iOpcion", 1); SqlDataReader reader = cmd.ExecuteReader(); reader.Read(); cmd.Parameters.Clear(); con.Close(); MessageBox.Show("Se ha Generado la Venta"); this.Hide(); FrmAbcExhibicion formexhibicion = new FrmAbcExhibicion(); formexhibicion.StartPosition = FormStartPosition.CenterScreen; formexhibicion.ShowDialog(this); formexhibicion.Dispose(); formexhibicion = null; this.Close(); } }
private void btn_ArticulosRegresar_Click(object sender, EventArgs e) { this.Hide(); FrmAbcExhibicion formexhibicion = new FrmAbcExhibicion(); formexhibicion.StartPosition = FormStartPosition.CenterScreen; formexhibicion.ShowDialog(this); formexhibicion.Dispose(); formexhibicion = null; this.Close(); }