📄 frmdychange.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace SMS.Forms
{
public partial class frmDyChange : Form
{
public string Stype;
public string Scontent;
public string Sid;
public frmDyChange()
{
InitializeComponent();
}
private void btnSure_Click(object sender, EventArgs e)
{
if (txtContent.Text == "") //判断是否输入了短信内容
{
MessageBox.Show("请输入常用短语!", "提示"); //弹出提示
}
else
{
OleDbConnection conn = BaseClass.ConnClass.DataConn();
conn.Open();
OleDbCommand cmd = new OleDbCommand("update tb_note set [note] = '" + txtContent.Text + "' where ID = " + Sid, conn);
cmd.ExecuteNonQuery();
conn.Close();
}
}
private void btnClose_Click(object sender, EventArgs e)
{
this.Close();
}
private void frmDyChange_Load(object sender, EventArgs e)
{
txttype.Text = Stype;//显示指定短语的类别
txtContent.Text = Scontent;//显示指定的短信内容
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -