这样的问题,三天没人知道?

HelpMeNow 2003-03-26 03:54:59
我有三个表.
产品表:
fid int 4 +
fname char
fNum number
颜色表
fid int 4 +
fName char 颜色
号码表
fid int 4 +
fname char 号码定义
现在我想做一个产品期初数量的定义.
实现功能如下:
在fNum(数量),双击,可以弹出一个窗体

列 号码1 号码2 号码3......自定义的(号码表中的记录)
行 颜色1 3 0 15
颜色2 12 16
颜色3 14 16
.
.
颜色n
这样的窗体录入完毕后.会在主表的fnum中把上面录入的数量(76)录入.
该如何实现这样的功能 ,有没有类似的控件呢.这样建表行吗.
请各位不吝指教.
能得到编码提示,不胜感谢.!!!!
...全文
42 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
zxtyhy 2003-03-30
  • 打赏
  • 举报
回复
用SQL语句,直接查询出来吧
sum,group
HelpMeNow 2003-03-30
  • 打赏
  • 举报
回复
我上述是就是由颜色表与号码表构成一个类似交叉表的编辑窗口,然后实现合计录入数到产品表的数据字段
CloneCenter 2003-03-30
  • 打赏
  • 举报
回复
太过于动态处理是很复杂的,建议楼主改个角度看吧。
ksaiy 2003-03-30
  • 打赏
  • 举报
回复
晕~~~~~~~~~~~~~~~~~~~
能不能再表达清楚一点?????????
zwlin 2003-03-30
  • 打赏
  • 举报
回复
乱七八糟,看不懂。bye
billst 2003-03-30
  • 打赏
  • 举报
回复
如果这样建表,要形成那样的结果表,有点难度!
提供一个方法:
先形成中间表,再查询成结果表
这样的表难弄,原来我也做过。一个字烦
HelpMeNow 2003-03-30
  • 打赏
  • 举报
回复
主要是如何构造实现该功能的录入窗体
langfei 2003-03-26
  • 打赏
  • 举报
回复
你的产品表中fname字段的数据与颜色表fname字段、号码表fname字段对应关系是怎样的。

你可用使用TStringGrid。如果你很牛的话,就是用TDrawGrid.

TStringGrid继承TDrawGrid。

TDrawGrid有事件过程OnSetEditEvent,你可以在这个过程将输入的数据写入产品表

OnSetEditEvent说明如下:

TCustomDrawGrid.OnSetEditText
-----------------------------------------------------------------

Occurs when the user edits the value of a cell.

type TSetEditEvent = procedure (Sender: TObject; ACol, ARow: Longint; const Value: String) of object;
property OnSetEditText: TSetEditEvent;

Description

Write an OnSetEditText event handler to perform any special processing of the text edited by the user in an in-place editor. For example, use the OnSetEditText event to retrieve and store the value of a cell so that it can be displayed in an OnDrawCell event handler. OnSetEditText occurs every time the user changes the text.

The Value parameter is the new value for the cell specified by the ACol and ARow parameters.

OnSetEditText does not occur unless the Options property includes goEditing.

pingshx 2003-03-26
  • 打赏
  • 举报
回复
我这个问题多少天?
http://expert.csdn.net/Expert/topic/1486/1486873.xml?temp=.6401331
Wally_wu 2003-03-26
  • 打赏
  • 举报
回复
写得太乱了,能写清楚点吗?
ly_liuyang 2003-03-26
  • 打赏
  • 举报
回复
获得记录数
并添加到表中
这很容易,是你没有说清楚问题的原因
citytramper 2003-03-26
  • 打赏
  • 举报
回复
领悟里太差了,没看懂
李_军 2003-03-26
  • 打赏
  • 举报
回复
乱,帮你UP吧
bluemeteor 2003-03-26
  • 打赏
  • 举报
回复
看着太晕了
l_xiaofeng 2003-03-26
  • 打赏
  • 举报
回复
乱,帮你UP吧

5,378

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧