コード例 #1
0
ファイル: Default.aspx.cs プロジェクト: Quantum541/work
        protected void Add_Click(object sender, EventArgs e)
        {
            var currentStudent = new Student();
            currentStudent.Namediscipline = TextBox1.Text;
            currentStudent.Hours = TextBox2.Text;
            currentStudent.Professor = TextBox3.Text;
            currentStudent.Assessment = TextBox4.Text;
            currentStudent.Date = TextBox5.Text;

            new DataAccess().Insert(currentStudent);
        }
コード例 #2
0
ファイル: Default.aspx.cs プロジェクト: kolyanikolay/ppc-pot
 protected void Add_Click(object sender, EventArgs e)
 {
     DateTime date1 = DateTime.Now;
     var currentStudent = new Student();
     //tb1.Text = tb.InnerText;
     currentStudent.FName = tb.InnerText;
     currentStudent.FName += " ";
     currentStudent.FName += date1;
     new DataAccess().Insert(currentStudent);
     tb.InnerText = "";
 }
コード例 #3
0
ファイル: DataAccess.cs プロジェクト: Quantum541/work
 public void Insert(Student student)
 {
     var collection = GetCollection();
      collection.Insert(student);
 }