コード例 #1
0
        void FormaSede(Cl_Enumeradores.eTipo_action Accion)
        {
            try
            {
                FrmAcaSede_Mant frm      = new FrmAcaSede_Mant();
                Aca_Sede_Info   infoSede = new Aca_Sede_Info();
                infoSede.IdInstitucion = infoVistaTree.IdInstitucion == null ? 0 : Convert.ToInt16(infoVistaTree.IdInstitucion);

                if (Accion != Cl_Enumeradores.eTipo_action.grabar)
                {
                    infoSede.IdSede = infoVistaTree.IdSede == null ? 0 : Convert.ToInt16(infoVistaTree.IdSede);
                    //infoSede.IdSucursal = listSucursal.FirstOrDefault(v => v.IdSucursal == Convert.ToInt32(cmbsucursal.EditValue));
                    infoSede.DescripcionSede = infoVistaTree.Nombre;
                    infoSede.Estado          = infoVistaTree.Estado;
                }

                frm.set_Sede(infoSede);
                frm.set_Accion(Accion);
                frm.Show();
                frm.event_FrmAcaSede_Mant_FormClosing += new FrmAcaSede_Mant.delegate_FrmAcaSede_Mant_FormClosing(frm_event_FrmAcaSede_Mant_FormClosing);
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #2
0
        private void nuevaSedeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmAcaSede_Mant frm      = new FrmAcaSede_Mant();
            Aca_Sede_Info   infoSede = new Aca_Sede_Info();

            infoSede.IdInstitucion =
                infoSede.IdSede    = infoVistaTree.IdSede == null ? 0 : Convert.ToInt16(infoVistaTree.IdSede);
            infoSede.IdInstitucion = infoVistaTree.IdInstitucion == null ? 0 : Convert.ToInt16(infoVistaTree.IdInstitucion);

            frm.set_Sede(infoSede);
            frm.set_Accion(Cl_Enumeradores.eTipo_action.grabar);
            frm.Show();
            frm.event_FrmAcaSede_Mant_FormClosing += new FrmAcaSede_Mant.delegate_FrmAcaSede_Mant_FormClosing(frm_event_FrmAcaSede_Mant_FormClosing);
        }