예제 #1
0
        private void Back_Click(object sender, RoutedEventArgs e)
        {
            Base_of_transactions Window = new Base_of_transactions();

            Window.Show();
            this.Close();
        }
예제 #2
0
 private void MakeADeal_Click(object sender, RoutedEventArgs e)
 {
     ServiceReference1.Service1Client Service = new ServiceReference1.Service1Client();
     if (Convert.ToString(Property.SelectedItem) == "" || Convert.ToString(TypeOfDeal.SelectedItem) == "" || Convert.ToDouble(Cost.Text) <= 0 || Cost.Text == "")
     {
         MessageBox.Show("Заполните поля корректно", "Внимание");
     }
     else
     {
         ServiceReference1.Deal SaveDeal = new ServiceReference1.Deal();
         SaveDeal.Realty_ID   = Help1[Convert.ToInt32(Property.SelectedIndex)];
         SaveDeal.DateDeal    = Convert.ToDateTime(Date.SelectedDate);
         SaveDeal.Services_ID = Help2[Convert.ToInt32(TypeOfDeal.SelectedIndex)];
         SaveDeal.Users_ID    = Authorization.IDUser;
         Service.AddDeal(SaveDeal);
         Base_of_transactions Window = new Base_of_transactions();
         Window.Show();
         this.Close();
     }
 }