Beispiel #1
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            DataSet   DSDevuelveID = new DataSet();
            DataTable DTDevuelveID = new DataTable();

            WSAdministracion.WSAdministracion WSAdmin = new WSAdministracion.WSAdministracion();
            WSAdmin.Url = mdlGenerales.DireccionWS + "FazServices/WSAdministracion.asmx";
            if (MayorACero(txtMonto.Text.ToString()) == false)
            {
                MessageBoxAdv.Show("El monto de la entrega a rendir debe de ser nùmerico y mayor que 0", "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            string SCorrelativo = lblCorrelativo.Text.ToString();
            string SITem        = lblItem.Text.ToString();
            string SMonto       = txtMonto.Text.ToString();
            string SDetalle     = txtDetalle.Text.ToString();
            string SDocumento   = txtDocumento.Text.ToString();

            DSDevuelveID = WSAdmin.AddIngresoAEntregaARendir(mdlGenerales.Conexion, SCorrelativo, SITem, SMonto, SDetalle,
                                                             SDocumento, dtpFecha.Value.ToString("yyyy/MM/dd"), "0", mdlGenerales.STRUsuario);
            MessageBoxAdv.Show("Ingreso añadido", "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);
            Limpiar();
            CargaGrid(lblCorrelativo.Text.ToString());
            return;
        }
Beispiel #2
0
        private void cmdAddFaltante_Click(object sender, EventArgs e)
        {
            string    LCorrelativo = "";
            string    LMonto       = "";
            string    SCorrelativo = "";
            string    SDetalle     = "";
            string    SDocumento   = "";
            DataSet   DSDevuelveID = new DataSet();
            DataTable DTDevuelveID = new DataTable();

            WSAdministracion.WSAdministracion WSAdmin = new WSAdministracion.WSAdministracion();
            WSAdmin.Url = mdlGenerales.DireccionWS + "FazServices/WSAdministracion.asmx";
            Element el = GGCEntregas.TableControl.Table.CurrentElement;

            if (el != null)
            {
                if (el is GridRecord)
                {
                    DataRowView drv = (el as Record).GetData() as DataRowView;
                    LCorrelativo = drv[0].ToString();
                    LMonto       = drv[12].ToString();
                    SCorrelativo = lblCorrelativo.Text.ToString();
                    SDetalle     = "Descargada de otra entrega a rendir";
                    SDocumento   = LCorrelativo;
                }
            }
            if (LMonto == "")
            {
                MessageBoxAdv.Show("Debe de seleccionar la EAR a descargar", "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            DSDevuelveID = WSAdmin.AddIngresoAEntregaARendir(mdlGenerales.Conexion, SCorrelativo, "0", LMonto, SDetalle,
                                                             SDocumento, dtpFecha.Value.ToString("yyyy/MM/dd"), LCorrelativo, mdlGenerales.STRUsuario);


            DSDevuelveID = WSAdmin.CierraEntregaARendir(mdlGenerales.Conexion, LCorrelativo, "1", "", "0",
                                                        "Se descargo el monto en otra entrega a rendir", lblCorrelativo.Text.ToString(),
                                                        mdlGenerales.STRUsuario);


            MessageBoxAdv.Show("Ingreso añadido", "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);
            Limpiar();
            CargaGrid(lblCorrelativo.Text.ToString());
            return;
        }