Esempio n. 1
0
 //修改
 private void btn_update_Click(object sender, EventArgs e)
 {
     try
     {
         if (TypeBLL.UpdateType(id, this.txt_typename.Text))
         {
             MessageBox.Show("修改成功", "温馨提示");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     finally
     {
         //初始化
         id = 0;
         this.txt_typename.Text        = "";
         this.dgv_xiangqing.DataSource = TypeBLL.selecttype();
     }
 }