Ejemplo n.º 1
0
 private void Display()
 {
     try
     {
         customDisk d = (customDisk)lvDisk.SelectedItem;
         userRent.Content = DiskControler.getUserRent(d.DiskID);
         dueDate.Text     = DiskControler.getDueDate(d.DiskID);
         status.Text      = d.ChkOutStatus;
     }
     catch (Exception)
     {
         userRent.Content = "None";
         dueDate.Text     = "None";
     }
 }
Ejemplo n.º 2
0
        private void Cd_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
        {
            //CustomerBS controller = new CustomerBS();
            ContentDialog cd = new ContentDialog();
            customDisk    d  = (customDisk)lvDisk.SelectedItem;

            if (DiskControler.RemoveDisk(d.DiskID))
            {
                lsDisk.Remove(lsDisk.Single(n => n.DiskID == d.DiskID));
                cd.Content           = "Successfully deleted title";
                cd.Title             = "Notification";
                cd.PrimaryButtonText = "Close";
                (sender as ContentDialog).Hide();
                cd.ShowAsync();
                return;
            }
            else
            {
                cd.Content           = "Delete title failed";
                cd.Title             = "Notification";
                cd.PrimaryButtonText = "Close";
                cd.ShowAsync();
            }
        }