Example #1
0
        private void Button_delete_Click(object sender, RoutedEventArgs e)
        {
            var db = new CommunicatorContext();

            db.DeleteObjectFromDB((Contact)listBox.SelectedItem);
            RefreshLB();
        }
Example #2
0
        public void RefreshLB()
        {
            var db    = new CommunicatorContext();
            var query = from c in db.Contacts
                        orderby c.Name
                        select c;

            listBox.ItemsSource = query.ToList();
        }
        public void RefreshLB()
        {
            var db = new CommunicatorContext();
            var query = from c in db.Contacts
                        orderby c.Name
                        select c;

            listBox.ItemsSource = query.ToList();
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var db = new CommunicatorContext();
            for (int i = 0; i < 5; i++)
            {
               Contact c = new Contact(i.ToString(), i.ToString(), i.ToString(), i.ToString(), i.ToString());
            }

            vc.A = "5";

            RefreshLB();
            List<IConnection> connections = new List<IConnection>();
            connections.Add(new VideoConnection());
            connections.Add(new PhoneConnection());
            connections.Add(new MessageConnection());
            comboBox.ItemsSource = connections;
        }
Example #5
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var db = new CommunicatorContext();

            for (int i = 0; i < 5; i++)
            {
                Contact c = new Contact(i.ToString(), i.ToString(), i.ToString(), i.ToString(), i.ToString());
            }

            vc.A = "5";

            RefreshLB();
            List <IConnection> connections = new List <IConnection>();

            connections.Add(new VideoConnection());
            connections.Add(new PhoneConnection());
            connections.Add(new MessageConnection());
            comboBox.ItemsSource = connections;
        }
 public UserService(CommunicatorContext _context, UserManager <User> _userManager)
 {
     this._context     = _context;
     this._userManager = _userManager;
 }
Example #7
0
 public RoomService(CommunicatorContext _context)
 {
     this._context = _context;
 }
 private void Button_delete_Click(object sender, RoutedEventArgs e)
 {
     var db = new CommunicatorContext();
     db.DeleteObjectFromDB((Contact)listBox.SelectedItem);
     RefreshLB();
 }