示例#1
0
 private void Limpiar()
 {
     IdNumericUpDown.Value = 0;
     DescripcionTextBox.Clear();
     CostoTextBox.Clear();
     ExistenciaTextBox.Clear();
     TotalTextBox.Clear();
     MyErrorProvider.Clear();
 }
 private void Limpiar()
 {
     this.factura              = new Facturas();
     this.factura.Fecha        = DateTime.Now;
     detallemostrar            = new List <DetalleMostrar>();
     DatosDataGrid.ItemsSource = detallemostrar;
     this.DataContext          = factura;
     TotalTextBox.Clear();
 }
示例#3
0
        private void LimparButton_Click(object sender, EventArgs e)
        {
            ClienteTextBox.Text      = "";
            ValorTextBox.Text        = String.Empty;
            UfComboBox.SelectedIndex = -1;
            FreteTextBox.Clear();
            TotalTextBox.Clear();

            ClienteTextBox.Focus();
        }
        public Form1()
        {
            InitializeComponent();
            con.Open();
            int count = 0;

            TotalTextBox.Clear();
            cmd   = new SqlCommand("Select count(*) FROM TruckShowParticipants", con);
            count = (int)cmd.ExecuteScalar();
            TotalTextBox.AppendText(count.ToString());
            con.Close();
        }
 private void NuevoButton_Click(object sender, EventArgs e)
 {
     CotizacionIdNumericUpDown.Value     = 0;
     CantidadCotizadaNumericUpDown.Value = 0;
     PrecioTextBox.Clear();
     ImporteTextBox.Clear();
     TotalTextBox.Clear();
     FechaDateTimePicker.Value = DateTime.Now;
     ObservacionesTextBox.Clear();
     DetalleCotizacionDataGridView.DataSource = null;
     MyErrorProvider.Clear();
 }
        private void ItemsListBox_DoubleClick(object sender, EventArgs e)
        {
            QuantityNumericUpDown.ResetText();
            TotalTextBox.Clear();
            string itemName = ItemsListBox.GetItemText(ItemsListBox.SelectedItem);

            ItemNameTextBox.Text = itemName;
            try
            {
                DataTable Dtitemprice = GetAndSetItemAndPrice(itemName);
                DataRow   row         = Dtitemprice.Rows[0];
                PriceTextBox.Text = row["price"].ToString();
            }
            catch { }
        }
 private void QuotaTextBox_TextChanged(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(QuotaTextBox.Text))
     {
         BalanceIntTextBox.Clear();
         TotalTextBox.Clear();
         BalanceIntTextBox.AppendText((Convert.ToDouble(QuotaTextBox.Text) * Convert.ToDouble(InteresTextBox.Text) / 100).ToString());
         TotalTextBox.AppendText((Convert.ToDouble(BalanceIntTextBox.Text) + Convert.ToDouble(QuotaTextBox.Text)).ToString());
     }
     else
     {
         Util.Limpiar(this);
         InteresTextBox.AppendText("4");
     }
 }
 private void NuevoButton_Click(object sender, EventArgs e)
 {
     VentaIdTextBox.Clear();
     CantidadTextBox.Clear();
     PrecioTextBox.Clear();
     NFCTextBox.Clear();
     TipoNFCTextBox.Clear();
     DescuentosTextBox.Clear();
     TotalTextBox.Clear();
     VentasdataGridView.Rows.Clear();
     BuscarVentaButton.Enabled = true;
     GuardarButton.Text        = "Guardar";
     EliminarButton.Enabled    = false;
     miError.Clear();
 }
示例#9
0
 private void Limpiar()
 {
     VentaIdNumericUpDown.Value    = 0;
     FechaDateTimePicker.Value     = DateTime.Now;
     ClienteComboBox.SelectedIndex = 0;
     CantidadTextBox.Clear();
     PrecioTextBox.Clear();
     ImporteTextBox.Clear();
     VentasGridView.DataSource = null;
     SubTotalTextBox.Clear();
     ItbisTextBox.Clear();
     TotalTextBox.Clear();
     MyErrorProvider.Clear();
     LlenarComboBox();
 }
 private void LimpiaObjetos()
 {
     FacturaIdNumericUpDown.Value = 0;
     FechaDateTimePicker.Value    = DateTime.Now;
     NombreCliente.Clear();
     ProductoComboBox.SelectedIndex = 0;
     CantidadTextBox.Clear();
     PrecioTextBox.Clear();
     ImporteTextBox.Clear();
     FacturaDetalleDataGridView.DataSource = null;
     SubTotalTextBox.Clear();
     ItbisTextBox.Clear();
     TotalTextBox.Clear();
     MyErrorProvider.Clear();
 }
        private void EnterButton2_Click(object sender, EventArgs e)
        {
            NameTextBox2.Clear();
            PhoneTextBox2.Clear();
            YearTextBox2.Clear();
            MakeTextBox2.Clear();
            ModelTextBox2.Clear();
            TotalTextBox.Clear();

            string number = NumberTextBox2.Text;

            number = number.Trim();
            con.Open();
            cmd = new SqlCommand("SELECT * FROM TruckShowParticipants WHERE ShowEntryNumber= '" + NumberTextBox2.Text + "'", con);
            SqlDataReader dr = cmd.ExecuteReader();

            if (dr.Read())
            {
                string Name = (dr["Name"].ToString());
                Name = Name.Trim();
                NameTextBox2.AppendText(Name);

                string phoneNum = (dr["PhoneNumber"].ToString());
                phoneNum = phoneNum.Trim();
                PhoneTextBox2.AppendText(phoneNum);

                string year = (dr["TruckYear"].ToString());
                year = year.Trim();
                YearTextBox2.AppendText(year);

                string make = (dr["Make"].ToString());
                make = make.Trim();
                MakeTextBox2.AppendText(make);

                string model = (dr["Model"].ToString());
                model = model.Trim();
                ModelTextBox2.AppendText(model);
            }
            con.Close();
            con.Open();
            int count = 0;

            TotalTextBox.Clear();
            cmd   = new SqlCommand("Select count(*) FROM TruckShowParticipants", con);
            count = (int)cmd.ExecuteScalar();
            TotalTextBox.AppendText(count.ToString());
            con.Close();
        }
示例#12
0
 private void Limpiar()
 {
     MantenimientoIdNumericUpDown.Value = 0;
     FechaDateTimePicker.Value          = DateTime.Now;
     VehiculoComboBox.SelectedIndex     = 0;
     TallerComboBox.SelectedIndex       = 0;
     ArticuloComboBox.SelectedIndex     = 0;
     CantidadNumericUpDown.Value        = 0;
     PrecioTextBox.Clear();
     ImporteTextBox.Clear();
     MantenimientoDetalleDataGridView.DataSource = null;
     SubTotalTextBox.Clear();
     ItbisTextBox.Clear();
     TotalTextBox.Clear();
     MyErrorProvider.Clear();
 }
        public void Limpiar()
        {
            IdnumericUpDown.Value       = 0;
            fechaDateTimePicker.Value   = DateTime.Now;
            fechaDateTimePicker1.Value  = DateTime.Now;
            CantidadnumericUpDown.Value = 0;
            TotalTextBox.Clear();
            ImporteTextBox.Clear();
            SubTotalTextBox.Text = 0.ToString();
            TotalTextBox.Text    = 0.ToString();
            ItbisTextBox.Text    = 0.ToString();
            MantenimientoDetalledataGridView.DataSource = null;

            itbis = 0;
            Total = 0;;
        }
示例#14
0
 public void Vaciar()
 {
     IdnumericUpDown.Value       = 0;
     FechadateTimePicker.Value   = DateTime.Now;
     PFechadateTimePicker.Value  = DateTime.Now;
     CantidadNumericUpDown.Value = 0;
     TotalTextBox.Clear();
     ImporteTextBox.Clear();
     SubTextBox.Text   = 0.ToString();
     TotalTextBox.Text = 0.ToString();
     ItbisTextBox.Text = 0.ToString();
     MantenimientoDataGridView.DataSource = null;
     itbis    = 0;
     importe  = 0;
     Total    = 0;
     subtotal = 0;
 }
        private void ClearButton1_Click(object sender, EventArgs e)
        {
            NumberTextBox1.Text = "";
            NameTextBox1.Text   = "";
            PhoneTextBox1.Text  = "";
            YearTextBox1.Text   = "";
            MakeTextBox1.Text   = "";
            ModelTextBox1.Text  = "";
            con.Open();
            TotalTextBox.Clear();
            int count = 0;

            cmd   = new SqlCommand("Select count(*) FROM TruckShowParticipants", con);
            count = (int)cmd.ExecuteScalar();
            TotalTextBox.AppendText(count.ToString());
            con.Close();
        }
        private void DeleteButton_Click(object sender, EventArgs e)
        {
            string message = "All records deleted";
            string title   = "Truck Show Records";

            MessageBox.Show(message, title);
            con.Open();
            cmd = new SqlCommand("DELETE FROM TruckShowParticipants", con);
            cmd.ExecuteNonQuery();
            con.Close();
            con.Open();
            TotalTextBox.Clear();
            int count = 0;

            cmd   = new SqlCommand("Select count(*) FROM TruckShowParticipants", con);
            count = (int)cmd.ExecuteScalar();
            TotalTextBox.AppendText(count.ToString());
            con.Close();
        }
示例#17
0
        public void LimpiarCampos()
        {
            MantenimientoIdNumericUpDown.Value = 0;
            FechaDateTimePicker.Value          = DateTime.Now;
            CantidadNumericUpDown.Value        = 0;
            TotalTextBox.Clear();

            ImporteTextBox.Clear();
            SubtotalTextBox.Text           = 0.ToString();
            TotalTextBox.Text              = 0.ToString();
            ITBISTextBox.Text              = 0.ToString();
            DetalleDataGridView.DataSource = null;

            itbis = 0;

            Total = 0;


            GeneralErrorProvider.Clear();
        }
示例#18
0
        public void LimpiarCampos()
        {
            VentaIdNumericUpDown.Value     = 0;
            FechaVentaDateTimePicker.Value = DateTime.Now;
            DescripcionTextBox.Clear();
            NombreClienteTextBox.Clear();
            TelefonomaskedTextBox.Clear();
            CantidadNumericUpDown.Value = 0;
            SubTotalTextBox.Text        = 0.ToString();
            ItbisTextBox.Text           = 0.ToString();
            TotalTextBox.Clear();

            ImporteTextBox.Clear();
            TotalTextBox.Text = 0.ToString();
            VentaDetalleDataGridView.DataSource = null;

            //Total = 0;

            GeneralErrorProvider.Clear();
        }
        private void EnterButton1_Click(object sender, EventArgs e)
        {
            TotalTextBox.Clear();

            string message = "Entry Added";
            string title   = "Truck Show Participant";

            MessageBox.Show(message, title);
            con.Open();
            cmd = new SqlCommand("INSERT INTO TruckShowParticipants (ShowEntryNumber, Name, PhoneNumber, TruckYear, Make, Model)" +
                                 " Values('" + NumberTextBox1.Text + "','" + NameTextBox1.Text + "','" + PhoneTextBox1.Text + "','" + YearTextBox1.Text + "','" + MakeTextBox1.Text + "','" + ModelTextBox1.Text + "')", con);
            cmd.ExecuteNonQuery();
            con.Close();
            con.Open();
            TotalTextBox.Clear();
            int count = 0;

            cmd   = new SqlCommand("Select count(*) FROM TruckShowParticipants", con);
            count = (int)cmd.ExecuteScalar();
            TotalTextBox.AppendText(count.ToString());
            con.Close();
        }