Ejemplo n.º 1
0
        //INSERTAR
        private void InsertaRegistro()
        {
            string Rta = string.Empty;

            try
            {
                Rta = NacfINVp_Inventario.Insertar(
                    this.txtINVid.Text
                    , this.txtINVdescripcion.Text
                    , this.dtINVfechainicio.Text
                    , this.txtINVfechacierre.Text
                    , this.cbActivo.Checked
                    , this.txtINVrespon.Text
                    , this.txtINVperiodo.Text);

                if (Rta.Equals("OK"))
                {
                    this.MensajeOk("Registro Agregado Correctamente");
                }
                else
                {
                    this.MensajeError(Rta);
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
Ejemplo n.º 2
0
 private void CargarCombos()
 {
     this.cboINV.DataSource    = NacfINVp_Inventario.Mostrar(); //INVid
     this.cboINV.ValueMember   = "INVid";
     this.cboINV.DisplayMember = "INVid";
     this.cboINV.SelectedIndex = -1;
 }
Ejemplo n.º 3
0
        private void Prev(String iINVid)
        {
            try
            {
                DataTable dat = NacfINVp_Inventario.Prev(iINVid);

                if (dat.Rows.Count > 0)
                {
                    DataRow row = dat.Rows[0];
                    //guardo datos en variables
                    txtINVid.Text          = Convert.ToString(row["INVid"]);
                    txtINVdescripcion.Text = Convert.ToString(row["INVdetalle"]);
                    dtINVfechainicio.Text  = Convert.ToString(row["INVinicio"]);
                    txtINVfechacierre.Text = Convert.ToString(row["INVcierre"]);
                    cbActivo.Checked       = Convert.ToBoolean(row["INVactivo"]);
                    txtINVrespon.Text      = Convert.ToString(row["INVrespon"]);
                    txtINVperiodo.Text     = Convert.ToString(row["INVperiodo"]);
                }
                else
                {
                    MessageBox.Show("No Existe", "Registro");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
Ejemplo n.º 4
0
 private void Last()
 {
     try
     {
         DataTable dat = NacfINVp_Inventario.Last();
         MostrarDatos(dat);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + ex.StackTrace);
     }
 }
 private void buscarNombre()
 {
     if (this.txtBuscar.Text == "")
     {
         this.mostrar();
     }
     else
     {
         this.dataListado.DataSource = NacfINVp_Inventario.Buscar(this.txtBuscar.Text);
         this.OcultarColumnas();
         lblTotal.Text = "Total de Registros: " + Convert.ToString(dataListado.Rows.Count);
     }
 }
        private void CargarCombos()
        {
            this.cboPERNR.DataSource    = NbdiXPEpExtraccionSAP_Personal.Mostrar(); //BURkS
            this.cboPERNR.ValueMember   = "PERNR";
            this.cboPERNR.DisplayMember = "PERNR";
            this.cboPERNR.SelectedIndex = -1;

            this.cboCSTid.DataSource    = NacfCSTt_Costo.Mostrar(); //BURkS
            this.cboCSTid.ValueMember   = "CSTid";
            this.cboCSTid.DisplayMember = "CSTid";
            this.cboCSTid.SelectedIndex = -1;

            this.cboVNRid.DataSource    = NacfVNRt_VNR.Mostrar(); //BURkS
            this.cboVNRid.ValueMember   = "VNRid";
            this.cboVNRid.DisplayMember = "VNRid";
            this.cboVNRid.SelectedIndex = -1;

            this.cboACTid.DataSource    = NacfACTt_Actividad.Mostrar(); //BURkS
            this.cboACTid.ValueMember   = "ACTid";
            this.cboACTid.DisplayMember = "ACTid";
            this.cboACTid.SelectedIndex = -1;

            this.cboSELid.DataSource    = NacfSELt_SistemaElectrico.Mostrar(); //BURkS
            this.cboSELid.ValueMember   = "SELid";
            this.cboSELid.DisplayMember = "SELid";
            this.cboSELid.SelectedIndex = -1;

            this.cboSETid.DataSource    = NacfUBEt_UbicacionElectrica.Mostrar(); //BURkS
            this.cboSETid.ValueMember   = "UBEset";
            this.cboSETid.DisplayMember = "UBEset";
            this.cboSETid.SelectedIndex = -1;

            this.cboMARid.DataSource    = NacfMARt_Marca.Mostrar(); //BURkS
            this.cboMARid.ValueMember   = "MARid";
            this.cboMARid.DisplayMember = "MARid";
            this.cboMARid.SelectedIndex = -1;

            this.cboUNMid.DataSource    = NacfUNMt_Unimed.Mostrar(); //BURkS
            this.cboUNMid.ValueMember   = "UNMid";
            this.cboUNMid.DisplayMember = "UNMid";
            this.cboUNMid.SelectedIndex = -1;

            this.cboINVid.DataSource    = NacfINVp_Inventario.Mostrar();
            this.cboINVid.ValueMember   = "INVid";
            this.cboINVid.DisplayMember = "INVid";
            this.cboINVid.SelectedIndex = -1;
        }
        //-----------------------------------------------------------------------------------
        // Actualiza Registros
        //-----------------------------------------------------------------------------------
        private void ActualizaRegistro()
        {
            string Rta = string.Empty;

            try
            {
                Rta = NacfINVp_Inventario.Editar(this.txtINVid.Text, this.txtINVdetalle.Text, this.txtINVinicio.Text, this.txtINVcierre.Text, false, this.txtINVactivo.Text, this.txtINVactivo.Text);
                if (Rta.Equals("OK"))
                {
                    this.MensajeOk("Regsitro Actualizado Correctamente");
                }
                else
                {
                    this.MensajeError("Error al Actualizar Registro ");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
        //-----------------------------------------------------------------------------------
        // Elimina Registros
        //-----------------------------------------------------------------------------------
        private void borrauno()
        {
            string       Rta = string.Empty;
            DialogResult Opcion;

            Opcion = MessageBox.Show("Realmente Desea Eliminar los Registros", "Sistema de escolar", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
            if (Opcion == DialogResult.OK)
            {
                string Codigo;
                Codigo = Convert.ToString(this.dataListado.CurrentRow.Cells[1].Value);
                Rta    = NacfINVp_Inventario.Eliminar(Codigo);

                if (Rta.Equals("OK"))
                {
                    this.MensajeOk("Se Eliminó Correctamente el registro");
                }
                else
                {
                    this.MensajeError("Error al Eliminar el Registro ");
                }
            }
        }
Ejemplo n.º 9
0
        // eliminar registro si no hay registro que coincidan con el filtro
        private void eliminarRegistro()
        {
            string Rta = string.Empty;

            try
            {
                Rta = NacfINVp_Inventario.Eliminar(txtINVid.Text);

                if (Rta.Equals("OK"))
                {
                    this.MensajeOk("Inventario No Generado");
                }
                else
                {
                    this.MensajeError(Rta);
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
        private void borramuchos()
        {
            try
            {
                DialogResult Opcion;
                Opcion = MessageBox.Show("Realmente Desea Eliminar los Registros", "Sistema de escolar", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);

                if (Opcion == DialogResult.OK)
                {
                    string Codigo;
                    string Rta = string.Empty;

                    foreach (DataGridViewRow row in dataListado.Rows)
                    {
                        if (Convert.ToBoolean(row.Cells[0].Value))
                        {
                            Codigo = Convert.ToString(row.Cells[1].Value);
                            Rta    = NacfINVp_Inventario.Eliminar(Codigo);

                            if (Rta.Equals("OK"))
                            {
                                this.MensajeOk("Se Eliminó Correctamente el registro");
                            }
                            else
                            {
                                this.MensajeError("Error al Eliminar el Registro ...");
                            }
                        }
                    }
                    this.mostrar();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
        private void BotonImprimir()
        {
            FrmReportes rptalu = new FrmReportes("Reportes\\Rpt_INVInventario.rdlc", NacfINVp_Inventario.Mostrar(), "ip");

            rptalu.ShowDialog();
        }