Beispiel #1
0
        protected void btnGuardar_Click(object sender, EventArgs e)
        {
            string    str   = "";
            DataTable table = null;

            table = ConsultasEspecificas.BuscarActividadExhorto(this.hiddidExhorto.Value.ToString(), this.tramite.SelectedValue.ToString(), this.txtFechatramite.Text);
            if ((table.Rows.Count > 0) && (table != null))
            {
                this.Page.RegisterClientScriptBlock("Mensaje", "<script>alert('Exhorto ya tiene actividad asociada');</script>");
                this.tramite.Focus();
            }
            else
            {
                Transaccion.InsertaActividadExhorto(this.hiddidExhorto.Value.ToString(), this.tramite.SelectedValue.ToString(), this.txtFechatramite.Text, this.observacion.Text);
                if ((((this.tramite.SelectedValue.ToString() == "9") || (this.tramite.SelectedValue.ToString() == "10")) || (this.tramite.SelectedValue.ToString() == "11")) || (this.tramite.SelectedValue.ToString() == "12"))
                {
                    Transaccion.UpdateExhorto(this.hiddidExhorto.Value.ToString());
                    str = "T";
                }
                string str2 = "ActividadesExhorto.aspx?Codigo=" + this.hiddidExhorto.Value.ToString() + "&status=" + str.ToString();
                this.Page.RegisterClientScriptBlock("Mensaje", "<script>alert('Operaci\x00f3n realizada correctamente');location.href='" + str2.ToString() + "';</script>");
            }
        }