Пример #1
0
        private void frm_Profesional_Shifts_Load(object sender, EventArgs e)
        {
            if (profesional == null) return;

            if (DesignMode) return;
            using (WaitCursorHelper w = new WaitCursorHelper (this))
            {
                uc_TimeLine1.SelectedProfesionalBE = new Profesional_FullViewBE();
                
                uc_TimeLine1.SelectedProfesionalBE.Nombre = profesional.Persona.Nombre;
                uc_TimeLine1.SelectedProfesionalBE.Apellido = profesional.Persona.Apellido;
                uc_TimeLine1.SelectedProfesionalBE.IdProfesional = profesional.IdProfesional;
                uc_TimeLine1.SelectedProfesionalBE.NombreEspecialidad = profesional.NombreEspecialidad;
                uc_TimeLine1.SelectedProfesionalBE.Matricula = profesional.Matricula;

                uc_TimeLine1.SelectedProfesionalBE.UserName = profesional.UserName;
                uc_TimeLine1.SelectedProfesionalBE.UserId = profesional.Persona.UserId;
                uc_TimeLine1.SelectedProfesionalBE.Foto = profesional.Persona.Foto;
                //this.uc_AllShiftGrid1.profesional = profesional;
                //this.uc_AllShiftGrid1.Refresh();
                uc_TimeLine1.Set_ProfesionalChanged();
            }
      
 

            
        }
Пример #2
0
 public override void Refresh()
 {
     using (WaitCursorHelper fr = new WaitCursorHelper(this))
     {
         uc_Profesionales_Grid1.Refresh();
     }
     base.Refresh();
 }
Пример #3
0
        private void gridView1_MouseDown(object sender, MouseEventArgs e)
        {

            _HitInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y));
            _Event = ((MedicalEvent_ViewBE)gridView1.GetRow(_HitInfo.RowHandle));
            if (_Event != null)
            {
                using (WaitCursorHelper w = new WaitCursorHelper(this))
                {
                    uc_docprontviewer_11.Pupulate(Create_Doc());
                }
            }

        }
Пример #4
0
 private void frmBase_Dialog_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F5)
     {
         using (WaitCursorHelper frm = new WaitCursorHelper(this))
         {
             this.Refresh();
         }
     }
     if (e.KeyCode == Keys.Escape)
     {
         this.Close();
     }
 }
Пример #5
0
        protected override void OnKeyDown(KeyEventArgs e)
        {
            base.OnKeyDown(e);
            if (e.KeyCode == Keys.F5)
            {
                using (WaitCursorHelper frm = new WaitCursorHelper(this))
                {
                    this.Refresh();
                }
            }
            if (e.KeyCode == Keys.Escape)
            {
                DialogResult = DialogResult.Cancel;
                this.Close();
            }

        }
Пример #6
0
        public void Pupulate()
        {
            //box.LoadFile(FileName, RichTextBoxStreamType.RichText);
            try
            {
                template = Fwk.HelperFunctions.FileFunctions.OpenTextFile(this.FileName);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
           }

            box.Rtf = Create_Doc();

            link.CreateDocument();
            using (WaitCursorHelper w = new WaitCursorHelper(this))
            {
                printingSystem1.Graph.PageUnit = GraphicsUnit.Pixel;
            }
          


        }
 private void frmPatientAtencion_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F5)
     {
         if (CurrentControl != null)
             using (WaitCursorHelper c = new WaitCursorHelper(this))
             {
                 CurrentControl.Refresh();
             }
     }
 }
        public DialogResult CheckCloseForm()
        {   
            string str = string.Concat("Finalizar la atencion de ", Controller.CurrentPatient.Persona.ApellidoNombre, "?");
            this.MessageViewer.Title = "Atención de pacientes";
            this.MessageViewer.MessageBoxButtons = MessageBoxButtons.YesNo;
            this.MessageViewer.MessageBoxIcon = Fwk.UI.Common.MessageBoxIcon.Question;
         
            DialogResult res = this.MessageViewer.Show(str);
            this.SetMessageViewInfoDefault();
            if (CurrentControl != null)
                using (WaitCursorHelper c = new WaitCursorHelper(this))
                {
                    //al pasarle true en AceptChanges, no se llama metodo estatico PopulateAsync que es innecesario dado q cera cerrado este formulario
                    CurrentControl.AceptChanges(true);
                }

            return res;

        }
 private void btnSaveChanges_Click(object sender, EventArgs e)
 {
     if (CurrentControl != null)
         using (WaitCursorHelper c = new WaitCursorHelper(this))
         {
             CurrentControl.AceptChanges(false);
         }
 }
        void RemoveControlFromPannel(Xtra_UC_Base ctrl)
        {

            if (ctrl != null)
            {
                ctrl.Exit();
                if (this.panelControl1.Contains(ctrl))
                {
                    this.panelControl1.Controls.Remove(ctrl);
                    controls.Remove(ctrl.Key);
                    if (this.panelControl1.Controls.Count != 0)
                    {
                        using (WaitCursorHelper w = new WaitCursorHelper(this))
                        {
                            btnClose.Visible = ctrl.ShowClose;
                            btnSaveChanges.Visible = ctrl.ShowSave;
                            ctrl = (Xtra_UC_Base)this.panelControl1.Controls[0];
                            ctrl.Refresh();
                        }
                    }
                }
            }



        }
        void AddContronToPannel(Fwk.UI.Controls.Menu.Tree.MenuItem item, object obj)
        {
            using (WaitCursorHelper w = new WaitCursorHelper(this))
            {
                Xtra_UC_Base ctrl = null;
                Type T = Fwk.HelperFunctions.ReflectionFunctions.CreateType(item.AssemblyInfo);

                if (!controls.Contains(string.Concat(T.Name, item.ID)))
                {
                    ctrl = (Xtra_UC_Base)Fwk.HelperFunctions.ReflectionFunctions.CreateInstance(item.AssemblyInfo);

                    ctrl.Tag = item.Tag;
                    ctrl.Key = string.Concat(T.Name, item.ID);

                    this.panelControl1.Controls.Add(ctrl);
                    controls.Add(ctrl.Key);
                    ctrl.Dock = System.Windows.Forms.DockStyle.Fill;
                    ctrl.OnExitControlEvent += new EventHandler(ctrl_OnExitControlEvent);
                    ctrl.Populate(obj);

                    //ctrl.Populate(null);
                }
                else
                {
                    int i = this.panelControl1.Controls.IndexOfKey(T.Name);
                    ctrl = (Xtra_UC_Base)this.panelControl1.Controls[i];
                }
                btnClose.Visible = ctrl.ShowClose;
                btnSaveChanges.Visible = ctrl.ShowSave;
                CurrentControl = ctrl;
                ctrl.BringToFront();
                ctrl.Refresh();
            }
        }
 private void aceptCancelButtonBar1_ClickOkCancelEvent(object sender, DialogResult result)
 {
     if (result == DialogResult.OK)
     {
         using (WaitCursorHelper waitn = new WaitCursorHelper(this))
         {
             //Validamos el valor que devuelve AcceptForm para ver si debemos cerrar o no el Formulario de Login
             if (AcceptForm(false))
             {
                 this.Close();
             }
         }
     }
     else
         this.Close();
 }