📄 frmcompany.frm
字号:
AutoSize = -1 'True
Caption = "Web Site"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 195
Index = 13
Left = 5790
TabIndex = 19
Top = 2040
Width = 765
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "LST Number"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 195
Index = 1
Left = 585
TabIndex = 18
Top = 3435
Width = 1050
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "CST Number"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 195
Index = 2
Left = 540
TabIndex = 17
Top = 3915
Width = 1095
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Pan Number"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 195
Index = 4
Left = 5505
TabIndex = 16
Top = 3435
Width = 1050
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Excise Number"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 195
Index = 5
Left = 5280
TabIndex = 15
Top = 3915
Width = 1275
End
End
End
Begin MSComctlLib.Toolbar Tlb_Kit
Align = 1 'Align Top
Height = 630
Left = 0
TabIndex = 0
Top = 0
Width = 10560
_ExtentX = 18627
_ExtentY = 1111
ButtonWidth = 1005
ButtonHeight = 1111
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 8
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "&New"
Key = "New"
Object.ToolTipText = "New"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "&Save"
Key = "Save"
Object.ToolTipText = "Save"
ImageIndex = 2
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "&Edit"
Key = "Edit"
Object.ToolTipText = "Edit"
ImageIndex = 3
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "Close"
Key = "Exit"
Object.ToolTipText = "Exit"
ImageIndex = 5
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
EndProperty
Begin MSComctlLib.ImageList ImageList1
Left = 0
Top = 0
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 22
ImageHeight = 22
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 5
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCompany.frx":001C
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCompany.frx":0365
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCompany.frx":082A
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCompany.frx":0D1C
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCompany.frx":1179
Key = ""
EndProperty
EndProperty
End
End
End
Attribute VB_Name = "frmCompany"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cboCity_Click()
Call cboCity_LostFocus
End Sub
Private Sub cboCity_LostFocus()
If Not cboCity.ListIndex = -1 Then
txtCity = cboCity
End If
txtCity.Visible = True
cboCity.Visible = False
End Sub
Private Sub cboState_Click()
Call cboState_LostFocus
End Sub
Private Sub cboState_LostFocus()
If Not cboState.ListIndex = -1 Then
txtState = cboState
End If
txtState.Visible = True
cboState.Visible = False
End Sub
Private Sub Command1_Click()
frmCountry.Show vbModal
End Sub
Private Sub Form_Activate()
Tlb_Kit.Buttons(1).Enabled = False
Tlb_Kit.Buttons(5).Enabled = False
Tlb_Kit.Buttons(7).Enabled = True
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case Is = 13
SendKeys "{Tab}"
Case Is = 27
If MsgBox("Do you want exit this form ?.", vbQuestion + vbYesNo, "iManager") = vbYes Then
Unload Me
End If
End Select
End Sub
Private Sub Form_Load()
frmCompany.Height = 6960
frmCompany.Width = 12090
frmCompany.Top = 0
frmCompany.Left = 0
Dim lSQL As String
Call fn_FillControls
End Sub
Private Sub Tlb_Kit_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case 1
Case 3
Call fn_Save
Case 5
Case 7
Unload Me
End Select
End Sub
Private Function fn_Save()
Dim lSQL As String
Dim rstSave As ADODB.Recordset
Set rstSave = New ADODB.Recordset
lSQL = "Select * From aCompanySetup"
Set rstSave = CNimanager.Execute(lSQL)
If Not (rstSave.EOF Or rstSave.BOF) Then
lSQL = "Update aCompanySetup set a_CompanyName = '" & fnEscapeQuote(Trim(txtCompanyName)) & _
"', a_CompanyAddress1 = '" & fnEscapeQuote(Trim(txtAdd1)) & "',a_CompanyAddress2 = '" & fnEscapeQuote(Trim(txtAdd2)) & _
"', a_CompanyCity = '" & fnEscapeQuote(Trim(txtCity)) & "',a_CompanyState = '" & fnEscapeQuote(Trim(txtState)) & _
"', a_CompanyPin = '" & fnEscapeQuote(Trim(txtPincode)) & "',a_CompanyCountry = '" & fnEscapeQuote(Trim(txtCountry)) & _
"', a_CompanyPhone = '" & fnEscapeQuote(Trim(txtPhone)) & "',a_CompanyFax = '" & fnEscapeQuote(Trim(txtFax)) & _
"', a_CompanyEmail = '" & fnEscapeQuote(Trim(txtEmail)) & "',a_CompanyWebsie = '" & fnEscapeQuote(Trim(txtWebSite)) & _
"', a_CompanyCSTNo = '" & fnEscapeQuote(Trim(txtCSTNo)) & "',a_CompanyPanNo = '" & fnEscapeQuote(Trim(txtPanNo)) & _
"', a_CompanySTNo = '" & fnEscapeQuote(Trim(txtSalesTaxNo)) & "', a_CompanyExcNo='" & fnEscapeQuote(Trim(txtExcNo)) & "' where a_Sno = 1"
CNimanager.Execute (lSQL)
MsgBox "Update Successfully .", vbInformation, "iManager"
Unload Me
End If
Set rstSave = Nothing
End Function
Private Function fn_FillControls()
Dim lSQL As String
Dim rstFill As ADODB.Recordset
Set rstFill = New ADODB.Recordset
lSQL = "Select * from aCompanySetup where a_Sno = 1"
Set rstFill = CNimanager.Execute(lSQL)
If Not (rstFill.EOF Or rstFill.BOF) Then
txtCompanyName = Null2Blank(Trim(rstFill("a_CompanyName")))
txtAdd1 = CheckNullString(Trim(rstFill("a_CompanyAddress1")))
txtAdd2 = CheckNullString(Trim(rstFill("a_CompanyAddress2")))
txtCountry = CheckNullString(Trim(rstFill("a_CompanyCountry")))
txtState = CheckNullString(Trim(rstFill("a_CompanyState")))
txtCity = CheckNullString(Trim(rstFill("a_CompanyState")))
Call gFillCountry(txtCountry, txtState, txtCity)
txtPincode = CheckNullString(Trim(rstFill("a_CompanyPin")))
txtPhone = CheckNullString(Trim(rstFill("a_CompanyPhone")))
txtFax = CheckNullString(Trim(rstFill("a_CompanyFax")))
txtEmail = CheckNullString(Trim(rstFill("a_CompanyEmail")))
txtWebSite = CheckNullString(Trim(rstFill("a_CompanyWebsie")))
txtSalesTaxNo = Null2Blank(Trim(rstFill("a_CompanySTNo")))
txtCSTNo = Null2Blank(Trim(rstFill("a_CompanyCSTNo")))
txtPanNo = Null2Blank(Trim(rstFill("a_CompanyPanNo")))
txtExcNo = Null2Blank(Trim(rstFill("a_CompanyExcNo")))
End If
Set rstFill = Nothing
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -