|
@@ -12,6 +12,7 @@ using System.Windows.Media;
|
|
|
using System.Windows.Media.Imaging;
|
|
|
using System.Windows.Navigation;
|
|
|
using System.Windows.Shapes;
|
|
|
+using LibraryRDK;
|
|
|
|
|
|
namespace PDK_Concert.Pages
|
|
|
{
|
|
@@ -29,16 +30,25 @@ namespace PDK_Concert.Pages
|
|
|
|
|
|
private void save_Click(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
- Numbers numbers = new Numbers()
|
|
|
+ if(InputValidation.CheckNumbers(tbTitle.Text, tbTime.Text))
|
|
|
{
|
|
|
- IDUser = logined.ID,
|
|
|
- Title = tbTitle.Text,
|
|
|
- Description = tbDescription.Text
|
|
|
- };
|
|
|
- Classes.DataBaseClass.connect.Numbers.Add(numbers);
|
|
|
- Classes.DataBaseClass.connect.SaveChanges();
|
|
|
- MessageBox.Show("Номер успешно добавлен","Информация", MessageBoxButton.OK, MessageBoxImage.Information);
|
|
|
- Classes.FrameClass.menuFrame.Navigate(new NumberPage(logined));
|
|
|
+ if (InputValidation.PatternTimeNumbers(tbTime.Text))
|
|
|
+ {
|
|
|
+ Numbers numbers = new Numbers()
|
|
|
+ {
|
|
|
+ IDUser = logined.ID,
|
|
|
+ Title = tbTitle.Text,
|
|
|
+ Description = tbDescription.Text,
|
|
|
+ TimeNumber = tbTime.Text
|
|
|
+ };
|
|
|
+ Classes.DataBaseClass.connect.Numbers.Add(numbers);
|
|
|
+ Classes.DataBaseClass.connect.SaveChanges();
|
|
|
+ MessageBox.Show("Номер успешно добавлен", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
|
|
|
+ Classes.FrameClass.menuFrame.Navigate(new NumberPage(logined));
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private void back_Click(object sender, RoutedEventArgs e)
|