Ejemplo n.º 1
0
 private void button_ok_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(textBox_title.Text.Trim()))
     {
         MessageBox.Show("为空不能保存");
         return;
     }
     try
     {
         if (titleService.setTitle(textBox_title.Text.Trim()) == true)
         {
             MessageBox.Show("保存成功!");
             this.Close();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }