Пример #1
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (File.Exists(settingsDir + comboBox1.Text + ".dbsettings"))
     {
         comp = File.ReadAllText(settingsDir + comboBox1.Text + ".dbsettings").FromJson <ComparerSetings>();
         loadDataToView();
     }
 }
Пример #2
0
        public void loadDataFromView()
        {
            comp = new ComparerSetings();

            comp.sourceServer         = textBox1.Text;
            comp.sourceAuthentication = radioButton1.Checked ? "Windows" : "SQL";
            comp.sourceUser           = textBox2.Text;
            comp.sourcePassword       = textBox3.Text;
            comp.sourceDb             = textBox4.Text;
            comp.sourceSchema         = textBox5.Text.Length > 0 ? textBox5.Text : "dbo";

            comp.destServer         = textBox6.Text;
            comp.destAuthentication = radioButton3.Checked ? "Windows" : "SQL";
            comp.destUser           = textBox7.Text;
            comp.destPassword       = textBox8.Text;
            comp.destDb             = textBox9.Text;
            comp.destSchema         = textBox10.Text.Length > 0 ? textBox10.Text : "dbo";

            comp.tableData      = textBox12.Text.Trim();
            comp.ignoreData     = textBox14.Text.Trim();
            comp.fastComparison = checkBox1.Checked ? "true" : "false";
            comp.modifiedDate   = DateTime.Now.ToString();
        }