Exemple #1
0
        public void TAB_Main_TabClosing(object sender, Infragistics.Win.UltraWinTabControl.TabClosingEventArgs e)
        {
            try
            {
                switch (e.Tab.Key)
                {
                case "City":
                    if (Adress_FRM.fCancelTransaction())
                    {
                        Adress_FRM.Close();
                    }
                    else
                    {
                        e.Cancel = true;
                    }
                    break;

                case "Chur":
                    if (Church_FRM.fCancelTransaction())
                    {
                        Church_FRM.Close();
                    }
                    else
                    {
                        e.Cancel = true;
                    }
                    break;

                case "Serv":
                    break;

                case "Edu":
                    break;

                case "Pers":
                    if (Persons_FRM.fCancelTransaction())
                    {
                        Persons_FRM.Close();
                    }
                    else
                    {
                        e.Cancel = true;
                    }
                    break;

                case "Meet":

                    break;

                case "Aten":
                    if (Meeting_FRM.fCancelTransaction())
                    {
                        Meeting_FRM.Close();
                    }
                    else
                    {
                        e.Cancel = true;
                    }
                    break;
                }
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(ex.Message, this.Name, "Tab_InventoryOptions_TabClosed");
            }
        }