Exemplo n.º 1
0
        //XpoMode
        public TreeViewCustomer(Window pSourceWindow, XPGuidObject pDefaultValue, CriteriaOperator pXpoCriteria, Type pDialogType, GenericTreeViewMode pGenericTreeViewMode = GenericTreeViewMode.Default, GenericTreeViewNavigatorMode pGenericTreeViewNavigatorMode = GenericTreeViewNavigatorMode.Default)
        {
            //Init Vars
            Type xpoGuidObjectType = typeof(ERP_Customer);
            //Override Default Value with Parameter Default Value, this way we can have diferent Default Values for GenericTreeView
            ERP_Customer defaultValue = (pDefaultValue != null) ? pDefaultValue as ERP_Customer : null;
            //Override Default DialogType with Parameter Dialog Type, this way we can have diferent DialogTypes for GenericTreeView
            Type typeDialogClass = (pDialogType != null) ? pDialogType : typeof(DialogCustomer);

            //Configure columnProperties
            List <GenericTreeViewColumnProperty> columnProperties = new List <GenericTreeViewColumnProperty>();

            columnProperties.Add(new GenericTreeViewColumnProperty("Code")
            {
                Title = Resx.global_record_code, MinWidth = 100
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("Name")
            {
                Title = Resx.global_name, MinWidth = 200, Expand = true
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("FiscalNumber")
            {
                Title = Resx.global_fiscal_number, MinWidth = 150
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("CardNumber")
            {
                Title = Resx.global_card_number, MinWidth = 150
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("UpdatedAt")
            {
                Title = Resx.global_record_date_updated, MinWidth = 150, MaxWidth = 150
            });

            //Configure Criteria/XPCollection/Model
            //CriteriaOperator.Parse("Code >= 100 and Code <= 9999");
            CriteriaOperator criteria      = pXpoCriteria;
            XPCollection     xpoCollection = new XPCollection(GlobalFramework.SessionXpo, xpoGuidObjectType, criteria);

            //Custom Events
            //WIP: this.CursorChanged += TreeViewCustomer_CursorChanged;

            //Call Base Initializer
            base.InitObject(
                pSourceWindow,                 //Pass parameter
                defaultValue,                  //Pass parameter
                pGenericTreeViewMode,          //Pass parameter
                pGenericTreeViewNavigatorMode, //Pass parameter
                columnProperties,              //Created Here
                xpoCollection,                 //Created Here
                typeDialogClass                //Created Here
                );

            //Protected Records
            ProtectedRecords.Add(SettingsApp.XpoOidDocumentFinanceMasterFinalConsumerEntity);//FinalConsumerEntity
        }
Exemplo n.º 2
0
        //XpoMode
        public TreeViewArticleClass(Window pSourceWindow, XPGuidObject pDefaultValue, CriteriaOperator pXpoCriteria, Type pDialogType, GenericTreeViewMode pGenericTreeViewMode = GenericTreeViewMode.Default, GenericTreeViewNavigatorMode pGenericTreeViewNavigatorMode = GenericTreeViewNavigatorMode.Default)
        {
            //Init Vars
            Type xpoGuidObjectType = typeof(FIN_ArticleClass);
            //Override Default Value with Parameter Default Value, this way we can have diferent Default Values for GenericTreeView
            FIN_ArticleClass defaultValue = (pDefaultValue != null) ? pDefaultValue as FIN_ArticleClass : null;
            //Override Default DialogType with Parameter Dialog Type, this way we can have diferent DialogTypes for GenericTreeView
            Type typeDialogClass = (pDialogType != null) ? pDialogType : typeof(DialogArticleClass);

            //Configure columnProperties
            List <GenericTreeViewColumnProperty> columnProperties = new List <GenericTreeViewColumnProperty>();

            columnProperties.Add(new GenericTreeViewColumnProperty("Code")
            {
                Title = Resx.global_record_code, MinWidth = 100
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("Designation")
            {
                Title = Resx.global_designation, Expand = true
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("Acronym")
            {
                Title = Resx.global_acronym
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("UpdatedAt")
            {
                Title = Resx.global_record_date_updated, MinWidth = 150, MaxWidth = 150
            });

            //Configure Criteria/XPCollection/Model
            //CriteriaOperator.Parse("Code >= 100 and Code <= 9999");
            CriteriaOperator criteria = pXpoCriteria;

            SortProperty[] sortProperty = new SortProperty[1];
            sortProperty[0] = new SortProperty("Code", SortingDirection.Ascending);
            XPCollection xpoCollection = new XPCollection(GlobalFramework.SessionXpo, xpoGuidObjectType, criteria, sortProperty);

            //Call Base Initializer
            base.InitObject(
                pSourceWindow,                 //Pass parameter
                defaultValue,                  //Pass parameter
                pGenericTreeViewMode,          //Pass parameter
                pGenericTreeViewNavigatorMode, //Pass parameter
                columnProperties,              //Created Here
                xpoCollection,                 //Created Here
                typeDialogClass                //Created Here
                );

            //Protected Records
            ProtectedRecords.Add(new Guid("6924945d-f99e-476b-9c4d-78fb9e2b30a3")); //P
            ProtectedRecords.Add(new Guid("7622e5d2-2d52-4be9-bb8b-e5efae5ec791")); //S
            ProtectedRecords.Add(new Guid("0763a749-0066-49f1-a9cf-5f9577395476")); //O
            ProtectedRecords.Add(new Guid("82c158f9-9c30-468f-9d15-8bde112998f4")); //I
        }
        //XpoMode
        public TreeViewConfigurationPrintersType(Window pSourceWindow, XPGuidObject pDefaultValue, CriteriaOperator pXpoCriteria, Type pDialogType, GenericTreeViewMode pGenericTreeViewMode = GenericTreeViewMode.Default, GenericTreeViewNavigatorMode pGenericTreeViewNavigatorMode = GenericTreeViewNavigatorMode.Default)
        {
            //Init Vars
            Type xpoGuidObjectType = typeof(sys_configurationprinterstype);
            //Override Default Value with Parameter Default Value, this way we can have diferent Default Values for GenericTreeView
            sys_configurationprinterstype defaultValue = (pDefaultValue != null) ? pDefaultValue as sys_configurationprinterstype : null;
            //Override Default DialogType with Parameter Dialog Type, this way we can have diferent DialogTypes for GenericTreeView
            Type typeDialogClass = (pDialogType != null) ? pDialogType : typeof(DialogConfigurationPrintersType);

            //Configure columnProperties
            List <GenericTreeViewColumnProperty> columnProperties = new List <GenericTreeViewColumnProperty>();

            columnProperties.Add(new GenericTreeViewColumnProperty("Code")
            {
                Title = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_record_code"), MinWidth = 100
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("Designation")
            {
                Title = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_designation"), Expand = true
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("fThermalPrinter")
            {
                Title = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_printer_thermal_printer"), Expand = true
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("UpdatedAt")
            {
                Title = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_record_date_updated"), MinWidth = 150, MaxWidth = 150
            });

            //Configure Criteria/XPCollection/Model
            //CriteriaOperator.Parse("Code >= 100 and Code <= 9999");
            CriteriaOperator criteria      = pXpoCriteria;
            XPCollection     xpoCollection = new XPCollection(GlobalFramework.SessionXpo, xpoGuidObjectType, criteria);

            //Call Base Initializer
            base.InitObject(
                pSourceWindow,                 //Pass parameter
                defaultValue,                  //Pass parameter
                pGenericTreeViewMode,          //Pass parameter
                pGenericTreeViewNavigatorMode, //Pass parameter
                columnProperties,              //Created Here
                xpoCollection,                 //Created Here
                typeDialogClass                //Created Here
                );

            //Protected Records
            ProtectedRecords.Add(SettingsApp.XpoOidConfigurationPrinterTypeThermalPrinterWindows);
            ProtectedRecords.Add(SettingsApp.XpoOidConfigurationPrinterTypeThermalPrinterLinux);
            ProtectedRecords.Add(SettingsApp.XpoOidConfigurationPrinterTypeThermalPrinterSocket);
            ProtectedRecords.Add(SettingsApp.XpoOidConfigurationPrinterTypeGenericWindows);
            ProtectedRecords.Add(SettingsApp.XpoOidConfigurationPrinterTypeGenericLinux);
            ProtectedRecords.Add(SettingsApp.XpoOidConfigurationPrinterTypeExportPdf);
        }
Exemplo n.º 4
0
        //XpoMode
        public TreeViewConfigurationCountry(Window pSourceWindow, XPGuidObject pDefaultValue, CriteriaOperator pXpoCriteria, Type pDialogType, GenericTreeViewMode pGenericTreeViewMode = GenericTreeViewMode.Default, GenericTreeViewNavigatorMode pGenericTreeViewNavigatorMode = GenericTreeViewNavigatorMode.Default)
        {
            //Init Vars
            Type xpoGuidObjectType = typeof(cfg_configurationcountry);
            //Override Default Value with Parameter Default Value, this way we can have diferent Default Values for GenericTreeView
            cfg_configurationcountry defaultValue = (pDefaultValue != null) ? pDefaultValue as cfg_configurationcountry : null;
            //Override Default DialogType with Parameter Dialog Type, this way we can have diferent DialogTypes for GenericTreeView
            Type typeDialogClass = (pDialogType != null) ? pDialogType : typeof(DialogConfigurationCountry);

            //Configure columnProperties
            List <GenericTreeViewColumnProperty> columnProperties = new List <GenericTreeViewColumnProperty>();

            columnProperties.Add(new GenericTreeViewColumnProperty("Code")
            {
                Title = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_record_code"), MinWidth = 100
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("Designation")
            {
                Title = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_designation"), Expand = true
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("UpdatedAt")
            {
                Title = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_record_date_updated"), MinWidth = 150, MaxWidth = 150
            });

            //Configure Criteria/XPCollection/Model
            CriteriaOperator criteria = (ReferenceEquals(pXpoCriteria, null)) ? null : pXpoCriteria;

            SortProperty[] sortProperty = new SortProperty[1];
            sortProperty[0] = new SortProperty("Code", SortingDirection.Ascending);
            XPCollection xpoCollection = new XPCollection(GlobalFramework.SessionXpo, xpoGuidObjectType, criteria);

            //Call Base Initializer
            base.InitObject(
                pSourceWindow,                 //Pass parameter
                defaultValue,                  //Pass parameter
                pGenericTreeViewMode,          //Pass parameter
                pGenericTreeViewNavigatorMode, //Pass parameter
                columnProperties,              //Created Here
                xpoCollection,                 //Created Here
                typeDialogClass                //Created Here
                );

            //Protected Records
            ProtectedRecords.Add(new Guid("9655510a-ff58-461e-9719-c037058f10ed")); //AO
            ProtectedRecords.Add(new Guid("16fcd7f2-e885-48d8-9f8e-9d224cc36f32")); //MZ
            ProtectedRecords.Add(new Guid("e7e8c325-a0d4-4908-b148-508ed750676a")); //PT
            ProtectedRecords.Add(new Guid("4ad7cfde-f5d9-4ebd-b9e2-5144d74bd923")); //PT-AC
            ProtectedRecords.Add(new Guid("6ca6a849-7d81-4284-b948-44f87e49c47b")); //PT-MA
        }
        //XpoMode
        public TreeViewConfigurationPaymentMethod(Window pSourceWindow, XPGuidObject pDefaultValue, CriteriaOperator pXpoCriteria, Type pDialogType, GenericTreeViewMode pGenericTreeViewMode = GenericTreeViewMode.Default, GenericTreeViewNavigatorMode pGenericTreeViewNavigatorMode = GenericTreeViewNavigatorMode.Default)
        {
            //Init Vars
            Type xpoGuidObjectType = typeof(FIN_ConfigurationPaymentMethod);
            //Override Default Value with Parameter Default Value, this way we can have diferent Default Values for GenericTreeView
            FIN_ConfigurationPaymentMethod defaultValue = (pDefaultValue != null) ? pDefaultValue as FIN_ConfigurationPaymentMethod : null;
            //Override Default DialogType with Parameter Dialog Type, this way we can have diferent DialogTypes for GenericTreeView
            Type typeDialogClass = (pDialogType != null) ? pDialogType : typeof(DialogConfigurationPaymentMethod);

            //Configure columnProperties
            List <GenericTreeViewColumnProperty> columnProperties = new List <GenericTreeViewColumnProperty>();

            columnProperties.Add(new GenericTreeViewColumnProperty("Code")
            {
                Title = Resx.global_record_code, MinWidth = 100
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("Designation")
            {
                Title = Resx.global_designation, Expand = true
            });
            //columnProperties.Add(new GenericTreeViewColumnProperty("Token") { Title = Resx.global_ConfigurationPaymentMethod_Token, MinWidth = 180 });
            columnProperties.Add(new GenericTreeViewColumnProperty("Acronym")
            {
                Title = Resx.global_ConfigurationPaymentMethod_Acronym
            });
            //columnProperties.Add(new GenericTreeViewColumnProperty("Symbol") { Title = Resx.global_ConfigurationPaymentMethod_Symbol });
            columnProperties.Add(new GenericTreeViewColumnProperty("UpdatedAt")
            {
                Title = Resx.global_record_date_updated, MinWidth = 150, MaxWidth = 150
            });

            //Configure Criteria/XPCollection/Model
            //CriteriaOperator.Parse("Code >= 100 and Code <= 9999");
            CriteriaOperator criteria      = pXpoCriteria;
            XPCollection     xpoCollection = new XPCollection(GlobalFramework.SessionXpo, xpoGuidObjectType, criteria);

            //Call Base Initializer
            base.InitObject(
                pSourceWindow,                 //Pass parameter
                defaultValue,                  //Pass parameter
                pGenericTreeViewMode,          //Pass parameter
                pGenericTreeViewNavigatorMode, //Pass parameter
                columnProperties,              //Created Here
                xpoCollection,                 //Created Here
                typeDialogClass                //Created Here
                );

            //Protected Records
            ProtectedRecords.Add(SettingsApp.XpoOidConfigurationPaymentMethodInstantPayment);
        }
Exemplo n.º 6
0
        //XpoMode
        public TreeViewCustomer(Window pSourceWindow, XPGuidObject pDefaultValue, CriteriaOperator pXpoCriteria, Type pDialogType, GenericTreeViewMode pGenericTreeViewMode = GenericTreeViewMode.Default, GenericTreeViewNavigatorMode pGenericTreeViewNavigatorMode = GenericTreeViewNavigatorMode.Default)
        {
            //Init Vars
            Type xpoGuidObjectType = typeof(erp_customer);
            //Override Default Value with Parameter Default Value, this way we can have diferent Default Values for GenericTreeView
            erp_customer defaultValue = (pDefaultValue != null) ? pDefaultValue as erp_customer : null;
            //Override Default DialogType with Parameter Dialog Type, this way we can have diferent DialogTypes for GenericTreeView
            Type typeDialogClass = (pDialogType != null) ? pDialogType : typeof(DialogCustomer);

            //Configure columnProperties
            List <GenericTreeViewColumnProperty> columnProperties = new List <GenericTreeViewColumnProperty>();

            columnProperties.Add(new GenericTreeViewColumnProperty("Code")
            {
                Title = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_record_code"), MinWidth = 100
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("Name")
            {
                Title = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_name"), MinWidth = 200, Expand = true
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("FiscalNumber")
            {
                Title = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_fiscal_number"), MinWidth = 150
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("CardNumber")
            {
                Title = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_card_number"), MinWidth = 150
            });
            columnProperties.Add(new GenericTreeViewColumnProperty("UpdatedAt")
            {
                Title = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_record_date_updated"), MinWidth = 150, MaxWidth = 150
            });

            //Configure Criteria/XPCollection/Model
            //CriteriaOperator.Parse("Code >= 100 and Code <= 9999");
            CriteriaOperator criteria = pXpoCriteria;
            /* IN009162 - customer sorting changes when "PosDocumentFinanceDialog" window */
            string sortedColumn = "Ord"; // Default one

            if ("PosDocumentFinanceDialog".Equals(pSourceWindow.GetType().Name))
            {
                sortedColumn = "UpdatedAt";
            }

            SortProperty sortPropertyForCustomer = new SortProperty(sortedColumn, DevExpress.Xpo.DB.SortingDirection.Descending);
            XPCollection xpoCollection           = new XPCollection(GlobalFramework.SessionXpo, xpoGuidObjectType, criteria, sortPropertyForCustomer);

            //Custom Events
            //WIP: this.CursorChanged += TreeViewCustomer_CursorChanged;

            //Call Base Initializer
            base.InitObject(
                pSourceWindow,                 //Pass parameter
                defaultValue,                  //Pass parameter
                pGenericTreeViewMode,          //Pass parameter
                pGenericTreeViewNavigatorMode, //Pass parameter
                columnProperties,              //Created Here
                xpoCollection,                 //Created Here
                typeDialogClass                //Created Here
                );

            //Protected Records
            ProtectedRecords.Add(SettingsApp.XpoOidDocumentFinanceMasterFinalConsumerEntity);//FinalConsumerEntity
        }