Beispiel #1
0
        /// <summary>
        /// Pozwala edytować już zapisane dane
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, EventArgs e)
        {
            foreach (DataGridViewRow row in this.dataGridView1.SelectedRows)
            {
                Clients client = row.DataBoundItem as Clients;
                if (client != null)
                {
                    NewClientForm clientForm = new NewClientForm();
                    clientForm.MdiParent = this.ParentForm;
                    clientForm.Show();

                }
            }
        }
Beispiel #2
0
 /// <summary>
 /// metoda Wywołyje formularz Klientów
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void button1_Click(object sender, EventArgs e)
 {
     NewClientForm newClientForm = new NewClientForm();
     newClientForm.MdiParent = this.ParentForm;
     newClientForm.Show();
 }
Beispiel #3
0
 private void dodajKontrahentaToolStripMenuItem_Click(object sender, EventArgs e)
 {
     NewClientForm newClients = new NewClientForm();
     newClients.MdiParent = this;
     newClients.Show();
 }
Beispiel #4
0
        /// <summary>
        /// Inmportowanie danych z pliku XML
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void importujDaneKontrahentówToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                OpenFileDialog openFileDialog = new OpenFileDialog();
                openFileDialog.Title = "Import danych produktu";
                openFileDialog.Filter = "Pliki formatu Xml (*.xml)|*.xml|Wszystkie pliki (*.*)|*.*";
                openFileDialog.Multiselect = false;
                if (openFileDialog.ShowDialog() == DialogResult.OK)
                {
                    Clients data = ClientXmlSerializer.Deserialize(openFileDialog.FileName);

                    NewClientForm newclientForm = new NewClientForm(data);
                    newclientForm.MdiParent = this;
                    newclientForm.Show();
                }
            }
            catch (Exception x)
            {
                MessageBox.Show("Podczas importu danych wystąpił błąd: " + x.Message);
            }
        }
Beispiel #5
0
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     NewClientForm newClients = new NewClientForm();
     newClients.MdiParent = this;
     newClients.Show();
 }