Автор работы: Пользователь скрыл имя, 12 Января 2013 в 15:16, дипломная работа
Целью данной работы является создание системы, которая обеспечит решение следующих задач:
вести журнал посещения и хранения автомобилей на стоянках;
отслеживать информацию о клиентах компании;
отслеживать свободное пространство на стоянках и рекомендовать постановку машины;
вести договора с клиентами.
RichTextBox1.Text = RichTextBox1.Text.Replace("add
RichTextBox1.Text = RichTextBox1.Text.Replace("
RichTextBox1.Text = RichTextBox1.Text.Replace("
RichTextBox1.Text = RichTextBox1.Text.Replace("
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
StringToPrint = RichTextBox1.Text
PrintDocument1.
PrintDialog1.Document = PrintDocument1
Dim result As DialogResult = PrintDialog1.ShowDialog
If result = DialogResult.OK Then
PrintDocument1.Print()
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Private
Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.
Dim numChars As Integer
Dim numLines As Integer
Dim stringForPage As String
Dim strFormat As New StringFormat
Dim rectDraw As New RectangleF(e.MarginBounds.
Dim sizeMeasure As New Size(e.MarginBounds.Width, e.MarginBounds.Height
- PrintFont.GetHeight(e.
strFormat.Trimming = StringTrimming.Word
e.Graphics.MeasureString(
stringForPage = StringToPrint.Substring(0, numChars)
e.Graphics.DrawString(
If numChars < StringToPrint.Length Then
StringToPrint = StringToPrint.Substring(
e.HasMorePages = True
Else
e.HasMorePages = False
StringToPrint = RichTextBox1.Text
End If
End Sub
End Class
Листинг В.12 - Модуль LoginForm1
Imports System.IO
Imports System.Drawing.Printing
Public Class Form6
Private PrintPageSettings As New PageSettings
Private StringToPrint As String
Private PrintFont As New Font("Arial", 10)
Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim var As Object
For Each var In RichTextBox1.Lines
RichTextBox1.Text = RichTextBox1.Text.Replace("
RichTextBox1.Text = RichTextBox1.Text.Replace("
RichTextBox1.Text = RichTextBox1.Text.Replace("
RichTextBox1.Text = RichTextBox1.Text.Replace("
RichTextBox1.Text = RichTextBox1.Text.Replace("
RichTextBox1.Text = RichTextBox1.Text.Replace("
RichTextBox1.Text = RichTextBox1.Text.Replace("
RichTextBox1.Text = RichTextBox1.Text.Replace("
RichTextBox1.Text = RichTextBox1.Text.Replace("
RichTextBox1.Text = RichTextBox1.Text.Replace("
RichTextBox1.Text = RichTextBox1.Text.Replace("
RichTextBox1.Text = RichTextBox1.Text.Replace("
RichTextBox1.Text = RichTextBox1.Text.Replace("
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
StringToPrint = RichTextBox1.Text
PrintDocument1.
PrintDialog1.Document = PrintDocument1
Dim result As DialogResult = PrintDialog1.ShowDialog
If result = DialogResult.OK Then
PrintDocument1.Print()
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Private
Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e
As System.Drawing.Printing.PrintP
Dim numChars As Integer
Dim numLines As Integer
Dim stringForPage As String
Dim strFormat As New StringFormat
Dim rectDraw As New RectangleF(e.MarginBounds.
Dim sizeMeasure As New Size(e.MarginBounds.Width, e.MarginBounds.Height
- PrintFont.GetHeight(e.
strFormat.Trimming = StringTrimming.Word
e.Graphics.MeasureString(Strin
stringForPage = StringToPrint.Substring(0, numChars)
e.Graphics.DrawString(
If numChars < StringToPrint.Length Then
StringToPrint = StringToPrint.Substring(
e.HasMorePages = True
Else
e.HasMorePages = False
StringToPrint = RichTextBox1.Text
End If
End Sub
End Class
Листинг В.13 - Модуль Oplata_dog
Public Class oplata_dog
Private
Sub Money_
Me.Validate()
Me.Money_dogBindingSource.
Me.Money_dogTableAdapter.
End Sub
Private Sub oplata_dog_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: Данная строка кода позволяет загрузить данные в таблицу "AppDatabase1DataSet1.balans". При необходимости она может быть перемещена или удалена.
Me.BalansTableAdapter.Fill(Me.
'TODO: Данная строка кода позволяет
загрузить данные в таблицу "AppDatabase1DataSet1.
Me.DolzhnekiTableAdapter.Fill(
'TODO: Данная строка кода позволяет
загрузить данные в таблицу "AppDatabase1DataSet1.
Me.Zarplata_vremTableAdapter.
'TODO: Данная строка кода позволяет
загрузить данные в таблицу "AppDatabase1DataSet1.money_
Me.Money_outTableAdapter.Fill(
'TODO: Данная строка кода позволяет
загрузить данные в таблицу "AppDatabase1DataSet1.
Me.ZarplataTableAdapter.Fill(
'TODO: Данная строка кода позволяет
загрузить данные в таблицу "AppDatabase1DataSet1.money_
Me.Money_allTableAdapter.Fill(
'TODO: Данная строка кода позволяет загрузить данные в таблицу "AppDatabase1DataSet1.Dog". При необходимости она может быть перемещена или удалена.
Me.DogTableAdapter.Fill(Me.
'TODO: Данная строка кода позволяет
загрузить данные в таблицу "AppDatabase1DataSet1.money_
Me.Money_dogTableAdapter.Fill(
End Sub
Private Sub ToolStripMenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem3.Click
Me.TabControl1.Refresh()
My.Forms.pay.Show()
End Sub
Private Sub ToolStripMenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem4.Click
Me.TabControl1.Refresh()
My.Forms.pay_night.Show()
End Sub
Private Sub ToolStripMenuItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem5.Click
Me.TabControl1.Refresh()
My.Forms.zarplata.Show()
End Sub
Private Sub ToolStripMenuItem6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem6.Click
Me.TabControl1.Refresh()
My.Forms.proch_rash.Show()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim date_s As String = Me.DateTimePicker1.Value
Dim date_po As String = Me.DateTimePicker2.Value
Dim row As DataRow
Me.Zarplata_vremTableAdapter.
Zarplata_vremTableAdapter.
For Each row In Me.AppDatabase1DataSet1.
Dim date_1 As Date = row.ItemArray(4)
Dim date_2 As Date = date_s
Dim date3 As Date = date_po
Dim summa As String = row.ItemArray(1)
Dim col_vosmen As String = row.ItemArray(2)
Dim date_ As String = row.ItemArray(4)
Dim sotrudnik As String = row.ItemArray(3)
If row.ItemArray(4) >= date_s And row.ItemArray(4) <= date_po Then
Dim result As Integer = Zarplata_vremTableAdapter.
If result <> 0 Then
AppDatabase1DataSet1.
Me.Zarplata_vremTableAdapter.
End If
End If
Next
My.Forms.Vedomost.Show()
'Me.Zarplata_vremTableAdapter.
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim date_s As String = Me.DateTimePicker6.Value
Dim date_po As String = Me.DateTimePicker5.Value
Dim var As Boolean
Dim row As DataRow
DolzhnekiTableAdapter.
For Each row In Me.AppDatabase1DataSet1.Dog.
If row.ItemArray(20).ToString = 0 Then
Dim number As String = row.ItemArray(1)
var = select_dolg(number, date_s, date_po)
If var = False Then
Dim fio As String = row.ItemArray(2) + " " + row.ItemArray(3) + " " + row.ItemArray(4)
Dim phones As String = "Дом(" + row.ItemArray(5) + ") Моб(" + row.ItemArray(6) + ")"
Dim mesto As String = row.ItemArray(18)
DolzhnekiTableAdapter.Insert(
End If
End If
Next
My.Forms.dolzhneti.Show()
End Sub
Public Shared Function select_dolg(ByVal number As String, ByVal date_s As String, ByVal date_po As String) As Boolean
Dim row1 As DataRow
Dim count As Integer = 0
My.Forms.abonementi.
For Each row1 In My.Forms.oplata_dog.
If row1.ItemArray(2) >= date_s And row1.ItemArray(2) <= date_po Then
count = count + 1
End If
Next
If count > 0 Then
Return True
Else
Return False
End If
End Function
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim row As DataRow
Dim row1 As DataRow
Dim row2 As DataRow
Dim row3 As DataRow
Dim date_s As String = Me.DateTimePicker8.Value
Dim date_po As String = Me.DateTimePicker7.Value
Dim summa_money_dog As Integer = 0
Dim summa_money_all As Integer = 0
Dim summa_money_out As Integer = 0
Dim summa_zarplata As Integer = 0
Dim debet As Integer = 0
Dim credit As Integer = 0
Dim balans As Integer = 0
For Each row In Me.AppDatabase1DataSet1.money_
If row.ItemArray(2) >= date_s And row.ItemArray(2) <= date_po Then
summa_money_dog = summa_money_dog + row.ItemArray(3)
End If
Next
For Each row1 In Me.AppDatabase1DataSet1.money_
If row1.ItemArray(4) >= date_s And row1.ItemArray(4) <= date_po Then
summa_money_all = summa_money_all + row1.ItemArray(1)
End If
Next
For Each row2 In Me.AppDatabase1DataSet1.money_
If row2.ItemArray(4) >= date_s And row2.ItemArray(4) <= date_po Then
summa_money_out = summa_money_out + row2.ItemArray(1)
End If
Next
For Each row3 In Me.AppDatabase1DataSet1.
If row3.ItemArray(4) >= date_s And row3.ItemArray(4) <= date_po Then
summa_zarplata = summa_zarplata + row3.ItemArray(1)
End If
Next
debet = summa_money_dog + summa_money_all
credit = summa_money_out + summa_zarplata
balans = debet - credit
Me.BalansTableAdapter.Fill(Me.
Me.BalansTableAdapter.Insert(
Me.BalansTableAdapter.Fill(Me.
My.Forms.balans.Show()
End Sub
End Class
Листинг В.14 - Модуль Park_manc
Public Class parc_mans
Private
Sub ParkmansBindingNavigatorSaveIt
Me.Validate()
Me.ParkmansBindingSource.
Me.ParkmansTableAdapter.
End Sub
Private Sub parc_mans_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: Данная строка кода позволяет загрузить данные в таблицу "AppDatabase1DataSet1.users". При необходимости она может быть перемещена или удалена.
Me.UsersTableAdapter.Fill(Me.
'TODO: Данная строка кода позволяет
загрузить данные в таблицу "AppDatabase1DataSet1.
Me.ParkmansTableAdapter.Fill(
'TODO: Данная строка кода позволяет загрузить данные в таблицу "AppDatabase1DataSet1.users". При необходимости она может быть перемещена или удалена.
Me.UsersTableAdapter.Fill(Me.
'TODO: Данная строка кода позволяет
загрузить данные в таблицу "AppDatabase1DataSet1.
Me.ParkmansTableAdapter.Fill(
'TODO: Данная строка кода позволяет загрузить данные в таблицу "AppDatabase1DataSet1.users". При необходимости она может быть перемещена или удалена.
'TODO: Данная строка кода позволяет
загрузить данные в таблицу "AppDatabase1DataSet1.
Me.ParkmansTableAdapter.Fill(
'TODO: Данная строка кода позволяет загрузить данные в таблицу "AppDatabase1DataSet1.users". При необходимости она может быть перемещена или удалена.
'TODO: Данная строка кода позволяет
загрузить данные в таблицу "AppDatabase1DataSet1.
Me.ParkmansTableAdapter.Fill(