private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                _ViolationData = await DFileType.GetData();
            }
            catch (Exception exception)
            {
                Utility.MyMessageBox("خطا در بانک اطلاعاتی", "خطا در دریافت اطلاعات\n" + exception.Message);
                Close();
                return;
            }
            _ViolationSearchData = _ViolationData;
            if (string.IsNullOrEmpty(TxtSearch.Text.Trim()) || _add)
            {
                DgdData.ItemsSource = _ViolationSearchData;
                TxtSearch.Text      = string.Empty;
            }
            else
            {
                TxtSearch_TextChanged(null, null);
            }
            DgdData.ItemsSource = _ViolationSearchData;

            BtnNew_Click(null, null);
        }
Example #2
0
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                //_fileData = await DFile.GetData();
                _fileAllData = await DFile.GetAllData();

                _fileTypeData = await DFileType.GetData();

                _violationData = await DViolation.GetData();

                _creatPersonData = await DPerson.GetCreate();

                _creatPlaqueData = await DPlaque.GetCreate();
            }
            catch (Exception exception)
            {
                Utility.MyMessageBox("خطا در بانک اطلاعاتی", "خطا در دریافت اطلاعات\n" + exception.Message);
                Close();
                return;
            }
            //_fileSearchData = _fileData;
            _fileSearchAllData       = _fileAllData;
            CboFileType.ItemsSource  = _fileTypeData;
            CboViolation.ItemsSource = _violationData;
            DgdFile.ItemsSource      = _fileSearchAllData;
            BtnNew_Click(null, null);
        }
Example #3
0
        private async void BtnSelectFileType_Click(object sender, RoutedEventArgs e)
        {
            var winFileType = new WinFileType();

            winFileType.ShowDialog();
            try
            {
                _fileTypeData = await DFileType.GetData();
            }
            catch (Exception exception)
            {
                Utility.MyMessageBox("خطا در بانک اطلاعاتی", "خطا در دریافت اطلاعات\n" + exception.Message);
                Close();
                return;
            }
            CboFileType.ItemsSource = _fileTypeData;
        }