Exemplo n.º 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)
            {
                Employee employee = row.DataBoundItem as Employee;
                if (employee != null)
                {
                    NewEmployeeForm newEmployeeForm = new NewEmployeeForm();
                    newEmployeeForm.MdiParent = this.ParentForm;
                    newEmployeeForm.Show();

                }
            }
        }
Exemplo n.º 2
0
 private void dodajPracownikaToolStripMenuItem_Click(object sender, EventArgs e)
 {
     NewEmployeeForm newemployeeForm = new NewEmployeeForm();
     newemployeeForm.MdiParent = this;
     newemployeeForm.Show();
 }
Exemplo n.º 3
0
 private void toolStripButton3_Click(object sender, EventArgs e)
 {
     NewEmployeeForm newemployeeForm = new NewEmployeeForm();
     newemployeeForm.MdiParent = this;
     newemployeeForm.Show();
 }
Exemplo n.º 4
0
        /// <summary>
        /// Inmportowanie danych z pliku XML
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void importujDanePracownikó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)
                {
                    Employee data = EmployeeXmlSerializer.Deserialize(openFileDialog.FileName);

                    NewEmployeeForm newEmployeeForm = new NewEmployeeForm(data);
                    newEmployeeForm.MdiParent = this;
                    newEmployeeForm.Show();
                }
            }
            catch (Exception x)
            {
                MessageBox.Show("Podczas importu danych wystąpił błąd: " + x.Message);
            }
        }
Exemplo n.º 5
0
 /// <summary>
 /// metoda Wywołyje formularz Pracowników 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void button1_Click(object sender, EventArgs e)
 {
     NewEmployeeForm newEmployeeForm = new NewEmployeeForm();
     newEmployeeForm.MdiParent = this.ParentForm;
     newEmployeeForm.Show();
 }