/// <summary> /// 点击新增按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Button2_Click(object sender, EventArgs e) { Ticket model = new Ticket(); model.movieName = textBox2.Text; model.date = dateTimePicker1.Text; //仅显示日期,XX年XX月XX日 model.price = textBox4.Text; TicketDAL.Add(model); //显示数据网格 FillDataGirdView(); }