首页 > 分享 > 小程序—库存管理系统:用listview实现增加删除修改数据并保存数据到目录save.ini文档问题(100分)=====之二

小程序—库存管理系统:用listview实现增加删除修改数据并保存数据到目录save.ini文档问题(100分)=====之二

新建模块:面板(代码):
object FormNewRecord: TFormNewRecord
Left = 412
Top = 241
Width = 269
Height = 209
Caption = '新建记录'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object GroupBox1: TGroupBox
Left = 0
Top = 0
Width = 261
Height = 145
Align = alTop
Caption = '请输入:'
TabOrder = 0
object Label1: TLabel
Left = 24
Top = 32
Width = 60
Height = 13
Caption = '产品编号:'
end
object Label2: TLabel
Left = 24
Top = 70
Width = 60
Height = 13
Caption = '产品名称:'
end
object Label3: TLabel
Left = 24
Top = 108
Width = 48
Height = 13
Caption = '存货量:'
end
object Label4: TLabel
Left = 232
Top = 108
Width = 12
Height = 13
Caption = '件'
end
object Edit1: TEdit
Left = 96
Top = 28
Width = 150
Height = 21
ImeName = '中文 (简体) - 智能 ABC'
TabOrder = 0
OnKeyPress = Edit1KeyPress
end
object Edit3: TEdit
Left = 96
Top = 104
Width = 130
Height = 21
ImeMode = imClose
ImeName = '中文 (简体) - 智能 ABC'
TabOrder = 1
end
object Edit2: TEdit
Left = 96
Top = 66
Width = 150
Height = 21
ImeName = '中文 (简体) - 智能 ABC'
TabOrder = 2
end
end
object BitBtn1: TBitBtn
Left = 88
Top = 152
Width = 75
Height = 25
Caption = '确定'
TabOrder = 1
end
object BitBtn2: TBitBtn
Left = 176
Top = 152
Width = 75
Height = 25
Caption = '取消'
TabOrder = 2
end
end

新建模块的实现:unit NewRecordForm:
unit NewRecordForm;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, VariableUnit;

type
TFormNewRecord = class(TForm)
GroupBox1: TGroupBox;
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Label3: TLabel;
Edit3: TEdit;
Label4: TLabel;
Edit2: TEdit;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;

var
FormNewRecord: TFormNewRecord;

implementation

uses MainForm;

{$R *.dfm}

procedure TFormNewRecord.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if(not(key in['0'..'9']))and(key<>#8)and(key<>#13) then
begin
key:=#0;
showmessage('请输入数字!');
if key=#13 then
begin
if length(edit1.Text)=0 then
begin
edit1.SetFocus;
showmessage('请输入编号!');
end
else begin
edit2.SetFocus;
VariableUnit.bh:=strtoint(edit1.Text);
//我写的,恐有错,我定义编号和库存只能是数字integer,名称类型为string,各位觉得不妥可更正
end;
end;
end
else begin

end;

exit;

end;

end.

查询模块:面板
object FormDemand: TFormDemand
Left = 415
Top = 237
Width = 251
Height = 164
Caption = '查询记录'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object GroupBox1: TGroupBox
Left = 0
Top = 0
Width = 243
Height = 97
Align = alTop
Caption = '请选择查询方式:'
TabOrder = 0
object Label1: TLabel
Left = 24
Top = 64
Width = 3
Height = 13
end
object RadioButton1: TRadioButton
Left = 8
Top = 24
Width = 65
Height = 17
Caption = '按编号'
TabOrder = 0
end
object RadioButton2: TRadioButton
Left = 72
Top = 24
Width = 65
Height = 17
Caption = '按名称'
TabOrder = 1
end
object Edit1: TEdit
Left = 84
Top = 60
Width = 121
Height = 21
ImeName = '中文 (简体) - 智能 ABC'
TabOrder = 2
end
end
object BitBtn1: TBitBtn
Left = 64
Top = 104
Width = 75
Height = 25
Caption = '确定'
TabOrder = 1
end
object BitBtn2: TBitBtn
Left = 152
Top = 104
Width = 75
Height = 25
Caption = '取消'
TabOrder = 2
end
end

查询模块:实现UNIT
unit DemandForm;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons;

type
TFormDemand = class(TForm)
GroupBox1: TGroupBox;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
Edit1: TEdit;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
Label1: TLabel;
//注:我把LABEL1的TEXT设置为空,当选择RADIO按钮则把它更改为:编号/名称
private
{ Private declarations }
public
{ Public declarations }
end;

var
FormDemand: TFormDemand;

implementation

uses MainForm;
{$R *.dfm}

end.

相关知识

最新花店管理系统
花店管理系统 数据库设计
花店管理系统数据库设计.docx
基于微信小程序的房屋租赁管理系统设计与实现(源码+论文+部署讲解等)
[花店]网上花店微信小程序的设计与实现
基于node.js+vue花店连锁经营管理系统设计与实现(开题+程序+论文)计算机毕业设计
小小花店管理系统的设计与实现 毕业设计开题报告
基于Java的花卉销售系统的设计与实现/管理系统/鲜花网站
【独家源码】ssm基于微信小程序的养花系统3sm9k计算机毕业设计问题的解决方案与方法
基于flask+vue框架的网上花店销售管理系统[开题+论文+程序]

网址: 小程序—库存管理系统:用listview实现增加删除修改数据并保存数据到目录save.ini文档问题(100分)=====之二 https://m.huajiangbk.com/newsview546600.html

所属分类:花卉
上一篇: 解析里面的单价敏感系数=息税前利
下一篇: 美团闪购牵牛花系统(零售IT解决