コード例 #1
0
 private void change_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (date.SelectedDate > stayLimit.SelectedDate)
         {
             MessageBox.Show("Срок проживания заканчивается раньше конца оплаченного периода проживания");
             date.BorderBrush = new SolidColorBrush(Colors.Red);
         }
         else
         {
             if (id.IsEnabled == true)
             {
                 Common_Functions.update_StudentData(globalConnection, studentID, name.Text, surname.Text, patronymic.Text, id.Text, faculty.SelectedValue.ToString(), course.Text, phone.Text, decree.Text, form.SelectedValue.ToString(), citizenship.SelectedValue.ToString(), (DateTime)date.SelectedDate, (DateTime)decreeDate.SelectedDate, (DateTime)stayLimit.SelectedDate);
             }
             else
             {
                 Common_Functions.update_OtherLivingData(globalConnection, id.Text, name.Text, surname.Text, patronymic.Text, (DateTime)date.SelectedDate, decree.Text, (DateTime)decreeDate.SelectedDate, (DateTime)stayLimit.SelectedDate, citizenship.SelectedValue.ToString(), info.Text, phone.Text);
             }
             page.searchButton_Click(sender, e);
             this.Close();
         }
     }
     catch
     {
         MessageBox.Show("Невозможно изменить информацию о проживающем");
     }
 }
コード例 #2
0
ファイル: eviction.xaml.cs プロジェクト: GesamalKoT/Test
        private void actionButton_Click(object sender, RoutedEventArgs e)
        {
            switch (type)
            {
            case "S": Common_Functions.evictionST(globalConnection, id, decree.Text, (DateTime)date.SelectedDate); break;

            case "SE": Common_Functions.evictionSTE(globalConnection, id, decree.Text, (DateTime)date.SelectedDate); break;

            case "O": Common_Functions.evictionOL(globalConnection, id, decree.Text, (DateTime)date.SelectedDate); break;

            case "OE": Common_Functions.evictionOLE(globalConnection, id, decree.Text, (DateTime)date.SelectedDate); break;
            }

            /*if (type == "S")
             * {
             *  Common_Functions.evictionST(globalConnection, id, decree.Text, (DateTime)date.SelectedDate);
             * }
             * else
             * {
             *  Common_Functions.evictionOL(globalConnection, id, decree.Text, (DateTime)date.SelectedDate);
             * }*/

            page.searchButton_Click(sender, e);
            window.Close();
            this.Close();
        }