Ejemplo n.º 1
0
        private void LoadData()
        {
            var source = new BindingSource();
            var data   = InitDbLogHelper.GetUnKnownErrors();

            source.DataSource        = data;
            dataGridView1.DataSource = source;
        }
Ejemplo n.º 2
0
 private void tabControl1_Selected(object sender, TabControlEventArgs e)
 {
     if (e.TabPageIndex == 1)
     {
         _listCollections = DataProcessor.GetCollections();
         LoadDataControls();
     }
     else if (e.TabPageIndex == 2)
     {
         textBox3.Text = String.Empty;
     }
     else if (e.TabPageIndex == 3)
     {
         var source = new BindingSource();
         var data   = InitDbLogHelper.GetKnownErrors();
         source.DataSource        = data;
         dataGridView2.DataSource = source;
     }
 }
Ejemplo n.º 3
0
        private void tabControl1_Selected(object sender, TabControlEventArgs e)
        {
            if (e.TabPageIndex == 1)
            {
                _listCollections = DataProcessor.GetCollections();
                LoadDataControls();
            }
            else if (e.TabPageIndex == 2)
            {
                textBox3.Text = String.Empty;
            }
            else if (e.TabPageIndex == 3)
            {
                var source      = new BindingSource();
                var data        = InitDbLogHelper.GetKnownErrors();
                var listKnowErr = new List <KnownErrorView>();
                foreach (var knowErr in data)
                {
                    var st = BsonSerializer.Deserialize <StatusError>(knowErr.Status.ToJson());
                    var an = BsonSerializer.Deserialize <Answer>(knowErr.Answer.ToJson());

                    listKnowErr.Add(new KnownErrorView
                    {
                        Message     = knowErr.Message,
                        Count       = knowErr.CountFounded,
                        StatusCode  = st.StatusCode,
                        StatusTitle = st.StatusTitle,
                        Answer      = an.Text,
                    });
                }

                source.DataSource        = listKnowErr;
                dataGridView2.DataSource = source;
                textBox7.Clear();
                textBox8.Clear();
                textBox9.Clear();
                textBox10.Clear();
            }
        }
Ejemplo n.º 4
0
 public LogParser()
 {
     InitDbLogHelper.InitDb();
     InitializeComponent();
 }