📄 ffine.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Library
{
public partial class fFine : Form
{
//属性
#region 用来实现单例模式
private static fFine instance = null;
public static fFine Instance
{
get
{
if (instance == null)
{
instance = new fFine();
}
return instance;
}
}
private fFine()
{
InitializeComponent();
instance = this;
}
private void fFine_FormClosed(object sender, FormClosedEventArgs e)
{
instance = null;
}
#endregion
//窗体首次加载时
private void btCancel_Click(object sender, EventArgs e)
{
Close();
}
private void btOK_Click(object sender, EventArgs e)
{
try
{
string sql = "Update fine set fine='" + tbMoney.Text + "' where ID='1'";
Library.ExecuteDataSet(sql);
MessageBox.Show("修改成功!", "系统提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
tbMoney.Text = "";
tbMoney.Focus();
}
catch
{
MessageBox.Show("操作错误!", "系统提示:", MessageBoxButtons.OK, MessageBoxIcon.Error);
tbMoney.Text = "";
tbMoney.Focus();
}
this.DialogResult = DialogResult.OK;
}
private void fFine_Load(object sender, EventArgs e)
{
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -