コード例 #1
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();
        }
コード例 #2
0
        private void CargarGrid()
        {
            ZonaImplement oZonaImplement = new ZonaImplement();

            this.dgvZona.DataSource = oZonaImplement.Buscar("");
            this.dgvZona.Enabled    = true;
        }
コード例 #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);
            }
        }
コード例 #4
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();
        }
コード例 #5
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;
        }
コード例 #6
0
        private void CargarZonas()
        {
            ZonaImplement oZonaImplement = new ZonaImplement();

            oZonaImplement.CargarCombo(this.cmbZona, "Seleccione Zona");
        }