protected void Button1_Click(object sender, EventArgs e) { us2dbDataContext db = new us2dbDataContext(); try { us2 tab1 = new us2(); tab1.data = Convert.ToDateTime(TextBox2.Text); tab1.oper = TextBox3.Text; tab1.summ = TextBox4.Text; db.us2.InsertOnSubmit(tab1); db.SubmitChanges(); Label5.Text = null; Response.Redirect("/Home2.aspx"); } catch (SystemException) { Label5.Text = "Ошибка ввода данных!"; } }
partial void Updateus2(us2 instance);
partial void Deleteus2(us2 instance);
partial void Insertus2(us2 instance);