Esempio n. 1
0
        private void comboBoxViewTable_SelectedIndexChanged(object sender, EventArgs e)
        {
            var option = comboBoxViewTable.SelectedItem.ToString();

            switch(option)
            {
                case "Lucrari":
                    dgViewDatabase.Refresh();
                    dgViewDatabase.AutoResizeColumns();
                    var jobs = new ReadFromDataBase();
                    dgViewDatabase.DataSource = jobs.ReadTables(ConfigurationManager.AppSettings["ReadJobs"]);

                    break;
                case "Contracte":
                    dgViewDatabase.Refresh();
                    dgViewDatabase.AutoResizeColumns();
                    var contracte= new ReadFromDataBase();
                    dgViewDatabase.DataSource = contracte.ReadTables(ConfigurationManager.AppSettings["Contracte"]);
                    break;
                case "Procese Verbale":
                    Console.WriteLine("Procese Verbale");
                    break;
                case "Registru Jurnal":
                    Console.WriteLine("Registru Jurnal");
                    break;
                case "Raport 392B":
                    Console.WriteLine("Raport 392B");
                    break;
                default:
                    break;
            }
        }
Esempio n. 2
0
 private void FillCombo()
 {
     var comboContent = new List<object>();
     var fillCombo = new ReadFromDataBase();
     comboContent=fillCombo.ReadColumnDatabase(ConfigurationManager.AppSettings["ComboBox"]);
     for (int i = 0; i < comboContent.Count; i++)
     {
         comboBoxViewTable.Items.Add((string)comboContent[i]);
     }
 }
Esempio n. 3
0
 public static void Lucrari()
 {
     var jobs= new ReadFromDataBase();
     jobs.ReadTables("");
 }