main_gzsz_gzgs_gs.frm
上传用户:wd52qq
上传日期:2022-07-24
资源大小:5366k
文件大小:8k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Begin VB.Form main_gzsz_gzgs_gs 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "公式编辑"
  5.    ClientHeight    =   5325
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   5745
  9.    Icon            =   "main_gzsz_gzgs_gs.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   5325
  14.    ScaleWidth      =   5745
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   2  '屏幕中心
  17.    Begin VB.CommandButton cmdExit 
  18.       Caption         =   "退出"
  19.       Height          =   390
  20.       Left            =   4275
  21.       TabIndex        =   24
  22.       Top             =   4800
  23.       Width           =   1305
  24.    End
  25.    Begin VB.CommandButton cmdDel 
  26.       Caption         =   "清空"
  27.       Height          =   390
  28.       Left            =   2910
  29.       TabIndex        =   23
  30.       Top             =   4800
  31.       Width           =   1305
  32.    End
  33.    Begin VB.CommandButton cmdCancel 
  34.       Caption         =   "撤消操作"
  35.       Height          =   390
  36.       Left            =   1530
  37.       TabIndex        =   22
  38.       Top             =   4800
  39.       Width           =   1305
  40.    End
  41.    Begin VB.CommandButton cmdSave 
  42.       Caption         =   "保存"
  43.       Height          =   390
  44.       Left            =   150
  45.       TabIndex        =   21
  46.       Top             =   4800
  47.       Width           =   1305
  48.    End
  49.    Begin VB.Frame Frame1 
  50.       Height          =   60
  51.       Left            =   -315
  52.       TabIndex        =   20
  53.       Top             =   4620
  54.       Width           =   6135
  55.    End
  56.    Begin VB.CommandButton Command1 
  57.       Caption         =   "/"
  58.       Height          =   540
  59.       Index           =   16
  60.       Left            =   5055
  61.       TabIndex        =   19
  62.       Top             =   3990
  63.       Width           =   660
  64.    End
  65.    Begin VB.CommandButton Command1 
  66.       Caption         =   "."
  67.       Height          =   540
  68.       Index           =   15
  69.       Left            =   4380
  70.       TabIndex        =   18
  71.       Top             =   3990
  72.       Width           =   660
  73.    End
  74.    Begin VB.CommandButton Command1 
  75.       Caption         =   "0"
  76.       Height          =   540
  77.       Index           =   14
  78.       Left            =   3030
  79.       TabIndex        =   17
  80.       Top             =   3990
  81.       Width           =   1320
  82.    End
  83.    Begin VB.CommandButton Command1 
  84.       Caption         =   "*"
  85.       Height          =   540
  86.       Index           =   13
  87.       Left            =   5055
  88.       TabIndex        =   16
  89.       Top             =   3435
  90.       Width           =   660
  91.    End
  92.    Begin VB.CommandButton Command1 
  93.       Caption         =   "3"
  94.       Height          =   540
  95.       Index           =   12
  96.       Left            =   4380
  97.       TabIndex        =   15
  98.       Top             =   3435
  99.       Width           =   660
  100.    End
  101.    Begin VB.CommandButton Command1 
  102.       Caption         =   "2"
  103.       Height          =   540
  104.       Index           =   11
  105.       Left            =   3705
  106.       TabIndex        =   14
  107.       Top             =   3435
  108.       Width           =   660
  109.    End
  110.    Begin VB.CommandButton Command1 
  111.       Caption         =   "1"
  112.       Height          =   540
  113.       Index           =   10
  114.       Left            =   3030
  115.       TabIndex        =   13
  116.       Top             =   3435
  117.       Width           =   660
  118.    End
  119.    Begin VB.CommandButton Command1 
  120.       Caption         =   "-"
  121.       Height          =   540
  122.       Index           =   9
  123.       Left            =   5055
  124.       TabIndex        =   12
  125.       Top             =   2880
  126.       Width           =   660
  127.    End
  128.    Begin VB.CommandButton Command1 
  129.       Caption         =   "6"
  130.       Height          =   540
  131.       Index           =   8
  132.       Left            =   4380
  133.       TabIndex        =   11
  134.       Top             =   2880
  135.       Width           =   660
  136.    End
  137.    Begin VB.CommandButton Command1 
  138.       Caption         =   "5"
  139.       Height          =   540
  140.       Index           =   7
  141.       Left            =   3705
  142.       TabIndex        =   10
  143.       Top             =   2880
  144.       Width           =   660
  145.    End
  146.    Begin VB.CommandButton Command1 
  147.       Caption         =   "4"
  148.       Height          =   540
  149.       Index           =   6
  150.       Left            =   3030
  151.       TabIndex        =   9
  152.       Top             =   2880
  153.       Width           =   660
  154.    End
  155.    Begin VB.CommandButton Command1 
  156.       Caption         =   "+"
  157.       Height          =   540
  158.       Index           =   5
  159.       Left            =   5055
  160.       TabIndex        =   8
  161.       Top             =   2325
  162.       Width           =   660
  163.    End
  164.    Begin VB.CommandButton Command1 
  165.       Caption         =   "9"
  166.       Height          =   540
  167.       Index           =   4
  168.       Left            =   4380
  169.       TabIndex        =   7
  170.       Top             =   2325
  171.       Width           =   660
  172.    End
  173.    Begin VB.CommandButton Command1 
  174.       Caption         =   "8"
  175.       Height          =   540
  176.       Index           =   3
  177.       Left            =   3705
  178.       TabIndex        =   6
  179.       Top             =   2325
  180.       Width           =   660
  181.    End
  182.    Begin VB.CommandButton Command1 
  183.       Caption         =   "7"
  184.       Height          =   540
  185.       Index           =   2
  186.       Left            =   3030
  187.       TabIndex        =   5
  188.       Top             =   2325
  189.       Width           =   660
  190.    End
  191.    Begin VB.CommandButton Command1 
  192.       Caption         =   ")"
  193.       Height          =   540
  194.       Index           =   1
  195.       Left            =   4380
  196.       TabIndex        =   4
  197.       Top             =   1770
  198.       Width           =   1335
  199.    End
  200.    Begin VB.CommandButton Command1 
  201.       Caption         =   "("
  202.       Height          =   540
  203.       Index           =   0
  204.       Left            =   3030
  205.       TabIndex        =   3
  206.       Top             =   1770
  207.       Width           =   1335
  208.    End
  209.    Begin VB.ListBox List1 
  210.       Height          =   2400
  211.       Left            =   30
  212.       TabIndex        =   2
  213.       Top             =   2130
  214.       Width           =   2970
  215.    End
  216.    Begin VB.TextBox Text1 
  217.       BackColor       =   &H00E6D7D4&
  218.       Height          =   1380
  219.       Left            =   0
  220.       TabIndex        =   0
  221.       Top             =   345
  222.       Width           =   5745
  223.    End
  224.    Begin VB.Label lblGZXM 
  225.       Height          =   180
  226.       Left            =   1410
  227.       TabIndex        =   26
  228.       Top             =   75
  229.       Width           =   825
  230.    End
  231.    Begin VB.Label Label2 
  232.       Caption         =   "可用于编辑的工资项目:"
  233.       Height          =   180
  234.       Left            =   60
  235.       TabIndex        =   25
  236.       Top             =   1860
  237.       Width           =   2490
  238.    End
  239.    Begin VB.Label Label1 
  240.       Caption         =   "当前编辑项目:"
  241.       Height          =   210
  242.       Left            =   105
  243.       TabIndex        =   1
  244.       Top             =   75
  245.       Width           =   1290
  246.    End
  247. End
  248. Attribute VB_Name = "main_gzsz_gzgs_gs"
  249. Attribute VB_GlobalNameSpace = False
  250. Attribute VB_Creatable = False
  251. Attribute VB_PredeclaredId = True
  252. Attribute VB_Exposed = False
  253. Dim rs1 As New ADODB.Recordset
  254. Private Sub cmdDel_Click()
  255.   Text1 = ""
  256. End Sub
  257. Private Sub cmdExit_Click()
  258.   Unload Me
  259. End Sub
  260. Private Sub cmdSave_Click()
  261.   Cnn.Execute ("update 工资公式表 set 计算公式='" + Text1 + "'where 项目名称='" + lblGZXM + "'")
  262.   main_gzsz_gzgs.Adodc1.Refresh
  263.   Unload Me
  264. End Sub
  265. Private Sub Command1_Click(Index As Integer)
  266.   Text1 = Text1 & Command1(Index).Caption
  267. End Sub
  268. Private Sub Form_Load()
  269.   rs1.Open "select 项目名称 from 工资公式表 group by 项目名称", Cnn, adOpenKeyset, adLockOptimistic
  270.   If rs1.RecordCount > 0 Then
  271.   rs1.MoveFirst
  272.   Do While rs1.EOF = False
  273.     List1.AddItem rs1.Fields("项目名称")
  274.     rs1.MoveNext
  275.   Loop
  276.   End If
  277.   rs1.Close
  278.   Text1 = main_gzsz_gzgs.DataGrid1.Columns(3)
  279. End Sub
  280. Private Sub List1_DblClick()
  281.   Text1 = Text1 & List1.text & " "
  282. End Sub