private void Button_Click(object sender, RoutedEventArgs e)
 {
     FName.Clear();
     LName.Clear();
     UserName.Clear();
     Address.Clear();
     City.Clear();
     txtPassword.Clear();
     MobileNo.Clear();
 }
Пример #2
0
 private void btnClear_Click(object sender, EventArgs e)
 {
     id = 0;
     FName.Clear();
     Surname.Clear();
     Email.Clear();
     City.Clear();
     ProductCategory.Clear();
     ProductCode.Clear();
     ProductName.Clear();
     ProductVolume.Clear();
     ProductUnit.Clear();
     comboBox1.Items.Clear();
     ProductCost.Clear();
 }
Пример #3
0
        private void FAddBtn_Click(object sender, RoutedEventArgs e)
        {
            string name = FName.Text;

            if (String.IsNullOrEmpty(name))
            {
                MessageBox.Show("Вы не ввели название факультета!", "Предупреждение", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
            else
            {
                Faculty faculty = new Faculty()
                {
                    Name = name
                };
                fvm.AddFaculty(faculty);
                MessageBox.Show($"Факультет {name} успешно добавлен.", "Сообщение", MessageBoxButton.OK, MessageBoxImage.Information);
                FName.Clear();
                LoadFaculties();
            }
        }
Пример #4
0
        private void DepartmentsList_SelectedIndexChanged(object sender, EventArgs e)
        {
            string name = DepartmentsList.SelectedItem.ToString();

            var id = departments
                     .Where(d => d.Name == name)
                     .FirstOrDefault().Id;
            var emps = employees
                       .Where(x => x.DepId == id)
                       .ToList();

            EmpList.Items.Clear();
            foreach (var x in emps)
            {
                EmpList.Items.Add($"{x.FirstName} {x.LastName}");
            }
            Add_but.Enabled = true;
            FName.Clear();
            LName.Clear();
            Position.Clear();
            Experience.Clear();
        }