11-硬件读写/视频采集卡读写/VideoMonitor/frmSetMonitor.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
using VideoMonitor.CommonClass;
namespace VideoMonitor
{
public partial class frmSetMonitor : Form
{
public frmSetMonitor()
{
InitializeComponent();
}
DataOperate dataoperate = new DataOperate();
DataSet ds;
private void frmSetMonitor_Load(object sender, EventArgs e)
{
lviewBind();
}
private void btnAdd_Click(object sender, EventArgs e)
{
if (txtName.Text == string.Empty)
{
MessageBox.Show("用户名不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
ds = dataoperate.getDs("select * from tb_admin where name='" + txtName.Text + "'", "tb_admin");
if (ds.Tables[0].Rows.Count > 0)
{
MessageBox.Show("该用户已经存在!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
dataoperate.getCom("insert into tb_admin (name,pwd) values('" + txtName.Text + "','" + txtPwd.Text + "')");
lviewBind();
txtName.Text = txtPwd.Text = string.Empty;
}
}
}
private void btnEdit_Click(object sender, EventArgs e)
{
if (txtName.Text == string.Empty && txtPwd.Text == string.Empty)
{
MessageBox.Show("用户名或密码不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
dataoperate.getCom("update tb_admin set pwd ='" + txtPwd.Text + "' where name='" + txtName.Text + "'");
lviewBind();
txtName.Text = txtPwd.Text = string.Empty;
}
后面还有 35 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
