Exemple #1
0
        private void dgvFormatoLegal_CurrentCellDirtyStateChanged(object sender, EventArgs e)
        {
            try
            {
                // Referenciamos el control DataGridViewCheckBoxCell actual
                DataGridViewCheckBoxCell cb = new DataGridViewCheckBoxCell();
                if (cb != null)
                {
                    //Confirmammos los cambios efectuados en la celda actual
                    dgvFormatoLegal.CommitEdit(DataGridViewDataErrorContexts.Commit);
                    Boolean bChk = Convert.ToBoolean(dgvFormatoLegal.CurrentRow.Cells["ChkSel"].Value.ToString());

                    TipoSolicitudFormatoBE oEntity = new TipoSolicitudFormatoBE()
                    {
                        OPCION               = 2,
                        USUARIO              = General.General.GetCodigoUsuario,
                        IdTipoSolicitud_tt   = dgvFormatoLegal.CurrentRow.Cells["IdTipoSolicitud_tt"].Value.ToString(),
                        IdFormatoDocLegal_tt = dgvFormatoLegal.CurrentRow.Cells["IdFormatoDocLegal_tt"].Value.ToString(),
                        Status               = bChk ? "A": "*"
                    };
                    new TipoSolicitudFormatoBL().ProcesarTipoSolicitudFormato(oEntity);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #2
0
        public DataSet ProcesarTipoSolicitudFormato(TipoSolicitudFormatoBE BE)
        {
            DataSet dsRet = new DataSet();

            try
            {
                dsRet = oEntityDA.ProcesarTipoSolicitudFormato(BE);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(dsRet);
        }
Exemple #3
0
        public DataSet ProcesarTipoSolicitudFormato(TipoSolicitudFormatoBE BE)
        {
            DataSet dsResult;

            try
            {
                cmd = db.GetStoredProcCommand("TipoSolicitudFormato_Mnt");
                cmd.CommandTimeout = 0;
                db.AddInParameter(cmd, "OPCION", DbType.Int32, BE.OPCION);
                db.AddInParameter(cmd, "USUARIO", DbType.String, BE.USUARIO);
                db.AddInParameter(cmd, "IdTipoSolicitud_tt", DbType.String, BE.IdTipoSolicitud_tt);
                db.AddInParameter(cmd, "IdFormatoDocLegal_tt", DbType.String, BE.IdFormatoDocLegal_tt);
                db.AddInParameter(cmd, "Status", DbType.String, BE.Status);
                dsResult = db.ExecuteDataSet(cmd);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(dsResult);
        }
Exemple #4
0
        private void dgvTipoSolicitud_SelectionChanged(object sender, EventArgs e)
        {
            try
            {
                if (dgvTipoSolicitud.RowCount > 0)
                {
                    TipoSolicitudFormatoBE oEntity = new TipoSolicitudFormatoBE()
                    {
                        OPCION             = 1,
                        USUARIO            = General.General.GetUsuario,
                        IdTipoSolicitud_tt = dgvTipoSolicitud.CurrentRow.Cells["Table_Id"].Value.ToString(),
                    };

                    DataSet ds = new TipoSolicitudFormatoBL().ProcesarTipoSolicitudFormato(oEntity);
                    dgvFormatoLegal.DataSource = ds.Tables[0];
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }