示例#1
0
        public void Setup_SetLanguage(WPFLanguage language)
        {
            if (language == null)
            {
                return;
            }

            foreach (var gridColumn in DataGridSuppliers.Columns)
            {
                if (gridColumn.Header == null)
                {
                    continue;
                }

                //The replace is done because FK values in Grid are 'MyTable.MyColumn' but in json are 'MyTable_MyColumn'
                string          actualHeaderValue = gridColumn.Header.ToString().Replace(".", "_");
                LanguageElement languageElement   = language.LanguageElementsFromDB.Where(x => x.OriginalValue.ToLower() == actualHeaderValue.ToLower()).FirstOrDefault();
                if (languageElement == null)
                {
                    continue;
                }

                gridColumn.Header = languageElement.TranslatedValue;
            }
        }
示例#2
0
        public void Setup_SetLanguage(string language)
        {
            CurrentLanguage = language;
            WPFLanguage wPFLanguage = LanguageHelper.GetLanguageForList(language, "Categories");

            Setup_SetLanguage(wPFLanguage);
            Setup_Controls(wPFLanguage);
            Setup_Messages(wPFLanguage);
        }
示例#3
0
        public void Setup_SetLanguage(string language)
        {
            CurrentLanguage = language;
            WPFLanguage wPFLanguage = LanguageHelper.GetLanguageForList(language, "CustomerDemographics");

            Setup_SetLanguage(wPFLanguage);
            Setup_Controls(wPFLanguage);
            Setup_Messages(wPFLanguage);
        }
示例#4
0
        public void LoadLanguages(string language)
        {
            if (language == null)
            {
                return;
            }

            LabelsAndMessagesOrderDetails labelsAndMessagesOrderDetails = new LabelsAndMessagesOrderDetails();
            WPFLanguage wPFLanguage = LanguageHelper.GetLanguageForForms(language, "OrderDetails");
        }
示例#5
0
        public void LoadLanguages(string language)
        {
            if (language == null)
            {
                return;
            }

            LabelsAndMessagesTag labelsAndMessagesTag = new LabelsAndMessagesTag();
            WPFLanguage          wPFLanguage          = LanguageHelper.GetLanguageForForms(language, "Tag");
        }
示例#6
0
        public void LoadLanguages(string language)
        {
            if (language == null)
            {
                return;
            }

            LabelsAndMessagesRegion labelsAndMessagesRegion = new LabelsAndMessagesRegion();
            WPFLanguage             wPFLanguage             = LanguageHelper.GetLanguageForForms(language, "Region");
        }
示例#7
0
        public void LoadLanguages(string language)
        {
            if (language == null)
            {
                return;
            }

            LabelsAndMessagesCustomers labelsAndMessagesCustomers = new LabelsAndMessagesCustomers();
            WPFLanguage wPFLanguage = LanguageHelper.GetLanguageForForms(language, "Customers");
        }
示例#8
0
        public void LoadLanguages(string language)
        {
            if (language == null)
            {
                return;
            }

            LabelsAndMessagesEmployees labelsAndMessagesEmployees = new LabelsAndMessagesEmployees();
            WPFLanguage wPFLanguage = LanguageHelper.GetLanguageForForms(language, "Employees");
        }
示例#9
0
        private void Setup_Controls(WPFLanguage language)
        {
            string          languageElementID = null;
            LanguageElement languageElement;

            languageElementID = WPFLanguage.LanguageControls.List_btnOpenForm.ToString();
            languageElement   = language.LanguageElementsDefaultControls.Where(x => x.OriginalValue == languageElementID).FirstOrDefault();
            if (languageElement != null)
            {
                CustomerDemographicsDataContext.WPFMessageAndLabelForList.LabelBtnOpenForm = languageElement.TranslatedValue;
            }

            languageElementID = WPFLanguage.LanguageControls.List_btnDelete.ToString();
            languageElement   = language.LanguageElementsDefaultControls.Where(x => x.OriginalValue == languageElementID).FirstOrDefault();
            if (languageElement != null)
            {
                CustomerDemographicsDataContext.WPFMessageAndLabelForList.LabelBtnDelete = languageElement.TranslatedValue;
            }

            languageElementID = WPFLanguage.LanguageControls.List_btnSave.ToString();
            languageElement   = language.LanguageElementsDefaultControls.Where(x => x.OriginalValue == languageElementID).FirstOrDefault();
            if (languageElement != null)
            {
                CustomerDemographicsDataContext.WPFMessageAndLabelForList.LabelBtnSave = languageElement.TranslatedValue;
            }

            languageElementID = WPFLanguage.LanguageControls.List_btnReload.ToString();
            languageElement   = language.LanguageElementsDefaultControls.Where(x => x.OriginalValue == languageElementID).FirstOrDefault();
            if (languageElement != null)
            {
                CustomerDemographicsDataContext.WPFMessageAndLabelForList.LabelBtnReload = languageElement.TranslatedValue;
            }

            languageElementID = WPFLanguage.LanguageControls.List_btnFilter.ToString();
            languageElement   = language.LanguageElementsDefaultControls.Where(x => x.OriginalValue == languageElementID).FirstOrDefault();
            if (languageElement != null)
            {
                CustomerDemographicsDataContext.WPFMessageAndLabelForList.LabelBtnFilter = languageElement.TranslatedValue;
            }

            languageElementID = WPFLanguage.LanguageControls.groupVisibility.ToString();
            languageElement   = language.LanguageElementsDefaultControls.Where(x => x.OriginalValue == languageElementID).FirstOrDefault();
            if (languageElement != null)
            {
                CustomerDemographicsDataContext.WPFMessageAndLabelForList.LabelGroupVisibility = languageElement.TranslatedValue;
            }

            languageElementID = WPFLanguage.LanguageControls.groupSearch.ToString();
            languageElement   = language.LanguageElementsDefaultControls.Where(x => x.OriginalValue == languageElementID).FirstOrDefault();
            if (languageElement != null)
            {
                CustomerDemographicsDataContext.WPFMessageAndLabelForList.LabelGroupSearch = languageElement.TranslatedValue;
            }
        }
示例#10
0
        private void Setup_Messages(WPFLanguage language)
        {
            LanguageElement languageElement;
            string          id;

            id = WPFLanguage.LanguageMessages.MessageBoxDeleteConfirm.ToString();
            languageElement = language.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == id).FirstOrDefault();
            if (languageElement != null)
            {
                //MessageBoxDeleteConfirm = languageElement.TranslatedValue;
                CustomerDemographicsDataContext.WPFMessageAndLabelForList.MessageBoxDeleteConfirm = languageElement.TranslatedValue;
            }

            id = WPFLanguage.LanguageMessages.MessageBoxDeleteConfirmCaption.ToString();
            languageElement = language.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == id).FirstOrDefault();
            if (languageElement != null)
            {
                //MessageBoxDeleteConfirmCaption = languageElement.TranslatedValue;
                CustomerDemographicsDataContext.WPFMessageAndLabelForList.MessageBoxDeleteConfirmCaption = languageElement.TranslatedValue;
            }

            id = WPFLanguage.LanguageMessages.MessageBoxDeleteOK.ToString();
            languageElement = language.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == id).FirstOrDefault();
            if (languageElement != null)
            {
                //MessageBoxDeleteOK = languageElement.TranslatedValue;
                CustomerDemographicsDataContext.WPFMessageAndLabelForList.MessageBoxDeleteOK = languageElement.TranslatedValue;
            }

            id = WPFLanguage.LanguageMessages.MessageBoxSaveError.ToString();
            languageElement = language.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == id).FirstOrDefault();
            if (languageElement != null)
            {
                //MessageBoxSaveError = languageElement.TranslatedValue;
                CustomerDemographicsDataContext.WPFMessageAndLabelForList.MessageBoxSaveError = languageElement.TranslatedValue;
            }

            id = WPFLanguage.LanguageMessages.MessageBoxSaveOK.ToString();
            languageElement = language.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == id).FirstOrDefault();
            if (languageElement != null)
            {
                //MessageBoxSaveOK = languageElement.TranslatedValue;
                CustomerDemographicsDataContext.WPFMessageAndLabelForList.MessageBoxSaveOK = languageElement.TranslatedValue;
            }
        }
示例#11
0
        public void Setup_SetLanguage(string language)
        {
            if (language == null)
            {
                return;
            }

            LabelsAndMessagesCategories labelsAndMessagesCategories = new LabelsAndMessagesCategories();
            WPFLanguage wPFLanguage = LanguageHelper.GetLanguageForForms(language, "Categories");
            LabelsAndMessagesCategories labelsAndMessages = new LabelsAndMessagesCategories();
            LanguageElement             languageElement;

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCategories.LabelCategoryID).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCategories.LabelCategoryID = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCategories.LabelCategoryName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCategories.LabelCategoryName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCategories.LabelDescription).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCategories.LabelDescription = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCategories.LabelPicture).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCategories.LabelPicture = languageElement.TranslatedValue;
            }

            //Labels
            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsCategories.LabelBtnNew).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsCategories.LabelBtnNew = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsCategories.LabelBtnDelete).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsCategories.LabelBtnDelete = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsCategories.LabelBtnUpdate).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsCategories.LabelBtnUpdate = languageElement.TranslatedValue;
            }

            //Messages
            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesCategories.MessageBoxDeleteConfirm).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesCategories.MessageBoxDeleteConfirm = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesCategories.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesCategories.MessageBoxSaveError = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesCategories.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesCategories.MessageBoxSaveOK = languageElement.TranslatedValue;
            }

            CategoriesDataContext.LabelsAndMessagesCategories = labelsAndMessages;
        }
示例#12
0
        public void Setup_SetLanguage(string language)
        {
            if (language == null)
            {
                return;
            }

            LabelsAndMessagesOrderDetails labelsAndMessagesOrderDetails = new LabelsAndMessagesOrderDetails();
            WPFLanguage wPFLanguage = LanguageHelper.GetLanguageForForms(language, "OrderDetails");
            LabelsAndMessagesOrderDetails labelsAndMessages = new LabelsAndMessagesOrderDetails();
            LanguageElement languageElement;

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrderDetails.LabelOrders_ShipName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrderDetails.LabelOrders_ShipName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrderDetails.LabelProducts_ProductName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrderDetails.LabelProducts_ProductName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrderDetails.LabelUnitPrice).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrderDetails.LabelUnitPrice = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrderDetails.LabelQuantity).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrderDetails.LabelQuantity = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrderDetails.LabelDiscount).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrderDetails.LabelDiscount = languageElement.TranslatedValue;
            }

            //Labels
            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsOrderDetails.LabelBtnNew).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsOrderDetails.LabelBtnNew = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsOrderDetails.LabelBtnDelete).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsOrderDetails.LabelBtnDelete = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsOrderDetails.LabelBtnUpdate).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsOrderDetails.LabelBtnUpdate = languageElement.TranslatedValue;
            }

            //Messages
            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesOrderDetails.MessageBoxDeleteConfirm).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesOrderDetails.MessageBoxDeleteConfirm = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesOrderDetails.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesOrderDetails.MessageBoxSaveError = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesOrderDetails.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesOrderDetails.MessageBoxSaveOK = languageElement.TranslatedValue;
            }

            OrderDetailsDataContext.LabelsAndMessagesOrderDetails = labelsAndMessages;
        }
示例#13
0
        public void Setup_SetLanguage(string language)
        {
            if (language == null)
            {
                return;
            }

            LabelsAndMessagesTagEmployee labelsAndMessagesTagEmployee = new LabelsAndMessagesTagEmployee();
            WPFLanguage wPFLanguage = LanguageHelper.GetLanguageForForms(language, "TagEmployee");
            LabelsAndMessagesTagEmployee labelsAndMessages = new LabelsAndMessagesTagEmployee();
            LanguageElement languageElement;

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBTagEmployee.LabelTagEmployeeID).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBTagEmployee.LabelTagEmployeeID = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBTagEmployee.LabelEmployees_LastName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBTagEmployee.LabelEmployees_LastName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBTagEmployee.LabelTag_TextDesc).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBTagEmployee.LabelTag_TextDesc = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBTagEmployee.LabelTagEmployeeTextDesc).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBTagEmployee.LabelTagEmployeeTextDesc = languageElement.TranslatedValue;
            }

            //Labels
            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsTagEmployee.LabelBtnNew).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsTagEmployee.LabelBtnNew = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsTagEmployee.LabelBtnDelete).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsTagEmployee.LabelBtnDelete = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsTagEmployee.LabelBtnUpdate).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsTagEmployee.LabelBtnUpdate = languageElement.TranslatedValue;
            }

            //Messages
            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesTagEmployee.MessageBoxDeleteConfirm).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesTagEmployee.MessageBoxDeleteConfirm = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesTagEmployee.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesTagEmployee.MessageBoxSaveError = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesTagEmployee.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesTagEmployee.MessageBoxSaveOK = languageElement.TranslatedValue;
            }

            TagEmployeeDataContext.LabelsAndMessagesTagEmployee = labelsAndMessages;
        }
示例#14
0
        public void Setup_SetLanguage(string language)
        {
            if (language == null)
            {
                return;
            }

            LabelsAndMessagesCustomers labelsAndMessagesCustomers = new LabelsAndMessagesCustomers();
            WPFLanguage wPFLanguage = LanguageHelper.GetLanguageForForms(language, "Customers");
            LabelsAndMessagesCustomers labelsAndMessages = new LabelsAndMessagesCustomers();
            LanguageElement            languageElement;

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCustomers.LabelCustomerID).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCustomers.LabelCustomerID = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCustomers.LabelCompanyName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCustomers.LabelCompanyName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCustomers.LabelContactName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCustomers.LabelContactName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCustomers.LabelContactTitle).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCustomers.LabelContactTitle = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCustomers.LabelAddress).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCustomers.LabelAddress = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCustomers.LabelCity).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCustomers.LabelCity = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCustomers.LabelRegion).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCustomers.LabelRegion = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCustomers.LabelPostalCode).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCustomers.LabelPostalCode = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCustomers.LabelCountry).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCustomers.LabelCountry = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCustomers.LabelPhone).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCustomers.LabelPhone = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCustomers.LabelFax).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCustomers.LabelFax = languageElement.TranslatedValue;
            }

            //Labels
            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsCustomers.LabelBtnNew).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsCustomers.LabelBtnNew = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsCustomers.LabelBtnDelete).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsCustomers.LabelBtnDelete = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsCustomers.LabelBtnUpdate).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsCustomers.LabelBtnUpdate = languageElement.TranslatedValue;
            }

            //Messages
            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesCustomers.MessageBoxDeleteConfirm).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesCustomers.MessageBoxDeleteConfirm = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesCustomers.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesCustomers.MessageBoxSaveError = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesCustomers.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesCustomers.MessageBoxSaveOK = languageElement.TranslatedValue;
            }

            CustomersDataContext.LabelsAndMessagesCustomers = labelsAndMessages;
        }
示例#15
0
        public void Setup_SetLanguage(string language)
        {
            if (language == null)
            {
                return;
            }

            LabelsAndMessagesOrders labelsAndMessagesOrders = new LabelsAndMessagesOrders();
            WPFLanguage             wPFLanguage             = LanguageHelper.GetLanguageForForms(language, "Orders");
            LabelsAndMessagesOrders labelsAndMessages       = new LabelsAndMessagesOrders();
            LanguageElement         languageElement;

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrders.LabelOrderID).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrders.LabelOrderID = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrders.LabelCustomers_ContactName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrders.LabelCustomers_ContactName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrders.LabelEmployees_LastName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrders.LabelEmployees_LastName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrders.LabelOrderDate).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrders.LabelOrderDate = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrders.LabelRequiredDate).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrders.LabelRequiredDate = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrders.LabelShippedDate).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrders.LabelShippedDate = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrders.LabelShippers_CompanyName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrders.LabelShippers_CompanyName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrders.LabelFreight).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrders.LabelFreight = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrders.LabelShipName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrders.LabelShipName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrders.LabelShipAddress).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrders.LabelShipAddress = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrders.LabelShipCity).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrders.LabelShipCity = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrders.LabelShipRegion).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrders.LabelShipRegion = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrders.LabelShipPostalCode).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrders.LabelShipPostalCode = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBOrders.LabelShipCountry).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBOrders.LabelShipCountry = languageElement.TranslatedValue;
            }

            //Labels
            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsOrders.LabelBtnNew).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsOrders.LabelBtnNew = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsOrders.LabelBtnDelete).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsOrders.LabelBtnDelete = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsOrders.LabelBtnUpdate).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsOrders.LabelBtnUpdate = languageElement.TranslatedValue;
            }

            //Messages
            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesOrders.MessageBoxDeleteConfirm).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesOrders.MessageBoxDeleteConfirm = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesOrders.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesOrders.MessageBoxSaveError = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesOrders.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesOrders.MessageBoxSaveOK = languageElement.TranslatedValue;
            }

            OrdersDataContext.LabelsAndMessagesOrders = labelsAndMessages;
        }
示例#16
0
        public void Setup_SetLanguage(string language)
        {
            if (language == null)
            {
                return;
            }

            LabelsAndMessagesCustomerCustomerDemo labelsAndMessagesCustomerCustomerDemo = new LabelsAndMessagesCustomerCustomerDemo();
            WPFLanguage wPFLanguage = LanguageHelper.GetLanguageForForms(language, "CustomerCustomerDemo");
            LabelsAndMessagesCustomerCustomerDemo labelsAndMessages = new LabelsAndMessagesCustomerCustomerDemo();
            LanguageElement languageElement;

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCustomerCustomerDemo.LabelCustomers_CompanyName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCustomerCustomerDemo.LabelCustomers_CompanyName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBCustomerCustomerDemo.LabelCustomerDemographics_CustomerTypeID).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBCustomerCustomerDemo.LabelCustomerDemographics_CustomerTypeID = languageElement.TranslatedValue;
            }

            //Labels
            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsCustomerCustomerDemo.LabelBtnNew).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsCustomerCustomerDemo.LabelBtnNew = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsCustomerCustomerDemo.LabelBtnDelete).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsCustomerCustomerDemo.LabelBtnDelete = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsCustomerCustomerDemo.LabelBtnUpdate).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsCustomerCustomerDemo.LabelBtnUpdate = languageElement.TranslatedValue;
            }

            //Messages
            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesCustomerCustomerDemo.MessageBoxDeleteConfirm).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesCustomerCustomerDemo.MessageBoxDeleteConfirm = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesCustomerCustomerDemo.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesCustomerCustomerDemo.MessageBoxSaveError = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesCustomerCustomerDemo.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesCustomerCustomerDemo.MessageBoxSaveOK = languageElement.TranslatedValue;
            }

            CustomerCustomerDemoDataContext.LabelsAndMessagesCustomerCustomerDemo = labelsAndMessages;
        }
示例#17
0
        public void Setup_SetLanguage(string language)
        {
            if (language == null)
            {
                return;
            }

            LabelsAndMessagesProducts labelsAndMessagesProducts = new LabelsAndMessagesProducts();
            WPFLanguage wPFLanguage = LanguageHelper.GetLanguageForForms(language, "Products");
            LabelsAndMessagesProducts labelsAndMessages = new LabelsAndMessagesProducts();
            LanguageElement           languageElement;

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBProducts.LabelProductID).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBProducts.LabelProductID = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBProducts.LabelProductName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBProducts.LabelProductName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBProducts.LabelSuppliers_CompanyName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBProducts.LabelSuppliers_CompanyName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBProducts.LabelCategories_CategoryName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBProducts.LabelCategories_CategoryName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBProducts.LabelQuantityPerUnit).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBProducts.LabelQuantityPerUnit = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBProducts.LabelUnitPrice).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBProducts.LabelUnitPrice = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBProducts.LabelUnitsInStock).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBProducts.LabelUnitsInStock = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBProducts.LabelUnitsOnOrder).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBProducts.LabelUnitsOnOrder = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBProducts.LabelReorderLevel).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBProducts.LabelReorderLevel = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBProducts.LabelDiscontinued).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBProducts.LabelDiscontinued = languageElement.TranslatedValue;
            }

            //Labels
            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsProducts.LabelBtnNew).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsProducts.LabelBtnNew = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsProducts.LabelBtnDelete).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsProducts.LabelBtnDelete = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsProducts.LabelBtnUpdate).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsProducts.LabelBtnUpdate = languageElement.TranslatedValue;
            }

            //Messages
            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesProducts.MessageBoxDeleteConfirm).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesProducts.MessageBoxDeleteConfirm = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesProducts.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesProducts.MessageBoxSaveError = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesProducts.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesProducts.MessageBoxSaveOK = languageElement.TranslatedValue;
            }

            ProductsDataContext.LabelsAndMessagesProducts = labelsAndMessages;
        }
示例#18
0
        public void Setup_SetLanguage(string language)
        {
            if (language == null)
            {
                return;
            }

            LabelsAndMessagesShippers labelsAndMessagesShippers = new LabelsAndMessagesShippers();
            WPFLanguage wPFLanguage = LanguageHelper.GetLanguageForForms(language, "Shippers");
            LabelsAndMessagesShippers labelsAndMessages = new LabelsAndMessagesShippers();
            LanguageElement           languageElement;

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBShippers.LabelShipperID).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBShippers.LabelShipperID = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBShippers.LabelCompanyName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBShippers.LabelCompanyName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBShippers.LabelPhone).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBShippers.LabelPhone = languageElement.TranslatedValue;
            }

            //Labels
            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsShippers.LabelBtnNew).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsShippers.LabelBtnNew = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsShippers.LabelBtnDelete).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsShippers.LabelBtnDelete = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsShippers.LabelBtnUpdate).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsShippers.LabelBtnUpdate = languageElement.TranslatedValue;
            }

            //Messages
            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesShippers.MessageBoxDeleteConfirm).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesShippers.MessageBoxDeleteConfirm = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesShippers.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesShippers.MessageBoxSaveError = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesShippers.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesShippers.MessageBoxSaveOK = languageElement.TranslatedValue;
            }

            ShippersDataContext.LabelsAndMessagesShippers = labelsAndMessages;
        }
示例#19
0
        public void Setup_SetLanguage(string language)
        {
            if (language == null)
            {
                return;
            }

            LabelsAndMessagesEmployees labelsAndMessagesEmployees = new LabelsAndMessagesEmployees();
            WPFLanguage wPFLanguage = LanguageHelper.GetLanguageForForms(language, "Employees");
            LabelsAndMessagesEmployees labelsAndMessages = new LabelsAndMessagesEmployees();
            LanguageElement            languageElement;

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelEmployeeID).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelEmployeeID = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelLastName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelLastName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelFirstName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelFirstName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelTitle).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelTitle = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelTitleOfCourtesy).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelTitleOfCourtesy = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelBirthDate).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelBirthDate = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelHireDate).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelHireDate = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelAddress).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelAddress = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelCity).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelCity = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelRegion).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelRegion = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelPostalCode).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelPostalCode = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelCountry).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelCountry = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelHomePhone).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelHomePhone = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelExtension).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelExtension = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelPhoto).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelPhoto = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelNotes).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelNotes = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelEmployees_LastName).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelEmployees_LastName = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBEmployees.LabelPhotoPath).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LabelsFromDBEmployees.LabelPhotoPath = languageElement.TranslatedValue;
            }

            //Labels
            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsEmployees.LabelBtnNew).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsEmployees.LabelBtnNew = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsEmployees.LabelBtnDelete).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsEmployees.LabelBtnDelete = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsEmployees.LabelBtnUpdate).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsControlsEmployees.LabelBtnUpdate = languageElement.TranslatedValue;
            }

            //Messages
            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesEmployees.MessageBoxDeleteConfirm).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesEmployees.MessageBoxDeleteConfirm = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesEmployees.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesEmployees.MessageBoxSaveError = languageElement.TranslatedValue;
            }

            languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesEmployees.MessageBoxSaveOK).FirstOrDefault();
            if (languageElement != null)
            {
                labelsAndMessages.LanguageElementsMessagesEmployees.MessageBoxSaveOK = languageElement.TranslatedValue;
            }

            EmployeesDataContext.LabelsAndMessagesEmployees = labelsAndMessages;
        }