AppCash/商品单位/frmEditUnit.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using DevComponents.DotNetBar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace AppCash
{
public partial class frmEditUnit : Form
{
public frmEditUnit()
{
InitializeComponent();
}
/// <summary>
/// 保存
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnSave_Click(object sender, EventArgs e)
{
//验证单位名称
if (txtUnit.Text.Trim() == "")
{
MessageBoxEx.Show("请输入商品单位!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
txtUnit.Focus();
return;
}
Dong.BLL.Unit bUnit = new Dong.BLL.Unit();
Dong.Model.Unit model = new Dong.Model.Unit();
model.Name = txtUnit.Text;
model.Id = int.Parse(this.Tag.ToString());
if (bUnit.Update(model))
{
MessageBoxEx.Show("修改成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
frmUnit fvip = (frmUnit)this.Owner;
fvip.refreshData();
this.Close();
}
else
{
MessageBoxEx.Show("保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
/// <summary>
/// 关闭
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
后面还有 15 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
