コード例 #1
0
        private void Seleccionar_DISTRIBUCION_DETALLE()
        {
            DB_EXT_Seguimiento rendi = new DB_EXT_Seguimiento();

            GVListRendimiento.DataSource = rendi.DB_Desplegar_SEGUIMIENTOS_PROD(Convert.ToInt32(LblIdInsOrg.Text), "TODOS", "TODOS", "SEG_REND_DETALLE");
            GVListRendimiento.DataBind();
        }
コード例 #2
0
        private void Llenar_GVSEGUIMIENTO()
        {
            DB_EXT_Seguimiento ListSeg = new DB_EXT_Seguimiento();

            GVListCostos.DataSource = ListSeg.DB_Desplegar_SEGUIMIENTOS_PROD(Convert.ToInt32(LblIdInsOrg.Text), LblIdInsProd.Text, "SEMILLA", "SEGUCOSTO");
            GVListCostos.DataBind();
        }
コード例 #3
0
        private void Seleccionar_DISTRIBUCION_DETALLE()
        {
            DB_EXT_Seguimiento disSem = new DB_EXT_Seguimiento();

            GVListaSemilla.DataSource = disSem.DB_Reporte_DISTRIBUCION_DETALLE(Convert.ToInt32(LblIdInsOrg.Text), "SEMILLA", "REPDETALLE");
            GVListaSemilla.DataBind();
        }
コード例 #4
0
        protected void GVListDistQuim_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            DB_EXT_Seguimiento disSem = new DB_EXT_Seguimiento();

            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                LblAux.Text = string.Empty;
                string valor = DataBinder.Eval(e.Row.DataItem, "Id_Productor").ToString();
                LblAux.Text = valor;
                ((DataList)e.Row.FindControl("DTLNumBolet")).DataSource = disSem.DB_Desplegar_SEGUIMIENTOS_PROD(Convert.ToInt32(LblIdInsOrg.Text), LblAux.Text, "AGROQUIMICO", "DETALLEDISTRIB");
                ((DataList)e.Row.FindControl("DTLNumBolet")).DataBind();
                ((DataList)e.Row.FindControl("DTLFechaDistrib")).DataSource = disSem.DB_Desplegar_SEGUIMIENTOS_PROD(Convert.ToInt32(LblIdInsOrg.Text), LblAux.Text, "AGROQUIMICO", "DETALLEDISTRIB");
                ((DataList)e.Row.FindControl("DTLFechaDistrib")).DataBind();
                ((DataList)e.Row.FindControl("DTLProducto")).DataSource = disSem.DB_Desplegar_SEGUIMIENTOS_PROD(Convert.ToInt32(LblIdInsOrg.Text), LblAux.Text, "AGROQUIMICO", "DETALLEDISTRIB");
                ((DataList)e.Row.FindControl("DTLProducto")).DataBind();
                ((DataList)e.Row.FindControl("DTLNomComer")).DataSource = disSem.DB_Desplegar_SEGUIMIENTOS_PROD(Convert.ToInt32(LblIdInsOrg.Text), LblAux.Text, "AGROQUIMICO", "DETALLEDISTRIB");
                ((DataList)e.Row.FindControl("DTLNomComer")).DataBind();
                ((DataList)e.Row.FindControl("DTLFechCaducid")).DataSource = disSem.DB_Desplegar_SEGUIMIENTOS_PROD(Convert.ToInt32(LblIdInsOrg.Text), LblAux.Text, "AGROQUIMICO", "DETALLEDISTRIB");
                ((DataList)e.Row.FindControl("DTLFechCaducid")).DataBind();
                ((DataList)e.Row.FindControl("DTLUnidad")).DataSource = disSem.DB_Desplegar_SEGUIMIENTOS_PROD(Convert.ToInt32(LblIdInsOrg.Text), LblAux.Text, "AGROQUIMICO", "DETALLEDISTRIB");
                ((DataList)e.Row.FindControl("DTLUnidad")).DataBind();
                ((DataList)e.Row.FindControl("DTLCantidad")).DataSource = disSem.DB_Desplegar_SEGUIMIENTOS_PROD(Convert.ToInt32(LblIdInsOrg.Text), LblAux.Text, "AGROQUIMICO", "DETALLEDISTRIB");
                ((DataList)e.Row.FindControl("DTLCantidad")).DataBind();
            }
        }
コード例 #5
0
        private void Seleccionar_DISTRIBUCION_DETALLE()
        {
            DB_EXT_Seguimiento disSem = new DB_EXT_Seguimiento();

            GVListDistQuim.DataSource = disSem.DB_Reporte_DISTRIBUCION_DETALLE(Convert.ToInt32(LblIdInsOrg.Text), "AGROQUIMICO", "REPPROD");
            GVListDistQuim.DataBind();
        }
コード例 #6
0
        protected void Registrar_SEGUIMIENTO()
        {
            DB_AP_Registro_Org aux    = new DB_AP_Registro_Org();
            DB_EXT_Seguimiento insSeg = new DB_EXT_Seguimiento();
            EXT_Seguimiento    seg    = new EXT_Seguimiento();
            EXT_Rendimiento    rd     = new EXT_Rendimiento();

            seg.Id_InscripcionOrg = Convert.ToInt32(LblIdInsOrg.Text);
            seg.Id_Usuario        = LblIdUsuario.Text;
            seg.Id_Productor      = LblIdInsProd.Text;
            seg.Id_Campanhia      = Convert.ToInt32(LblIdCamp.Text);
            seg.Id_Regional       = Convert.ToInt32(LblIdReg.Text);
            seg.Programa          = LblProg.Text;
            seg.Etapa             = "RENDIMIENTO";
            seg.Num_Seg_Cultivo   = 0;
            seg.Estado            = "ENVIADO";
            seg.Fecha_Envio       = DateTime.Now;
            seg.Tipo_Seguimiento  = 0;
            insSeg.DB_Registrar_SEGUIMIENTO(seg);
            rd.Id_Seguimiento   = Convert.ToInt32(aux.DB_MaxId("EXT_SEGUIMIENTO", "Id_Seguimiento"));
            rd.Fecha_Sis        = DateTime.Now;
            rd.Fech_Inspeccion  = Convert.ToDateTime(TxtFechaInspeccion.Text);
            rd.Variedad_Semilla = TxtVariedad.Text;
            insSeg.DB_Registrar_RENDIMIENTO(rd);
            Registrar_RENDIMIENTO_DETALLE(Convert.ToInt32(aux.DB_MaxId("EXT_RENDIMIENTO", "Id_Rendimiento")));
        }
コード例 #7
0
        private void Llenar_GVSEGUIMIENTO()
        {
            DB_EXT_Seguimiento ListSeg = new DB_EXT_Seguimiento();

            GVDistribAgroQuim.DataSource = ListSeg.DB_Desplegar_SEGUIMIENTOS_PROD(Convert.ToInt32(LblIdInsOrg.Text), LblIdInsProd.Text, "AGROQUIMICO", "SEGUIMIENTODISTRIB");
            GVDistribAgroQuim.DataBind();
        }
コード例 #8
0
        protected void Desplegar_SEGUIMIENTO_TECNICOS()
        {
            DB_EXT_Seguimiento segt = new DB_EXT_Seguimiento();

            GVSegTec.DataSource = segt.DB_Desplegar_SEGUIMIENTO_A_TECNICOS(LblIdUsuario.Text, DDLProg.SelectedValue, Convert.ToInt32(DDLCamp.SelectedValue), Convert.ToInt32(DDLRegional.SelectedValue), "SEG_TECNICOS");
            GVSegTec.DataBind();
        }
コード例 #9
0
        protected void Desplegar_SEGUIMIENTO_TECNICOS()
        {
            DB_EXT_Seguimiento segt = new DB_EXT_Seguimiento();

            GVSegTec.DataSource = segt.DB_Desplegar_SEGUIMIENTO_A_TECNICOS(LblIdUsuario.Text, LblPrograma.Text, Convert.ToInt32(LblIdCamp.Text), Convert.ToInt32(LblIdReg.Text), "SEG_TECNICOS");
            GVSegTec.DataBind();
        }
コード例 #10
0
        protected void Registrar_SEGUIMIENTO()
        {
            DB_EXT_DesignacionProd      estadoprod = new DB_EXT_DesignacionProd();
            DB_AP_Registro_Org          aux        = new DB_AP_Registro_Org();
            DB_EXT_Seguimiento          insSeg     = new DB_EXT_Seguimiento();
            EXT_Seguimiento             seg        = new EXT_Seguimiento();
            EXT_SeguimientoDistribucion segDist    = new EXT_SeguimientoDistribucion();

            seg.Id_InscripcionOrg = Convert.ToInt32(LblIdInsOrg.Text);
            seg.Id_Usuario        = LblIdUsuario.Text;
            seg.Id_Productor      = LblIdInsProd.Text;
            seg.Id_Campanhia      = Convert.ToInt32(LblIdCamp.Text);
            seg.Id_Regional       = Convert.ToInt32(LblIdReg.Text);
            seg.Programa          = LblProg.Text;
            seg.Etapa             = LblEtapa.Text;
            seg.Estado            = "ENVIADO";
            seg.Fecha_Envio       = DateTime.Now;
            insSeg.DB_Registrar_SEGUIMIENTO(seg);

            segDist.Id_Seguimiento     = Convert.ToInt32(aux.DB_MaxId("EXT_SEGUIMIENTO", "Id_Seguimiento"));
            segDist.Programa           = LblProg.Text;
            segDist.Nom_Proveedor      = DDLProveedor.SelectedItem.Text;
            segDist.Lugar_Distribucion = TxtLugarDistrib.Text;
            segDist.Fecha_Sis          = DateTime.Now;
            segDist.Fecha_Distribucion = Convert.ToDateTime(TxtFechaDistrib.Text);
            segDist.Tipo_Insumo        = "SEMILLA";
            segDist.Observacion        = TxtObser.Text;
            segDist.Num_Boleta         = Convert.ToInt32(TxtNumBoleta.Text);
            insSeg.DB_Registrar_SEGUIMIENTO_DISTRIBUCION(segDist);
            Registrar_DISTRIBUCION_DETALLE(Convert.ToInt32(aux.DB_MaxId("EXT_SEGUIMIENTO_DISTRIBUCION", "Id_Seg_Distribucion")));
            estadoprod.DB_Cambiar_ESTADO(LblIdInsProd.Text, "VERIFICACION_SIEMBRA");
            Response.Redirect("frmSeguimientoTecnico.aspx");
        }
コード例 #11
0
        private void Llenar_GVDESIGNADO()
        {
            DB_EXT_DesignacionProd ListDes = new DB_EXT_DesignacionProd();
            DataTable dt = new DataTable();
            //GVDesignado.DataSource = ListDes.DB_Desplegar_DESIGNACION_PROD(LblIdUsuario.Text, 0, 0, LblPrograma.Text, Convert.ToInt32(LblIdInsOrg.Text), "SEGDESIGNADOS");
            //******************************TRATAMIENTO PARA LAS ETAPAS
            DB_EXT_Seguimiento ListSegPendiente = new DB_EXT_Seguimiento();
            List <EXT_SeguimientoPendiente> LSP = ListSegPendiente.DB_Desplegar_SEGUIMIENTOS_PENDIENTE();

            //LSP[0].Nombre_Anterior
            DT_PROD_CONSULTAS = ListDes.DB_Desplegar_DESIGNACION_PROD(LblIdUsuario.Text, 0, 0, LblPrograma.Text, Convert.ToInt32(LblIdInsOrg.Text), "SEGDESIGNADOS");
            dt = DT_PROD_CONSULTAS;//copiamos
            dt.Columns.Add("Id_Etapa", typeof(String));
            foreach (DataRow fila in dt.Rows)
            {
                int    number1    = 0;
                string Etapa      = fila["Etapa"].ToString();
                bool   canConvert = int.TryParse(Etapa, out number1);
                if (canConvert == true)
                {
                    foreach (EXT_SeguimientoPendiente row in LSP)
                    {
                        int id_sp         = row.Id_Seguimiento_pendiente;
                        int etapaobtenida = Convert.ToInt16(fila["Etapa"]);
                        if (id_sp == etapaobtenida)
                        {
                            fila["Etapa"]    = row.Nombre;
                            fila["Id_Etapa"] = row.Id_Seguimiento_pendiente.ToString();
                            break;
                        }
                    }
                }
                else
                {
                    foreach (EXT_SeguimientoPendiente row in LSP)
                    {
                        string old_name      = row.Nombre_Anterior;
                        string etapaobtenida = fila["Etapa"].ToString();
                        if (old_name == etapaobtenida)
                        {
                            fila["Etapa"]    = row.Nombre;
                            fila["Id_Etapa"] = row.Id_Seguimiento_pendiente.ToString();
                            break;
                        }
                    }
                }
            }
            //******************************
            GVDesignado.DataSource = dt;
            GVDesignado.DataBind();
            if (GVDesignado.Rows.Count == 0)
            {
                LblMsj1.Text = "No se seleccionó productores que formen parte de la muestra.";
            }
            else
            {
                LblMsj1.Text = string.Empty;
            }
        }
コード例 #12
0
        protected string Seleccionar_NUM_BOLETA(int idSeg, string etapa)
        {
            DB_EXT_Seguimiento numbol = new DB_EXT_Seguimiento();
            DataTable          dt     = new DataTable();

            dt = numbol.DB_Seleccionar_NUM_BOLETA_SEG(idSeg, etapa);
            return(dt.Rows[0][0].ToString());
        }
コード例 #13
0
        protected void Registrar_SEGUIMIENTO()
        {
            if (TxtLugarDistrib.Text != "")
            {
                //if(TxtProveedor.Text!="")
                //{
                if (TxtFechaDistrib.Text != "")
                {
                    if (GVDistribAgroQuim.Rows.Count > 0)
                    {
                        DB_AP_Registro_Org          aux     = new DB_AP_Registro_Org();
                        DB_EXT_Seguimiento          insSeg  = new DB_EXT_Seguimiento();
                        EXT_Seguimiento             seg     = new EXT_Seguimiento();
                        EXT_SeguimientoDistribucion segDist = new EXT_SeguimientoDistribucion();
                        seg.Id_InscripcionOrg = Convert.ToInt32(LblIdInsOrg.Text);
                        seg.Id_Usuario        = LblIdUsuario.Text;
                        seg.Id_Productor      = LblIdInsProd.Text;
                        seg.Id_Campanhia      = Convert.ToInt32(LblIdCamp.Text);
                        seg.Id_Regional       = Convert.ToInt32(LblIdReg.Text);
                        seg.Programa          = LblProg.Text;
                        seg.Etapa             = "DISTRIBUCION_AGROQUIMICO";
                        seg.Estado            = "ENVIADO";
                        seg.Fecha_Envio       = DateTime.Now;
                        insSeg.DB_Registrar_SEGUIMIENTO(seg);

                        segDist.Id_Seguimiento     = Convert.ToInt32(aux.DB_MaxId("EXT_SEGUIMIENTO", "Id_Seguimiento"));
                        segDist.Programa           = LblProg.Text;
                        segDist.Nom_Proveedor      = DDLProveedor.SelectedItem.Text;
                        segDist.Lugar_Distribucion = TxtLugarDistrib.Text;
                        segDist.Fecha_Sis          = DateTime.Now;
                        segDist.Fecha_Distribucion = Convert.ToDateTime(TxtFechaDistrib.Text);
                        segDist.Tipo_Insumo        = "AGROQUIMICO";
                        segDist.Observacion        = TxtObser.Text;
                        insSeg.DB_Registrar_SEGUIMIENTO_DISTRIBUCION(segDist);
                        Registrar_DISTRIBUCION_DETALLE(Convert.ToInt32(aux.DB_MaxId("EXT_SEGUIMIENTO_DISTRIBUCION", "Id_Seg_Distribucion")));
                        Response.Redirect("frmSeguimientoTecnico.aspx");
                    }
                    else
                    {
                        LblMsj1.Text = string.Empty;
                        LblMsj2.Text = "Debe registrar los datos de la distribución de insumos para poder enviar el seguimiento realizado";
                    }
                }
                else
                {
                    LblMsj.Text = "Para continuar es necesario ingresar la fecha de la distribución de insumos";
                }
                //}
                //else
                //{
                //    LblMsj.Text = "Para continuar se necesita que ingrese el nombre del  proveedor de semilla";
                //}
            }
            else
            {
                LblMsj.Text = "Para continuar necesita especificar el lugar donde se realizó la distribución de insumos";
            }
        }
コード例 #14
0
ファイル: repCostos.aspx.cs プロジェクト: luisystemix/viatico
        private void Mostrar_ENCABEZADO()
        {
            DB_EXT_Seguimiento disSem = new DB_EXT_Seguimiento();
            DataTable          dt     = new DataTable();

            dt               = disSem.DB_Reporte_DISTRIBUCION_DETALLE(Convert.ToInt32(LblIdInsOrg.Text), "SEMILLA", "REPDIRSTRIBORG");
            LblCamp.Text     = dt.Rows[0][3].ToString();
            LblRegional.Text = dt.Rows[0][2].ToString();
        }
コード例 #15
0
        /******************************** FUNCIONES **************************************/
        #region FUNCIONES PARA CONTROLAR EL USUARIO
        private void Control_FORMULARIO()
        {
            /**************************************************************************/
            DB_EXT_Seguimiento num = new DB_EXT_Seguimiento();
            DataTable          dt  = new DataTable();

            dt = num.DB_Desplegar_SEGUIMIENTOS_PROD(Convert.ToInt32(LblIdInsOrg.Text), LblIdInsProd.Text, "", "NUMSEG");
            PnlDatsCoord.Visible = true;
            PnlOBsRec.Visible    = true;
        }
コード例 #16
0
        private void Llenar_DDLSEGUIMIENTO()
        {
            DB_EXT_Seguimiento ListSegPendiente = new DB_EXT_Seguimiento();
            //ListSegPendiente.DB_Desplegar_SEGUIMIENTOS_PENDIENTE();
            List <EXT_SeguimientoPendiente> LSP = ListSegPendiente.DB_Desplegar_SEGUIMIENTOS_PENDIENTE();

            DDLOpcion.DataSource     = LSP;
            DDLOpcion.DataValueField = "Id_Seguimiento_pendiente";
            DDLOpcion.DataTextField  = "Nombre";
            DDLOpcion.DataBind();
            DDLOpcion.Items.Insert(0, new ListItem("Seleccione Opción", "0", true));
        }
コード例 #17
0
        protected void GVListRendi_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            DB_EXT_Seguimiento disSem  = new DB_EXT_Seguimiento();
            DB_EXT_Seguimiento ListSeg = new DB_EXT_Seguimiento();
            DataTable          dt      = new DataTable();

            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                int valor = Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "Id_Rendimiento"));
                dt = ListSeg.DB_Desplegar_SEGUIMIENTOS_PROD(Convert.ToInt32(valor), LblIdInsProd.Text, "", "REND_DETALLE");
                ((Label)e.Row.FindControl("LblFanHect")).Text = dt.Rows[0][14].ToString();
            }
        }
コード例 #18
0
        private void Llenar_GVSEGUIMIENTO()
        {
            DB_EXT_Seguimiento ListSeg = new DB_EXT_Seguimiento();
            //GVListaSeg.DataSource = ListSeg.DB_Desplegar_SEGUIMIENTOS_PROD(Convert.ToInt32(LblIdInsOrg.Text), LblIdInsProd.Text, "","SEGUIMIENTO");
            //******************************TRATAMIENTO PARA LAS ETAPAS
            DB_EXT_Seguimiento ListSegPendiente = new DB_EXT_Seguimiento();
            DataTable          dt = new DataTable();
            List <EXT_SeguimientoPendiente> LSP = ListSegPendiente.DB_Desplegar_SEGUIMIENTOS_PENDIENTE();

            dt = ListSeg.DB_Desplegar_SEGUIMIENTOS_PROD(Convert.ToInt32(LblIdInsOrg.Text), LblIdInsProd.Text, "", "SEGUIMIENTO");
            //dt.Columns.Add("Id_Etapa", typeof(String));
            foreach (DataRow fila in dt.Rows)
            {
                int    number1    = 0;
                string Etapa      = fila["Etapa"].ToString();
                bool   canConvert = int.TryParse(Etapa, out number1);
                if (canConvert == true)
                {
                    foreach (EXT_SeguimientoPendiente row in LSP)
                    {
                        int id_sp         = row.Id_Seguimiento_pendiente;
                        int etapaobtenida = Convert.ToInt16(fila["Etapa"]);
                        if (id_sp == etapaobtenida)
                        {
                            fila["Etapa"] = row.Nombre;
                            break;
                            //fila["Id_Etapa"] = row.Id_Seguimiento_pendiente.ToString();
                        }
                    }
                }
                else
                {
                    foreach (EXT_SeguimientoPendiente row in LSP)
                    {
                        string old_name      = row.Nombre_Anterior;
                        string etapaobtenida = fila["Etapa"].ToString();
                        if (old_name == etapaobtenida)
                        {
                            fila["Etapa"] = row.Nombre;
                            break;
                            //fila["Id_Etapa"] = row.Id_Seguimiento_pendiente.ToString();
                        }
                    }
                }
            }
            //******************************
            GVListaSeg.DataSource = dt;
            GVListaSeg.DataBind();
        }
コード例 #19
0
        private void Mostrar_ENCABEZADO()
        {
            DB_EXT_Seguimiento disSem = new DB_EXT_Seguimiento();
            DataTable          dt     = new DataTable();

            dt               = disSem.DB_Reporte_DISTRIBUCION_DETALLE(Convert.ToInt32(LblIdInsOrg.Text), "AGROQUIMICO", "REPDIRSTRIBORG");
            LblCamp.Text     = dt.Rows[0][3].ToString();
            LblRegional.Text = dt.Rows[0][2].ToString();
            LblProg.Text     = dt.Rows[0][5].ToString();
            LblOrg.Text      = dt.Rows[0][4].ToString();
            /*******************************************************/
            //dt = disSem.DB_Desplegar_SEGUIMIENTOS_PROD(Convert.ToInt32(LblIdInsOrg.Text), "TRILP01-00012", "DETALLEDISTRIB");
            //List<EXT_SeguimientoDistribDetalle> Lista = disSem.DB_Desplegar_LISTA_DETALLE_DISTRIB(Convert.ToInt32(LblIdInsOrg.Text), "TRILP01-00013", "DETALLEDISTRIB");
            //DataList2.DataSource = Lista;
            //DataList2.DataBind();
        }
コード例 #20
0
        private void Control_FORMULARIO()
        {
            /**************************************************************************/
            DB_EXT_Seguimiento num = new DB_EXT_Seguimiento();
            DataTable          dt  = new DataTable();

            dt = num.DB_Desplegar_SEGUIMIENTOS_PROD(Convert.ToInt32(LblIdInsOrg.Text), LblIdInsProd.Text, "", "NUMSEG");
            if (DDLFenologia.SelectedItem.Text == "FECHA Y AVANCE DE SIEMBRA")
            {
                LblNumSegCult.Text = "1";
            }
            else
            {
                LblNumSegCult.Text = dt.Rows[0][0].ToString();
            }
            PnlOBsRec.Visible = true;
        }
コード例 #21
0
        protected void Registrar_COSTOS()
        {
            DataTable          dt     = new DataTable();
            DB_AP_Registro_Org aux    = new DB_AP_Registro_Org();
            DB_EXT_Seguimiento insSeg = new DB_EXT_Seguimiento();
            EXT_Seguimiento    seg    = new EXT_Seguimiento();
            DB_EXT_Costos      c      = new DB_EXT_Costos();
            EXT_Costos         rc     = new EXT_Costos();
            EXT_FechaSegCost   fsc    = new EXT_FechaSegCost();

            seg.Id_InscripcionOrg = Convert.ToInt32(LblIdInsOrg.Text);
            seg.Id_Usuario        = LblIdUsuario.Text;
            seg.Id_Productor      = LblIdInsProd.Text;
            seg.Id_Campanhia      = Convert.ToInt32(LblIdCamp.Text);
            seg.Id_Regional       = Convert.ToInt32(LblIdReg.Text);
            seg.Programa          = LblProg.Text;
            seg.Etapa             = "COSTOS";
            seg.Num_Seg_Cultivo   = 0;
            seg.Estado            = "ENVIADO";
            seg.Fecha_Envio       = DateTime.Now;
            seg.Tipo_Seguimiento  = 0;
            insSeg.DB_Registrar_SEGUIMIENTO(seg);
            int idseg  = Convert.ToInt32(aux.DB_MaxId("EXT_SEGUIMIENTO", "Id_Seguimiento"));
            int idCost = 0;

            dt = c.DB_Seleccionar_COSTOS(0, LblIdInsProd.Text, "PORP_ROD");
            if (dt.Rows.Count <= 0)
            {
                rc.Tipo_Siembra      = DDLTipoSiembra.SelectedValue;
                rc.Superficie        = Convert.ToDecimal(LblSupProd.Text);
                rc.Id_InscripcionOrg = Convert.ToInt32(LblIdInsOrg.Text);
                rc.Id_Productor      = LblIdInsProd.Text;
                rc.Id_Seguimiento    = idseg;
                insSeg.DB_Registrar_COSTOS(rc);
                idCost = Convert.ToInt32(aux.DB_MaxId("EXT_COSTOS", "Id_Costos"));
            }
            else
            {
                idCost = Convert.ToInt32(dt.Rows[0][0].ToString());
            }
            fsc.Id_Seguimiento    = idseg;
            fsc.Id_Costos         = idCost;
            fsc.Fecha_Seguimiento = Convert.ToDateTime(TxtFechaInspeccion.Text);
            insSeg.DB_Registrar_FECHA_SEG_COST(fsc);
            Registrar_COSTOS_DETALLE(Convert.ToInt32(aux.DB_MaxId("EXT_COSTOS", "Id_Costos")));
        }
コード例 #22
0
        protected void GVFenologias_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            DB_EXT_Seguimiento disSem = new DB_EXT_Seguimiento();
            DataTable          dt     = new DataTable();
            string             tipo   = Convert.ToString(e.CommandName);
            int           rowIndex    = Convert.ToInt32(e.CommandArgument);
            StringBuilder sbMensaje   = new StringBuilder();

            Session.Add("Programa", DDLProg.SelectedValue);
            Session.Add("IdCamp", DDLCamp.SelectedValue);
            Session.Add("IdReg", GVFenologias.Rows[rowIndex].Cells[0].Text);
            switch (tipo)
            {
            case "Seguimiento":
                sbMensaje.Append("<script type='text/javascript'>");
                sbMensaje.AppendFormat("window.open('{0}','Titulo','top=0,left=0,width=1000,height=600,scrollbars=yes,resizable=no,directories=no,location=no,menubar=no,status=no,Titlebar=yes,toolbar=no');", "../AnalistasOFC/repEstadoFenologico.aspx?ci=" + GVFenologias.Rows[rowIndex].Cells[4].Text);
                sbMensaje.Append("</script>");
                ClientScript.RegisterClientScriptBlock(this.GetType(), "Mensaje", sbMensaje.ToString());
                break;

            case "Costos":
                //dt = disSem.DB_Reporte_DISTRIBUCION_DETALLE(Convert.ToInt32(GVLisOrg.Rows[rowIndex].Cells[4].Text), "COSTOS", "CONTAR_COST");/*************************/
                //if (dt.Rows.Count > 0)
                //{
                //sbMensaje.Append("<script type='text/javascript'>");
                //sbMensaje.AppendFormat("window.open('{0}','Titulo','top=0,left=0,width=1000,height=600,scrollbars=yes,resizable=no,directories=no,location=no,menubar=no,status=no,Titlebar=yes,toolbar=no');", "../Extensiones/repCostos.aspx?ci=" + GVLisOrg.Rows[rowIndex].Cells[4].Text);
                //sbMensaje.Append("</script>");
                //ClientScript.RegisterClientScriptBlock(this.GetType(), "Mensaje", sbMensaje.ToString());
                //}
                //else
                //{
                //    LblMsj.Text = "No existe un reporte para mostrar, a la fecha NO registro un seguimiento para calcular los Costos de Producción";
                //}
                break;
            }

            //}
            //else
            //{
            //    LblMsg.Text = "No hay Informacion Registrada";
            //}
        }
コード例 #23
0
        protected void Registrar_DISTRIBUCION_DETALLE(int idsegdd)
        {
            DB_EXT_Seguimiento            rsd = new DB_EXT_Seguimiento();
            EXT_SeguimientoDistribDetalle sdd = new EXT_SeguimientoDistribDetalle();
            DataTable dt = Session["datos"] as DataTable;

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                sdd.Id_Seg_Distribucion = idsegdd;
                sdd.Num_Boleta          = Convert.ToInt32(dt.Rows[i][0].ToString());
                sdd.Valor1          = dt.Rows[i][1].ToString();
                sdd.Valor2          = dt.Rows[i][3].ToString();
                sdd.Valor3          = dt.Rows[i][2].ToString();
                sdd.Valor4          = 0;
                sdd.Fecha_Caducidad = Convert.ToDateTime(dt.Rows[i][4].ToString());
                sdd.Unidad          = dt.Rows[i][5].ToString();
                sdd.Cantidad        = Convert.ToInt32(dt.Rows[i][6].ToString());
                rsd.DB_RRegistrar_DISTRIBUCION_DETALLE(sdd);
            }
        }
コード例 #24
0
        protected void Registrar_RENDIMIENTO_DETALLE(int idsegdd)
        {
            DB_EXT_Seguimiento     rsd = new DB_EXT_Seguimiento();
            EXT_RendimientoDetalle rdd = new EXT_RendimientoDetalle();
            DataTable dt = Session["datos"] as DataTable;

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                rdd.Id_Rendimiento = idsegdd;
                rdd.Id_Fenologia   = Convert.ToInt32(dt.Rows[i][0].ToString());
                rdd.Face_Fenologia = dt.Rows[i][1].ToString();
                rdd.Valor1         = Convert.ToInt32(dt.Rows[i][2].ToString());
                rdd.Valor2         = Convert.ToInt32(dt.Rows[i][3].ToString());
                rdd.Valor3         = Convert.ToInt32(dt.Rows[i][4].ToString());
                rdd.Valor4         = Convert.ToInt32(dt.Rows[i][5].ToString());
                rdd.Valor5         = Convert.ToDecimal(dt.Rows[i][6].ToString());
                rdd.Valor6         = Convert.ToInt32(dt.Rows[i][7].ToString());
                rdd.Valor7         = Convert.ToDecimal(dt.Rows[i][8].ToString());
                rdd.Valor8         = 0;
                rsd.DB_Registrar_RENDIMIENTO_DETALLE(rdd);
            }
        }
コード例 #25
0
        protected void Registrar_RENDIMIENTO_DETALLE(int idsegdd)
        {
            DB_EXT_Seguimiento     rsd = new DB_EXT_Seguimiento();
            EXT_RendimientoDetalle rdd = new EXT_RendimientoDetalle();
            DataTable dt = Session["datos"] as DataTable;

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                rdd.Id_Rendimiento = idsegdd;
                rdd.Id_Fenologia   = Convert.ToInt32(DDLFaceFenologica.SelectedValue);
                rdd.Face_Fenologia = DDLFaceFenologica.SelectedItem.Text;
                rdd.Valor1         = Convert.ToDecimal(dt.Rows[i][0].ToString());
                rdd.Valor2         = Convert.ToDecimal(dt.Rows[i][1].ToString());
                rdd.Valor3         = Convert.ToDecimal(dt.Rows[i][2].ToString());
                rdd.Valor4         = Convert.ToDecimal(dt.Rows[i][3].ToString());
                rdd.Valor5         = Convert.ToDecimal(dt.Rows[i][4].ToString());
                rdd.Valor6         = Convert.ToDecimal(dt.Rows[i][5].ToString());
                rdd.Valor7         = Convert.ToDecimal(dt.Rows[i][6].ToString());
                rdd.Valor8         = 0;
                rsd.DB_Registrar_RENDIMIENTO_DETALLE(rdd);
            }
            Response.Redirect("../Extensiones/frmListaRendimiento.aspx");
        }
コード例 #26
0
        protected void Registrar_COSTOS_DETALLE(int idcostd)
        {
            DB_EXT_Seguimiento rsd = new DB_EXT_Seguimiento();
            EXT_CostosDetalle  rcd = new EXT_CostosDetalle();
            DataTable          dt  = Session["datos"] as DataTable;

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                rcd.Id_Costos        = idcostd;
                rcd.Etapa_Cultivo    = Convert.ToInt32(dt.Rows[i][1].ToString());
                rcd.Insumo           = Convert.ToInt32(dt.Rows[i][3].ToString());
                rcd.Tipo_Recurso     = Convert.ToInt32(dt.Rows[i][5].ToString());
                rcd.Producto         = dt.Rows[i][6].ToString();
                rcd.Unidad           = dt.Rows[i][7].ToString();
                rcd.Cantidad         = Convert.ToDecimal(dt.Rows[i][8].ToString());
                rcd.Num_Apli         = Convert.ToInt32(dt.Rows[i][9].ToString());
                rcd.Precio_Unidad    = Convert.ToDecimal(dt.Rows[i][10].ToString());
                rcd.Tipo_Adquicicion = dt.Rows[i][11].ToString();
                rcd.Costo_Total_Bs   = Convert.ToDecimal(dt.Rows[i][12].ToString());
                rcd.Costo_Total_Sus  = Convert.ToDecimal(dt.Rows[i][13].ToString());
                rsd.DB_Registrar_COSTOS_DETALLE(rcd);
            }
        }
コード例 #27
0
        private void Get_Semanas()
        {
            int Count = 0;
            DB_EXT_Seguimiento Seg_       = new DB_EXT_Seguimiento();
            DataTable          DT_GetRepF = new DataTable();

            DT_GetRepF = Seg_.DB_GET_ETAPAS_FASE_FENOLOGICA();

            var distinctRows = (from DataRow dRow in DT_GetRepF.Rows
                                select new { col1 = dRow["Reporte_Fecha_Inicio"], col2 = dRow["Reporte_Fecha_Fin"] }).Distinct();

            var distinctRowsAsc = distinctRows.OrderBy(x => x.col1);

            ddlSemanas.Items.Clear();
            ddlSemanas.Items.Insert(0, new ListItem("Seleccione Semana", "0", true));
            foreach (var rowfechas in distinctRowsAsc)
            {
                Count++;
                string value1 = rowfechas.col1.ToString();
                string value2 = rowfechas.col2.ToString();
                //*** llenamos las semanas
                //int isaux = indexsemana + 1;
                if (Count > 20)
                {
                    lblMensaje.Text = "Se supero el rango de 20 Semanas";
                    return;
                }
                else
                {
                    string item  = "Semana " + Count + "(del " + Convert.ToDateTime(value1).ToShortDateString() + " al " + Convert.ToDateTime(value2).ToShortDateString() + ")";
                    string fecha = value1 + "|" + value2;
                    ddlSemanas.Items.Insert(Count, new ListItem(item, fecha, true));
                }
                //indexsemana++;
            }
        }
コード例 #28
0
        protected void GVLisOrg_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            DB_EXT_Seguimiento disSem = new DB_EXT_Seguimiento();
            DataTable          dt     = new DataTable();
            string             tipo   = Convert.ToString(e.CommandName);
            int           rowIndex    = Convert.ToInt32(e.CommandArgument);
            StringBuilder sbMensaje   = new StringBuilder();

            GVLisOrg.Columns[4].Visible = true;
            Llenar_GVDESIGNADO();
            Session.Add("IdInsOrg", GVLisOrg.Rows[rowIndex].Cells[4].Text);
            switch (tipo)
            {
            case "Seguimiento":
                Response.Redirect("frmSeguimientoTecnico.aspx");
                break;

            case "Fenologia":
                Response.Redirect("frmRP_SegFenologias.aspx");
                break;

            case "Semilla":
                dt = disSem.DB_Reporte_DISTRIBUCION_DETALLE(Convert.ToInt32(GVLisOrg.Rows[rowIndex].Cells[4].Text), "SEMILLA", "REPPROD");
                if (dt.Rows.Count > 0)
                {
                    LblMsj.Text = string.Empty;
                    sbMensaje.Append("<script type='text/javascript'>");
                    sbMensaje.AppendFormat("window.open('{0}','Titulo','top=0,left=0,width=1000,height=600,scrollbars=yes,resizable=no,directories=no,location=no,menubar=no,status=no,Titlebar=yes,toolbar=no');", "../Extensiones/repDistribSemillaOrg.aspx?ci=" + GVLisOrg.Rows[rowIndex].Cells[4].Text);
                    sbMensaje.Append("</script>");
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "Mensaje", sbMensaje.ToString());
                }
                else
                {
                    LblMsj.Text = "No existe un reporte para mostrar, a la fecha NO registro un seguimiento a la distribución de semilla.";
                }
                break;

            case "Quimicos":
                dt = disSem.DB_Reporte_DISTRIBUCION_DETALLE(Convert.ToInt32(GVLisOrg.Rows[rowIndex].Cells[4].Text), "AGROQUIMICO", "REPPROD");
                if (dt.Rows.Count > 0)
                {
                    LblMsj.Text = string.Empty;
                    sbMensaje.Append("<script type='text/javascript'>");
                    sbMensaje.AppendFormat("window.open('{0}','Titulo','top=0,left=0,width=1000,height=600,scrollbars=yes,resizable=no,directories=no,location=no,menubar=no,status=no,Titlebar=yes,toolbar=no');", "../Extensiones/repDistribAgroQuimOrg.aspx?ci=" + GVLisOrg.Rows[rowIndex].Cells[4].Text);
                    sbMensaje.Append("</script>");
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "Mensaje", sbMensaje.ToString());
                }
                else
                {
                    LblMsj.Text = "No existe un reporte para mostrar, a la fecha NO registro un seguimiento a la distribución de agroquímicos.";
                }
                break;

            case "Rendimiento":
                dt = disSem.DB_Reporte_DISTRIBUCION_DETALLE(Convert.ToInt32(GVLisOrg.Rows[rowIndex].Cells[4].Text), "RENDIMIENTO", "CONTAR_REND");     /***********************/
                if (dt.Rows.Count > 0)
                {
                    sbMensaje.Append("<script type='text/javascript'>");
                    sbMensaje.AppendFormat("window.open('{0}','Titulo','top=0,left=0,width=1000,height=600,scrollbars=yes,resizable=no,directories=no,location=no,menubar=no,status=no,Titlebar=yes,toolbar=no');", "../Extensiones/repRendimiento.aspx?ci=" + GVLisOrg.Rows[rowIndex].Cells[4].Text);
                    sbMensaje.Append("</script>");
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "Mensaje", sbMensaje.ToString());
                    LblMsj.Text = string.Empty;
                }
                else
                {
                    LblMsj.Text = "No existe un reporte para mostrar, a la fecha NO registro un seguimiento para el Rendimiento";
                }
                break;

            case "Costos":
                dt = disSem.DB_Reporte_DISTRIBUCION_DETALLE(Convert.ToInt32(GVLisOrg.Rows[rowIndex].Cells[4].Text), "COSTOS", "CONTAR_COST");    /*************************/
                if (dt.Rows.Count > 0)
                {
                    sbMensaje.Append("<script type='text/javascript'>");
                    sbMensaje.AppendFormat("window.open('{0}','Titulo','top=0,left=0,width=1000,height=600,scrollbars=yes,resizable=no,directories=no,location=no,menubar=no,status=no,Titlebar=yes,toolbar=no');", "../Extensiones/repCostos.aspx?ci=" + GVLisOrg.Rows[rowIndex].Cells[4].Text);
                    sbMensaje.Append("</script>");
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "Mensaje", sbMensaje.ToString());
                }
                else
                {
                    LblMsj.Text = "No existe un reporte para mostrar, a la fecha NO registro un seguimiento para calcular los Costos de Producción";
                }
                break;
            }
            GVLisOrg.Columns[4].Visible = false;
            Llenar_GVDESIGNADO();
        }
コード例 #29
0
        protected void Registrar_SEGUIMIENTO()
        {
            int aux1 = 0;

            DB_EXT_DesignacionProd estadoprod = new DB_EXT_DesignacionProd();
            DB_AP_Registro_Org     aux        = new DB_AP_Registro_Org();
            DB_EXT_Seguimiento     insSeg     = new DB_EXT_Seguimiento();
            EXT_Seguimiento        seg        = new EXT_Seguimiento();
            EXT_SeguimientoParcela segParc    = new EXT_SeguimientoParcela();

            seg.Id_InscripcionOrg = Convert.ToInt32(LblIdInsOrg.Text);
            seg.Id_Usuario        = LblIdUsuario.Text;
            seg.Id_Productor      = LblIdInsProd.Text;
            seg.Id_Campanhia      = Convert.ToInt32(LblIdCamp.Text);
            seg.Id_Regional       = Convert.ToInt32(LblIdReg.Text);
            seg.Programa          = LblProg.Text;
            //seg.Etapa = LblEtapa.Text;
            seg.Etapa           = LblId_Etapa.Text;
            seg.Num_Seg_Cultivo = 0;

            seg.Estado           = "ENVIADO";
            seg.Fecha_Envio      = DateTime.Now;
            seg.Tipo_Seguimiento = Convert.ToInt32(DDLTipoSeg.SelectedValue);
            insSeg.DB_Registrar_SEGUIMIENTO(seg);

            segParc.Id_Seguimiento = Convert.ToInt32(aux.DB_MaxId("EXT_SEGUIMIENTO", "Id_Seguimiento"));
            if (Convert.ToInt32(DDLTipoSeg.SelectedValue) == 1)
            {
                segParc.Boleta_Numero = Convert.ToInt32(aux.DB_MaxId("EXT_SEGUIMIENTO_PARCELA", "Id_Seguimiento_Parcela")) + 1;
            }
            else
            {
                segParc.Boleta_Numero = Convert.ToInt32(TxtNumBoleta.Text);
            }
            segParc.Fecha_Seg = Convert.ToDateTime(TxtFecha.Text);
            //segParc.Hora_Seg = DDLHora.SelectedValue + ":" + DDLMinuto.SelectedValue;
            segParc.Hora_Seg      = string.Empty;
            segParc.Fecha_Sis     = DateTime.Now;
            segParc.Observacion   = TxtObser.Text;
            segParc.Recomendacion = TxtRecomen.Text;
            insSeg.DB_Registrar_SEGUIMIENTO_PARCELA(segParc);

            EXT_SeguimientoCoordenadas scor = new EXT_SeguimientoCoordenadas();
            int id = 0;

            id = Convert.ToInt32(aux.DB_MaxId("EXT_SEGUIMIENTO_PARCELA", "Id_Seguimiento_Parcela"));
            //scor.Id_Seguimiento_Parcela = Convert.ToInt32(aux.DB_MaxId("EXT_SEGUIMIENTO_PARCELA", "Id_Seguimiento_Parcela"));
            foreach (GridViewRow dgi in GVCoord.Rows)
            {
                scor.Id_Seguimiento_Parcela = id;
                scor.Id_Productor           = LblIdInsProd.Text;
                scor.Num_Parcela            = Convert.ToInt32(GVCoord.Rows[dgi.RowIndex].Cells[0].Text);
                scor.Num_Punto   = Convert.ToInt16(GVCoord.Rows[dgi.RowIndex].Cells[1].Text);
                scor.CoordenadaX = GVCoord.Rows[dgi.RowIndex].Cells[2].Text;
                scor.CoordenadaY = GVCoord.Rows[dgi.RowIndex].Cells[3].Text;
                insSeg.DB_Registrar_SEGUIMIENTO_COORDENADA(scor);
            }
            ///****** inicio nuevo
            //**ADVERSIDAD
            //int id = 0;
            //id = Convert.ToInt32(aux.DB_MaxId("EXT_SEGUIMIENTO_PARCELA", "Id_Seguimiento_Parcela"));
            EXT_AdversidadPresentada ad = new EXT_AdversidadPresentada();

            if (GVAdversidad.Rows.Count > 0)
            {
                foreach (GridViewRow dgi in GVAdversidad.Rows)
                {
                    ad.Id_Seguimiento_Parcela = id;
                    if (GVAdversidad.Rows[dgi.RowIndex].Cells[0].Text != string.Empty)
                    {
                        ad.Adversidad       = GVAdversidad.Rows[dgi.RowIndex].Cells[0].Text;
                        ad.Intencidad       = GVAdversidad.Rows[dgi.RowIndex].Cells[1].Text;
                        ad.Porcentage       = Convert.ToDecimal(GVAdversidad.Rows[dgi.RowIndex].Cells[2].Text);
                        ad.Fecha_Ocurrencia = Convert.ToDateTime(GVAdversidad.Rows[dgi.RowIndex].Cells[3].Text);
                        //ad.Descripcion = GVAdversidad.Rows[dgi.RowIndex].Cells[4].Text;
                        ad.Descripcion = HttpUtility.HtmlDecode(GVAdversidad.Rows[dgi.RowIndex].Cells[4].Text);
                        ad.Tratamiento = string.Empty;
                        insSeg.DB_Registrar_ADVESIDAD(ad);
                    }
                }
            }
            //*** plaga, maleza, enfermedad
            EXT_AdversidadPresentada adpme = new EXT_AdversidadPresentada();

            if (GV_PlagaMaEnf.Rows.Count > 0)
            {
                foreach (GridViewRow dgi in GV_PlagaMaEnf.Rows)
                {
                    adpme.Id_Seguimiento_Parcela = id;
                    if (GV_PlagaMaEnf.Rows[dgi.RowIndex].Cells[0].Text != string.Empty)
                    {
                        adpme.Adversidad  = GV_PlagaMaEnf.Rows[dgi.RowIndex].Cells[0].Text;
                        adpme.Descripcion = GV_PlagaMaEnf.Rows[dgi.RowIndex].Cells[1].Text;
                        adpme.Intencidad  = GV_PlagaMaEnf.Rows[dgi.RowIndex].Cells[2].Text;
                        adpme.Tratamiento = GV_PlagaMaEnf.Rows[dgi.RowIndex].Cells[3].Text;
                        adpme.Porcentage  = 0;          //no se ingresa en sp
                        DateTime fecha = DateTime.Now;
                        adpme.Fecha_Ocurrencia = fecha; //no se ingresa en sp
                        insSeg.DB_Registrar_ADVESIDAD_PME(adpme);
                    }
                }
            }
            ///*** fin nuevo
            //estadoprod.DB_Cambiar_ESTADO(LblIdInsProd.Text, "DISTRIBUCION_SEMILLA");
            estadoprod.DB_Cambiar_ESTADO(LblIdInsProd.Text, "2");
            Response.Write("<script>window.alert('El Registrado de las coordenadas se realizó  Correctamente…..');</script>");
            Response.Redirect("frmSeguimientoTecnico.aspx");
        }
コード例 #30
0
        protected void GVSegTec_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            string        tipo      = Convert.ToString(e.CommandName);
            int           rowIndex  = Convert.ToInt32(e.CommandArgument);
            StringBuilder sbMensaje = new StringBuilder();

            GVSegTec.Columns[6].Visible = true;
            GVSegTec.Columns[7].Visible = true;
            Desplegar_SEGUIMIENTO_TECNICOS();
            Session.Add("IdSeguimiento", GVSegTec.Rows[rowIndex].Cells[6].Text);
            Session.Add("Etapa", GVSegTec.Rows[rowIndex].Cells[2].Text);
            Session.Add("IdInsOrg", GVSegTec.Rows[rowIndex].Cells[7].Text);
            switch (tipo)
            {
            case "Seguimiento":
                switch (GVSegTec.Rows[rowIndex].Cells[2].Text)
                {
                case "VERIFICACION_PARCELA":
                    sbMensaje.Append("<script type='text/javascript'>");
                    sbMensaje.AppendFormat("window.open('{0}','Titulo','top=0,left=0,width=1000,height=600,scrollbars=yes,resizable=no,directories=no,location=no,menubar=no,status=no,Titlebar=yes,toolbar=no');", "../Extensiones/repSeguimientosTecnicos.aspx?ci=" + GVSegTec.Rows[rowIndex].Cells[5].Text);
                    sbMensaje.Append("</script>");
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "Mensaje", sbMensaje.ToString());
                    break;

                case "VERIFICACION_SIEMBRA":
                    sbMensaje.Append("<script type='text/javascript'>");
                    sbMensaje.AppendFormat("window.open('{0}','Titulo','top=0,left=0,width=1000,height=600,scrollbars=yes,resizable=no,directories=no,location=no,menubar=no,status=no,Titlebar=yes,toolbar=no');", "../Extensiones/repSeguimientosTecnicos.aspx?ci=" + GVSegTec.Rows[rowIndex].Cells[5].Text);
                    sbMensaje.Append("</script>");
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "Mensaje", sbMensaje.ToString());
                    break;

                case "VERIFICACION_CULTIVO":
                    sbMensaje.Append("<script type='text/javascript'>");
                    sbMensaje.AppendFormat("window.open('{0}','Titulo','top=0,left=0,width=1000,height=600,scrollbars=yes,resizable=no,directories=no,location=no,menubar=no,status=no,Titlebar=yes,toolbar=no');", "../Extensiones/repSeguimientosTecnicos.aspx?ci=" + GVSegTec.Rows[rowIndex].Cells[5].Text);
                    sbMensaje.Append("</script>");
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "Mensaje", sbMensaje.ToString());
                    break;

                case "DISTRIBUCION_SEMILLA":
                    sbMensaje.Append("<script type='text/javascript'>");
                    sbMensaje.AppendFormat("window.open('{0}','Titulo','top=0,left=0,width=1000,height=600,scrollbars=yes,resizable=no,directories=no,location=no,menubar=no,status=no,Titlebar=yes,toolbar=no');", "../Extensiones/repDistribSemillaOrg.aspx?ci=" + GVSegTec.Rows[rowIndex].Cells[4].Text);
                    sbMensaje.Append("</script>");
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "Mensaje", sbMensaje.ToString());
                    break;

                case "DISTRIBUCION_AGROQUIMICO":
                    sbMensaje.Append("<script type='text/javascript'>");
                    sbMensaje.AppendFormat("window.open('{0}','Titulo','top=0,left=0,width=1000,height=600,scrollbars=yes,resizable=no,directories=no,location=no,menubar=no,status=no,Titlebar=yes,toolbar=no');", "../Extensiones/repDistribAgroQuimOrg.aspx?ci=" + GVSegTec.Rows[rowIndex].Cells[4].Text);
                    sbMensaje.Append("</script>");
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "Mensaje", sbMensaje.ToString());
                    break;
                }
                break;

            case "Aceptar":
                DB_EXT_Seguimiento seg = new DB_EXT_Seguimiento();
                seg.DB_Cambiar_ESTADO_SEGUIMIENTO(GVSegTec.Rows[rowIndex].Cells[6].Text, "APROBADO");
                break;
            }
            GVSegTec.Columns[6].Visible = false;
            GVSegTec.Columns[7].Visible = false;
            Desplegar_SEGUIMIENTO_TECNICOS();
        }