Пример #1
0
 private void Image_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
 {
     grid1.Visibility = Visibility.Hidden;
     gridsearch.RowDefinitions.Add(new RowDefinition());
     using (DAL.Model1 m = new DAL.Model1())
     {
         lvDataBinding.ItemsSource = m.Jobs.ToList();
     }
 }
Пример #2
0
        private void CreateJobButton_Click(object sender, RoutedEventArgs e)
        {
            Operations o = new Operations(dal);

            using (DAL.Model1 m = new DAL.Model1())
            {
                o.AddJob(textBoxName.Text, "topik", m.Types.Where(x => x.Name == "Уборщица").FirstOrDefault(),
                         Convert.ToInt32(textBoxSalary.Text), textBoxinfo.Text, "asdasd", m.Users.Where(x => x.Name == "antony").FirstOrDefault(), m.Cityes.Where(x => x.Name == "Киев").FirstOrDefault(), "a", "b");
            }
        }
Пример #3
0
        public MainJobWindow()
        {
            InitializeComponent();

            using (DAL.Model1 m = new DAL.Model1())
            {
                foreach (City c in m.Cityes.ToList())
                {
                    comboBoxCityes.Items.Add(c.Name);
                }
            }
        }