-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathEEGradeThesis.aspx.cs
48 lines (39 loc) · 1.47 KB
/
EEGradeThesis.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Data;
using System.Linq;
using System.Security.Cryptography;
using System.Web;
using System.Web.Configuration;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Management;
namespace Lastellast
{
public partial class EEGradeThesis : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void gra_Click(object sender, EventArgs e)
{
string connStr = WebConfigurationManager.ConnectionStrings["test"].ToString();
//create a new connection
SqlConnection conn = new SqlConnection(connStr);
SqlCommand EEGrade = new SqlCommand("EEGradeThesis", conn);
EEGrade.CommandType = CommandType.StoredProcedure;
int EE_id = Int16.Parse(eeid.Text);
int sid = Int16.Parse(sidd.Text);
String title = tt.Text;
Decimal EE_Grade = Decimal.Parse(eeg.Text);
EEGrade.Parameters.Add(new SqlParameter("@EE_id", EE_id));
EEGrade.Parameters.Add(new SqlParameter("@sid", sid));
EEGrade.Parameters.Add(new SqlParameter("@thesis_title", title));
EEGrade.Parameters.Add(new SqlParameter("@EE_grade", EE_Grade));
conn.Open();
EEGrade.ExecuteNonQuery();
conn.Close();
}
}
}