Beispiel #1
0
        private void CargarSolicitudCheckList(string IdTipo_tt)
        {
            try
            {
                SolicitudCheckListBE oEntity = new SolicitudCheckListBE();
                oEntity.USUARIO     = General.General.GetCodigoUsuario;
                oEntity.OPCION      = 1;
                oEntity.IdSolicitud = Codigo;
                oEntity.IdTipo_tt   = IdTipo_tt;

                DataSet ds = new SolicitudCheckListBL().ProcesarSolicitudCheckList(oEntity);

                if (IdTipo_tt.Equals("00321")) // Socio
                {
                    dgvCheckListSocio.DataSource = ds.Tables[0];
                }
                else
                {
                    dgvCheckListPagador.DataSource = ds.Tables[0];
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(cboIdDocumento_tt.SelectedValue.ToString().Trim()))
                {
                    MessageBox.Show("Seleccione el tipo de documento", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }

                if (string.IsNullOrEmpty(txtvDocumento.Text.Trim()))
                {
                    MessageBox.Show("Se seleccionar el documento adjunto", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }

                SolicitudCheckListBE oEntity = new SolicitudCheckListBE();
                oEntity.OPCION         = 2;
                oEntity.USUARIO        = General.General.GetCodigoUsuario;
                oEntity.IdSolicitud    = Codigo;
                oEntity.IdDocumento_tt = cboIdDocumento_tt.SelectedValue.ToString();
                oEntity.IdTipo_tt      = _IdTipo_tt;
                oEntity.vDocumento     = txtvDocumento.Text.Trim();
                new SolicitudCheckListBL().ProcesarSolicitudCheckList(oEntity);
                MessageBox.Show("Se Guardo Correctamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Dispose();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        public DataSet ProcesarSolicitudCheckList(SolicitudCheckListBE BE)
        {
            DataSet dsRet = new DataSet();

            try
            {
                dsRet = SolicitudCheckListDA.ProcesarSolicitudCheckList(BE);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(dsRet);
        }
        public DataSet ProcesarSolicitudCheckList(SolicitudCheckListBE BE)
        {
            DataSet dsResult;

            try
            {
                cmd = db.GetStoredProcCommand("SolicitudCheckList_Mnt");
                cmd.CommandTimeout = 0;
                db.AddInParameter(cmd, "OPCION", DbType.Int32, BE.OPCION);
                db.AddInParameter(cmd, "USUARIO", DbType.String, BE.USUARIO);
                db.AddInParameter(cmd, "IdSolicitud", DbType.String, BE.IdSolicitud);
                db.AddInParameter(cmd, "IdDocumento_tt", DbType.String, BE.IdDocumento_tt);
                db.AddInParameter(cmd, "IdTipo_tt", DbType.String, BE.IdTipo_tt);
                db.AddInParameter(cmd, "vDocumento", DbType.String, BE.vDocumento);
                dsResult = db.ExecuteDataSet(cmd);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(dsResult);
        }
        private void CargaDatos()
        {
            try
            {
                SolicitudCheckListBE oEntity = new SolicitudCheckListBE();
                oEntity.OPCION         = 1;
                oEntity.IdSolicitud    = Codigo;
                oEntity.IdDocumento_tt = _IdDocumento_tt;
                oEntity.IdTipo_tt      = _IdTipo_tt;
                DataSet ds = new DataSet();
                ds = new SolicitudCheckListBL().ProcesarSolicitudCheckList(oEntity);

                if (ds.Tables[0].Rows.Count > 0)
                {
                    cboIdDocumento_tt.SelectedValue = ds.Tables[0].Rows[0]["IdDocumento_tt"].ToString();
                    txtvDocumento.Text = ds.Tables[0].Rows[0]["vDocumento"].ToString();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #6
0
        private void cboIdTipoSolicitud_tt_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                txtiPlazo.Enabled     = true;
                dtVencimiento.Enabled = true;
                if (cboIdTipoSolicitud_tt.SelectedValue.ToString().Equals("00288"))
                {
                    txtiPlazo.Enabled     = false;
                    dtVencimiento.Enabled = false;
                }

                if (!ChkIncluyeLC.Checked)
                {
                    TabControlPagadora.Enabled = false;
                }

                btnAgregarDocumentoSocio.Enabled = true;
                if (cboIdTipoSolicitud_tt.SelectedValue.ToString().Equals("00300")) //00300	Estudio Poderes Pagadora
                {
                    TabControlPagadora.Enabled       = true;
                    btnAgregarDocumentoSocio.Enabled = false;
                }

                if (!string.IsNullOrEmpty(cboIdTipoSolicitud_tt.SelectedValue.ToString()))
                {
                    SolicitudCheckListBE oEntity = new SolicitudCheckListBE();
                    oEntity.OPCION    = 4;
                    oEntity.USUARIO   = General.General.GetCodigoUsuario;
                    oEntity.IdTipo_tt = cboIdTipoSolicitud_tt.SelectedValue.ToString();
                    DataSet ds = new DataSet();
                    ds = new SolicitudCheckListBL().ProcesarSolicitudCheckList(oEntity);

                    //if (ds.Tables.Count > 0)
                    //{
                    dgvCheckListSocio.DataSource = ds.Tables[0];
                    //}

                    string IdTipo_tt = "X";
                    if (ChkIncluyeLC.Checked || cboIdTipoSolicitud_tt.SelectedValue.ToString().Equals("00300")) //Estudio pagadoras
                    {
                        IdTipo_tt = cboIdTipoSolicitud_tt.SelectedValue.ToString();
                    }

                    oEntity           = new SolicitudCheckListBE();
                    oEntity.OPCION    = 5;
                    oEntity.USUARIO   = General.General.GetCodigoUsuario;
                    oEntity.IdTipo_tt = IdTipo_tt;
                    DataSet dsP = new DataSet();
                    dsP = new SolicitudCheckListBL().ProcesarSolicitudCheckList(oEntity);

                    //if (dsP.Tables.Count > 0)
                    //{
                    dgvCheckListPagador.DataSource = dsP.Tables[0];
                    //}
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #7
0
        private void dgvCheckListPagador_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.ColumnIndex < 0)
                {
                    return;
                }
                if (e.RowIndex == -1)
                {
                    return;
                }

                if (dgvCheckListPagador.Columns[e.ColumnIndex].Name.Equals("btnVerDocP") && !string.IsNullOrEmpty(dgvCheckListPagador.CurrentRow.Cells["vDocumentoP"].Value.ToString()))
                {
                    string filepath = ConfigurationManager.AppSettings["RutaImageFisical"].ToString() + "//LegalSistemas//" + txtcRucPagadora.Text.Trim() + "//Adjuntos//" + txtIdSolicitud.Text + "//" + dgvCheckListPagador.CurrentRow.Cells["vDocumentoP"].Value.ToString();
                    Process.Start(filepath);
                }

                if (dgvCheckListPagador.Columns[e.ColumnIndex].Name.Equals("btnEliminarAdjPag"))
                {
                    DialogResult dialogResult = 0;
                    dialogResult = MessageBox.Show("¿Seguro de eliminar el documento seleccionado : " + dgvCheckListPagador.CurrentRow.Cells["IdDocumento_tt_DscP"].Value.ToString() + "?", "Confirme", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    if (dialogResult == DialogResult.Yes)
                    {
                        SolicitudCheckListBE oEntity = new SolicitudCheckListBE();
                        oEntity.USUARIO        = General.General.GetCodigoUsuario;
                        oEntity.OPCION         = 3;
                        oEntity.IdSolicitud    = Codigo;
                        oEntity.IdTipo_tt      = dgvCheckListPagador.CurrentRow.Cells["IdTipo_ttP"].Value.ToString();
                        oEntity.IdDocumento_tt = dgvCheckListPagador.CurrentRow.Cells["vDocumentoP"].Value.ToString();
                        new SolicitudCheckListBL().ProcesarSolicitudCheckList(oEntity);
                        CargarSolicitudCheckList("00322");
                    }
                }

                if (dgvCheckListPagador.Columns[e.ColumnIndex].Name.Equals("btnEditarDocP"))
                {
                    if (string.IsNullOrEmpty(Codigo))
                    {
                        if (!GuardarSolicitud())
                        {
                            return;
                        }
                    }

                    frmMntSolicitudCheckListDato ofrm = new frmMntSolicitudCheckListDato();
                    ofrm.Operacion            = "N";
                    ofrm.Codigo               = txtIdSolicitud.Text;
                    ofrm._IdTipo_tt           = "00322"; //Pagadora
                    ofrm._IdTipoSolicitud_tt  = cboIdTipoSolicitud_tt.SelectedValue.ToString();
                    ofrm._IdDocumento_tt      = dgvCheckListPagador.CurrentRow.Cells["IdDocumento_ttP"].Value.ToString();
                    ofrm._NroIdentidadEntidad = txtcRucSocio.Text.Trim();
                    ofrm.ShowDialog();

                    CargarSolicitudCheckList("00322");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }