Ejemplo n.º 1
0
        /// <summary>
        /// Сохранение водителя (редактирование).
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button6RedactionDriver_Click(object sender, EventArgs e)
        {
            DriverClass RedactionDriver = new DriverClass();

            RedactionDriver                  = (DriverClass)listBox2Driver.SelectedItem;
            RedactionDriver.FIOdriver        = textBox2FioDriver.Text;
            RedactionDriver.ExpirienceDriver = textBox3ExpirienceDriver.Text;
            RedactionDriver.DriverHabitSmoke = checkBox6Smoke.Checked;
            RedactionDriver.DriverHabitDrink = checkBox7Drink.Checked;
            RedactionDriver.DriverHabitDrugs = checkBox5Drugs.Checked;

            if (destFile != "")
            {
                ListDeletePhoto.Add(RedactionDriver.PhotoDriver);
                RedactionDriver.PhotoDriver = destFile;
            }

            if (FlagCopy)
            {
                File.Copy(sourcePath, destFile, true);
                destFile = "";
            }
            RedactionDriver.EditDriver();

            UpdateDriversListbox();
            UpdateOrdersListbox();
            FlagCopy = false;
            ClearDriverPanel();
        }