Пример #1
0
        protected void ib_word_Click(object sender, ImageClickEventArgs e)
        {
            UpdatePanel up   = (UpdatePanel)this.Page.FindControl("up_grilla");
            Int32       tipo = Convert.ToInt32(this.dl_doc.SelectedValue);

            if (tipo > 0)
            {
                GridViewRow row;
                HyperLink   but;
                for (int i = 0; i < gr_dato.Rows.Count; i++)
                {
                    row = gr_dato.Rows[i];
                    CheckBox chk = (CheckBox)gr_dato.Rows[i].FindControl("chk");

                    but = (HyperLink)row.Cells[0].Controls[0];
                    string id_solicitud = but.Text.Trim();

                    if (chk.Checked == true)
                    {
                        crearescritura(Convert.ToInt32(id_solicitud), tipo);
                    }
                }
                //Para darle tiempo al demonio para generar las escrituras
                FuncionGlobal.Sleep(10);
                FuncionGlobal.alerta_updatepanel("Documento(s) de Garantia generado(s) con exito", this.Page, this.up_grilla);
            }
            else
            {
                FuncionGlobal.alerta_updatepanel("Debe selecionar una opcion en los *", this.Page, this.up_grilla);
            }
            busca_operacion();
            return;
        }