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

            BtnNew_Click(null, null);
        }
Beispiel #2
0
 private async void Window_Loaded(object sender, RoutedEventArgs e)
 {
     try
     {
         _plaqueData = await DPlaque.GetData();
     }
     catch (Exception exception)
     {
         Utility.MyMessageBox("خطا در بانک اطلاعاتی", "خطا در دریافت اطلاعات\n" + exception.Message);
         Close();
         return;
     }
     _plaqueSearchData     = _plaqueData;
     DgdPlaque.ItemsSource = _plaqueSearchData;
 }
Beispiel #3
0
        private async void BtnNew_Click(object sender, RoutedEventArgs e)
        {
            var winPlaque = new WinPlaque();

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