Beispiel #1
0
 private void btn_Create_Click(object sender, EventArgs e)
 {
     if (tb_StdNum.Text != "" && tb_Name.Text != "")
     {
         StdInfoBLL sib    = new StdInfoBLL();
         int        result = sib.AddInfo(tb_StdNum.Text, tb_Name.Text, tb_Sex.Text, tb_Nation.Text, tb_Email.Text, tb_PN.Text);
         MessageBox.Show($"已添加{result}条数据");
     }
     else
     {
         MessageBox.Show("请输入基本信息");
     }
 }
Beispiel #2
0
 protected void btn_Create_Click(object sender, EventArgs e)
 {
     if (tb_StdNum.Text != "" && tb_Name.Text != "" && tb_Sex.Text != "" && tb_Nation.Text != "" && tb_Email.Text != "" && tb_PN.Text != "")
     {
         StdInfoBLL sib = new StdInfoBLL();
         sib.AddInfo(tb_StdNum.Text, tb_Name.Text, tb_Sex.Text, tb_Nation.Text, tb_Email.Text, tb_PN.Text);
         Response.Write(@"<script>alert('成功创建1条学生信息');</script>");
         Response.Write(@"<script>location.href='Handler_ShowStdInfo.ashx';</script>");
     }
     else
     {
         Response.Write(@"请输入基本信息");
     }
 }