Beispiel #1
0
        private void bt_solicitarJustificacion_Click(object sender, EventArgs e)
        {
            Frm_Filtro             fil = new Frm_Filtro();
            Frm_Reg_Justiificacion per = new Frm_Reg_Justiificacion();

            if (lsv_person.SelectedIndices.Count == 0)
            {
                fil.Show();
                MessageBox.Show("seleccione el personal por favor", "Advertencia de Seguridad", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                fil.Hide();
            }
            else
            {
                var    lsv      = lsv_person.SelectedItems[0];
                string xidsocio = lsv.SubItems[0].Text;
                string xnombre  = lsv.SubItems[2].Text;
                fil.Show();
                per.xedit = false;
                per.txt_IdPersona.Text  = xidsocio;
                per.txt_nompersona.Text = xnombre;
                per.txt_idjusti.Text    = RN_Utilitario.RN_NroDoc(4);
                per.ShowDialog();
                fil.Hide();

                if (Convert.ToString(per.Tag) == "")
                {
                    return;
                }
                {
                    Cargar_Todas_Justificaciones();
                    elTab1.SelectedTabPageIndex = 4;
                    elTabPage10.Visible         = true;
                }
            }
        }
Beispiel #2
0
        private void bt_editJusti_Click(object sender, EventArgs e)
        {
            Frm_Filtro             fil = new Frm_Filtro();
            Frm_Reg_Justiificacion per = new Frm_Reg_Justiificacion();

            if (lsv_justifi.SelectedIndices.Count == 0)
            {
                fil.Show();
                MessageBox.Show("Seleccione un item por favor", "Advertencia de Seguridad", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                fil.Hide();
            }
            else
            {
                var lsv = lsv_justifi.SelectedItems[0]; // si no se selecciona nada, nada se hace o pedemos lanzar un mensaje

                string xidsocio = lsv.SubItems[1].Text;
                string xidJusti = lsv.SubItems[0].Text;
                string xnombre  = lsv.SubItems[2].Text;

                fil.Show();
                per.xedit = false;
                per.txt_IdPersona.Text  = xidsocio;
                per.txt_nompersona.Text = xnombre;
                per.txt_idjusti.Text    = xidJusti;
                per.BuscarJustificacion(xidJusti);
                per.ShowDialog();
                fil.Hide();

                if (Convert.ToString(per.Tag) == "")
                {
                    return;
                }
                {
                    Cargar_Todas_Justificaciones();
                    elTab1.SelectedTabPageIndex = 4;
                    elTabPage10.Visible         = true;
                }
            }
        }