Beispiel #1
0
 private void SalvaButton_Click(object sender, EventArgs e)
 {
     if (
         NameTextBox.Text != string.Empty &&
         PathTextBox.Text != string.Empty &&
         CodBaseTextBox.Text != string.Empty
         )
     {
         //if (MessageBox.Show("Salva database?", "Confermare", MessageBoxButtons.YesNo) == DialogResult.Yes)
         //{
         var db = new GeispDatabase(NameTextBox.Text, CodBaseTextBox.Text, PathTextBox.Text, GeispUtils.getSocietaId(SocietaComboBox.SelectedItem.ToString()));
         GeispUtils.addDatabase(db);
         cfg.Refr();
         this.Close();
         //}
         //else
         //{
         /// Code for ‘No’
         //}
     }
     else
     {
         MessageBox.Show("Si prega di compilare tutti i campi", "Attenzione..");
     }
 }
Beispiel #2
0
        private void ControlsInit()
        {
            GeispDatabase gDet = new GeispDatabase();

            gDet = GeispUtils.getDatabase(name);

            NameTextBox.Text  = gDet.name;
            MdbTextBox.Text   = gDet.mdb;
            ExcelTextBox.Text = gDet.excel;
            Mdb2TextBox.Text  = gDet.mdb2;
        }
Beispiel #3
0
        public DetailsForm(string name)
        {
            InitializeComponent();
            GeispDatabase gDet = new GeispDatabase();

            gDet = GeispUtils.getDatbase(name);

            NameTextBox.Text    = gDet.name;
            CodBaseTextBox.Text = gDet.codBas;
            SocietaTextBox.Text = gDet.getSocietaName();
            PathTextBox.Text    = gDet.path;
        }
Beispiel #4
0
        public DetailsForm(string name)
        {
            InitializeComponent();
            GeispDatabase gDet = new GeispDatabase();

            gDet = GeispUtils.getDatabase(name);

            NameTextBox.Text  = gDet.name;
            MdbTextBox.Text   = gDet.mdb;
            ExcelTextBox.Text = gDet.excel;
            Mdb2TextBox.Text  = gDet.mdb2;
        }
Beispiel #5
0
        private void ControlsInit()
        {
            GeispDatabase gDet = new GeispDatabase();

            gDet          = GeispUtils.getDatbase(name);
            bs            = new BindingSource();
            bs.DataSource = GeispUtils.getSocietaNames();
            SocietaComboBox.DataSource = bs;

            NameTextBox.Text     = gDet.name;
            CodBaseTextBox.Text  = gDet.codBas;
            SocietaComboBox.Text = gDet.getSocietaName();
            PathTextBox.Text     = gDet.path;
        }
Beispiel #6
0
        private void ApplicareButton_Click(object sender, EventArgs e)
        {
            if (File.Exists(MdbTextBox.Text) == false || File.Exists(ExcelTextBox.Text) == false || File.Exists(Mdb2TextBox.Text) == false)
            {
                MessageBox.Show("Invalid path format!");
                return;
            }
            if (String.IsNullOrEmpty(NameTextBox.Text))
            {
                MessageBox.Show("Name field is required!");
                return;
            }
            var db = new GeispDatabase(NameTextBox.Text, MdbTextBox.Text, ExcelTextBox.Text, Mdb2TextBox.Text);

            GeispUtils.modifyDatabase(name, db);
            this.Close();
        }
Beispiel #7
0
 private void ApplicareButton_Click(object sender, EventArgs e)
 {
     if (
         NameTextBox.Text != string.Empty &&
         PathTextBox.Text != string.Empty &&
         CodBaseTextBox.Text != string.Empty
         )
     {
         if (MessageBox.Show("Applicare configurazione?", "Confermare", MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
             var db = new GeispDatabase(NameTextBox.Text, CodBaseTextBox.Text, PathTextBox.Text, GeispUtils.getSocietaId(SocietaComboBox.SelectedItem.ToString()));
             GeispUtils.modifyDatabase(name, db);
         }
         else
         {
             /// Code for ‘No’
         }
     }
     else
     {
         MessageBox.Show("Si prega di compilare tutti i campi", "Attenzione..");
     }
 }