Exemple #1
0
        private Models.ChangePapersAnSiseModel.Types GetSize()
        {
            var defType = new Models.ChangePapersAnSiseModel.Types();
            var tmpType = GetTypesBySize(GetSizeByIndex(1));

            defType.Type = tmpType[0].Type;
            defType.id   = tmpType[0].id;
            return(defType);
        }
Exemple #2
0
        public BindableCollection <Models.ChangePapersAnSiseModel.Types> GetTypesBySize(Sizes size)
        {
            _listTypes = _all.Types.GetTypesBySize(size).ToList();
            var tmp = new BindableCollection <Models.ChangePapersAnSiseModel.Types>();

            foreach (var e in _listTypes)
            {
                var tmpType = new Models.ChangePapersAnSiseModel.Types();
                tmpType.id = e.TypeID;
                try
                {
                    tmpType.Type = _all.TypeTexts.GetTypeTextByTypeALang(e, new Languages {
                        Language = Preference.Lang
                    }).Text;
                }
                catch (NotExistInDataBaseException)
                {
                    tmpType.Type = "Tymczasowy text";
                }
                tmp.Add(tmpType);
            }
            return(tmp);
        }