class= " lineNumbers " del
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:
|
class= del
il class= " del id= " codeSnippet691657 del protected Button1_Click vuoto (mittente dell'oggetto, EventArgs e)
{
stringa sql = "";
varietà COM = nuovo SqlCommand ();
sql +=
“L'INSERTO in Xtrain.XTV7_3_Video_View (XTV7_VVR_Time_Start, XTV7_VVR_Time_Close, XTV7_UserName, XTV7_Videos_ID) stima (@XTV7_VVR_Time_Start, @XTV7_VVR_Time_Close, @XTV7_UserName, @XTV7_Videos_ID)„;
//Geek.XTV7_VidReg;
COM. Parameters.Add (“@XTV7_VVR_Time_Start„, SqlDbType.DateTime). Valore = DateTime.Parse (lblVidReg.Text);
COM. Parameters.Add (“@XTV7_VVR_Time_Close„, SqlDbType.DateTime). Valore = DateTime.Parse (DateTime.Now.ToString ());
COM. Parameters.Add (“@XTV7_UserName„, SqlDbType.NVarChar). Valore = HttpContext.Current.User.Identity.Name.ToString ();
COM. Parameters.Add (“@XTV7_Videos_ID„, SqlDbType.Int). Valore = Int32.Parse (Geek.XTV7_Videos_ID.ToString ());
prova
{
data.ExecuteNonQuery (sql, COM);
}
fermo (eccezione ex)
{
mettere insieme lo scritto = “language= \ “Javascript \ “>alert del „;
ClientScript.RegisterStartupScript (GetType (), “riorienta„, scriptreturn, falsi);
}
|