Exemplo n.º 1
0
    protected void btn_kaydet_Click(object sender, EventArgs e)
    {
        SoruDBDataContext ohamg = new SoruDBDataContext();
        var a = ohamg.lu_topicOS;

        lu_topicOS topik = new lu_topicOS {
            text = txt_konu.Text
        };

        ohamg.lu_topicOS.InsertOnSubmit(topik);
        ohamg.SubmitChanges();

        //GridView1.DataSource = a;
    }
Exemplo n.º 2
0
    public static void saveAnswer(int member_id, int question_id, DateTime date, bool correct, TimeSpan?time)  //soru işareti nullable demek oluyor
    {
        SoruDBDataContext sorudb = new SoruDBDataContext();

        tx_answeredQuestionOS taq = new tx_answeredQuestionOS();

        taq.member_id   = member_id;
        taq.question_id = question_id;
        taq.date        = date;
        taq.correct     = correct;
        taq.time        = time;

        sorudb.tx_answeredQuestionOS.InsertOnSubmit(taq);
        sorudb.SubmitChanges();
    }