Exemplo n.º 1
0
    //public string obtenerPlantillas(int iNodo, string sOrigen, bool bRecarga)
    //{
    //    StringBuilder sb = new StringBuilder();
    //    string sResul = "OK";
    //    try
    //    {//
    //        SqlDataReader dr;
    //        if (iNodo == -1)//Saca todas las plantillas de los nodos administrables
    //            dr = PlantProy.Catalogo(1, 0, gsTipo, -1, int.Parse(Session["IDFICEPI_PC_ACTUAL"].ToString()), sOrigen);
    //        else//Saca todas las plantillas del nodo seleccionado
    //            dr = PlantProy.Catalogo(1, 0, gsTipo, iNodo, int.Parse(Session["IDFICEPI_PC_ACTUAL"].ToString()), sOrigen);
    //        int i = 0;
    //        sb.Append("<table id='tblDatos' class='texto MA' style='WIDTH: 850px; BORDER-COLLAPSE: collapse; ' cellSpacing='0' border='0'>");
    //        sb.Append("<colgroup><col style='width:27px;padding-left:3px' /><col width='443px' /><col width='330px' /><col align=center width='50px' /></colgroup>");
    //        sb.Append("<tbody>");
    //        while (dr.Read())
    //        {
    //            sb.Append("<tr id='" + dr["t338_idplantilla"].ToString() + "' onclick='mmse(this)' ondblclick='mostrarMaestro(this)'");
    //            sb.Append(" nCR='" + dr["cod_une"].ToString() + "' amb='" + dr["t338_ambito"].ToString() + "' style='height:20px;'>");
    //            //sb.Append("<td>" + dr["des_ambito"].ToString() + "</td>");
    //            sb.Append("<td>");
    //            switch (dr["t338_ambito"].ToString())
    //            {
    //                case "D": sb.Append("<img src='../../../../images/imgIconoDepartamental.gif' style='width:16px;height:16px;border:0px' />"); break;
    //                case "P": sb.Append("<img src='../../../../images/imgIconoPersonal.gif' style='width:16px;height:16px;border:0px' />"); break;
    //                case "E": sb.Append("<img src='../../../../images/imgIconoEmpresarial.gif' style='width:16px;height:16px;border:0px' />"); break;
    //            }
    //            sb.Append("</td>");
    //            sb.Append("<td>" + HttpUtility.HtmlEncode(dr["t338_denominacion"].ToString()) + "</td>"); //Para mostrar caracteres como < y > que haya en el nombre.
    //            sb.Append("<td>" + dr["nom_une"].ToString() + "</td><td>");
    //            if ((int)dr["t338_estado"] == 1) sb.Append("<img src='../../../../Images/imgOk.gif'>");
    //            else sb.Append("<img src='../../../../Images/imgSeparador.gif'>");
    //            sb.Append("</td></tr>");
    //            i++;
    //        }
    //        dr.Close();
    //        dr.Dispose();
    //        sb.Append("</tbody>");
    //        sb.Append("</table>");
    //        if (bRecarga)
    //            sResul = sb.ToString();
    //        else
    //            div1.InnerHtml = sb.ToString();
    //    }
    //    catch (Exception ex)
    //    {
    //        Master.sErrores = Errores.mostrarError("Error al obtener el catálogo", ex);
    //    }
    //    return sResul;
    //}
    private string EliminarPlantilla(string slIDPlant)
    {
        string sResul = "", sIDPlant;

        try
        {
            //PlantProy objPlant = new PlantProy(int.Parse(sIDPlant));
            //objPlant.Eliminar();
            string[] lstPlant = Regex.Split(slIDPlant, "##");
            for (int i = 0; i < lstPlant.Length; i++)
            {
                sIDPlant = lstPlant[i].ToString();
                if (sIDPlant != "")
                {
                    PlantProy.Eliminar(int.Parse(sIDPlant));
                }
            }
            sResul = "OK";
        }
        catch (Exception ex)
        {
            Master.sErrores = Errores.mostrarError("Error al eliminar la plantilla", ex);
        }

        return(sResul);
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsCallback)
        {
            if (Session["IDRED"] == null)
            {
                try
                {
                    Response.Redirect("~/SesionCaducadaModal.aspx", true);
                }
                catch (System.Threading.ThreadAbortException) { return; }
            }

            sErrores     = "";
            strTablaAECR = "";
            strArrayVAE  = "";

            nIdTarea = int.Parse(Request.QueryString["nIdTarea"].ToString());

            try
            {
                ObtenerDatosTarea();
            }
            catch (Exception ex)
            {
                sErrores += Errores.mostrarError("Error al obtener los datos del elemento", ex);
            }

            try
            {
                if (gsTipoPlant != "E")
                {//No puede haber atributos estadisticos para plantillas empresariales
                    PlantProy oPlant = PlantProy.Select(int.Parse(this.hdnIdPlant.Text));
                    ObtenerAtributosEstadisticosCR(oPlant.codune.ToString());
                    ObtenerAtributosEstadisticosTarea();
                    ObtenerValoresAtributosEstadisticosCR(oPlant.codune.ToString());
                }
            }
            catch (Exception ex)
            {
                sErrores += Errores.mostrarError("Error al obtener datos complementarios", ex);
            }

            this.hdnAcceso.Text = Request.QueryString["Permiso"].ToString();
            if (this.hdnAcceso.Text == "R")
            {
                ModoLectura.Poner(this.Controls);
            }
            //1º Se indican (por este orden) la función a la que se va a devolver el resultado
            //   y la función que va a acceder al servidor
            string cbRespuesta = Page.ClientScript.GetCallbackEventReference(this, "arg", "RespuestaCallBack", "context", false);
            string cbLlamada   = "function RealizarCallBack(arg, context)" + "{" + cbRespuesta + ";" + "}";

            //2º Se "registra" la función que va a acceder al servidor.
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "RealizarCallBack", cbLlamada, true);
        }
    }
    //protected void Regresar()
    //{
    //    Response.Redirect(HistorialNavegacion.Leer(), true);
    //}
    private string Grabar(string sIdPlant, string sDesPlant, string sCodUne, string sEstado, string sAmbito, string sTipo, string sObs)
    {
        string sResul = "";
        int    iPlant, iPromotor = int.Parse(Session["IDFICEPI_PC_ACTUAL"].ToString());
        //bool bInsertarPT;
        SqlConnection  oConn = null;
        SqlTransaction tr    = null;

        try
        {
            if (sCodUne == "")
            {
                sCodUne = "-1";
            }
            if (sIdPlant != "0")
            {
                PlantProy.Modificar(int.Parse(sIdPlant), sAmbito, Utilidades.unescape(sDesPlant), int.Parse(sEstado), iPromotor, int.Parse(sCodUne), Utilidades.unescape(sObs));
                sResul = "OK@#@" + sIdPlant;
            }
            else
            {
                //if (sAmbito=="T") bInsertarPT = true;
                //else bInsertarPT = false;
                try
                {
                    oConn = Conexion.Abrir();
                    tr    = Conexion.AbrirTransaccion(oConn);
                }
                catch (Exception ex)
                {
                    sResul = "Error@#@" + Errores.mostrarError("Error al abrir la conexión", ex);
                    return(sResul);
                }

                iPlant = PlantProy.Insertar(tr, sTipo, Utilidades.unescape(sDesPlant), int.Parse(sEstado), sAmbito, iPromotor, int.Parse(sCodUne), Utilidades.unescape(sObs));

                Conexion.CommitTransaccion(tr);

                this.hdnIDPlantilla.Text = iPlant.ToString();
                Session["IDPlant"]       = iPlant.ToString();
                sResul = "OK@#@" + iPlant.ToString();
            }
        }
        catch (Exception ex)
        {
            //TextBox hdnErrores = (TextBox)Master.FindControl("hdnErrores");
            //hdnErrores.Text = Errores.mostrarError("Error al grabar el detalle del calendario", ex);
            Conexion.CerrarTransaccion(tr);
            sResul = "Error@#@" + Errores.mostrarError("Error al grabar el maestro de la plantilla", ex);
        }
        finally
        {
            Conexion.Cerrar(oConn);
        }
        return(sResul);
    }
    private void getPlantillasPE(string sTipo, string sDesglose, string sAmbito)
    {
        StringBuilder sb = new StringBuilder();
        int           idNodo = -1, idUser = -1;

        if (sAmbito != "E")
        {
            if (Request.QueryString["idNodo"] != null)
            {
                idNodo = int.Parse(Request.QueryString["idNodo"].ToString());
            }
            idUser = int.Parse(Session["IDFICEPI_PC_ACTUAL"].ToString());
        }
        //SqlDataReader dr = PlantProy.CatalogoPlantillasPE(int.Parse(Request.QueryString["idNodo"].ToString()),
        //                                                  (int)Session["UsuarioActual"], sTipo);
        SqlDataReader dr = PlantProy.CatalogoPlantillasPE(idNodo, idUser, sTipo);

        sb.Append("<table id='tblDatos' class='texto MA' style='width:420px'>");
        sb.Append("<colgroup><col style='width:30px;' /><col style='width:390px;' /></colgroup>");
        sb.Append("</tbody>");
        while (dr.Read())
        {
            sb.Append("<tr id='" + dr["t338_idplantilla"].ToString() + "' style='height:20px;'");
            if (sDesglose == "T")
            {
                sb.Append(" ondblclick='cargarPlantilla();' ");
            }
            else
            {
                sb.Append(" ondblclick='aceptarClick(this.rowIndex);' ");
            }
            sb.Append(" onclick='ms(this);mostrarPlantilla(this.id);'>");
            sb.Append("<td style='padding-left:3px'>");
            switch (dr["t338_ambito"].ToString())
            {
            case "D": sb.Append("<img src='../../../images/imgIconoDepartamental.gif' style='width:16px;height:16px;border:0px' />"); break;

            case "P": sb.Append("<img src='../../../images/imgIconoPersonal.gif' style='width:16px;height:16px;border:0px' />"); break;

            case "E": sb.Append("<img src='../../../images/imgIconoEmpresarial.gif' style='width:16px;height:16px;border:0px' />"); break;
            }
            sb.Append("</td><td>" + dr["t338_denominacion"].ToString() + "</td></tr>");
        }
        dr.Close();
        dr.Dispose();
        sb.Append("</tbody>");
        sb.Append("</table>");

        this.strTablaHTMLPlantilla = sb.ToString();
    }
Exemplo n.º 5
0
    private string GrabarComo(string sDesPlant, string sAmbito, string sIdPlantOrigen, string sOrigen, string sTipo, string sNodo,
                              string sEmp, string sDep, string sPer)
    {
        string         sResul = "";
        int            iPromotor = int.Parse(Session["IDFICEPI_PC_ACTUAL"].ToString()), idPlantOrigen, idPlantDestino;
        SqlConnection  oConn = null;
        SqlTransaction tr    = null;

        try
        {
            //Cargo los datos de la plantilla actual
            idPlantOrigen = int.Parse(sIdPlantOrigen);
            PlantProy miPlant = new PlantProy();
            miPlant.Obtener(idPlantOrigen);
            //Abro transaccion serializable
            oConn = Conexion.Abrir();
            tr    = Conexion.AbrirTransaccionSerializable(oConn);

            if (sAmbito == "")
            {
                sAmbito = miPlant.ambito;
            }
            if (sAmbito != "D")
            {
                miPlant.codune = -1;
            }
            idPlantDestino = PlantProy.Insertar(tr, miPlant.tipo, Utilidades.unescape(sDesPlant), 1, sAmbito, iPromotor, miPlant.codune, miPlant.obs);

            ITEMSPLANTILLA.Duplicar(tr, idPlantOrigen, idPlantDestino);

            Conexion.CommitTransaccion(tr);
            //Recargo el desglose
            //sResul = "OK@#@" + obtenerPlantillas(inodo, sorigen, true);
            sResul = Buscar("1", "0", sTipo, sOrigen, sNodo, sEmp, sDep, sPer, true);
        }
        catch (Exception ex)
        {
            Conexion.CerrarTransaccion(tr);
            sResul = "Error@#@" + Errores.mostrarError("Error al grabar el desglose de la plantilla", ex);
        }
        finally
        {
            Conexion.Cerrar(oConn);
        }
        return(sResul);
    }
Exemplo n.º 6
0
    private string Buscar(string sOrden, string sAscDesc, string sTipo, string sOrigen, string sNodo,
                          string sEmp, string sDep, string sPer, bool bRecarga)
    {
        string sResul = "";
        bool   bEmp = false, bDep = false, bPer = false;
        int    iPromotor = int.Parse(Session["IDFICEPI_PC_ACTUAL"].ToString());

        if (sNodo == "")
        {
            sNodo = "-1";
        }
        int           iCR = int.Parse(sNodo);
        StringBuilder sb  = new StringBuilder();

        try
        {
            if (sEmp == "1")
            {
                bEmp = true;
            }
            if (sDep == "1")
            {
                bDep = true;
            }
            if (sPer == "1")
            {
                bPer = true;
            }
            SqlDataReader dr = PlantProy.Catalogo(int.Parse(sOrden), int.Parse(sAscDesc), sTipo, iCR, iPromotor, sOrigen, bEmp, bDep, bPer);
            sb.Append("<table id='tblDatos' class='texto MA' style='WIDTH: 854px;'>");
            sb.Append("<colgroup><col style='width:27px;' /><col style='width:443px' /><col style='width:330px' /><col style='width:54px' /></colgroup>");
            sb.Append("<tbody>");
            while (dr.Read())
            {
                sb.Append("<tr id='" + dr["t338_idplantilla"].ToString() + "' onclick='mm(event)' ondblclick='mostrarMaestro(this)'");
                sb.Append(" nCR='" + dr["cod_une"].ToString() + "' amb='" + dr["t338_ambito"].ToString() + "' style='height:20px;'>");
                sb.Append("<td style='padding-left:3px'>");
                switch (dr["t338_ambito"].ToString())
                {
                case "D": sb.Append("<img src='../../../../images/imgIconoDepartamental.gif' style='width:16px;height:16px;border:0px' />"); break;

                case "P": sb.Append("<img src='../../../../images/imgIconoPersonal.gif' style='width:16px;height:16px;border:0px' />"); break;

                case "E": sb.Append("<img src='../../../../images/imgIconoEmpresarial.gif' style='width:16px;height:16px;border:0px' />"); break;
                }
                sb.Append("</td>");
                sb.Append("<td>" + HttpUtility.HtmlEncode(dr["t338_denominacion"].ToString()) + "</td>"); //Para mostrar caracteres como < y > que haya en el nombre.
                sb.Append("<td>" + dr["nom_une"].ToString() + "</td><td>");
                if (int.Parse(dr["t338_estado"].ToString()) == 1)                                         //Solo mostramos las plantillas en estado activo
                {
                    sb.Append("<img src='../../../../Images/imgOk.gif' border='0' style='margin-left:20px;'>");
                }
                sb.Append("</td></tr>");
            }
            dr.Close();
            dr.Dispose();
            sb.Append("</tbody>");
            sb.Append("</table>");

            if (bRecarga)
            {
                sResul = "OK@#@" + sb.ToString();
            }
            else
            {
                div1.InnerHtml = sb.ToString();
            }
        }
        catch (Exception ex)
        {
            sResul = "Error@#@" + Errores.mostrarError("Error al ordenar el catálogo", ex);
        }
        return(sResul);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsCallback)
        {
            //Para que se muestre la botonera, únicamente hay que indicar el número de botonera
            //y crear el manejador de eventos para la misma.
            Master.nBotonera           = 7;
            Master.Botonera.ItemClick += new ToolBarEventHandler(this.Botonera_Click);
            Master.bFuncionesLocales   = true;
            Master.TituloPagina        = "Maestro de plantillas";
            if (!Page.IsPostBack)
            {
                try
                {
                    this.lblNodo.InnerText = Estructura.getDefCorta(Estructura.sTipoElem.NODO);
                    this.lblNodo.Attributes.Add("title", Estructura.getDefLarga(Estructura.sTipoElem.NODO));

                    this.txtOrigen.Text = Request.QueryString["sOr"];
                    string sPlantAux = Request.QueryString["nIDPlant"];
                    if (sPlantAux != null)
                    {
                        this.hdnIDPlantilla.Text         = sPlantAux;
                        this.hdnIDPlantillaOriginal.Text = sPlantAux;
                        Session["IDPlant"] = sPlantAux;
                    }
                    else if (Session["IDPlant"] != null)
                    {
                        sPlantAux = Session["IDPlant"].ToString();
                        this.hdnIDPlantilla.Text         = sPlantAux;
                        this.hdnIDPlantillaOriginal.Text = sPlantAux;
                    }

                    string sTipo = Request.QueryString["sTipo"];
                    if (sTipo != null)
                    {
                        this.txtTipo.Text = sTipo;
                    }
                    else
                    {
                        this.txtTipo.Text = "E";
                    }

                    PlantProy objPlant = new PlantProy();
                    objPlant.Obtener(int.Parse(this.hdnIDPlantilla.Text));

                    this.hndCRActual.Text = Request.QueryString["nCR"];
                    CR objCR = new CR();
                    //int iNumEmpleado = int.Parse(HttpContext.Current.Session["IDFICEPI_PC_ACTUAL"].ToString());
                    int iNumEmpleado = int.Parse(HttpContext.Current.Session["UsuarioActual"].ToString());
                    this.cboCR.DataSource     = objCR.ObtenerCatalogoPlant(iNumEmpleado);
                    this.cboCR.DataTextField  = "sDesCR";
                    this.cboCR.DataValueField = "nIdCR";
                    this.cboCR.DataBind();

                    ListItem Elemento = new ListItem("", "-1");
                    this.cboCR.Items.Insert(0, Elemento);

                    this.txtDesPlantilla.Text = objPlant.descripcion;
                    if (objPlant.activo)
                    {
                        this.chkActivo.Checked = true;
                    }
                    else
                    {
                        this.chkActivo.Checked = false;
                    }
                    this.cboCR.SelectedValue = objPlant.codune.ToString();

                    this.cboAmbito.SelectedValue = objPlant.ambito;

                    this.txtObs.Text = objPlant.obs;
                    //Establezco los posibles valores del combo de ámbito
                    plEstablecerAmbitos();
                    //Establezco la modificabilidad de la plantilla
                    this.txtModificable.Text = flPlantillaModificable(objPlant.ambito);
                    if (this.txtModificable.Text == "T")
                    {
                        if (objPlant.ambito != "D")
                        {
                            cboCR.Enabled = false;
                        }
                        else
                        {
                            cboCR.Enabled = true;
                        }
                        this.txtDesPlantilla.Focus();
                    }
                }
                catch (Exception ex)
                {
                    Master.sErrores = Errores.mostrarError("Error al cargar la plantilla", ex);
                }
            }

            //1º Se indican (por este orden) la función a la que se va a devolver el resultado
            //   y la función que va a acceder al servidor
            string cbRespuesta = Page.ClientScript.GetCallbackEventReference(this, "arg", "RespuestaCallBack", "context", false);
            string cbLlamada   = "function RealizarCallBack(arg, context)" + "{" + cbRespuesta + ";" + "}";

            //2º Se "registra" la función que va a acceder al servidor.
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "RealizarCallBack", cbLlamada, true);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsCallback)
        {
            //Para que se muestre la botonera, únicamente hay que indicar el número de botonera
            //y crear el manejador de eventos para la misma.
            //Master.nBotonera = 8;
            Master.nBotonera           = 23;
            Master.Botonera.ItemClick += new ToolBarEventHandler(this.Botonera_Click);
            Master.bFuncionesLocales   = true;
            Master.TituloPagina        = "Desglose de plantilla";
            if (!(bool)Session["PLANT1024"])
            {
                Master.nResolucion = 1280;
            }
            if (!Page.IsPostBack)
            {
                try
                {
                    int    iPlant    = 0;
                    string sPlantAux = Request.QueryString["nIDPlant"];
                    if (sPlantAux != null)
                    {
                        Session["IDPlant"] = sPlantAux;
                    }
                    else if (Session["IDPlant"] != null)
                    {
                        sPlantAux = Session["IDPlant"].ToString();
                    }
                    string sTipo = Request.QueryString["sTipo"];

                    if (sTipo != null)
                    {
                        Session["TIPO_PLANT"] = sTipo;
                    }
                    else
                    {
                        if (Session["TIPO_PLANT"] != null)
                        {
                            sTipo = Session["TIPO_PLANT"].ToString();
                        }
                        else
                        {
                            Session["TIPO_PLANT"] = sTipo;
                        }
                    }
                    if (sTipo == "E")
                    {
                        this.lblTipo.Text = "Proyecto económico";
                    }
                    else
                    {
                        this.lblTipo.Text = "Proyecto técnico";
                    }

                    if (sPlantAux != null)
                    {
                        iPlant = int.Parse(sPlantAux);
                        this.hdnIDPlantilla.Text = sPlantAux;
                    }
                    sPlantAux = Request.QueryString["sDesPlant"];
                    if (sPlantAux != null)
                    {
                        this.txtDesPlantilla.Text = sPlantAux;
                    }

                    //Establezco la modificabilidad de la plantilla
                    PlantProy objPlant = new PlantProy();
                    objPlant.Obtener(int.Parse(this.hdnIDPlantilla.Text));
                    this.txtModificable.Text = flPlantillaModificable(objPlant.ambito);
                    switch (objPlant.ambito)
                    {
                    case "E":
                        this.txtAmbito.Text = "EMPRESARIAL";
                        break;

                    case "D":
                        this.txtAmbito.Text = "DEPARTAMENTAL";
                        break;

                    case "P":
                        this.txtAmbito.Text = "PERSONAL";
                        break;

                    default:
                        this.txtAmbito.Text = "DESCONOCIDO";
                        break;
                    }

                    ObtenerTareas(iPlant, sTipo);
                    ObtenerHitos(iPlant);
                    //Establezco el perfil del empleado para poder controlar desde el lado cliente el ambito que se usará al GrabarComo
                    string sPerfil = "T";
                    if (User.IsInRole("A"))
                    {
                        sPerfil = "A";
                    }
                    else
                    {
                        if (User.IsInRole("RSN") || User.IsInRole("DSN") || User.IsInRole("ISN") || User.IsInRole("RN") ||
                            User.IsInRole("DN") || User.IsInRole("CN") || User.IsInRole("IN") || User.IsInRole("OT"))
                        {
                            sPerfil = "D";
                        }
                    }
                    this.txtPerfil.Text = sPerfil;
                }
                catch (Exception ex)
                {
                    Master.sErrores = Errores.mostrarError("Error al obtener el catálogo de tareas", ex);
                }
            }

            //1º Se indican (por este orden) la función a la que se va a devolver el resultado
            //   y la función que va a acceder al servidor
            string cbRespuesta = Page.ClientScript.GetCallbackEventReference(this, "arg", "RespuestaCallBack", "context", false);
            string cbLlamada   = "function RealizarCallBack(arg, context)" + "{" + cbRespuesta + ";" + "}";

            //2º Se "registra" la función que va a acceder al servidor.
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "RealizarCallBack", cbLlamada, true);
        }
    }
Exemplo n.º 9
0
    private void CargarDatosItem(int idNat)
    {
        NATURALEZA oNat = NATURALEZA.Select(tr, idNat);

        txtDenominacion.Text = oNat.t323_denominacion;
        hdnIDSN1.Text        = oNat.t323_idnaturaleza.ToString();

        if ((bool)oNat.t323_regfes)
        {
            chkRegFes.Checked = true;
        }
        else
        {
            chkRegFes.Checked = false;
        }

        if ((bool)oNat.t323_regjornocompleta)
        {
            chkRegJor.Checked = true;
        }
        else
        {
            chkRegJor.Checked = false;
        }

        if ((bool)oNat.t323_coste)
        {
            chkCoste.Checked = true;
        }
        else
        {
            chkCoste.Checked = false;
        }

        if ((bool)oNat.t323_estado)
        {
            chkActivo.Checked = true;
        }
        else
        {
            chkActivo.Checked = false;
        }

        if ((bool)oNat.t323_pasaaSAP)
        {
            chkPasaSAP.Checked = true;
        }
        else
        {
            chkPasaSAP.Checked = false;
        }

        txtOrden.Text       = oNat.t323_orden.ToString();
        txtMesVig.Text      = oNat.t323_mesesvigenciaPIG.ToString();
        hdnIDPlantilla.Text = oNat.t338_idplantilla.ToString();
        int idPlant;

        if (oNat.t338_idplantilla != null)
        {
            idPlant = (int)oNat.t338_idplantilla;
            PlantProy oPlant = PlantProy.Select(idPlant);
            txtDesPlantilla.Text = oPlant.descripcion;
        }
    }