Exemple #1
0
        private void barButtonItemMember_ItemClick(object sender, ItemClickEventArgs e)
        {
            var form = new FormNewMemberWizard(staffID);

            form.ShowDialog();

            RefreshDataGrid();
        }
Exemple #2
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));
            }
        }