Пример #1
0
 private void buscarNombre()
 {
     if (this.txtBuscar.Text == "")
     {
         this.mostrar();
     }
     else
     {
         this.dataListado.DataSource = NacfMVMt_MotivoMovimiento.Buscar(this.txtBuscar.Text);
         this.OcultarColumnas();
         lblTotal.Text = "Total de Registros: " + Convert.ToString(dataListado.Rows.Count);
     }
 }
Пример #2
0
        //-----------------------------------------------------------------------------------
        // Actualiza Registros
        //-----------------------------------------------------------------------------------
        private void ActualizaRegistro()
        {
            string Rta = string.Empty;

            try
            {
                Rta = NacfMVMt_MotivoMovimiento.Editar(this.txtTMVid.Text, this.txtMVMid.Text, this.txtMVMmotivomovimiento.Text, this.txtMVMjustificacion.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);
            }
        }
Пример #3
0
        private void mostrar()
        {
            this.Configura();
            this.Activo = 1;
            this.tomaTab();
            this.Botones(true);
            this.dataListado.DataSource = NacfMVMt_MotivoMovimiento.Mostrar();

            lblTotal.Text = "Total de Registros: " + Convert.ToString(dataListado.Rows.Count);
            if (dataListado.Rows.Count == 0)
            {
                BotonesSinReg(false);
            }
            else
            {
                BotonesSinReg(true);
                this.toolStripAgregar.Enabled = true;
            }
            this.dataListado.Select();
            this.dataListado.Focus();
        }
Пример #4
0
        //-----------------------------------------------------------------------------------
        // 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[2].Value);
                Rta    = NacfMVMt_MotivoMovimiento.Eliminar(Codigo);

                if (Rta.Equals("OK"))
                {
                    this.MensajeOk("Se Eliminó Correctamente el registro");
                }
                else
                {
                    this.MensajeError("Error al Eliminar el Registro ");
                }
            }
        }
Пример #5
0
        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[2].Value);
                            Rta    = NacfMVMt_MotivoMovimiento.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);
            }
        }
Пример #6
0
        private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                foreach (DataGridViewRow row in dataGridView1.Rows)
                {
                    string Rta = string.Empty;
                    Rta = NacfMVMt_MotivoMovimiento.Insertar(Convert.ToString(row.Cells[0].Value), Convert.ToString(row.Cells[1].Value), Convert.ToString(row.Cells[2].Value), Convert.ToString(row.Cells[3].Value));

                    if (Rta.Equals("OK"))
                    {
                    }
                    else
                    {
                        break;
                    }
                }
                MessageBox.Show("Datos agregados");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Пример #7
0
        private void BotonImprimir()
        {
            FrmReportes rptalu = new FrmReportes("Reportes\\Rpt_MVMMotivoMovimiento.rdlc", NacfMVMt_MotivoMovimiento.Mostrar(), "ip");

            rptalu.ShowDialog();

            /*  Form FrmMVMReporteD = new FrmMVMReporteD();
             * FrmMVMReporteD.Show();*/
        }
Пример #8
0
        private void CargarCombos()
        {
            this.cboPERNR1.DataSource    = NbdiXPEpExtraccionSAP_Personal.Mostrar();//
            this.cboPERNR1.ValueMember   = "PERNR";
            this.cboPERNR1.DisplayMember = "PERNR";
            this.cboPERNR1.SelectedIndex = -1;

            this.cboPERNR2.DataSource    = NbdiXPEpExtraccionSAP_Personal.Mostrar();//
            this.cboPERNR2.ValueMember   = "PERNR";
            this.cboPERNR2.DisplayMember = "PERNR";
            this.cboPERNR2.SelectedIndex = -1;

            this.cboPERNR3.DataSource    = NbdiXPEpExtraccionSAP_Personal.Mostrar();//
            this.cboPERNR3.ValueMember   = "PERNR";
            this.cboPERNR3.DisplayMember = "PERNR";
            this.cboPERNR3.SelectedIndex = -1;

            this.cboPERNR4.DataSource    = NbdiXPEpExtraccionSAP_Personal.Mostrar();//
            this.cboPERNR4.ValueMember   = "PERNR";
            this.cboPERNR4.DisplayMember = "PERNR";
            this.cboPERNR4.SelectedIndex = -1;

            this.cboAMB1.DataSource    = NacfAMBt_Ambiente.Mostrar();//
            this.cboAMB1.ValueMember   = "AMBid";
            this.cboAMB1.DisplayMember = "AMBid";
            this.cboAMB1.SelectedIndex = -1;

            this.cboAMB2.DataSource    = NacfAMBt_Ambiente.Mostrar();//
            this.cboAMB2.ValueMember   = "AMBid";
            this.cboAMB2.DisplayMember = "AMBid";
            this.cboAMB2.SelectedIndex = -1;

            this.cboZONA1.DataSource    = NbdiSEGpSegmento.Mostrar();//
            this.cboZONA1.ValueMember   = "id_zona";
            this.cboZONA1.DisplayMember = "id_zona";
            this.cboZONA1.SelectedIndex = -1;

            this.cboZONA2.DataSource    = NbdiSEGpSegmento.Mostrar();//
            this.cboZONA2.ValueMember   = "id_zona";
            this.cboZONA2.DisplayMember = "id_zona";
            this.cboZONA2.SelectedIndex = -1;

            this.cboMVPtipo.DataSource    = NacfTMVt_TipoMovimiento.Mostrar();//
            this.cboMVPtipo.ValueMember   = "TMVid";
            this.cboMVPtipo.DisplayMember = "TMVid";
            this.cboMVPtipo.SelectedIndex = -1;

            this.txtORGcrp.DataSource    = NacfCRPt_Centro_Responsabilidad.Mostrar();
            this.txtORGcrp.ValueMember   = "CRPid_crp";
            this.txtORGcrp.DisplayMember = "CRPid_crp";
            this.txtORGcrp.SelectedIndex = -1;

            this.txtDSTcrp.DataSource    = NacfCRPt_Centro_Responsabilidad.Mostrar();
            this.txtDSTcrp.ValueMember   = "CRPid_crp";
            this.txtDSTcrp.DisplayMember = "CRPid_crp";
            this.txtDSTcrp.SelectedIndex = -1;

            this.txtMVPds_movimiento.DataSource    = NacfMVMt_MotivoMovimiento.Mostrar();
            this.txtMVPds_movimiento.ValueMember   = "MVMid";
            this.txtMVPds_movimiento.DisplayMember = "MVMid";
            this.txtMVPds_movimiento.SelectedIndex = -1;
        }