コード例 #1
0
        public static TituloIdiomaFic Detalle(int t021_idtituloidioma)
        {
            TituloIdiomaFic o  = new TituloIdiomaFic();
            SqlDataReader   dr = DAL.TituloIdiomaFic.Detalle(t021_idtituloidioma);

            if (dr.Read())
            {
                if (dr["T021_TITULO"] != DBNull.Value)
                {
                    o.T021_TITULO = (string)dr["T021_TITULO"];
                }
                if (dr["T021_FECHA"] != DBNull.Value)
                {
                    o.T021_FECHA = (DateTime)dr["T021_FECHA"];
                }
                if (dr["T021_OBSERVA"] != DBNull.Value)
                {
                    o.T021_OBSERVA = (string)dr["T021_OBSERVA"];
                }
                if (dr["T021_CENTRO"] != DBNull.Value)
                {
                    o.T021_CENTRO = (string)dr["T021_CENTRO"];
                }
                if (dr["T021_NDOC"] != DBNull.Value)
                {
                    o.T021_NDOC = (string)dr["T021_NDOC"];
                }
                if (dr["T021_MOTIVORT"] != DBNull.Value)
                {
                    o.T835_MOTIVORT = (string)dr["T021_MOTIVORT"].ToString();
                }
                if (dr["T020_DESCRIPCION"] != DBNull.Value)
                {
                    o.T020_DESCRIPCION = (string)dr["T020_DESCRIPCION"];
                }
                if (dr["t839_idestado"] != DBNull.Value)
                {
                    o.t839_idestado = dr["t839_idestado"].ToString().ToCharArray()[0];
                }
                //if (dr["T021_DOC"] != DBNull.Value)
                //    o.T021_DOC = (byte[])dr["T021_DOC"];
                if (dr["t2_iddocumento"] != DBNull.Value)
                {
                    o.t2_iddocumento = (long)dr["t2_iddocumento"];
                }
            }
            else
            {
                throw (new NullReferenceException("No se ha obtenido ningun dato de Idioma"));
            }

            dr.Close();
            dr.Dispose();

            return(o);
        }
コード例 #2
0
        public static TituloIdiomaFic SelectDoc(SqlTransaction tr, int t021_idtituloidioma)
        {
            TituloIdiomaFic o  = new TituloIdiomaFic();
            SqlDataReader   dr = DAL.TituloIdiomaFic.Detalle(t021_idtituloidioma);

            if (dr.Read())
            {
                if (dr["T021_NDOC"] != DBNull.Value)
                {
                    o.T021_NDOC = (string)dr["T021_NDOC"];
                }
                //if (dr["T021_DOC"] != DBNull.Value)
                //    o.T021_DOC = (byte[])dr["T021_DOC"];
                if (dr["t2_iddocumento"] != DBNull.Value)
                {
                    o.t2_iddocumento = (long)dr["t2_iddocumento"];
                }
            }
            dr.Close();
            dr.Dispose();

            return(o);
        }
コード例 #3
0
    private string getDocumento(string sUsuTicks)
    {
        string sRes = "";

        try
        {
            if (Utilidades.isNumeric(sUsuTicks))
            {
                SUPER.BLL.TituloIdiomaFic oTit = SUPER.BLL.TituloIdiomaFic.SelectDoc(null, int.Parse(sUsuTicks));
                sRes = oTit.T021_NDOC + "@#@S@#@" + oTit.t2_iddocumento.ToString();
            }
            else
            {
                SUPER.BLL.DocuAux oDoc = SUPER.BLL.DocuAux.GetDocumento(null, sUsuTicks);
                sRes = oDoc.t686_nombre + "@#@N@#@" + sUsuTicks;
            }

            return(sRes);
        }
        catch (Exception ex)
        {
            return("Error@#@" + Errores.mostrarError("Error al obtener documento del título del idioma", ex));
        }
    }