Example #1
0
        static clsProcesoNiño transformar(PROCESO newProceso)
        {
            clsProcesoNiño proceso = new clsProcesoNiño();

            proceso.IDProceso1    = newProceso.IDPROCESO;
            proceso.NombreProceso = newProceso.NOMBREPROCESO;
            proceso.Estado        = int.Parse(newProceso.ESTADOPROCESO.ToString());
            return(proceso);
        }
Example #2
0
        //Metodo de eliminacion de procesos
        public bool D_eliminarProceso(PROCESO eliminarProceso)
        {
            try
            {
                using (MERSembrarDataContext db = new MERSembrarDataContext())
                {
                    PROCESO proceso = (from p in db.PROCESO where p.IDPROCESO == eliminarProceso.IDPROCESO select p).First();
                    db.PROCESO.DeleteOnSubmit(proceso);
                    db.SubmitChanges();
                }

                return(true);
            }
            catch
            {
                return(false);
            }
        }
Example #3
0
        //Metodo de edicion de los procesos
        public bool D_editarProceso(PROCESO editarProceso)
        {
            try
            {
                using (MERSembrarDataContext db = new MERSembrarDataContext())
                {
                    PROCESO proceso = db.PROCESO.Single(u => u.IDPROCESO == editarProceso.IDPROCESO);
                    proceso.NOMBREPROCESO = editarProceso.NOMBREPROCESO;
                    proceso.ESTADOPROCESO = editarProceso.ESTADOPROCESO;
                    db.SubmitChanges();
                }

                return(true);
            }
            catch
            {
                return(false);
            }
        }
Example #4
0
        //Metodo de creacion de nuevo proceso
        public bool D_ingresarProceso(clsNProceso nuevoProceso)
        {
            try
            {
                using (MERSembrarDataContext db = new MERSembrarDataContext())
                {
                    PROCESO proceso = new PROCESO();
                    proceso.NOMBREPROCESO = nuevoProceso.NOMBREPROCESO;
                    proceso.ESTADOPROCESO = nuevoProceso.ESTADO;

                    db.PROCESO.InsertOnSubmit(proceso);
                    db.SubmitChanges();
                }

                return(true);
            }
            catch
            {
                return(false);
            }
        }
        private string ObtenerDatos()
        {
            string sResul = "";

            try
            {
                StringBuilder strBuilder = new StringBuilder();
                int           i          = 0;

                strBuilder.Append("<table id='tblDatos' class='texto' style='width: 396px;'>");
                strBuilder.Append("<colgroup><col style='width:396px;' /></colgroup>");
                if (hdnOpcion.Text == "Area")
                {
                    dr = Areas.Listado(int.Parse(Session["IDFICEPI"].ToString()), Session["ADMIN"].ToString());
                }
                else if (hdnOpcion.Text == "Tipo")
                {
                    dr = TIPO.Catalogo(null, short.Parse(hdnIDArea.Text), "", null, 4, 0);
                }
                else if (hdnOpcion.Text == "Entrada")
                {
                    dr = ENTRADA.Catalogo(null, short.Parse(hdnIDArea.Text), "", null, 4, 0);
                }
                else if (hdnOpcion.Text == "Alcance")
                {
                    dr = ALCANCE.Catalogo(null, short.Parse(hdnIDArea.Text), "", null, 4, 0);
                }
                else if (hdnOpcion.Text == "Proceso")
                {
                    dr = PROCESO.Catalogo(null, short.Parse(hdnIDArea.Text), "", null, 4, 0);
                }
                else if (hdnOpcion.Text == "Producto")
                {
                    dr = PRODUCTO.Catalogo(null, short.Parse(hdnIDArea.Text), "", null, 4, 0);
                }
                else if (hdnOpcion.Text == "Requisito")
                {
                    dr = REQUISITO.Catalogo(null, short.Parse(hdnIDArea.Text), "", null, 4, 0);
                }
                else if (hdnOpcion.Text == "CR")
                {
                    dr = CR.Catalogo();
                }
                else if (hdnOpcion.Text == "CR_TEXTO")
                {
                    dr = CR.Catalogo(short.Parse(hdnIDArea.Text));
                }
                else if (hdnOpcion.Text == "Cliente")
                {
                    dr = Cliente.Catalogo(short.Parse(hdnIDArea.Text));
                }
                else if (hdnOpcion.Text == "Proveedor")
                {
                    dr = Proveedor.Catalogo(short.Parse(hdnIDArea.Text));
                }
                else if (hdnOpcion.Text == "Causa")
                {
                    dr = CAUSA.Catalogo(null, short.Parse(hdnIDArea.Text), "", null, 4, 0);
                }
                else if (hdnOpcion.Text == "Origen")
                {
                    dr = ORIGEN.Catalogo(null, short.Parse(hdnIDArea.Text), "", null, 4, 0);
                }
                else if (hdnOpcion.Text == "Coordinadores")
                {
                    dr = Areas.CoordinadoresArea(int.Parse(hdnIDArea.Text));
                }
                else if (hdnOpcion.Text == "Solicitantes")
                {
                    dr = Areas.SolicitantesArea(int.Parse(hdnIDArea.Text));
                }
                else if (hdnOpcion.Text == "Especialistas")
                {
                    dr = Areas.LeerTecnicosArea(int.Parse(hdnIDArea.Text));
                }
                else if (hdnOpcion.Text == "Deficiencias")
                {
                    dr = Areas.DeficienciasArea(int.Parse(hdnIDArea.Text));
                }

                while (dr.Read())
                {
                    //if (i % 2 == 0) strBuilder.Append("<tr class=FA ");
                    //else strBuilder.Append("<tr class=FB ");
                    i++;
                    strBuilder.Append("<tr ");
                    if (hdnOpcion.Text == "Cliente" || hdnOpcion.Text == "Proveedor" || hdnOpcion.Text == "CR_TEXTO")
                    {
                        strBuilder.Append("id='" + i.ToString() + "'");
                    }
                    else
                    {
                        strBuilder.Append("id='" + dr["ID"].ToString() + "'");
                    }
                    strBuilder.Append(" onclick='ms(this)' ondblclick='aceptarClick(this);' onmousemove='TTip(event);' style='cursor:pointer;height:16px'>");
                    //strBuilder.Append("<td width='15%'>" + (int.Parse(dr["ID"].ToString())).ToString("#,###,##0") + "</td>");

                    if (hdnOpcion.Text == "Cliente" || hdnOpcion.Text == "Proveedor" || hdnOpcion.Text == "CR_TEXTO")
                    {
                        strBuilder.Append("<td style='padding-left:5px'><label class=texto id='lbl" + i.ToString() + "' style='width:315px;text-overflow:ellipsis;overflow:hidden'");
                    }
                    else
                    {
                        strBuilder.Append("<td style='padding-left:5px'><label class=texto id='lbl" + dr["ID"].ToString() + "' style='width:315px;text-overflow:ellipsis;overflow:hidden'");
                    }
                    if (dr["DESCRIPCION"].ToString().Length > 80)
                    {
                        strBuilder.Append(" title='" + dr["DESCRIPCION"].ToString() + "'");
                    }
                    strBuilder.Append("><nobr class='NBR W395'>" + dr["DESCRIPCION"] + "</nobr></label></td></tr>");
                }

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

                strBuilder.Append("</table>");

                sResul = "OK@@" + strBuilder.ToString();
            }
            catch (Exception ex)
            {
                sResul = "Error@@" + Errores.mostrarError("Error al obtener los datos", ex);
            }
            return(sResul);
        }