private void Desplegar_GRILLA() { DB_EXT_Fenologia ListFen = new DB_EXT_Fenologia(); GVFaseFenologica.DataSource = ListFen.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), 0, 0, 0, LblPrograma.Text, "", 0, DateTime.Now, "LISTA_FASE_FENOLOGICA"); GVFaseFenologica.DataBind(); }
private void Datos_Org_ENCABEZADO() { DB_AP_Registro_Org d_org = new DB_AP_Registro_Org(); DataTable dt = new DataTable(); dt = d_org.DB_Desplegar_ENCABEZADO_ORG(Convert.ToInt32(LblIdInsOrg.Text)); LblOrg.Text = dt.Rows[0][2].ToString(); LblIdCamp.Text = dt.Rows[0][5].ToString(); LblCamp.Text = dt.Rows[0][6].ToString(); LblProg.Text = dt.Rows[0][9].ToString(); LblIdReg.Text = dt.Rows[0][7].ToString(); LblReg.Text = dt.Rows[0][8].ToString(); Cargar_NUM_SEGUIMIENTOS(); DB_EXT_Fenologia Luis = new DB_EXT_Fenologia(); //LblNumSeg.Text = (Luis.DB_MaxNumSeg(Convert.ToInt32(LblIdInsOrg.Text))).ToString(); LblNumSeg.Text = DDLNumSeg.SelectedValue; dt = Luis.DB_Seleccionar_NUMPROD_TOTSUP_ORG(Convert.ToInt32(LblIdInsOrg.Text)); if (dt.Rows.Count > 0) { TxtNumBenefVig.Text = dt.Rows[0][0].ToString(); TxtSupAct.Text = dt.Rows[0][1].ToString(); TxtSupApo.Text = dt.Rows[0][2].ToString(); } }
protected void LnkBtnEnviar_Click(object sender, EventArgs e) { Session.Add("IdUser", LblIdUsuario.Text); Session.Add("IdInsOrg", LblIdInsOrg.Text); Session.Add("IdCamp", LblIdCamp.Text); Session.Add("IdReg", LblIdReg.Text); Session.Add("Programa", LblPrograma.Text); DB_EXT_Fenologia Luis = new DB_EXT_Fenologia(); if (Luis.DB_MaxNumSeg(Convert.ToInt32(LblIdInsOrg.Text)) > 0) { switch (LblPrograma.Text) { case "TRIGO": //Response.Redirect("frmFenologiaTrigo.aspx"); Response.Redirect("frmFaseFenTrigo.aspx"); break; case "ARROZ": Response.Redirect("frmFenologiaArroz.aspx"); break; case "MAIZ": Response.Redirect("frmFenologiaMaiz.aspx"); break; } } else { LblMsj.Text = "Por el momento NO registro seguimiento técnico a los cultivos, NO se puede procesar esta operación."; } }
private void Desplegar_GRILLA_ENVIADOS() { DB_EXT_Fenologia fendetalle = new DB_EXT_Fenologia(); GVEnviadosSemana.DataSource = fendetalle.DB_Seleccionar_ENVIOS_SEMANA(Convert.ToInt32(DDLReg.SelectedValue)); GVEnviadosSemana.DataBind(); }
protected void GVAvances_RowDataBound(object sender, GridViewRowEventArgs e) { DB_RegionesApoyadas ListRegCamp = new DB_RegionesApoyadas(); DB_EXT_Fenologia Luis = new DB_EXT_Fenologia(); DB_EXT_Rendimiento ex = new DB_EXT_Rendimiento(); DataTable dt = new DataTable(); if (e.Row.RowType == DataControlRowType.DataRow) { int IdInsOrg = Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "Id_InscripcionOrg").ToString()); int IdComunidad = Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "Id_Municipio").ToString()); /*****************************/ dt = Luis.DB_Seleccionar_NUMPROD_TOTSUP(IdInsOrg, IdComunidad); ((Label)e.Row.FindControl("LblNumBenefVig")).Text = dt.Rows[0][0].ToString(); ((Label)e.Row.FindControl("LblSupApoyada")).Text = dt.Rows[0][1].ToString(); dt = ex.DB_Reporte_DETALLE_PLANILLA(IdInsOrg, "", "", "RENDIMIENTO_PROMEDIO"); ((Label)e.Row.FindControl("LblRendimiento")).Text = dt.Rows[0][0].ToString(); try { ((Label)e.Row.FindControl("LblProdEstim")).Text = (Convert.ToDecimal(((Label)e.Row.FindControl("LblSupApoyada")).Text) * Convert.ToDecimal(((Label)e.Row.FindControl("LblRendimiento")).Text)).ToString(); } catch { ((Label)e.Row.FindControl("LblProdEstim")).Text = "0"; } } }
private void Desplegar_GRILLA() { DB_EXT_Fenologia fendetalle = new DB_EXT_Fenologia(); switch (LblPrograma.Text) { case "TRIGO": if (LblIdInsOrg.Text == "Total") { GVDetalleFenologiaTrigo.Visible = true; GVDetalleFenologiaTrigo.DataSource = fendetalle.DB_Reporte_FENOLOGIA_DETALLE(0, LblPrograma.Text, Convert.ToInt32(LblIdCamp.Text), Convert.ToInt32(LblIdReg.Text), Convert.ToInt32(LblNumSegCult.Text), "", DateTime.Now, "FENOLOGIA_TRIGO"); GVDetalleFenologiaTrigo.DataBind(); if (GVDetalleFenologiaTrigo.Rows.Count > 0) { Promedios_Totales(); } } else { GVDetalleFenologiaTrigo.Visible = true; GVDetalleFenologiaTrigo.DataSource = fendetalle.DB_Reporte_FENOLOGIA_DETALLE(Convert.ToInt32(LblIdInsOrg.Text), LblPrograma.Text, Convert.ToInt32(LblIdCamp.Text), Convert.ToInt32(LblIdReg.Text), Convert.ToInt32(LblNumSegCult.Text), "", DateTime.Now, "DETALLE_FENOLOGIA_TRIGO"); GVDetalleFenologiaTrigo.DataBind(); if (GVDetalleFenologiaTrigo.Rows.Count > 0) { Promedios_Totales(); } } break; case "MAIZ": if (LblIdInsOrg.Text == "Total") { GVDetalleFenologiaMaiz.Visible = true; GVDetalleFenologiaMaiz.DataSource = fendetalle.DB_Reporte_FENOLOGIA_DETALLE(0, LblPrograma.Text, Convert.ToInt32(LblIdCamp.Text), Convert.ToInt32(LblIdReg.Text), Convert.ToInt32(LblNumSegCult.Text), "", DateTime.Now, "FENOLOGIA_MAIZ"); GVDetalleFenologiaMaiz.DataBind(); } else { GVDetalleFenologiaMaiz.Visible = true; GVDetalleFenologiaMaiz.DataSource = fendetalle.DB_Reporte_FENOLOGIA_DETALLE(Convert.ToInt32(LblIdInsOrg.Text), LblPrograma.Text, Convert.ToInt32(LblIdCamp.Text), Convert.ToInt32(LblIdReg.Text), Convert.ToInt32(LblNumSegCult.Text), "", DateTime.Now, "DETALLE_FENOLOGIA_MAIZ"); GVDetalleFenologiaMaiz.DataBind(); } break; case "ARROZ": if (LblIdInsOrg.Text == "Total") { GVDetalleFenologiaArroz.Visible = true; GVDetalleFenologiaArroz.DataSource = fendetalle.DB_Reporte_FENOLOGIA_DETALLE(0, LblPrograma.Text, Convert.ToInt32(LblIdCamp.Text), Convert.ToInt32(LblIdReg.Text), Convert.ToInt32(LblNumSegCult.Text), "", DateTime.Now, "FENOLOGIA_ARROZ"); GVDetalleFenologiaArroz.DataBind(); } else { GVDetalleFenologiaArroz.Visible = true; GVDetalleFenologiaArroz.DataSource = fendetalle.DB_Reporte_FENOLOGIA_DETALLE(Convert.ToInt32(LblIdInsOrg.Text), LblPrograma.Text, Convert.ToInt32(LblIdCamp.Text), Convert.ToInt32(LblIdReg.Text), Convert.ToInt32(LblNumSegCult.Text), "", DateTime.Now, "DETALLE_FENOLOGIA_ARROZ"); GVDetalleFenologiaArroz.DataBind(); } break; } }
//#region FUNCIONES PARA CARGAR LOS DATOS DE LA ORGANIZACION //private void Datos_ENCABEZADO() //{ // DB_AP_Registro_Org Usuario = new DB_AP_Registro_Org(); // DataTable dt = new DataTable(); // dt = Usuario.DB_Desplegar_USUARIO(LblIdUsuario.Text); // LblRegional.Text = dt.Rows[0][5].ToString(); // LblIdReg.Text = dt.Rows[0][4].ToString(); // LblRegion.Text = dt.Rows[0][10].ToString(); //} //#endregion //#region FUNCION PARA LLENAR EL COMBO CON TODAS LAS CAMPAÑAS //private void Llenar_DDLCAMPANHIA() //{ // DB_AP_Campanhia cam = new DB_AP_Campanhia(); // DataTable dt = new DataTable(); // dt = cam.DB_Seleccionar_CAMPANHIA_REG_NOFIN(LblRegion.Text); // DDLCamp.DataSource = dt; // DDLCamp.DataValueField = "Id_Campanhia"; // DDLCamp.DataTextField = "Nombre"; // DDLCamp.DataBind(); //} //#endregion private void Desplegar_GRILLA_ENVIADOS() { DB_EXT_Fenologia fendetalle = new DB_EXT_Fenologia(); GVEnviadosSemana.DataSource = fendetalle.DB_Seleccionar_ENVIOS_SEMANA_FENOLOGIA("ENVIADO"); GVEnviadosSemana.DataBind(); }
private void Cargar_COMBO() { DB_EXT_Fenologia nd = new DB_EXT_Fenologia(); List <EXT_Fenologia> ListaF = nd.DB_Desplegar_FENOLOGIA_PRODUCTOR("MAIZ", LblIdInsProd.Text); DDLFaceFenologica.DataSource = ListaF; DDLFaceFenologica.DataValueField = "Id_Fenologia"; DDLFaceFenologica.DataTextField = "Nom_Fenologia"; DDLFaceFenologica.DataBind(); }
private void Cargar_NUM_SEGUIMIENTOS() { DB_EXT_Fenologia numBol = new DB_EXT_Fenologia(); DataTable dt = new DataTable(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 0, Convert.ToInt32(LblIdReg.Text), "0", "0", 0, DateTime.Now, "NUM_SEGUIMIENTOS"); DDLNumSeg.DataSource = dt; DDLNumSeg.DataValueField = "Num_Seg_Cultivo"; DDLNumSeg.DataTextField = "Num_Seg_Cultivo"; DDLNumSeg.DataBind(); }
protected void Registrar_ETAPA_FENOLOGICA() { DB_AP_Registro_Org aux = new DB_AP_Registro_Org(); DB_EXT_Fenologia regfen = new DB_EXT_Fenologia(); EXT_FaceFenologicaCultivo fenCultivo = new EXT_FaceFenologicaCultivo(); EXT_FaceFenologiaTrigo fenTrigo = new EXT_FaceFenologiaTrigo(); fenCultivo.Id_Campanhia = Convert.ToInt32(LblIdCamp.Text); fenCultivo.Id_Regional = Convert.ToInt32(LblIdReg.Text); fenCultivo.Id_InscripcionOrg = Convert.ToInt32(LblIdInsOrg.Text); fenCultivo.Id_Usuario = LblIdUsuario.Text; fenCultivo.Programa = LblProg.Text; fenCultivo.Fecha_Registro = DateTime.Now; fenCultivo.Num_Boletas_Inspec = Convert.ToInt32(TxtNumBoletas.Text); fenCultivo.Charla_Tecnica = DDLHuboCharla.SelectedValue; fenCultivo.Num_Prod_Vigentes = Convert.ToInt32(TxtNumBenefVig.Text); fenCultivo.Sup_Actual = Convert.ToDecimal(TxtSupAct.Text); fenCultivo.Variedad_Semilla = TxtVariedadSem.Text; fenCultivo.Observacion = TxtObserv.Text; fenCultivo.Num_Seg_Cultivo = 0; regfen.DB_Registrar_FACE_FENOLOGICA_CULTIVO(fenCultivo); /*************************************** RESGISTRO FENOLOGIA PROGRAMA TRIGO MUESTRA ********************************************/ fenTrigo.Id_Face_Feonologica = Convert.ToInt32(aux.DB_MaxId("EXT_FACE_FENOLOGICA_CULTIVO", "Id_Face_Feonologica"));; fenTrigo.FechaAvnSiemIni = LblFIniSiem.Text; fenTrigo.FechaAvnSiemFin = LblFFinSiem.Text; fenTrigo.FechaAvnSiemAvan = Convert.ToDecimal(LblAvnSiem.Text); fenTrigo.GerminacionIni = Convert.ToDecimal(LblGer1.Text); fenTrigo.GerminacionFin = Convert.ToDecimal(LblGer2.Text); fenTrigo.PlantulaIni = Convert.ToDecimal(LblPlant1.Text); fenTrigo.PlantulaFin = Convert.ToDecimal(LblPlant2.Text); fenTrigo.MacollamientoIni = Convert.ToDecimal(LblMacolla1.Text); fenTrigo.MacollamientoFin = Convert.ToDecimal(LblMacolla2.Text); fenTrigo.EmbucheIni = Convert.ToDecimal(LblEmbu1.Text); fenTrigo.EmbucheFin = Convert.ToDecimal(LblEmbu2.Text); fenTrigo.EspigazonIni = Convert.ToDecimal(LblEspi1.Text); fenTrigo.EspigazonFin = Convert.ToDecimal(LblEspi2.Text); fenTrigo.FloracionIni = Convert.ToDecimal(LblFlora1.Text); fenTrigo.FloracionFin = Convert.ToDecimal(LblFlora2.Text); fenTrigo.LlenadoGranoIni = Convert.ToDecimal(LblGrano1.Text); fenTrigo.LlenadoGranoFin = Convert.ToDecimal(LblGrano2.Text); fenTrigo.MaduracionIni = Convert.ToDecimal(LblMadura1.Text); fenTrigo.MaduracionFin = Convert.ToDecimal(LblMadura2.Text); fenTrigo.CosechaAcopioAvan = Convert.ToDecimal(LblCosAco1.Text); fenTrigo.CosechaAcopioRend = Convert.ToDecimal(LblCosAco2.Text); fenTrigo.FechaCosechaIni = LblFcosechaIni.Text; fenTrigo.FechaCosechaFin = LblFcosechaFin.Text; fenTrigo.Tipo = "MUESTRA"; fenTrigo.SupSem = Convert.ToDecimal(LblSupSem.Text); regfen.DB_Registrar_FACE_FENOLOGICA_TRIGO(fenTrigo); }
/// <summary> /// se llena DDLFaseFenoligia /// </summary> private void llenar_dllfase() { DropDownList ddlfase = new DropDownList(); foreach (GridViewRow gvr in GVCultivo.Rows) { ddlfase = ((DropDownList)gvr.FindControl("DDLFaseFenoligia")); } DB_EXT_Fenologia nd = new DB_EXT_Fenologia(); List <EXT_Fenologia> ListaF = nd.DB_GET_FASES_FENOLOGICAS(LblPrograma.Text); ddlfase.DataSource = ListaF; ddlfase.DataValueField = "Id_Fenologia"; ddlfase.DataTextField = "Nom_Fenologia"; ddlfase.DataBind(); }
protected void GVDesignado_RowCommand(object sender, GridViewCommandEventArgs e) { string tipo = Convert.ToString(e.CommandName); int rowIndex = Convert.ToInt32(e.CommandArgument); GVDesignado.Columns[5].Visible = true; GVDesignado.Columns[4].Visible = true; Llenar_GVDESIGNADO(); Session.Add("IdInsProd", GVDesignado.Rows[rowIndex].Cells[5].Text); Session.Add("Etapa", GVDesignado.Rows[rowIndex].Cells[3].Text); Session.Add("Id_Etapa", GVDesignado.Rows[rowIndex].Cells[12].Text);//**LR Session.Add("Estado", GVDesignado.Rows[rowIndex].Cells[4].Text); switch (tipo) { case "Parcela": //if (GVDesignado.Rows[rowIndex].Cells[3].Text != "DISTRIBUCION_SEMILLA")//**LR //{ Response.Redirect("frmListaSeguimiento.aspx"); //} //else //{ // LblMsj.Text = "Tiene que realizar el seguimiento a la distribución de semilla, antes de verificar la siembra."; //} break; case "Semilla": Response.Redirect("frmListaDistribSemilla.aspx"); break; case "Agroquimico": Response.Redirect("frmListaDistribAgroquimico.aspx"); break; case "Rendimiento": DB_EXT_Fenologia nd = new DB_EXT_Fenologia(); List <EXT_Fenologia> ListaF = new List <EXT_Fenologia>(); Response.Redirect("frmListaRendimiento.aspx"); break; case "Costos": Response.Redirect("frmListaCostos.aspx"); break; } GVDesignado.Columns[5].Visible = false; GVDesignado.Columns[4].Visible = false; Llenar_GVDESIGNADO(); }
protected void GVCultivo_Load(object sender, EventArgs e) { if (!IsPostBack) { DropDownList ddlfase = new DropDownList(); foreach (GridViewRow gvr in GVCultivo.Rows) { ddlfase = ((DropDownList)gvr.FindControl("DDLFaseFenoligia")); } DB_EXT_Fenologia nd = new DB_EXT_Fenologia(); List <EXT_Fenologia> ListaF = nd.DB_GET_FASES_FENOLOGICAS(LblPrograma.Text); ddlfase.DataSource = ListaF; ddlfase.DataValueField = "Id_Fenologia"; ddlfase.DataTextField = "Nom_Fenologia"; ddlfase.DataBind(); } }
protected void BtnEnviarSeg_Click(object sender, EventArgs e) { /**************************************************** VALIDAR QUE SOLAMENTE SE ENVIE SI TIENE TODAS LAS ORGANIZACIONES DE LA REGIONAL ***/ DB_EXT_Fenologia index = new DB_EXT_Fenologia(); EXT_FaseFenEnvioSem ffsem = new EXT_FaseFenEnvioSem(); EXT_FaseFenEnvioSemanaTrigo ffsTrigo = new EXT_FaseFenEnvioSemanaTrigo(); DB_AP_Registro_Org aux = new DB_AP_Registro_Org(); ffsem.Id_Campanhia = Convert.ToInt32(DDLCamp.SelectedValue); ffsem.Id_Regional = Convert.ToInt32(LblIdReg.Text); ffsem.Programa = DDLProg.SelectedValue; ffsem.Fecha_Envio = DateTime.Now; ffsem.Estado = "ENVIADO"; ffsem.Fecha_Semana = Convert.ToDateTime(DDLSemanaEnvio.SelectedValue); index.DB_Registrar_FACE_FENOLOGICA_SEMANAL(ffsem); int valor = Convert.ToInt32(aux.DB_MaxId("EXT_FASE_FEN_ENVIO_SEM", "Id_Envio_FenologiaSemanal")); /***********************************/ ffsTrigo.Id_Envio_FenologiaSemanal = valor; ffsTrigo.Num_Prod_Vigente = Convert.ToInt32(LblTotNumBenef.Text); ffsTrigo.Sup_Sembrada = Convert.ToDecimal(LblTotSupSem.Text); ffsTrigo.Avance_Siembra = Convert.ToDecimal(LblTotAvSiem.Text); ffsTrigo.Germinacion = Convert.ToDecimal(LblTotGerm.Text); ffsTrigo.Plantula = Convert.ToDecimal(LblTotPlant.Text); ffsTrigo.Macollamiento = Convert.ToDecimal(LblTotMacolla.Text); ffsTrigo.Embuche = Convert.ToDecimal(LblTotEmbu.Text); ffsTrigo.Espigazon = Convert.ToDecimal(LblTotEspi.Text); ffsTrigo.Floracion = Convert.ToDecimal(LblTotFlora.Text); ffsTrigo.Llenado_Grano = Convert.ToDecimal(LblTotLlenGran.Text); ffsTrigo.Maduracion = Convert.ToDecimal(LblTotMadura.Text); ffsTrigo.Avance_cosecha = Convert.ToDecimal(LblTotAvCos.Text); ffsTrigo.Rendimiento = Convert.ToDecimal(LblTotRend.Text); index.DB_Registrar_FACE_FENOLOGICA_SEMANAL_ENVIO_TRIGO(ffsTrigo); int i = 0; GVDetalleFenologiaTrigo.Columns[0].Visible = true; Desplegar_GRILLA(); foreach (GridViewRow dgi in GVDetalleFenologiaTrigo.Rows) { index.DB_Indexar_FACE_FENOLOGICA_SEMANAL(valor, Convert.ToInt32(GVDetalleFenologiaTrigo.Rows[i].Cells[0].Text)); i++; } GVDetalleFenologiaTrigo.Columns[0].Visible = false; Desplegar_GRILLA(); Desplegar_GRILLA_ENVIADOS(); }
private void Desplegar_GRILLA() { DB_EXT_Fenologia fendetalle = new DB_EXT_Fenologia(); switch (DDLProg.SelectedValue) { case "TRIGO": GVDetalleFenologiaTrigo.Visible = true; GVDetalleFenologiaTrigo.DataSource = fendetalle.DB_Reporte_FENOLOGIA_DETALLE(0, DDLProg.SelectedValue, Convert.ToInt32(DDLCamp.SelectedValue), Convert.ToInt32(LblIdReg.Text), 0, "", Convert.ToDateTime(DDLSemanaEnvio.SelectedItem.Text), "FENOLOGIA_TRIGO"); GVDetalleFenologiaTrigo.DataBind(); if (GVDetalleFenologiaTrigo.Rows.Count > 0) { Promedios_Totales(); } break; //case "MAIZ": // if (LblIdInsOrg.Text == "Total") // { // GVDetalleFenologiaMaiz.Visible = true; // GVDetalleFenologiaMaiz.DataSource = fendetalle.DB_Reporte_FENOLOGIA_DETALLE(0, LblPrograma.Text, Convert.ToInt32(LblIdCamp.Text), Convert.ToInt32(LblIdReg.Text), Convert.ToInt32(LblNumSegCult.Text), "", "FENOLOGIA_MAIZ"); // GVDetalleFenologiaMaiz.DataBind(); // } // else // { // GVDetalleFenologiaMaiz.Visible = true; // GVDetalleFenologiaMaiz.DataSource = fendetalle.DB_Reporte_FENOLOGIA_DETALLE(Convert.ToInt32(LblIdInsOrg.Text), LblPrograma.Text, Convert.ToInt32(LblIdCamp.Text), Convert.ToInt32(LblIdReg.Text), Convert.ToInt32(LblNumSegCult.Text), "", "DETALLE_FENOLOGIA_MAIZ"); // GVDetalleFenologiaMaiz.DataBind(); // } // break; //case "ARROZ": // if (LblIdInsOrg.Text == "Total") // { // GVDetalleFenologiaArroz.Visible = true; // GVDetalleFenologiaArroz.DataSource = fendetalle.DB_Reporte_FENOLOGIA_DETALLE(0, LblPrograma.Text, Convert.ToInt32(LblIdCamp.Text), Convert.ToInt32(LblIdReg.Text), Convert.ToInt32(LblNumSegCult.Text), "", "FENOLOGIA_ARROZ"); // GVDetalleFenologiaArroz.DataBind(); // } // else // { // GVDetalleFenologiaArroz.Visible = true; // GVDetalleFenologiaArroz.DataSource = fendetalle.DB_Reporte_FENOLOGIA_DETALLE(Convert.ToInt32(LblIdInsOrg.Text), LblPrograma.Text, Convert.ToInt32(LblIdCamp.Text), Convert.ToInt32(LblIdReg.Text), Convert.ToInt32(LblNumSegCult.Text), "", "DETALLE_FENOLOGIA_ARROZ"); // GVDetalleFenologiaArroz.DataBind(); // } // break; } }
private void Llenar_DDLFECHAENVIA() { DB_EXT_Fenologia fendetalle = new DB_EXT_Fenologia(); DataTable dt = new DataTable(); dt = fendetalle.DB_Reporte_FENOLOGIA_DETALLE(0, DDLProg.SelectedValue, Convert.ToInt32(DDLCamp.SelectedValue), Convert.ToInt32(LblIdReg.Text), 0, "", DateTime.Now, "FENOLOGIA_POR_FECHA"); if (dt.Rows.Count > 0) { DDLSemanaEnvio.DataSource = dt; DDLSemanaEnvio.DataValueField = "Fecha_Semana_Envio"; DDLSemanaEnvio.DataTextField = "Fecha_Semana_Envio"; DDLSemanaEnvio.DataBind(); } else { DDLSemanaEnvio.Items.Insert(0, new ListItem(DateTime.Now.ToString("dd/MM/yyyy"), "Fecha_Semana_Envio")); } }
protected void GVFenologias_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { DataTable dt = new DataTable(); DB_EXT_Fenologia tot = new DB_EXT_Fenologia(); int Idreg = Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "Id_Regional")); dt = tot.DB_Reporte_FENOLOGIA_DETALLE(0, DDLProg.SelectedValue, 0, Idreg, 0, DDLCamp.SelectedItem.Text, DateTime.Now, "TOTALES"); if (dt.Rows[0][0].ToString() != "") { ((Label)e.Row.FindControl("blNumBoletas")).Text = dt.Rows[0][0].ToString(); ((Label)e.Row.FindControl("LblProdVig")).Text = dt.Rows[0][1].ToString(); ((Label)e.Row.FindControl("LblSupAct")).Text = dt.Rows[0][2].ToString(); } else { ((Label)e.Row.FindControl("blNumBoletas")).Text = "0"; ((Label)e.Row.FindControl("LblProdVig")).Text = "0"; ((Label)e.Row.FindControl("LblSupAct")).Text = "0"; } } }
private void Datos_Org_ENCABEZADO() { DB_AP_Registro_Org d_org = new DB_AP_Registro_Org(); DataTable dt = new DataTable(); dt = d_org.DB_Desplegar_ENCABEZADO_ORG(Convert.ToInt32(LblIdInsOrg.Text)); LblOrg.Text = dt.Rows[0][2].ToString(); LblIdCamp.Text = dt.Rows[0][5].ToString(); LblProg.Text = dt.Rows[0][9].ToString(); LblIdReg.Text = dt.Rows[0][7].ToString(); DB_AP_Productor p = new DB_AP_Productor(); dt = p.DB_Seleccionar_ENCABEZADO_PROD(LblIdInsProd.Text, "DATS_PROD"); LblProductor.Text = dt.Rows[0][0].ToString() + " " + dt.Rows[0][1].ToString() + " " + dt.Rows[0][2].ToString(); /***********************************************************/ DB_EXT_Fenologia numBol = new DB_EXT_Fenologia(); dt = numBol.DB_Datos_SIEMBRA(Convert.ToInt32(LblIdInsOrg.Text), "ARROZ", "VARIEDADES"); if (dt.Rows.Count > 0) { LblVariedad.Text = dt.Rows[0][0].ToString(); } }
protected void GVOrgSup_RowDataBound(object sender, GridViewRowEventArgs e) { DB_EXT_Rendimiento rend = new DB_EXT_Rendimiento(); DB_EXT_Fenologia numBol = new DB_EXT_Fenologia(); DataTable dt = new DataTable(); decimal rendi = 0; decimal supe = 0; if (e.Row.RowType == DataControlRowType.DataRow) { int id = Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "Id_InscripcionOrg")); dt = rend.DB_Reporte_DETALLE_PLANILLA(id, "", "", "RENDIMIENTO_PROMEDIO"); rendi = Convert.ToDecimal(dt.Rows[0][0].ToString()); //dt = numBol.DB_Datos_FACE_FENOLOGICA(id, Convert.ToInt32(DDLCamp.SelectedValue), 34, Convert.ToInt32(DDLRegional.SelectedValue), "TRIGO", "Avance", 1, DateTime.Now, "RENDIMIENTO"); dt = numBol.DB_Datos_FACE_FENOLOGICA(id, Convert.ToInt32(DDLCamp.SelectedValue), 34, Convert.ToInt32(DDLRegional.SelectedValue), "TRIGO", "Avance", 1, DateTime.Now, "PORCENTAGE_COSECHA"); supe = Convert.ToDecimal(dt.Rows[0][0].ToString()); decimal valor = (((rendi * Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "SumaHas"))) * supe) / 100); ((Label)e.Row.FindControl("LblSupCos")).Text = supe.ToString(); ((Label)e.Row.FindControl("LblFanegasEstim")).Text = valor.ToString(); switch (DDLUnidades.SelectedValue) { case "1": //GVOrgSup.Columns[4].HeaderText = DDLUnidades.SelectedItem.Text; break; case "2": // ((TextBox)e.Row.FindControl("TxtObjetivo")).Text = (((rendi * Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "SumaHas"))) * supe) / 100).ToString(); break; case "3": //((TextBox)e.Row.FindControl("TxtObjetivo")).Text = (((rendi * Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "SumaHas"))) * supe) / 100).ToString(); break; } // ((DropDownList)e.Row.FindControl("DDLZona")).Items.Insert(0, new ListItem(zona, zona, true)); //if (tramo == "Salida") //{ // ((DropDownList)e.Row.FindControl("DDLZona")).Items.Insert(0, new ListItem(zona, zona, true)); // ((DropDownList)e.Row.FindControl("DDLZona")).DataBind(); // ((DropDownList)e.Row.FindControl("DDLDestino")).Items.Insert(0, new ListItem(destino, destino, true)); // ((DropDownList)e.Row.FindControl("DDLDestino")).DataBind(); // ((TextBox)e.Row.FindControl("TxtObjetivo")).Text = objetivo; // ((TextBox)e.Row.FindControl("TxtFecha")).Text = fecha; // ((DropDownList)e.Row.FindControl("DDLHora")).Items.Insert(0, new ListItem(hora, hora, true)); // ((DropDownList)e.Row.FindControl("DDLMinuto")).Items.Insert(0, new ListItem(min, min, true)); //} //else //{ // ((DropDownList)e.Row.FindControl("DDLZona")).Items.Insert(0, new ListItem(zona, zona, true)); // ((DropDownList)e.Row.FindControl("DDLZona")).DataBind(); // ((DropDownList)e.Row.FindControl("DDLZona")).Enabled = false; // ((DropDownList)e.Row.FindControl("DDLDestino")).Items.Insert(0, new ListItem(destino, destino, true)); // ((DropDownList)e.Row.FindControl("DDLDestino")).DataBind(); // ((DropDownList)e.Row.FindControl("DDLDestino")).Enabled = false; // ((TextBox)e.Row.FindControl("TxtObjetivo")).Enabled = fal10se; // ((TextBox)e.Row.FindControl("TxtFecha")).Text = fecha; // ((DropDownList)e.Row.FindControl("DDLHora")).Items.Insert(0, new ListItem(hora, hora, true)); // ((DropDownList)e.Row.FindControl("DDLMinuto")).Items.Insert(0, new ListItem(min, min, true)); //} } }
protected void Registrar_ETAPA_FENOLOGICA() { DB_AP_Registro_Org aux = new DB_AP_Registro_Org(); DB_EXT_Fenologia regfen = new DB_EXT_Fenologia(); EXT_FaceFenologicaCultivo fenCultivo = new EXT_FaceFenologicaCultivo(); EXT_FaceFenologiaMaiz fenMaiz = new EXT_FaceFenologiaMaiz(); fenCultivo.Id_Campanhia = Convert.ToInt32(LblIdCamp.Text); fenCultivo.Id_Regional = Convert.ToInt32(LblIdReg.Text); fenCultivo.Id_InscripcionOrg = Convert.ToInt32(LblIdInsOrg.Text); fenCultivo.Id_Usuario = LblIdUsuario.Text; fenCultivo.Programa = LblProg.Text; fenCultivo.Fecha_Registro = DateTime.Now; fenCultivo.Num_Boletas_Inspec = Convert.ToInt32(TxtNumBoletas.Text); fenCultivo.Charla_Tecnica = DDLHuboCharla.SelectedValue; fenCultivo.Num_Prod_Vigentes = Convert.ToInt32(TxtNumBenefVig.Text); fenCultivo.Sup_Actual = Convert.ToDecimal(TxtSupAct.Text); fenCultivo.Variedad_Semilla = TxtVariedadSem.Text; fenCultivo.Observacion = TxtObserv.Text; fenCultivo.Num_Seg_Cultivo = Convert.ToInt32(LblNumSeg.Text); regfen.DB_Registrar_FACE_FENOLOGICA_CULTIVO(fenCultivo); /*************************************** RESGISTRO FENOLOGIA PROGRAMA MAIZ MUESTRA ********************************************/ fenMaiz.Id_Face_Feonologica = Convert.ToInt32(aux.DB_MaxId("EXT_FACE_FENOLOGICA_CULTIVO", "Id_Face_Feonologica"));; fenMaiz.FechaAvnSiemIni = LblFIniSiem.Text; fenMaiz.FechaAvnSiemFin = LblFFinSiem.Text; fenMaiz.FechaAvnSiemAvan = Convert.ToDecimal(LblAvnSiem.Text); fenMaiz.Emergencia5dias = Convert.ToDecimal(LblEmerg.Text); fenMaiz.HojasDesplegadas1y2 = Convert.ToDecimal(Lbl1y2Hojas.Text); fenMaiz.HojasDesplegadas3y4 = Convert.ToDecimal(Lbl3y4Hojas.Text); fenMaiz.HojasDesplegadas5y6 = Convert.ToDecimal(Lbl5y6Hojas.Text); fenMaiz.HojasDesplegadas7y8 = Convert.ToDecimal(Lbl7y8Hojas.Text); fenMaiz.HojasDesplegadas9y10 = Convert.ToDecimal(Lbl9y10Hojas.Text); fenMaiz.HojasDesplegadas11oMas = Convert.ToDecimal(Lbl11oMasHojas.Text); fenMaiz.FloracionyPolinizacion = Convert.ToDecimal(LblFloracion.Text); fenMaiz.EstigmasVisiblesyAmpolla = Convert.ToDecimal(LblEstigmas.Text); fenMaiz.GranoLechosoyMasoso = Convert.ToDecimal(LblGranoLechoso.Text); fenMaiz.EtapaDentadayMadurez = Convert.ToDecimal(LblDentadayMadurez.Text); fenMaiz.CosechaAcopioAvan = Convert.ToDecimal(LblCosAco1.Text); fenMaiz.CosechaAcopioRend = Convert.ToDecimal(LblCosAco2.Text); fenMaiz.FechaCosechaIni = LblFcosechaIni.Text; fenMaiz.FechaCosechaFin = LblFcosechaFin.Text; fenMaiz.Tipo = "MUESTRA"; fenMaiz.SupSem = Convert.ToDecimal(LblSupSem.Text); regfen.DB_Registrar_FACE_FENOLOGICA_MAIZ(fenMaiz); /*************************************** RESGISTRO FENOLOGIA PROGRAMA MAIZ GLOBAL ********************************************/ fenMaiz.Id_Face_Feonologica = Convert.ToInt32(aux.DB_MaxId("EXT_FACE_FENOLOGICA_CULTIVO", "Id_Face_Feonologica"));; fenMaiz.FechaAvnSiemIni = TxtFIniSiem.Text; fenMaiz.FechaAvnSiemFin = TxtFFinSiem.Text; fenMaiz.FechaAvnSiemAvan = Convert.ToDecimal(TxtAvnSiem.Text); fenMaiz.Emergencia5dias = Convert.ToDecimal(TxtEmerg.Text); fenMaiz.HojasDesplegadas1y2 = Convert.ToDecimal(Txt1y2Hojas.Text); fenMaiz.HojasDesplegadas3y4 = Convert.ToDecimal(Txt3y4Hojas.Text); fenMaiz.HojasDesplegadas5y6 = Convert.ToDecimal(Txt5y6Hojas.Text); fenMaiz.HojasDesplegadas7y8 = Convert.ToDecimal(Txt7y8Hojas.Text); fenMaiz.HojasDesplegadas9y10 = Convert.ToDecimal(Txt9y10Hojas.Text); fenMaiz.HojasDesplegadas11oMas = Convert.ToDecimal(Txt11oMasHojas.Text); fenMaiz.FloracionyPolinizacion = Convert.ToDecimal(TxtFloracion.Text); fenMaiz.EstigmasVisiblesyAmpolla = Convert.ToDecimal(TxtEstigmas.Text); fenMaiz.GranoLechosoyMasoso = Convert.ToDecimal(TxtGranoLechoso.Text); fenMaiz.EtapaDentadayMadurez = Convert.ToDecimal(TxtDentadayMadurez.Text); fenMaiz.CosechaAcopioAvan = Convert.ToDecimal(TxtCosAco1.Text); fenMaiz.CosechaAcopioRend = Convert.ToDecimal(TxtCosAco2.Text); fenMaiz.FechaCosechaIni = TxtFcosechaIni.Text; fenMaiz.FechaCosechaFin = TxtFcosechaFin.Text; fenMaiz.Tipo = "GLOBAL"; fenMaiz.SupSem = Convert.ToDecimal(TxtSupSem.Text); regfen.DB_Registrar_FACE_FENOLOGICA_MAIZ(fenMaiz); }
private void Datos_CULTIVO() { DB_EXT_Fenologia numBol = new DB_EXT_Fenologia(); DataTable dt = new DataTable(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 0, Convert.ToInt32(LblIdReg.Text), "MAIZ", "", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "NUM_BOLETAS"); TxtNumBoletas.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 11, Convert.ToInt32(LblIdReg.Text), "MAIZ", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "AVANCE_SIEMBRA"); LblAvnSiem.Text = dt.Rows[0][0].ToString(); LblSupSem.Text = Convert.ToString(Math.Round(((Convert.ToDecimal(LblAvnSiem.Text) * Convert.ToDecimal(TxtSupApo.Text)) / 100), 2)); dt = numBol.DB_Datos_SIEMBRA(Convert.ToInt32(LblIdInsOrg.Text), "MAIZ", "VARIEDADES"); if (dt.Rows.Count > 0) { TxtVariedadSem.Text = dt.Rows[0][0].ToString(); } dt = numBol.DB_Datos_SIEMBRA(Convert.ToInt32(LblIdInsOrg.Text), "MAIZ", "FECHAMAXMIN"); if (dt.Rows.Count > 0) { LblFIniSiem.Text = dt.Rows[0][0].ToString(); LblFFinSiem.Text = dt.Rows[0][1].ToString(); } dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 12, Convert.ToInt32(LblIdReg.Text), "MAIZ", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblEmerg.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 13, Convert.ToInt32(LblIdReg.Text), "MAIZ", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); Lbl1y2Hojas.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 14, Convert.ToInt32(LblIdReg.Text), "MAIZ", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); Lbl3y4Hojas.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 15, Convert.ToInt32(LblIdReg.Text), "MAIZ", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); Lbl5y6Hojas.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 16, Convert.ToInt32(LblIdReg.Text), "MAIZ", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); Lbl7y8Hojas.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 17, Convert.ToInt32(LblIdReg.Text), "MAIZ", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); Lbl9y10Hojas.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 18, Convert.ToInt32(LblIdReg.Text), "MAIZ", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); Lbl11oMasHojas.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 19, Convert.ToInt32(LblIdReg.Text), "MAIZ", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblFloracion.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 20, Convert.ToInt32(LblIdReg.Text), "MAIZ", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblEstigmas.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 21, Convert.ToInt32(LblIdReg.Text), "MAIZ", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblGranoLechoso.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 22, Convert.ToInt32(LblIdReg.Text), "MAIZ", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblDentadayMadurez.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 23, Convert.ToInt32(LblIdReg.Text), "MAIZ", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblCosAco1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 23, Convert.ToInt32(LblIdReg.Text), "MAIZ", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "RENDIMIENTO"); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 9, Convert.ToInt32(LblIdReg.Text), "ARROZ", "Avance", 0, "RENDIMIENTO"); LblCosAco2.Text = dt.Rows[0][0].ToString(); /******************************** FALTA EL RENDIMIENTO ********************************** * * dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text),35, Convert.ToInt32(LblIdReg.Text),"TRIGO", "Inicial", 1, "FECHAACOPIO"); * TxtFcosechaIni.Text = dt.Rows[0][0].ToString(); * * dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text),35, Convert.ToInt32(LblIdReg.Text),"TRIGO", "Final", 1, "FECHAACOPIO"); * TxtFcosechaFin.Text = dt.Rows[0][0].ToString();*/ }
private void Datos_CULTIVO() { DB_EXT_Fenologia numBol = new DB_EXT_Fenologia(); DataTable dt = new DataTable(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 0, Convert.ToInt32(LblIdReg.Text), "TRIGO", "", 1, DateTime.Now, "NUM_BOLETAS"); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 0, Convert.ToInt32(LblIdReg.Text), "ARROZ", "", 0, "NUM_BOLETAS"); TxtNumBoletas.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 25, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Avance", 1, DateTime.Now, "AVANCE_SIEMBRA"); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 1, Convert.ToInt32(LblIdReg.Text), "ARROZ", "Avance", 0, "AVANCE_SIEMBRA"); LblAvnSiem.Text = dt.Rows[0][0].ToString(); LblSupSem.Text = Convert.ToString(Math.Round(((Convert.ToDecimal(LblAvnSiem.Text) * Convert.ToDecimal(TxtSupApo.Text)) / 100), 2)); dt = numBol.DB_Datos_SIEMBRA(Convert.ToInt32(LblIdInsOrg.Text), "TRIGO", "VARIEDADES"); if (dt.Rows.Count > 0) { TxtVariedadSem.Text = dt.Rows[0][0].ToString(); } dt = numBol.DB_Datos_SIEMBRA(Convert.ToInt32(LblIdInsOrg.Text), "TRIGO", "FECHAMAXMIN"); if (dt.Rows.Count > 0) { LblFIniSiem.Text = dt.Rows[0][0].ToString(); LblFFinSiem.Text = dt.Rows[0][1].ToString(); } dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 26, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblGer1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 26, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblGer2.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 27, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblPlant1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 27, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblPlant2.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 28, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblMacolla1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 28, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblMacolla2.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 29, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblEmbu1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 29, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblEmbu2.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 30, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblEspi1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 30, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblEspi2.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 31, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblFlora1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 31, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblFlora2.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 32, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblGrano1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 32, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblGrano2.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 33, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblMadura1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 33, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblMadura2.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 34, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE"); LblCosAco1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 34, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "RENDIMIENTO"); LblCosAco2.Text = dt.Rows[0][0].ToString(); //******************************** FALTA FECHAS **********************************/ ////dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), 35, "ARROZ", "Inicial", Convert.ToInt32(LblNumSeg.Text), "FECHAACOPIO"); ////TxtFcosechaIni.Text = dt.Rows[0][0].ToString(); ////dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), 35, "ARROZ", "Final", Convert.ToInt32(LblNumSeg.Text), "FECHAACOPIO"); ////TxtFcosechaFin.Text = dt.Rows[0][0].ToString(); //DB_EXT_Fenologia numBol = new DB_EXT_Fenologia(); //DataTable dt = new DataTable(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 0, Convert.ToInt32(LblIdReg.Text), "TRIGO", "", Convert.ToInt32(LblNumSeg.Text), "NUM_BOLETAS"); //TxtNumBoletas.Text = dt.Rows[0][0].ToString(); ////dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 0, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Avance", Convert.ToInt32(LblNumSeg.Text), "AVANCE_SIEMBRA"); ////TxtAvnSiem.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 1, Convert.ToInt32(LblIdReg.Text), "ARROZ", "Avance", 1, "AVANCE_SIEMBRA"); ////dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 1, Convert.ToInt32(LblIdReg.Text), "ARROZ", "Avance", 0, "AVANCE_SIEMBRA"); //LblAvnSiem.Text = dt.Rows[0][0].ToString(); //LblSupSem.Text = Convert.ToString(Math.Round(((Convert.ToDecimal(LblAvnSiem.Text) * Convert.ToDecimal(TxtSupApo.Text)) / 100), 2)); //dt = numBol.DB_Datos_SIEMBRA(Convert.ToInt32(LblIdInsOrg.Text), "TRIGO", "VARIEDADES"); //if (dt.Rows.Count > 0) //{ // TxtVariedadSem.Text = dt.Rows[0][0].ToString(); //} //dt = numBol.DB_Datos_SIEMBRA(Convert.ToInt32(LblIdInsOrg.Text), "TRIGO", "FECHAMAXMIN"); //if (dt.Rows.Count > 0) //{ // TxtFIniSiem.Text = dt.Rows[0][0].ToString(); // TxtFFinSiem.Text = dt.Rows[0][1].ToString(); //} //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 26, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtGer1.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 26, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtGer2.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 27, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtPlant1.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 27, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtPlant2.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 28, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtMacolla1.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 28, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtMacolla2.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 29, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtEmbu1.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 29, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtEmbu2.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 30, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtEspi1.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 30, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtEspi2.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 31, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtFlora1.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 31, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtFlora2.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 32, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtGrano1.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 32, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtGrano2.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 33, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtMadura1.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 33, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtMadura2.Text = dt.Rows[0][0].ToString(); //dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 34, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Avance", Convert.ToInt32(LblNumSeg.Text), "PORCENTAGE"); //TxtCosAco1.Text = dt.Rows[0][0].ToString(); /////******************************** FALTA EL RENDIMIENTO **********************************/ ////dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), 35, "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), "FECHAACOPIO"); ////TxtFcosechaIni.Text = dt.Rows[0][0].ToString(); ////dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), 35, "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), "FECHAACOPIO"); ////TxtFcosechaFin.Text = dt.Rows[0][0].ToString(); }
private DataTable Busqueda_FENOLOGIA(int idfenologia, string programa, string etapa, string parametro) { DB_EXT_Fenologia numBol = new DB_EXT_Fenologia(); return(numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), idfenologia, Convert.ToInt32(LblIdReg.Text), programa, etapa, Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), parametro)); }
private void Datos_CULTIVO() { DB_EXT_Fenologia numBol = new DB_EXT_Fenologia(); DataTable dt = new DataTable(); dt = numBol.DB_Datos_SIEMBRA(Convert.ToInt32(LblIdInsOrg.Text), "TRIGO", "VARIEDADES"); if (dt.Rows.Count > 0) { TxtVariedadSem.Text = dt.Rows[0][0].ToString(); } dt = numBol.DB_Datos_SIEMBRA(Convert.ToInt32(LblIdInsOrg.Text), "TRIGO", "FECHAMAXMIN"); if (dt.Rows.Count > 0) { LblFIniSiem.Text = dt.Rows[0][0].ToString(); LblFFinSiem.Text = dt.Rows[0][1].ToString(); } dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 0, Convert.ToInt32(LblIdReg.Text), "TRIGO", "", 1, DateTime.Now, "NUM_BOLETAS_FISICAS"); TxtBoletasFisicas.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 0, Convert.ToInt32(LblIdReg.Text), "TRIGO", "", 1, DateTime.Now, "NUM_BOLETAS_MONITOREO"); TxtBoletasMonitoreo.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 25, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Avance", 1, DateTime.Now, "AVANCE_SIEMBRA"); LblAvnSiem.Text = dt.Rows[0][0].ToString(); LblSupSem.Text = Convert.ToString(Math.Round(((Convert.ToDecimal(LblAvnSiem.Text) * Convert.ToDecimal(TxtSupApo.Text)) / 100), 2)); LblFechaAUX.Text = TxtFechaIni.Text; do { dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 26, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(LblFechaAUX.Text), "PORCENTAGE"); LblGer1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 27, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(LblFechaAUX.Text), "PORCENTAGE"); LblPlant1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 28, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(LblFechaAUX.Text), "PORCENTAGE"); LblMacolla1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 29, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(LblFechaAUX.Text), "PORCENTAGE"); LblEmbu1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 30, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(LblFechaAUX.Text), "PORCENTAGE"); LblEspi1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 31, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(LblFechaAUX.Text), "PORCENTAGE"); LblFlora1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 32, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(LblFechaAUX.Text), "PORCENTAGE"); LblGrano1.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 33, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(LblFechaAUX.Text), "PORCENTAGE"); LblMadura1.Text = dt.Rows[0][0].ToString(); LblSuma.Text = (Convert.ToDecimal(LblGer1.Text) + Convert.ToDecimal(LblPlant1.Text) + Convert.ToDecimal(LblMacolla1.Text) + Convert.ToDecimal(LblEmbu1.Text) + Convert.ToDecimal(LblEspi1.Text) + Convert.ToDecimal(LblFlora1.Text) + Convert.ToDecimal(LblGrano1.Text) + Convert.ToDecimal(LblMadura1.Text)).ToString(); if (Convert.ToDateTime(LblFechaAUX.Text) <= Convert.ToDateTime(LblFIniSiem.Text)) { break; } LblFechaAUX.Text = (Convert.ToDateTime(LblFechaAUX.Text)).AddDays(-7).ToString("dd/MM/yyyy"); }while (Convert.ToDecimal(LblSuma.Text) <= 0); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 34, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "PORCENTAGE_COSECHA"); LblCosAco1.Text = dt.Rows[0][0].ToString(); LblMadura1.Text = (Convert.ToDecimal(LblMadura1.Text) - Convert.ToDecimal(LblCosAco1.Text)).ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 34, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Avance", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "RENDIMIENTO"); LblCosAco2.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 35, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Inicial", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "FECHAACOPIO"); LblFcosechaIni.Text = dt.Rows[0][0].ToString(); dt = numBol.DB_Datos_FACE_FENOLOGICA(Convert.ToInt32(LblIdInsOrg.Text), Convert.ToInt32(LblIdCamp.Text), 35, Convert.ToInt32(LblIdReg.Text), "TRIGO", "Final", Convert.ToInt32(LblNumSeg.Text), Convert.ToDateTime(TxtFechaIni.Text), "FECHAACOPIO"); LblFcosechaFin.Text = dt.Rows[0][0].ToString(); }