Exemple #1
0
 private void CargarSeleccion()
 {
     cod_zonas oZona = new cod_zonas();
     ZonaImplement oZonaImplement = new ZonaImplement();
     DataGridViewRow row = this.dgvZona.CurrentRow;
     int id = Convert.ToInt32(row.Cells[0].Value);
     oZona = oZonaImplement.Get(id);
     this.lblCodigo.Text = oZona.id_zona.ToString();
     this.txtNombre.Text = oZona.zona;
     this.chkImprimir.Checked = oZona.imprimir.Value;
     this.txtNombre.Enabled = false;
     Deshabilitar();
 }
 private void CargarZonas()
 {
     ZonaImplement oZonaImplement = new ZonaImplement();
     oZonaImplement.CargarCombo(this.cmbZona, "Seleccione Zona");
 }
Exemple #3
0
 private void CargarZonasFacturacion()
 {
     ZonaImplement oZonaImplement = new ZonaImplement();
     List<cod_zonas> _listZonas = oZonaImplement.GetAll();
     foreach (cod_zonas zona in _listZonas)
     {
         chkListZonaFacturacion.Items.Add(zona.zona);
     }
 }
Exemple #4
0
 private void CargarZonaFacturacion()
 {
     ZonaImplement oZonaImplement = new ZonaImplement();
     oZonaImplement.CargarCombo(this.cmbZona, "Seleccione..");
 }
Exemple #5
0
        private void Guardar()
        {
            ZonaImplement oZonaImplement = new ZonaImplement();
            cod_zonas oZona = new cod_zonas();

            if (this.lblCodigo.Text == "")
            {
                oZona.zona = this.txtNombre.Text;
                oZona.imprimir=this.chkImprimir.Checked;
                oZonaImplement.Save(oZona);
            }
            else
            {

                DataGridViewRow row = this.dgvZona.CurrentRow;
                int id = Convert.ToInt32(row.Cells[0].Value);
                oZona = oZonaImplement.Get(id);
                oZona.zona = this.txtNombre.Text;
                oZona.imprimir = this.chkImprimir.Checked;
                oZonaImplement.Update(oZona);
            }
            Deshabilitar();
            this.txtNombre.Text = "";
            CargarGrid();
        }
Exemple #6
0
 private void CargarGrid()
 {
     ZonaImplement oZonaImplement = new ZonaImplement();
     this.dgvZona.DataSource = oZonaImplement.Buscar("");
     this.dgvZona.Enabled = true;
 }
Exemple #7
0
 private void ModificarZona()
 {
     HabilitarBotones();
     this.txtNombre.Enabled = true;
     this.chkImprimir.Enabled=true;
     cod_zonas oZona = new cod_zonas();
     ZonaImplement oZonaImplement=new ZonaImplement();
     DataGridViewRow row = this.dgvZona.CurrentRow;
     int id = Convert.ToInt32(row.Cells[0].Value);
     oZona = oZonaImplement.Get(id);
     this.lblCodigo.Text = oZona.id_zona.ToString();
     this.txtNombre.Text = oZona.zona;
     this.chkImprimir.Checked = oZona.imprimir.Value;
     this.dgvZona.Enabled = false;
 }