コード例 #1
0
 protected void GVINSPROPERINSORG_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     try
     {
         TSHAK.Components.SecureQueryString querystringSeguro;
         querystringSeguro = new TSHAK.Components.SecureQueryString(new Byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 8 });
         querystringSeguro["id_campanhia"] = this.HiddenFieldCampanhia.Value;
         querystringSeguro["id_Org"]       = this.HiddenFieldInsOrg.Value;
         int index = Convert.ToInt32(e.CommandArgument);
         //// Retrieve the row that contains the button clicked
         //// by the user from the Rows collection.
         GridViewRow row = GVINSPROPERINSORG.Rows[index];
         querystringSeguro["id_Prod"] = Convert.ToString(GVINSPROPERINSORG.DataKeys[index].Values[0]);//extre el ID incripcion_PROD
         try
         {
             if (e.CommandName == "Ir")
             {
                 querystringSeguro["id_Com"] = Convert.ToString(GVINSPROPERINSORG.DataKeys[index].Values[2]);
                 Response.Redirect("frmRegistroDatosTec.aspx?data=" + HttpUtility.UrlEncode(Convert.ToString(querystringSeguro)) + "");
             }
             if (e.CommandName == "Editar")
             {
                 querystringSeguro["ci"] = Convert.ToString(GVINSPROPERINSORG.DataKeys[index].Values[1]);//extre el CI
                 Response.Redirect("frmRegistroProductorUpdate.aspx?data=" + HttpUtility.UrlEncode(Convert.ToString(querystringSeguro)) + "");
             }
         }
         catch
         {
         }
     }
     catch
     {
     }
 }
コード例 #2
0
 protected void LnkNuevo_Click(object sender, EventArgs e)
 {
     try
     {
         TSHAK.Components.SecureQueryString querystringSeguro;
         querystringSeguro = new TSHAK.Components.SecureQueryString(new Byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 8 });
         querystringSeguro["id_campanhia"] = this.HiddenFieldCampanhia.Value;
         querystringSeguro["id_Org"]       = this.HiddenFieldInsOrg.Value;
         Response.Redirect("frmRegistroProductorNew.aspx?data=" + HttpUtility.UrlEncode(Convert.ToString(querystringSeguro)) + "");
     }
     catch
     {
     }
 }
コード例 #3
0
 // Int32 id_Campanhia, id_Org;
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string urrl = Request.QueryString["data"];
         TSHAK.Components.SecureQueryString querystringSeguro;
         querystringSeguro = new TSHAK.Components.SecureQueryString(new Byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 8 }, urrl);
         ////parametros de otra formulario
         this.HiddenFieldInsOrg.Value = Convert.ToString(querystringSeguro["IdInsOrg"]);
         DB_AP_Registro_Org idCamp = new DB_AP_Registro_Org();
         this.HiddenFieldCampanhia.Value = Convert.ToString(idCamp.DB_EXTRAE_COMPANHIA_DE_AP_INCRIPCION_ORG(Convert.ToInt32(this.HiddenFieldInsOrg.Value)));
         ///////////////////
         String          SIGLA     = "";
         String          PROGRAMA  = "";
         String          CAMPANHIA = "";
         DB_AP_Campanhia cam       = new DB_AP_Campanhia();
         cam.ExtraerCapanhiaID_INORG(Convert.ToInt32(this.HiddenFieldCampanhia.Value), Convert.ToInt32(this.HiddenFieldInsOrg.Value), ref SIGLA, ref PROGRAMA, ref CAMPANHIA);
         contEncabezado21.LabelCamp = CAMPANHIA;
         contEncabezado21.LabelOrg  = SIGLA;
         contEncabezado21.LabelProg = PROGRAMA;
         ///
         INCRIPCION_PROD_PERSONA_INS_ORG(Convert.ToInt32(this.HiddenFieldCampanhia.Value), Convert.ToInt32(this.HiddenFieldInsOrg.Value), "", "", "", "");
     }
 }