예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Session.Add("Legajos", null);
            CargarGrilla("");
            CargarCombos();
        }

        (UpdateProgress2.FindControl("lbltituloCarga") as Label).Text = "Cargando datos para la edición del legajo..";
    }
예제 #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            ((Label)UpdateProgress2.FindControl("lblMsg2")).Text = DateTime.Now.ToString();
            int i = 0;

            while (i < 5)
            {
                System.Threading.Thread.Sleep(1000);
                Literal1.Text = DateTime.Now.ToString();
                i++;
            }
        }
예제 #3
0
    protected void gvLegajos_ItemCommand(object source, GridCommandEventArgs e)
    {
        (UpdateProgress2.FindControl("lbltituloCarga") as Label).Text = "Actualizando datos del legajo..";

        e.Canceled           = true;
        gvLegajos.DataSource = Session["Legajos"];
        gvLegajos.DataBind();

        long id = long.Parse(gvLegajos.Items[e.Item.DataSetIndex].GetDataKeyValue("IdLegajos").ToString());

        Entidades.Legajos leg = (from E in (Session["Legajos"] as List <Entidades.Legajos>)
                                 where E.IdLegajos == id
                                 select E).First <Entidades.Legajos>();



        txtApellido.Text                = leg.Apellido;
        txtNombre.Text                  = leg.Nombre;
        txtNroDocumento.Text            = leg.NroDoc;
        txtFechaNacimiento.SelectedDate = leg.FechaNacimiento;
        txtCuil.Text         = leg.CUIL;
        txtDireccion.Text    = leg.Direccion;
        txtCodigoPostal.Text = leg.CodigoPostal;
        txtTelefono.Text     = leg.TelefonoFijo;
        txtEmail.Text        = leg.CorreoElectronico;

        if (leg.objEstadoCivil != null)
        {
            cboEstadoCivil.Items.FindItemByValue(leg.objEstadoCivil.IdClasificacion.ToString()).Selected = true;
        }

        if (leg.objTipoDocumento != null)
        {
            cboTipoDoc.Items.FindItemByValue(leg.objTipoDocumento.IdClasificacion.ToString()).Selected = true;
        }

        if (leg.objProvincia != null)
        {
            cboProvincia.Items.FindItemByValue(leg.objProvincia.IdClasificacion.ToString()).Selected = true;
        }

        if (leg.objNacionalidad != null)
        {
            cboNacionalidad.Items.FindItemByValue(leg.objNacionalidad.IdClasificacion.ToString()).Selected = true;
        }



        HiddenId.Value       = leg.IdLegajos.ToString();
        toolTipEdicion.Title = "Edición Legajo: " + leg.Apellido + ", " + leg.Nombre;
        upToolTip.Update();
    }