📄 frmnewclass.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Students1
{
using StudentLibrary.Business;
public partial class frmNewClass : Form
{
public frmNewClass()
{
InitializeComponent();
}
private void frmNewClass_Load(object sender, EventArgs e)
{
}
/// <summary>
/// 添加班级信息
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
Classs classs = new Classs();
try
{
classs.InsertClass(
this.textBox1.Text,
this.dateTimePicker1.Value,
this.textBox2.Text);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
return;
}
MessageBox.Show("创建成功。");
this.Close();
}
/// <summary>
/// 关闭
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -