Beispiel #1
0
/*
 *      private void btnAdmin_Click(object sender, EventArgs e)
 *      {
 *          new GeoAdmin().ShowDialog();
 *      }
 */

        private void Agenda_Load(object sender, EventArgs e)
        {
            Icon = Icon.FromHandle(Resources.Agenda.GetHicon());

            var exp = new e_expedientes();

            Expedientes = exp.Gete_expedientes();
            comboExpedientes.DisplayMember = "clave_dir";
            comboExpedientes.ValueMember   = "id_expediente";
            comboExpedientes.DataSource    = Expedientes.Tables[0];
            comboExpedientes.SelectedValue = zeusWin.IdExpediente;
            FillCombos();
        }
        private void CargarExpedientes()
        {
            if (dgExpedientes.InvokeRequired)
            {
                dgExpedientes.Invoke((MethodInvoker)CargarExpedientes);
            }
            else
            {
                ZeusWin.Ocupado(true);
                ZeusWin.BarraEstado("Cargando Expedientes...");
                var exp = new e_expedientes();

                try
                {
                    dgExpedientes.DataSource = exp.Gete_expedientes().Tables[0];
                }
                catch (Exception e)
                {
                    Log.ShowAndLog(e);
                }
                ZeusWin.Ocupado(false);
                ZeusWin.BarraEstado("");
            }
        }