Ejemplo n.º 1
0
        public int OpenDefaultCustomersDlg()
        {
            Window _owner;

            _owner = Application.Current.Windows[0];

            Views.DefaultCustomerView dlg = new Views.DefaultCustomerView
            {
                Owner = _owner
            };
            dlg.ShowDialog();

            int result = (int)dlg.Tag;

            return(result);
        }
Ejemplo n.º 2
0
        public bool OpenDialog(string _name)
        {
            Window _owner;

            _owner = Application.Current.Windows[0];

            switch (_name)
            {
            case "ScheduledActivities":
                Views.ScheduledActivityAlerterView schedalerter = new Views.ScheduledActivityAlerterView
                {
                    Owner = _owner
                };
                schedalerter.Show();
                return(false);

            case "SalesDivisions":
                Views.EditSalesDivisionView eav = new Views.EditSalesDivisionView
                {
                    Owner = _owner
                };
                eav.ShowDialog();
                return((bool)eav.DialogResult);

            case "Countries":
                Views.EditCountryView ecv = new Views.EditCountryView
                {
                    Owner = _owner
                };
                ecv.ShowDialog();
                return((bool)ecv.DialogResult);

            case "Corporations":
                Views.EditCorporation corps = new Views.EditCorporation
                {
                    Owner = _owner
                };
                corps.ShowDialog();
                return((bool)corps.DialogResult);

            case "AssetAreas":
                Views.EditAssetAreaView assetareas = new Views.EditAssetAreaView
                {
                    Owner = _owner
                };
                assetareas.ShowDialog();
                return((bool)assetareas.DialogResult);

            case "AssetTypes":
                Views.EditAssetType assettypes = new Views.EditAssetType
                {
                    Owner = _owner
                };
                assettypes.ShowDialog();
                return((bool)assettypes.DialogResult);

            case "AssetGroups":
                Views.EditAssetGroup assetgroups = new Views.EditAssetGroup
                {
                    Owner = _owner
                };
                assetgroups.ShowDialog();
                return((bool)assetgroups.DialogResult);

            case "AssetSpecifications":
                Views.EditAssetSpecificationView specs = new Views.EditAssetSpecificationView
                {
                    Owner = _owner
                };
                specs.ShowDialog();
                return((bool)specs.DialogResult);

            case "Users":
                Views.AdministratorView users = new Views.AdministratorView
                {
                    Owner = _owner
                };
                users.ShowDialog();
                return((bool)users.DialogResult);

            case "OperatingCompanies":
                Views.EditOperatingCompanyView opcos = new Views.EditOperatingCompanyView
                {
                    Owner = _owner
                };
                opcos.ShowDialog();
                return((bool)opcos.DialogResult);

            case "DeletedAssets":
                Views.DeletedAssetsView deletedassets = new Views.DeletedAssetsView
                {
                    Owner = _owner
                };
                deletedassets.ShowDialog();
                return((bool)deletedassets.DialogResult);

            case "About":
                Views.AboutView about = new Views.AboutView
                {
                    Owner = _owner
                };
                about.ShowDialog();
                return((bool)about.DialogResult);

            case "DefaultCustomer":
                Views.DefaultCustomerView defcustomer = new Views.DefaultCustomerView
                {
                    Owner = _owner
                };
                defcustomer.ShowDialog();
                return((bool)defcustomer.DialogResult);

            case "GroupSpecifications":
                Views.GroupSpecificationsView groupspecs = new Views.GroupSpecificationsView
                {
                    Owner = _owner
                };
                groupspecs.ShowDialog();
                return((bool)groupspecs.DialogResult);

            case "SpecificationProperties":
                Views.EditSpecificationPropertyView specprops = new Views.EditSpecificationPropertyView
                {
                    Owner = _owner
                };
                specprops.ShowDialog();
                return((bool)specprops.DialogResult);

            case "UserSettings":
                Views.UserSettingsView userset = new Views.UserSettingsView
                {
                    Owner = _owner
                };
                userset.ShowDialog();
                return((bool)userset.DialogResult);

            case "Reports":
                Views.CustomReportsView custrepts = new Views.CustomReportsView
                {
                    Owner = _owner
                };
                custrepts.ShowDialog();
                return(false);

            default:
                return(false);
            }
        }