Пример #1
0
 private void dtpSalida_ValueChanged(object sender, EventArgs e)
 {
     if (idTar != 0)
     {
         clsTarifa tar = new clsTarifa("Tarifas", "C:\\Sistema de Cochera\\Tarifas");
         tar = tar.existe(this.idTar);
         int dias = (int)(dtpSalida.Value - DateTime.Today).TotalDays;
         lblMonto.Text = "$" + (dias + 1) * tar.Precio;
     }
 }
Пример #2
0
        public void actualizar()
        {
            if (patenteVeh != string.Empty)
            {
                tbVeh.Text = patenteVeh;
            }
            else
            {
                tbVeh.Text = "<Sin Seleccionar>";
            }

            if (nombreLote != string.Empty)
            {
                tbLote.Text = nombreLote;
            }
            else
            {
                tbLote.Text = "<Sin Seleccionar>";
            }
            if (nombreTarifa != string.Empty)
            {
                clsTarifa tar = new clsTarifa("Tarifas", "C:\\Sistema de Cochera\\Tarifas");
                tar           = tar.existe(idTar);
                tbTarifa.Text = tar.Nombre;
            }
            else
            {
                tbTarifa.Text = "<Sin Seleccionar>";
            }


            if (idVeh == 0)
            {
                btnTarf.Enabled = false;
                btnLote.Enabled = false;
            }
            else
            {
                btnTarf.Enabled = true;
                btnLote.Enabled = true;
            }
        }
Пример #3
0
        private void FrmModTarifa_Load(object sender, EventArgs e)
        {
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.MaximizeBox     = false;
            clsTarifa t = misTarifas.existe(idmod);

            if (t != null)
            {
                tbNombre.Text       = t.Nombre;
                cbAuto.Checked      = t.Tipo[0];
                cbMoto.Checked      = t.Tipo[1];
                cbCamioneta.Checked = t.Tipo[2];
                cbCamion.Checked    = t.Tipo[3];
                nudPrecio.Value     = t.Precio;
                tbDescripcion.Text  = t.Descripcion;
            }

            else
            {
                MessageBox.Show("Se elimino la tarifa mientras se editaba, intente de nuevo", "Error");
                this.Close();
            }
        }