Example #1
0
        private void check_list_search_btn_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                IClientDAO clientDAO = new ClientFileDAO(new ConfigMgr());
                Client     client    = clientDAO.SearchClientByText(check_list_search.Text);
                if (client != null)
                {
                    check_list_owner_name.Text = $"התיק בטיפולו של:{client.ContactForm.CaseOwnerValue}";
                    check_list_partner_1.Text  = $"ת.ז: {client.ContactForm.Person_1.Id}, שם: {client.ContactForm.Person_1.FullName}";
                    check_list_partner_2.Text  = $"ת.ז: {client.ContactForm.Person_2.Id}, שם: {client.ContactForm.Person_2.FullName}";

                    check_list_DataGrid.ItemsSource = client.CheckListRows;
                    this.checkListSearchedClient    = client;
                }
                else
                {
                    DisplaySnackbar("לקוח לא נמצא");
                }
            }
            catch (FileNotFoundException)
            {
                DisplaySnackbar("הקובץ לקוחות לא נמצא, בדוק בהגדרות מערכת את ההגדרות שלך");
            }
            catch (Exception ex)
            {
                DisplaySnackbar("שגיאה כללית במערכת, אנא נסה שוב");
                Logger log = new Logger(new ConfigMgr());
                log.Error("general error on load tab", ex);
            }
        }