小编nla*_*mar的帖子

从 WPF 执行存储过程

我正在做一个简单的wpf申请注册过程。用户提供的注册详细信息必须存储在服务器中。我想为此使用存储过程。我正在使用 SQL Server 2008。我在服务器中创建了表和存储过程,用于存储来自用户的输入。我无法在我的 wpf 应用程序中使用它。以下是C#代码。

注册.xaml.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Data.SqlClient;
using System.Text.RegularExpressions;
using System.Data; 

namespace storedprocedure
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class Registration : Window
{
    public Registration()
    {
        InitializeComponent();
    }
private void Login_Click(object sender, RoutedEventArgs e)
    {

        Login login = new Login();

        login.Show();

        Close();

    }



    private void …
Run Code Online (Sandbox Code Playgroud)

c# sql wpf stored-procedures

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

c# ×1

sql ×1

stored-procedures ×1

wpf ×1