Exemple #1
0
 protected void BtnRegistrar_Click(object sender, EventArgs e)
 {
     if (Convert.ToInt32(DDLFaceFenologica.SelectedValue) >= 6)
     {
         DataTable dt  = Session["datos"] as DataTable;
         DataRow   row = dt.NewRow();
         row["Valor1"] = TxtNumPanoja.Text;
         row["Valor2"] = TxtNumExpigillas.Text;
         row["Valor3"] = TxtNumEspiguillasPanojaVano.Text;
         row["Valor4"] = TxtPorcentEspiguillasLlenas.Text;
         row["Valor5"] = TxtPesoMilGranos.Text;
         row["Valor6"] = TxtPorcentHumedad.Text;
         row["Valor7"] = LblFanHect.Text;
         dt.Rows.Add(row);
         GVRendArroz.DataSource = dt;
         GVRendArroz.DataBind();
         Session["datos"]    = dt;
         BtnEnviar.Visible   = true;
         BtnCancelar.Visible = true;
         LblMsj1.Text        = string.Empty;
         BtnEnviar.Visible   = true;
         BtnCancelar.Visible = true;
         LblMsj1.Text        = string.Empty;
     }
     else
     {
         LblMsj1.Text = "Para un rendimiento adecuado, debe definir la fenología desde la Floración del cultivo.";
     }
 }
Exemple #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!IsPostBack)
         {
             LblIdInsOrg.Text  = Session["IdInsOrg"].ToString();
             LblIdInsProd.Text = Session["IdInsProd"].ToString();
             LblIdUsuario.Text = Session["IdUser"].ToString();
             Datos_Org_ENCABEZADO();
             Cargar_COMBO();
             /*************************************/
             DataTable dtListaPartida = new DataTable();
             dtListaPartida.Columns.AddRange(new DataColumn[7] {
                 new DataColumn("Valor1"), new DataColumn("Valor2"), new DataColumn("Valor3"), new DataColumn("Valor4"), new DataColumn("Valor5"), new DataColumn("Valor6"), new DataColumn("Valor7")
             });
             GVRendArroz.DataSource = dtListaPartida;
             GVRendArroz.DataBind();
             Session["datos"] = dtListaPartida;
         }
     }
     catch
     {
         Response.Redirect("~/About.aspx");
     }
 }