コード例 #1
0
        public void AMBeneficiario_Notas(BeneficiarioNotas iParam)
        {
            ActorDatos objdao = new ActorDatos();

            try
            {
                // Creo un Objeto Windows Identity para enviarle al thread asyncronico
                //(lo necesita para poder impersonar el thread nuevo)
                WindowsIdentity mThreadIdentity = WindowsIdentity.GetCurrent();
                objdao.AMBeneficiarioNotas(iParam);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objdao.Dispose();
            }
        }
コード例 #2
0
    protected void btnGuardar_Click(object sender, EventArgs e)
    {
        Page.Validate();

        if (Page.IsValid)
        {
            try
            {
                string            mensajeEr = string.Empty;
                BeneficiarioNotas iParam    = new BeneficiarioNotas();
                iParam.Asunto = txtAsunto.Text;
                //iParam.Descripcion = txttextarea.Value;
                iParam.Descripcion     = "";
                iParam.FRecepcion      = DateTime.Parse(txtFechaRec.Text);
                iParam.Id_Beneficiario = Int64.Parse(HFIdBeneficiario.Value);
                iParam.NroNota         = txtNumNota.Text;


                InvocaWsDao.AMBeneficiario_Notas(iParam, out mensajeEr);

                if (mensajeEr.Equals(string.Empty))
                {
                    mensaje.TipoMensaje        = Mensaje.infoMensaje.Info;
                    mensaje.DescripcionMensaje = "La nota se guardó satisfactoriamente";
                    mensaje.Mostrar();
                    mensaje.QuienLLama = "OK";
                    TraeNotasXBeneficiario(Int64.Parse(HFIdBeneficiario.Value));
                    Limpiar(true);
                }
                else
                {
                    MError.MensajeError = "Ocurrió un error al guardar la nota.";
                }
            }
            catch (Exception er)
            {
                log.Error(er.Message);
                MError.MensajeError = "Ocurrió un error al guardar la nota. Revisar log para mayor detalle.";
            }
        }
    }
コード例 #3
0
    protected void rptNotas_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        RepeaterItem item = e.Item; // elemento del Repeater

        if (item.ItemType == ListItemType.AlternatingItem || item.ItemType == ListItemType.Item)
        {
            BeneficiarioNotas oNota = (BeneficiarioNotas)e.Item.DataItem;

            Label lblNNota = (Label)item.FindControl("lblNNota"); // obtenemos el control.
            lblNNota.Text = oNota.NroNota;

            Label lbFecha = (Label)item.FindControl("lbFecha"); // obtenemos el control.
            lbFecha.Text = oNota.FRecepcion.ToShortDateString();

            Label lblAsunto = (Label)item.FindControl("lblAsunto"); // obtenemos el control.
            lblAsunto.Text = oNota.Asunto;

            Label lbDescripcion = (Label)item.FindControl("lbDescripcion"); // obtenemos el control.
            lbDescripcion.Text = Util.PutBRs(oNota.Descripcion, 100);

            //Button btnImprimirNota = (Button)item.FindControl("btnImprimirNota"); // obtenemos el control.
            //ScriptManager.GetCurrent(this.Page).RegisterPostBackControl(btnImprimirNota);
        }
    }