Beispiel #1
0
        private void barButtonItemNote_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (memberIDSelected != -1)
            {
                var form = new FormAddEditNotes(memberIDSelected, staffID);
                form.ShowDialog();

                this.noteTableAdapter.Fill(this.lorikeetAppDataSet.Note);
            }
        }
Beispiel #2
0
        private void gridView6_DoubleClick(object sender, EventArgs e)
        {
            GridView    view    = (GridView)sender;
            GridHitInfo hitInfo = view.CalcHitInfo(view.GridControl.PointToClient(Control.MousePosition));

            if (hitInfo.HitTest == GridHitTest.RowCell)
            {
                memberIDSelected = int.Parse(view.GetRowCellDisplayText(hitInfo.RowHandle, colMemberIDNotes).ToString());
            }

            if (memberIDSelected != -1)
            {
                var form = new FormAddEditNotes(memberIDSelected, staffID);
                form.ShowDialog();

                this.noteTableAdapter.Fill(this.lorikeetAppDataSet.Note);
            }
        }
Beispiel #3
0
        void barManager_ItemClick(object sender, ItemClickEventArgs e)
        {
            try
            {
                if (e.Item.Caption.Equals("New Member"))
                {
                    radialMenu1.Collapse(true);

                    var form = new FormNewMemberWizard(staffID);
                    form.ShowDialog();

                    RefreshDataGrid();
                }
                else if (e.Item.Caption.Equals("Edit"))
                {
                    radialMenu1.Collapse(true);

                    if (gridControl1.FocusedView.ViewCaption.ToString().Equals(""))
                    {
                        if (memberIDSelected != -1)
                        {
                            var form = new FormEditMember(memberIDSelected, staffID);
                            form.ShowDialog();

                            this.memberTableAdapter.Fill(this.lorikeetAppDataSet.Member);
                        }
                    }

                    else if (gridControl1.FocusedView.ViewCaption.ToString().Equals("Contact"))
                    {
                        if (memberIDSelected != -1)
                        {
                            var form = new FormAddEditContacts(memberIDSelected, staffID);
                            form.ShowDialog();

                            this.contactTableAdapter.Fill(this.lorikeetAppDataSet.Contact);
                        }
                    }
                    else if (gridControl1.FocusedView.ViewCaption.ToString().Equals("Credits / Debits"))
                    {
                        if (memberIDSelected != -1)
                        {
                            var form = new FormAddEditDebitCredit(memberIDSelected, staffID);
                            form.ShowDialog();

                            this.debitSystemTableAdapter.Fill(this.lorikeetAppDataSet.DebitSystem);
                        }
                    }
                    else if (gridControl1.FocusedView.ViewCaption.ToString().Equals("Medication"))
                    {
                        if (memberIDSelected != -1)
                        {
                            var form = new FormAddEditMedication(memberIDSelected, staffID);
                            form.ShowDialog();

                            this.medicationTableAdapter.Fill(this.lorikeetAppDataSet.Medication);
                        }
                    }
                    else if (gridControl1.FocusedView.ViewCaption.ToString().Equals("Diagnosis"))
                    {
                        if (memberIDSelected != -1)
                        {
                            var form = new FormAddEditDiagnosis(memberIDSelected, staffID);
                            form.ShowDialog();

                            this.diagnosisTableAdapter.Fill(this.lorikeetAppDataSet.Diagnosis);
                        }
                    }
                    else if (gridControl1.FocusedView.ViewCaption.ToString().Equals("Notes"))
                    {
                        if (memberIDSelected != -1)
                        {
                            var form = new FormAddEditNotes(memberIDSelected, staffID);
                            form.ShowDialog();

                            this.noteTableAdapter.Fill(this.lorikeetAppDataSet.Note);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(MiscStuff.GetAllMessages(ex));
            }
        }