Ejemplo n.º 1
0
        protected void BtnSrch_Click(object sender, EventArgs e)
        {
            String mots = InputMot.Value;
            Mots   m    = db.Mots.FirstOrDefault(a => a.text == mots);

            if (m != null)
            {
                lab.Text    = mots;
                lab.Visible = true;
            }
            else
            {
                Mots mo = new Mots();
                mo.text = mots;
                db.Mots.InsertOnSubmit(mo);
                db.SubmitChanges();


                GrdTable.DataSource = db.Mots;
                GrdTable.DataBind();
            }
        }
 partial void DeleteMots(Mots instance);
 partial void UpdateMots(Mots instance);
 partial void InsertMots(Mots instance);