예제 #1
0
 private void btnAddLoaiSach_Click(object sender, RoutedEventArgs e)
 {
     FlatWindow window = new FlatWindow()
     {
         Title = "Quản lý loại sách",
         Name = "LoaiSach",
         Content = new LoaiSachView(),
         WindowStartupLocation = WindowStartupLocation.CenterScreen,
         FontSize = 16
     };
     window.Style = Application.Current.FindResource("FlatWindow") as Style;
     window.Closed += new EventHandler(AddWindow_Closed);
     window.ShowDialog();
 }
예제 #2
0
 private void btnAddDauSach_Click(object sender, RoutedEventArgs e)
 {
     FlatWindow window = new FlatWindow()
     {
         Title = "QUẢN LÝ ĐẦU SÁCH",
         Name = "DauSach",
         Content = new DauSachView(true),
         WindowStartupLocation = WindowStartupLocation.CenterScreen,
         FontSize = 16,
         MinHeight = 577,
         MinWidth = 1164
     };
     window.Style = Application.Current.FindResource("FlatWindow") as Style;
     window.Closed += new EventHandler(AddWindow_Closed);
     window.ShowDialog();
 }
예제 #3
0
 private void btnDetail_Click(object sender, RoutedEventArgs e)
 {
     if (!String.IsNullOrEmpty(txtMaDauSach1.Text))
     {
         var record = _dausach.GetByID(int.Parse(txtMaDauSach1.Text));
         FlatWindow window = new FlatWindow()
         {
             Title = "CHI TIẾT ĐẦU SÁCH",
             Name = "CTDauSach",
             Content = new CTDauSachView(record),
             WindowStartupLocation = WindowStartupLocation.CenterScreen,
             FontSize = 16,
             MinHeight = 500,
             MinWidth = 1000
         };
         window.Style = Application.Current.FindResource("FlatWindow") as Style;
         window.ShowDialog();
     }
     else MessageBox.Show("Vui lòng chọn đầu sách");
 }
예제 #4
0
 private void btnDetail_Click(object sender, RoutedEventArgs e)
 {
     var record = (DauSach)dauSachDataGrid.SelectedItem;
     if (record != null)
     {
         FlatWindow window = new FlatWindow()
         {
             Title = "CHI TIẾT ĐẦU SÁCH",
             Name = "CTDauSach",
             Content = new CTDauSachView(record),
             WindowStartupLocation = WindowStartupLocation.CenterScreen,
             FontSize = 16,
             MinHeight = 500,
             MinWidth = 1000
         };
         window.Style = Application.Current.FindResource("FlatWindow") as Style;
         window.ShowDialog();
     }
     else MessageBox.Show("Vui lòng chọn đầu sách");
 }