Esempio n. 1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            DataClasses1DataContext db = new DataClasses1DataContext();

            suggestion su = new suggestion();

               su.message_box = TextBoxmessage.Text;
            su.Full_name = TextBoxCont_Name.Text;
               su.Email = TextBoxContEmail.Text;
            su.user_id = db.user_datas.FirstOrDefault(a => a.id == Int32.Parse(Session["User"].ToString())).id;
            var user= db.user_datas.FirstOrDefault(a => a.id == Int32.Parse(Session["User"].ToString())).first_name;

            db.suggestions.InsertOnSubmit(su);
               db.SubmitChanges();
        }
 partial void Deletesuggestion(suggestion instance);
 partial void Updatesuggestion(suggestion instance);
 partial void Insertsuggestion(suggestion instance);
		private void detach_suggestions(suggestion entity)
		{
			this.SendPropertyChanging();
			entity.user_data = null;
		}