private void Updatebtn_Click(object sender, RoutedEventArgs e)
        {
            var update = MessageBox.Show("Would you like to update the data??", "Data Update", MessageBoxButton.YesNo, MessageBoxImage.Question);

            if (update == MessageBoxResult.Yes)
            {
                customer cus = new customer(CustList.SelectedIndex, Name_tb.Text, Address_tb.Text, Email_tb.Text, Phone_tb.Text);
                foreach (customer csitem in cq)
                {
                    if (cus.Id == csitem.Id)
                    {
                        csitem.Name    = Name_tb.Text;
                        csitem.Address = Address_tb.Text;
                        csitem.Email   = Email_tb.Text;
                        csitem.Phone   = Phone_tb.Text;
                    }
                }

                var upd = from up in cq
                          select up.Name;
                CustList.DataContext = upd;
                Name_tb.Clear();
                Address_tb.Clear();
                Email_tb.Clear();
                Phone_tb.Clear();
                MessageBox.Show("Details have been successfully Updated!!!", "Data Updated", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }
        private void Delete_Click(object sender, RoutedEventArgs e)
        {
            var delete = MessageBox.Show("Would you like to update the data??", "Data Update", MessageBoxButton.YesNo, MessageBoxImage.Question);

            if (delete == MessageBoxResult.Yes)
            {
                while (true)
                {
                    customer tempc = cq.Dequeue();
                    if (tempc.Id == CustList.SelectedIndex)
                    {
                        break;
                    }
                    cq.Enqueue(tempc);
                }
                int i = 0;
                foreach (customer item in cq)
                {
                    item.Id = i;
                    i++;
                }

                var del = from cust in cq
                          select cust.Name;
                CustList.DataContext = del;
                Name_tb.Clear();
                Address_tb.Clear();
                Email_tb.Clear();
                Phone_tb.Clear();
                MessageBox.Show("Information is successfully deleted!!!", "Information Deleted", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }
 private void Addbtn_Click(object sender, RoutedEventArgs e)
 {
     if (Name_tb.Text == "" || Address_tb.Text == "" || Email_tb.Text == "" || Phone_tb.Text == "")
     {
         MessageBox.Show("All fields are required to add new customer", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
     else
     {
         cq.Enqueue(new customer(cq.Count, Name_tb.Text, Address_tb.Text, Email_tb.Text, Phone_tb.Text));
         var ins = from cu in cq
                   select cu.Name;
         CustList.DataContext = ins;
         Name_tb.Clear();
         Address_tb.Clear();
         Email_tb.Clear();
         Phone_tb.Clear();
         MessageBox.Show("New infromation is successfully added!!!", "New Information Added", MessageBoxButton.OK, MessageBoxImage.Information);
     }
 }