close

Вход

Забыли?

вход по аккаунту

?

Развитие ИАКЦ ПМР

код для вставкиСкачать
 ??????????
????????.......................................................................................................3
1 ???????? ? ??????????? ??????-??????????????? ?????? ? ??????? ?????????? ???.....4
2 ??????????????? ????????? ???? ??? ??? ................................................... 5
3 ???????? ??????????? ? ???????????? ??????????? ???? ...................................6
4 ????????????? ? ???????????? ????? ?????????? ???????...................................7
5 ?????????????? ???? ??????
5.1 ?????????????? ?????????????? ?????? ???? ??????.......................................8
5.2 ?????????? ?????????????? ?????? ???? ??????..............................................10
5.3 ?????????? ?????????????? ?????? ???? ??????.............................................12
6 ???????? ????????? ????????? .....................................................................13 ??????????...................................................................................................14
?????? ??????????.........................................................................................15
?????????? ?. ??????????? ???????????? ...........................................................16
?????????? ?. ??????? ????????? ...................................................................21
????????
???????????????? ???????? ???????? ????????? ?????? ???????? ??????????????? ????????? ?? ????????????? "??????????? ??????????? ?????????????? ??????? ? ?????????????????? ??????".
??? ????? ????? ??????????? ? ?????????? ??????, ?????????? ?????????? ? ???????? ?????????????? ????????, ???????????? ??????????? ??????, ??????? ? ????? ???????????? ?????? ?? ????????? ?????????????.
??? ?? ??????????? ?????????? ????????? ????:
- ???????????? ? ????????????? ???????????;
- ???????? ????????? ?????? ??????????;
- ???????? ?????????? ????? ?????? ???????????? ??????????;
- ???????? ????????? ??????????? ? ?????? ??????????;
- ?????????? ? ??????????? ??????????? ??????, ?????????? ? ???????? ????????;
- ????????? ??????? ???????? ??????? ? ?????????? ??????? ? ???????????? ????????????;
- ?????????? ???????????? ????????? ? ?????????? ? ??????????????? ???????????????? ???????????? ?? ?????? ?????? ? ??????, ?????????? ?? ?????????? ????? ??????? ????????;
- ?????????? ??????????????? ???????, ?????????? ? ?????????? ???????????????? ???????.
1 ???????? ? ??????????? ??????-??????????????? ?????? ? ??????? ?????????? ???
?????????????-????????????? ??????????? ????? (????), ????????????? ???????? ??????????????-?????????????? ?????????? ????? ??? ???. ????????? ??? ?????????????? ????? (??) ??? ? 1993 ???? ? ????? ????????? ??????? ?????, ?????????, ???????? ??????????, ??????????? ??????, ??????????? ?? ?????????????-????????????? ????????? (???) ????????????? ?????????? ? ???????? ?????? ?????????????? ????????? ? ??????? ??? ???. ? 2004 ???? ???????????? ? ???????????? ? ???????? ???????? ??? ??? ? ?????????????-????????????? ??????????? ????? ??? ???. ? ??????? ??????? ?????????? ??? ???? - ???????? ??????????? ? ??????? ??????????? ??????????????, ??????????-??????????, ?????????, ?????????????????? ???????????. ? ?????? ????????? ? ???????? ?????? ?????????? ??? ??? ???????? ?????????????-????????????? ?????????. ??? ???????????? ???? ? ????????? ????????? ?????????? ? ????????????? ? ???????????????? ??????????????? ? ??????????, ? ???????? ?? ? ??????????? ???? ?? ??????????? ??????? ????? ??? ?????????? ?????????, ???????? ? ?????????????? ? ????.
2 ??????????????? ????????? ???? ??? ???
? ????????? ???? ?????? ????????? ??????: ????? ???????????? ??????????? (???) ? ?????????????-????????????? ????? (???), ??????? ???????? ? ???? ?????? ????? (??), ?????? ????????????, ?????????? ?????????????? ???????, ?????????? ???????? ??? ??????.
??? ???????????? ????????, ???????? ? ??????????? ???????????? ?????????????????? ?????????????? ??????, ??????????????? ?????? ?????? (???) ??????????-???????????, ?????????? ? ??????????????????? ??????????.
??? ???????????? ?????? ???? ??????????? ?? ?????????? ??? ???????????? ? ???, ?? ???????????, ????????????????? ???????? ????????? ??? ? ?????????? ??? ???????????, ??????????? ?? ????????????? ? ???????????? ? ?????.
????? ??????????-?????????? ????????? ??? ???????, ???????????? ? ????????? ???????????????, ??????????? ? ???????, ????????? ?? ??????????? ??????, ? ????? ???????????. ???????????? ??????? ???????????????? ????? ??????, ??????????, ????????? ? ???? ??????????-?????????? ? ????????? ??????????, ???????????? ?? ??????.
???????????? ???????????? ? ????????????? ? ??? ???, ??????????? ???, ?????????? ??? ?????????????? ?????????? ? ????????? ???????????? ? ??????????? ????????????????, ??????????-????????? ? ???????????? ???????????? ??????? ?????????? ???.
???????????? ????, ?????????, ?????????? ? ?????? ???????????? ???????, ???????? ?????????????? ? ?????? ?????????? ??????????-?????????? ?????????? ? ?????, ??????????????????, ??????, ???????? ?????, ??????????? ? ???????, ? ?????? ????????, ??????????? ??? ????????? ???????????? ? ???????????? ???, ?? ???????????.
????????? ? ?? ????? ???????????? ??????? ??? ???????????? ???????? ?? ???????????????? ?????????? ??? ? ??????? ?? ????????? ?? ???????????? ?? ?????????? ?? ?????. 3 ???????? ??????????? ? ???????????? ??????????? ????
?? ??????? ????? ? ????????? ???????????? ??????????? ????????????? ?????????? ????????? ????????????:
1. ??????? ???????-???????????:
* ????????? ?????? 1014 ?? (DDR2-800 DDR2 SDRAM)
* ??????? ???? SAMSUNG HD161GJ (160 ??, 7200 RPM, SATA-II)
* ????????? DualCore Intel Celeron E3300, 2500 MHz (12.5 x 200)
* ???????????? ??????? Microsoft Windows XP Professional
* ??????? Samsung SAMTRON 55(M)E (Plus) [15" CRT] (HJAR300226);
2. ???????-???????????:
* ??????? ???? SAMSUNG HD503HI (500 ??, 5400 RPM, SATA-II)
* ????????? DualCore Intel Celeron E3400, 2600 MHz (13 x 200)
* ???????????? ??????? Microsoft Windows XP Professional
* ????????? ?????? 2012 ?? (DDR3-1333 DDR3 SDRAM)
* ??????? Samsung SyncMaster 927DF(I)/927MB(I)/997DF/997MB [19" CRT] (HMBL700999);
3. ????????? ???:
* ??????? ???? MAXTOR STM3250310AS (250 ??, 7200 RPM, SATA-II) ? SAMSUNG HD253GJ (250 ??, 7200 RPM, SATA-II)
* ????????? DualCore Intel Core 2 Duo E7500, 2933 MHz (11 x 267)
* ???????????? ??????? Microsoft Windows XP Professional
* ????????? ?????? 2016 ?? (DDR2-800 DDR2 SDRAM)
* ??????? LG W2253 (Analog) [22" LCD] (19081);
??????????? ??????????? ???? ???????? ?? ???? ICS (???????????????? ????????????????? ???????), ??????? ???? ??????????? ? 1994 ???? ?? ???? MS-DOS. ? ????????? ????? ?????????? ??????????? ??????????????? ?????????????? ???? ? ????????????? ???? ORACLE ?? ?????? ???????????????? Visual FoxPro, Delphi.
4 ????????????? ? ???????????? ????? ?????????? ???????
?? ????? ??????????? ???????? ???? ?????????? ?????? ??????????? ??????????? ??????? "????? ??????", ??????????? ????, ?????????????, ???????? ?????????? ? ???????????, ???????, ??????????, ?????? ? ????? ??????? ? ???????????.
???? ?????? ?????? ????????? ?????????? ? ???????????, ???????, ??????????, ??????. ???? ?????? ?????? ????? ??????????? ?????? ?????????? ? ?????????? ?? ?????? ????????, ?? ???????.
????????? ?????? ???????????? ??????????? ???????????? ???????:
* ?????? ????, ? ??????? ????????????? ????????????? ???? ?????? ? ??????????? ?? ????????? ????????: ???? ??????????? ?? ?????? ? ???? ?????? ??????;
* ?????, ???????????? ??????????? ?? ??????????, ? ????????? ?????????? ??????????? ?? ?????? ?????????.
??????????, ?????????? ? ????? ?????? ????, ???????? ??? ????????? ? ????????????? (? ??????????? ?? ?????????? ??????) ?? ???? ????????? ? ???????? ??????? ?????????? ??? ???.
????? ?? ????? ??????????, ?????????? ? ????? ?????? ????, ???????? ???????? ? ??????????? ??????? (???) ? ???????????????? ??????????????? ? ???????????? ? ???????? ?? ???????????????? ??????????????? ? ??? (???? ???). ??? ???????? ??????? ?? ????????? ??????????:
1. ???????? ?????? ????:
- ???????;
- ???;
- ????????;
- ???? ????????;
- ????? ????????;
- ????? ????? ??????????.
2. ???????? ? ??????????? ????, ??????????? ????????:
- ??????? ? ????????;
- ??????;
- ?????????;
3. ???????? ? ????? ? ??????? ??????????? ?????????:
- ????? ??????????????;
- ????? ??????????????;
- ?????? ??????????????;
- ?????? ????;
- ???? ??????????? ?????????;
- ???????? ? ???????, ?????????????? ??? ??????????? ?????????;
- ?????????? ? ??????? ??????????;
- ???????? ?????????, ??????? ??? ??????????? ?????????.
4. ???????? ? ???????????? ??????????????:
- ???? ?????????;
- ??? ??????? ???????;
5. ???????? ? ???? ?????????? ?????????.
5 ?????????????? ???? ??????
5.1 ?????????????? ?????????????? ?????? ???? ??????
?????????? ???????, ?????????? ?????????????, ???????? ?????????? ? ???????????, ???????, ??????????.
??????? ?????????? ???????: "???????? ? ???????", "???????? ? ???????????", "???????? ? ??????????". ? ?????????? ??????? ????? ???????? ????????? ????????: ????? ?? ??????, ?????????? ?? ?????????, ?????????? ??????.
? ??????????????? ?????????? ??????? ????? ???????? ????????? ????????: "???????? ? ???????", "???????? ? ???????????", "???????? ? ??????????".
?????????? ???????? ??????????????? ?????????? ???????, ????? ???????? ????????? ???????? ? ???????????????? ?????:
???????? "???????? ? ???????" ???????? ??????????: ??????, ????. ? ???????? ????????? ???????? ????? ??????? ID ??????, ??????? ???????????? ????????? ??????????.
???????? "???????? ? ???????????" ???????? ????????? ????????: ???????, ???, ????????, ????? ????????, ??????, ?????????, ???? ??????????? ?? ??????, ???? ?????????? ??????, ????, ?????????. ???????????????? ?????? ?????? ???????? ???????? ????? ????????, ??? ??? ?? ???????????? ????????? ??????????.
???????? "???????? ? ??????????" ???????? ????????? ????????: ?????????, ?????. ? ???????? ????????? ???????? ????? ??????? ID ?????????, ??????? ???????????? ????????? ??????????.
??????? 5.1 - ????? ????? ?????????? "???????? ? ???????" ? "???????? ? ???????????"
????? ?????????? "???????? ? ???????" ? "???????? ? ???????????" ?????????? ????? ???? ?? ??????, ??? ??? ??????? ID ?????? ???????? ?? ?????????? ? ??????? ????????????? ????????? ID ?????? ???????? "???????? ? ???????????". ????????? ?????? ???????? "???????? ? ???????" ????? ??????? ID ?????? ?? ????????? ? ???????? "???????? ? ???????????" ? ??????? ?????? ID ??????. ??????? 5.2 - ????? ????? ?????????? "???????? ? ??????????" ? "???????? ? ???????????"
????? ?????????? "???????? ? ??????????" ? "???????? ? ???????????" ?????????? ????? ???? ?? ??????, ??? ??? ??????? ID ????????? ???????? ?? ?????????? ? ?????????? ????????????? ????????? ID ?????????? ???????? "???????? ? ???????????". ????????? ?????? ???????? "???????? ? ??????????" ????? ??????? ID ????????? ?? ????????? ? ???????? "???????? ? ???????????" ? ??????? ?????? ID ?????????. ??????????????? ?????????? ???????, ????? ????????? ????????? ER-????????? ?????????? ??????? "????? ??????":
??????? 5.3 - ER-????????? ?????????? ??????? "????? ??????"
5.2 ?????????? ?????????????? ?????? ???? ??????
?? ?????????? ????? ?????????????? ?????? ???? ?????? ??????????? ??????? ????????? ?????????????? ?????? ? ?????????. ????????? "???????? ? ???????????" (???????, ???, ????????, ????? ????????, ??????, ?????????, ???? ?????????? ??????, ???? ??????????? ?? ??????, ????, ?????????) ????????? ? ?????? ?????????? ????? (1NF), ??? ??? ?? ??????????? ??????? ??????? ? ?????? ????????? ?????? ???????????? ???????? ?????????.
????????? ????????? ?? ?????? ?????????? ????? (2NF), ??? ??? ??? ????????? ? ?????? ?????????? ????? ? ?? ???????? ???????? ?????????????? ???????????? ??????????? ????????? ?? ?????????? ?????.
????????? ????????? ? ??????? ?????????? ????? (3NF), ???? ??? ????????? ?? ?????? ?????????? ????? ? ?? ???????? ???????????? ????????????. ? ?????? ?????? ????????? "???????? ? ???????????" ????????? ?? ?????? ?????????? ????? ? ???????????? ??????????? ???????????. ?????????????, ?????? ????????? ????????? ? ??????? ?????????? ?????.
?????? ?? ???????????? ??????????? ? ??????? ????????? ?????????, ????????? ????? ????????? "???????? ? ???????????", ??????? ????? ??????????? ? ???? ??????? "??????????" ? ??????? ?????????? ?????? ??????.
??????? 1 - ????? ????????? "???????? ? ???????????"
??? ???????? ????? ??? ???? ??????? ??
???????? ???????? ??????? ????????? ??????? ??????? ??? ????????? ??? ??? ???????? ????????? ???????? ????????????? ???????? ?????????????_???????? ????? ????????ID ?????? ????????ID_?????? ID ?????? ID ????????? ???????? ID_????????? ID ????????? ???? ?????????? ?????? ????/????? ????_??????????_ ?????? ???? ?????????? ?????? ???? ??????????? ?? ?????? ????/????? ????_???????????_??_?????? ???? ??????????? ?? ?????? ???? ????????? ???? ???? (????.???????.???) ????????? ????????? ????????? ????????? (??/???) ????????? "???????? ? ???????" (ID ??????, ??????, ????) ????????? ? ?????? ?????????? ?????, ??? ??? ?? ??????????? ??????? ??????? ? ?????? ????????? ?????? ???????????? ???????? ?????????.
????????? ????????? ?? ?????? ?????????? ?????, ??? ??? ??? ????????? ? ?????? ?????????? ????? ? ?? ???????? ???????? ?????????????? ???????????? ??????????? ????????? ?? ?????????? ?????.
????????? "???????? ? ???????" ????????? ? ??????? ?????????? ?????, ??? ??? ??? ????????? ?? ?????? ?????????? ????? ? ???????????? ??????????? ???????????. ????? ???????, ????????? ????? ????????? "???????? ? ???????", ??????? ????? ??????????? ? ???? ??????? "??????" ? ??????? ?????????? ?????? ??????.
??????? 2 - ????? ????????? "???????? ? ???????"
??? ???????? ????? ??? ???? ??????? ??
???????? ???????? ID ?????? ???????? Id_?????? ID ?????? ?????? ????????? ?????? ?????? ???? ???????? ???? ????? ??????? ??? ????????? ?????? ????????? "???????? ? ??????????" (ID ?????????, ?????????, ?????) ????????? ? ?????? ?????????? ?????, ??? ??? ?? ??????????? ??????? ??????? ? ?????? ????????? ?????? ???????????? ???????? ?????????.
????????? ????????? ?? ?????? ?????????? ?????, ??? ??? ??? ????????? ? ?????? ?????????? ????? ? ?? ???????? ???????? ?????????????? ???????????? ??????????? ????????? ?? ?????????? ?????.
????????? "???????? ? ??????????" ????????? ? ??????? ?????????? ?????, ??? ??? ??? ????????? ?? ?????? ?????????? ????? ? ???????????? ??????????? ???????????. ????? ???????, ????????? ????? ????????? "???????? ? ??????????", ??????? ????? ??????????? ? ???? ??????? "??????" ? ??????? ?????????? ?????? ??????.
??????? 3 - ????? ????????? "???????? ? ??????????"
??? ???????? ????? ??? ???? ??????? ??
???????? ???????? ID ????????? ???????? id_????????? ID ????????? ????????? ????????? ????????? ????????? ????? ???????? ????? ????? 5.3 ?????????? ?????????????? ?????? ???? ??????
??? ???????? ???? ?????? ???? ??????? ??????? ?????????? ?????? ?????? MS Access 2003. ???????? ????????????? MS Access 2003 ???????? ?????? ?????????? ? Microsoft Visual Studio. ??? ?????????? ?????????? ???????????? ??????????????? ????? ?????????? Visual Studio 2005, ???? C#. ???? ???????????? ????? ?????? ?????????? ??????? "????? ??????" ? ???? MS Access 2003:
??????? 5.9 - ????? ?????? ? ???? MS Access 2003
6 ???????? ????????? ?????????
??????????? ????? - ?????, ?????????? ?????? ? ?????????????? ?? ?????????? ?????? ???????????????? ????????. ??? ????????? ???????????? ?????? ??????? ???????? ??????? (??????? 6.1).
??????? 6.1 - ??????????? ????? ???????????? ???????? (????????? ????????????)
?????? ??????????? ??????? ??????????????? ?? ???????????? ?????????, ?????????? ??????? ? ???????, ???????????? ???? ?? ?????????? ??????. ??????????? ????? ???????? ?????????? ????????. ??????????? ??????? ????? ????????? ??????????? ?????: ??????? ??????????? ??????? ????? Form1.cs, ??? ???????????? ????? ???????????? ? ?????? ??????? ?????????? ? ???????????, ?????????? ? ???????, ? ????? ????? ???????????? ??????. ?? ???? ?? ????? ????? ??????? ? ????? ?????? ??????????? ?????????? ?? ?????? ???????? ??? ?? ???????, ? ????? ??????????? ???? ?????? ? ????? ?????????? ??? ???????????????? ???????????? ??????, ? ?????? ????????? ???????? ??????, ?????????, ?????? ??? ?????? ??????????.????? ?????? ?????? ?????????????? ???????? ????? ??????? ???? ?? ??????????????? ????: - ??????? - ?????? ? ????? ???????????, ??????????, ??????;
- ?????? - ???????????? ???????;
- ????? - ????? ?????? ?? ???????? ??????????;
- ????? - ????? ?? ?????????.
??????????
????????????? ????????? ???????? ?????????????????? ??????? ?????? ?????????? ???????? ??????. ??? ???????????? ???? ? ????????? ?????? ? ???????????, ????????? ???????? ?????, ????????? ???????? ??????? ?????? ?????? ???????? ??????????, ??????????? ?????????????????? ????? ????????? ????????? ????????.
? ????????? ???? ??????????? ????????? ???????:
- ?????????? ?????? ? ????? ???????? ???????????
- ???????? ?????? ? ???????????
- ????????? ?????? ? ???????????, ???????, ?????????? ? ???????
- ?????????????? ??????? ????? ??????
- ??????????? ? ????? ?????????? ?????????? ??????
- ????? ?????? ??????????? ? ???????????? ?? ??????????
- ????? ?????? ?????? ???????????
- ???????? ???????, ??????????? ?? ?????????? ? ??????. ?????? ????????? ????? ??????????? ? ???????? ?????????????? ????????? ?????????? ? ??????? ????????.
?????? ??????????
1. ??????? ????? "?????? ?????????? ?? C#", ??????? ? ????., ???????????? ??? "???????", ??????, 2004?.-752?.:??. 2. ???????? ?.?. ???????? ?????? ?? "?????????? ????????????????", ??? ???, 2008 ?. 3. ????? ??????? "???????? .NET ??????????. ???????????????? ?? C#", ??????? 2-??. ???????????? "??????-????". ??????, 2005 ?.-684?.
4. ????????. ?. ?. ????? ?????????? ?????. ???????? ??????????? ????????????, 2008 ?. ISBN 978-5-466-00338-3
5. ????? ?????? ? ??. "C#",??????? ? ????., ???????????? "????", ??????, 2005?.-862?.
6. ???????? ?????? "???? ??????. ?????? ? ?????", ???????????? "?????-?????", 2008 ?. 7. ????? ?.?. "?? ????: ???????? ?????????? ??? Windows", ???????????? "???????", ?????, 2003?.-384?.
8. ???????? ?. "C# ? ????????? .NET. ?????????? ????????????", ???????????? ??? "?????", ?????-?????????, 2004?.-796?.:??. ?????????? ?
??????????? ????????????
??? ?????? ?????? ????????? ?????????????? ????, ??? ???????? "WindowsApplication1.exe". ??? ??????? ???????? ??????? ????, ??? ???????????? ????? ???????????? ? ?????? ??????? ?????????? ? ???????????:
??????? 6.1 - ??????? ???? ?????????
??? ?????? ? ???????? "??????????" ???????? ????? ???? ???????-->?????????? ? ????????, ??????? ????????? ?????????. ??????????? ???????? ?????????? ????????? ??? ?????? ? ???????? "?????????"
??????? 6.2 - ???????? ???? ?????????
??? ?????? ???????? ??????????? ????????? ????, ? ??????? ?????????? ????????? ??? ????, ?? ?????????? ??????? ??????? ?????? ? ?????????. ??? ?????????? ?????? ?????? ?????? "????????".
??????? 6.3 - ?????????? ?????? ??????????
??? ?????? ??????? ??????????? ???? ?????????? ????, ? ??????? ??????????? ????????? ???? ???????, ????? ???? ???????? ????? ???????? ???? ?? ????? ? ????? ??????, ????????????? ??????, ????????? ?? ??? ? ?????? ????????, ???????? ???????? ??????, ?????????? ????????. ??????? 6.4 - ???????? ??????????
? ?????? ????? ???? ???????????? ?????? ?????????? ? ?????? ????. ????? ????? ???????? ??????? ??????? ??? ??????.
??????? 6.5 - ???????? ??????????
??? ?????? ???????? ??????????? ???? ????????? ?????? ? ???????????. ????? ?????? ?????? ?????????? ?????????? ??????????? ??????. ????? ???? ?? ???????? ??????, ????????? ? ?????? ?????? ?????????? ?????????????? ?????????? ?????. ????? ???????? ?????? ??????? ? ?????????? ?????????????. ??? ?????????? ?????? ???????? ?????? ????????.
??????? 6.6 - ????????? ?????? ? ???????????
??? ?????? ????????? ????????? ????????? ?????? ?????? ?? ??????? ?????????? "??" ? ????? ?????????. ? ?????? ?????? ?????????????? ??????? ??????, ???? ?????????? ?????? ? ????????? ?????????? ?? "???".
??? ?????? ??????? ????????? ???????????? ???? ?????????? ?????? ? ??????? ?????. ??????????? ??????? (?????????? ???) ???????????? ? ????? "????" ?? ??????? ??????. ??? ?????????? ??????????? ????????? "?????????" ??????? ?????????? ???????? ?? "??".
??? ????????? ???????? ?????????? ?????????????? ??????? ?????????:
1. ????????? ????? ??????????. ???????? ????? ???? ???????-->?????????-->????????.
??????? 6.7 - ?????????? ?????????
2. ?????????? ??????????. ???????? ????? ???? ???????-->?????????-->??????? ????? ?? ??????????? ?????? ???????? ????????? ??? ????????.
??????? 6.8 - ???????? ?????????
3. ????????? ??????. ???????? ????? ???? ???????-->?????????-->???????? ????? ?? ??????????? ?????? ???????? ????????? ??? ????????? ??????. ? ????????? ????? ???????????? ???????? ?????. ? ?????? ????? ?????? ????? ???????? ??????. ???????? ???????? ?????.
??????? 6.8 - ???????? ?????????
??????? ?????? ?????????? ???????????? ?????? ? ?????????? ??? ???????, ?? ????????? ???????? ????????????? ????????? ?????? ? ???????????? ? ?????????? ??????????. ??? ????????? ???? ??????? ???????? ????? ???? ???????-->??????.
??? ??????????? ?????? ???????? ????? ???? "?????" ? ?????????? ????? ?????? - ?? ?????? ???????? ??? ?? ???????. ? ??????????? ?? ?????????? ?????? ????????? ?????? ?????, ????? ???? ???????? ?????? ??????. ??? ?????????? ????????? ?????????? ?? ?????? ???????????? ???????? ? ???????????.
??????? 6.9 - ????? ??????
??? ?????? ???????????? ?????? ???????? ????? ???? "??????".
??????? 6.10 - ????? "?????? ????????"
??????? 6.11 - ????? ?????
?????????? ?
??????? ?????????
Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
OleDbDataAdapter datAdap;
string I = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @"db1.mdb";
OleDbConnection con;
public Form1()
{
InitializeComponent();
con = new OleDbConnection(I);
con.Open();
}
private void ??????????ToolStripMenuItem_Click(object sender, EventArgs e)
{
DataTable DT = new DataTable("[??????????]");
datAdap = new OleDbDataAdapter("Select* From [??????????]", con);
datAdap.Fill(DT);
dataGridView1.DataSource = DT;
}
private void ?????????ToolStripMenuItem_Click(object sender, EventArgs e)
{
DataTable DT = new DataTable("[??????]");
datAdap = new OleDbDataAdapter("Select* From [??????]", con);
datAdap.Fill(DT);
dataGridView1.DataSource = DT;
}
private void ??????ToolStripMenuItem_Click(object sender, EventArgs e)
{
DataTable DT = new DataTable("[??????]");
datAdap = new OleDbDataAdapter("Select* From [??????]", con);
datAdap.Fill(DT);
dataGridView1.DataSource = DT;
}
private void ?????????ToolStripMenuItem_Click(object sender, EventArgs e)
{
Form2 f2 = new Form2();
f2.ShowDialog();
}
private void ???????ToolStripMenuItem_Click(object sender, EventArgs e)
{
Form3 f3 = new Form3();
f3.ShowDialog();
}
private void ?????ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
private void ???????ToolStripMenuItem_Click(object sender, EventArgs e)
{
Form4 f4 = new Form4();
f4.ShowDialog();
}
private void ????????ToolStripMenuItem_Click(object sender, EventArgs e)
{
Form5 f5 = new Form5();
f5.ShowDialog();
}
private void Form1_Activated(object sender, EventArgs e)
{
OleDbCommand Com = new OleDbCommand("SELECT ??????????.????_???????????_??_?????? FROM ??????????;", con);
using (OleDbDataReader dr = Com.ExecuteReader())
{
while (dr.Read())
{
DateTime a = DateTime.Now;
DateTime b = Convert.ToDateTime(dr.GetValue(0).ToString());
int y1 = a.Year;
int m1 = a.Month;
int d1 = a.Day;
int y2 = b.Year;
int m2 = b.Month;
int d2 = b.Day;
int r = d1 - d2, rm, ry;
if (d1 - d2 < 0)
{
switch (m1)
{
case 5:
case 7:
case 8:
case 10:
case 12:
r = d1 - d2 + 30;
m1--;
break;
case 3:
if (d1 - d2 < 0)
if (y1 % 4 == 0)
r = d1 - d2 + 29;
else r = d1 - d2 + 28;
m1--;
break;
case 1:
y1--;
r = d1 - d2 + 31;
m1 = 12;
break;
default:
r = d1 - d2 + 31;
break;
}
}
if (m1 - m2 < 0)
{
y1--;
rm = m1 - m2 + 12;
}
else rm = m1 - m2;
ry = y1 - y2;
string staj = r.ToString() + '.' + rm.ToString() + '.' + ry.ToString();
string u = "UPDATE ?????????? SET ??????????.???? = '" + staj + "' WHERE ??????????.????_???????????_??_??????= '" + b.ToShortDateString() + "' ;";
OleDbCommand insCom = new OleDbCommand(u, con);
insCom.ExecuteNonQuery();
}
}
OleDbCommand Com1 = new OleDbCommand("SELECT ??????????.?????_?????????, ??????????.??????, ??????????.????_??????????_?????? FROM ??????????;", con);
using (OleDbDataReader dr1 = Com1.ExecuteReader())
{
while (dr1.Read())
{
DateTime a = DateTime.Now;
string zv = dr1.GetValue(1).ToString();
string nomer = dr1.GetValue(0).ToString(); ;
DateTime b = Convert.ToDateTime(dr1.GetValue(2).ToString());
int y1 = a.Year;
int m1 = a.Month;
int d1 = a.Day;
int y2 = b.Year;
int m2 = b.Month;
int d2 = b.Day;
int r = d1 - d2, rm, ry;
if (d1 - d2 < 0)
{
switch (m1)
{
case 5:
case 7:
case 8:
case 10:
case 12:
r = d1 - d2 + 30;
m1--;
break;
case 3:
if (d1 - d2 < 0)
if (y1 % 4 == 0)
r = d1 - d2 + 29;
else r = d1 - d2 + 28;
m1--;
break;
case 1:
y1--;
r = d1 - d2 + 31;
m1 = 12;
break;
default:
r = d1 - d2 + 31;
break;
}
}
if (m1 - m2 < 0)
{
y1--;
rm = m1 - m2 + 12;
}
else rm = m1 - m2;
ry = y1 - y2;
switch (zv)
{
case "???????":
case "??????? ???????":
case "???????":
case "??????? ???????":
case "????????":
case "?????????":
case "??????? ?????????":
case "??????? ?????????":
case "?????????":
if (ry >= 1)
{
string u1 = "UPDATE ?????????? SET ??????????.????????? = '??' WHERE (((??????????.?????_?????????)=" + nomer + "));";
OleDbCommand insCom1 = new OleDbCommand(u1, con);
insCom1.ExecuteNonQuery();
}
break;
case "??????? ?????????":
if (ry >= 3)
{
string u1 = "UPDATE ?????????? SET ??????????.????????? = '??' WHERE (((??????????.?????_?????????)=" + nomer + "));";
OleDbCommand insCom1 = new OleDbCommand(u1, con);
insCom1.ExecuteNonQuery();
}
break;
case "???????":
if (ry >= 4)
{
string u1 = "UPDATE ?????????? SET ??????????.????????? = '??' WHERE (((??????????.?????_?????????)=" + nomer + "));";
OleDbCommand insCom1 = new OleDbCommand(u1, con);
insCom1.ExecuteNonQuery();
}
break;
case "?????":
if (ry >= 4)
{
string u1 = "UPDATE ?????????? SET ??????????.????????? = '??' WHERE (((??????????.?????_?????????)=" + nomer + "));";
OleDbCommand insCom1 = new OleDbCommand(u1, con);
insCom1.ExecuteNonQuery();
}
break;
case "????????????":
if (ry >= 5)
{
string u1 = "UPDATE ?????????? SET ??????????.????????? = '??' WHERE (((??????????.?????_?????????)=" + nomer + "));";
OleDbCommand insCom1 = new OleDbCommand(u1, con);
insCom1.ExecuteNonQuery();
}
break;
default: break;
}
}
}
string I1 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @"db1.mdb";
OleDbConnection con1 = new OleDbConnection(I1);
con1.Open();
dataGridView1.ClearSelection();
DataTable dt = new DataTable("[??????????]");
OleDbDataAdapter dA1 = new OleDbDataAdapter("Select* From [??????????]", con1);
dA1.Fill(dt);
dataGridView1.DataSource = dt;
con1.Close();
}
private void ???????ToolStripMenuItem1_Click(object sender, EventArgs e)
{
Form6 f6 = new Form6();
f6.ShowDialog();
}
private void ????????ToolStripMenuItem1_Click(object sender, EventArgs e)
{
Form7 f7 = new Form7();
f7.ShowDialog();
}
private void aToolStripMenuItem_Click(object sender, EventArgs e)
{
Form10 f10 = new Form10();
f10.ShowDialog();
}
private void ??????????ToolStripMenuItem1_Click(object sender, EventArgs e)
{
Form9 f9 = new Form9();
f9.ShowDialog();
}
private void ?????????ToolStripMenuItem_Click(object sender, EventArgs e)
{
DialogResult DR;
DR=MessageBox.Show("???? ???????????, ??????? ?????????? ????????? ?????? ????? ????????? ????????? ??????. ???? ?????????? ?????? ????? ???????????. ???????????", "?????????", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (DR == DialogResult.Yes)
{
OleDbCommand Com1 = new OleDbCommand("SELECT ??????????.?????_?????????, ??????????.??????, ??????????.????????? FROM ?????????? WHERE (((??????????.?????????)='??'));", con);
using (OleDbDataReader dr1 = Com1.ExecuteReader())
{
while (dr1.Read())
{
string zv = dr1.GetValue(1).ToString();
string nomer = dr1.GetValue(0).ToString();
OleDbCommand Com2 = new OleDbCommand("SELECT ??????.ID_?????? FROM ?????? WHERE (((??????.??????)='" + zv + "'));", con);
using (OleDbDataReader dr2 = Com2.ExecuteReader())
{
while (dr2.Read())
{
int Nz = Convert.ToInt32(dr2.GetValue(0).ToString());
Nz++;
OleDbCommand Com3 = new OleDbCommand("SELECT ??????.?????? FROM ?????? WHERE (((??????.ID_??????)=" + Nz + "));", con);
using (OleDbDataReader dr3 = Com3.ExecuteReader())
{
while (dr3.Read())
{
string zvanie = dr3.GetValue(0).ToString();
string u = "UPDATE ?????????? SET ??????????.????????? = '???', ??????????.????_??????????_?????? = '" + DateTime.Now.ToShortDateString() + "', ??????????.?????? = '" + zvanie + "'WHERE (((??????????.?????_?????????)=" + nomer + "));";
OleDbCommand cmd = new OleDbCommand(u, con);
cmd.ExecuteNonQuery();
}
}
}
}
}
}
}
}
private void ????????????????ToolStripMenuItem_Click(object sender, EventArgs e)
{
label1.Visible = true;
label1.Text = "??????? ????? ????????";
textBox1.Visible = true;
button1.Visible = true;
}
private void button1_Click(object sender, EventArgs e)
{
if (label1.Text == "??????? ????? ????????")
{
if (textBox1.Text != "")
{
try
{
DataTable DT = new DataTable("[??????????]");
datAdap = new OleDbDataAdapter("SELECT ??????????.* FROM ?????????? WHERE (((??????????.?????_?????????)=" + textBox1.Text + "));", con);
datAdap.Fill(DT);
dataGridView1.DataSource = DT;
}
catch (Exception ex)
{
MessageBox.Show("???? '????? ????????' ?? ????? ????????? ????", "??????", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else MessageBox.Show("??????? ????? ????????", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
if (textBox1.Text != "")
{
try
{
DataTable DT = new DataTable("[??????????]");
datAdap = new OleDbDataAdapter("SELECT ??????????.* FROM ?????????? WHERE (((??????????.???????)='" + textBox1.Text + "'));", con);
datAdap.Fill(DT);
dataGridView1.DataSource = DT;
}
catch (Exception ex)
{
MessageBox.Show("???? '???????' ?? ????? ????????? ????", "??????", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else MessageBox.Show("??????? ????? ????????", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void ?????????ToolStripMenuItem_Click(object sender, EventArgs e)
{
label1.Visible = true;
label1.Text = "??????? ??????? ??????????";
textBox1.Visible = true;
button1.Visible = true;
}
private void ???????ToolStripMenuItem_Click(object sender, EventArgs e)
{
textBox1.Visible = false;
button1.Visible = false;
label1.Visible = false;
dataGridView1.ClearSelection();
}
}
}
Form2.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form2 : Form
{
string I = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @"db1.mdb";
OleDbConnection con;
public Form2()
{
InitializeComponent();
con = new OleDbConnection(I);
con.Open();
OleDbCommand Com = new OleDbCommand("SELECT [??????].?????? FROM [??????];", con);
using (OleDbDataReader dr = Com.ExecuteReader())
{
while (dr.Read())
{
comboBox1.Items.Add(dr.GetValue(0).ToString());
}
}
OleDbCommand Com1 = new OleDbCommand("SELECT [??????].????????? FROM [??????];", con);
using (OleDbDataReader dr1 = Com1.ExecuteReader())
{
while (dr1.Read())
{
comboBox2.Items.Add(dr1.GetValue(0).ToString());
}
}
}
private void button1_Click(object sender, EventArgs e)
{
OleDbDataAdapter datAdap;
try
{
if (textBox1.Text != "" && textBox2.Text != "" && textBox3.Text != "" && textBox4.Text != "" && comboBox1.Text != "" && comboBox2.Text != "")
{
string data = dateTimePicker1.Value.ToShortDateString();
string data2 = dateTimePicker2.Value.ToShortDateString();
string t1 = textBox1.Text, t2 = textBox2.Text, t3 = textBox3.Text;
string t11 = "", t22 = "", t33 = "";
t11 += t1[0]; t22 += t2[0]; t33 += t3[0];
t11 = t11.ToUpperInvariant(); t22 = t22.ToUpperInvariant(); t33 = t33.ToUpperInvariant();
t1 = t11 + t1.Substring(1); t2 = t22 + t2.Substring(1); t3 = t33 + t3.Substring(1);
string q = "INSERT INTO [??????????] VALUES('" + t1 + "','" + t2 + "','" + t3 + "'," + textBox4.Text + ",'" + comboBox1.SelectedItem.ToString() + "','" + comboBox2.SelectedItem.ToString() + "','" + data + "','" + data2 + "',' ','???');";
OleDbCommand i = new OleDbCommand(q, con);
if (i.ExecuteNonQuery() == 1)
MessageBox.Show("???????? ????? ?????????", "?????????", MessageBoxButtons.OK,MessageBoxIcon.Information);
else
MessageBox.Show("??????", "?????????", MessageBoxButtons.OK, MessageBoxIcon.Error);
DataTable dt = new DataTable("[??????????]");
datAdap = new OleDbDataAdapter("Select* From [??????????]", con);
datAdap.Fill(dt);
this.Close();
}
else MessageBox.Show("?? ???????? ????", "??????", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(),"??????",MessageBoxButtons.OK,MessageBoxIcon.Error);
}
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
Form3.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form3 : Form
{
public string t = "";
string I = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @"db1.mdb";
OleDbConnection con;
public Form3()
{
InitializeComponent();
con = new OleDbConnection(I);
con.Open();
OleDbCommand Com3 = new OleDbCommand("SELECT ??????????.???????, ??????????.???, ??????????.????????, ??????????.?????_????????? FROM ??????????;", con);
using (OleDbDataReader dr3 = Com3.ExecuteReader())
{
while (dr3.Read())
{
comboBox3.Items.Add(dr3.GetValue(0).ToString() + ' ' + dr3.GetValue(1).ToString() + ' ' + dr3.GetValue(2).ToString() + ' ' + dr3.GetValue(3).ToString());
}
}
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
private void button1_Click(object sender, EventArgs e)
{
try
{
string del = "DELETE ??????????.?????_?????????, ??????????.???????, ??????????.???, ??????????.????????, ??????????.ID_??????, ??????????.????_???????????_??_??????, ??????????.ID_????????? FROM ?????????? WHERE (((??????????.?????_?????????)=" + t + "));";
OleDbCommand insCom = new OleDbCommand(del, con);
if (insCom.ExecuteNonQuery() == 1)
{
MessageBox.Show("????????? ??????", "????????", MessageBoxButtons.OK);
this.Close();
}
else
MessageBox.Show("??????", "????????", MessageBoxButtons.OK);
}
catch (Exception e3)
{
MessageBox.Show(e3.ToString(), "??????", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
string d = "";
t = comboBox3.Text;
string fam = t.Substring(0, t.IndexOf(' '));
t = t.Substring(t.IndexOf(' ') + 1);
string im = t.Substring(0, t.IndexOf(' '));
t = t.Substring(t.IndexOf(' ') + 1);
string ot = t.Substring(0, t.IndexOf(' '));
t = t.Substring(t.IndexOf(' ') + 1);
int n = Convert.ToInt32(t);
string q = "select * from [??????????] where (((??????????.???)='" + im + "') AND ((??????????.???????)='" + fam + "') AND ((??????????.????????)='" + ot + "') AND ((??????????.?????_?????????)=" + n + ")) ;";
OleDbCommand C = new OleDbCommand(q, con);
using (OleDbDataReader dr = C.ExecuteReader())
{
while (dr.Read())
{
for (int i = 0; i < 10; i++)
d += dr.GetValue(i).ToString() + " ";
}
}
label1.Visible = true;
label1.Text = d;
}
}
}
Form4.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form4 : Form
{
string I = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @"db1.mdb";
OleDbConnection con;
public Form4()
{
InitializeComponent();
con = new OleDbConnection(I);
con.Open();
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
private void button1_Click(object sender, EventArgs e)
{
OleDbDataAdapter datAdap;
int[] a = new int[100];
int k = 0;
OleDbCommand Com = new OleDbCommand("SELECT [??????].ID_????????? FROM [??????];", con);
using (OleDbDataReader dr = Com.ExecuteReader())
{
while (dr.Read())
{
a[k] = Convert.ToInt32(dr.GetValue(0));
k++;
}
}
k++;
try
{
if (textBox1.Text != "" && textBox2.Text != "")
{
string cifr = "0123456789";
int flag = 0;
for (int p = 0; p < 10; p++)
if (textBox1.Text.IndexOf(cifr[p]) != -1)
{
flag = 1;
}
if (flag == 1)
MessageBox.Show("???? ????????? ?? ?????? ????????? ????", "??????", MessageBoxButtons.OK, MessageBoxIcon.Error);
else
{
string q = "INSERT INTO [??????] VALUES(" + k + ",'" + textBox1.Text + "',"
+ textBox2.Text + ");";
OleDbCommand i = new OleDbCommand(q, con);
if (i.ExecuteNonQuery() == 1)
MessageBox.Show("????????? ????? ?????????", "?????????", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
MessageBox.Show("??????", "?????????", MessageBoxButtons.OK, MessageBoxIcon.Error);
DataTable dt = new DataTable("[??????]");
datAdap = new OleDbDataAdapter("Select* From [??????]", con);
datAdap.Fill(dt);
this.Close();
}
}
else MessageBox.Show("?? ???????? ????", "??????", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch (Exception ex)
{
if (ex.ToString().Contains("??????????? ????????"))
MessageBox.Show("???? ????? ????? ????????? ?????? ????????? ????????", "??????", MessageBoxButtons.OK, MessageBoxIcon.Error);
else
MessageBox.Show(ex.ToString(), "??????", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}
Form5.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form5 : Form
{
public string t = "";
string I = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @"db1.mdb";
OleDbConnection con;
public Form5()
{
InitializeComponent();
con = new OleDbConnection(I);
con.Open();
OleDbCommand Com1 = new OleDbCommand("SELECT [??????].?????? FROM [??????];", con);
using (OleDbDataReader dr1 = Com1.ExecuteReader())
{
while (dr1.Read())
{
comboBox2.Items.Add(dr1.GetValue(0).ToString());
}
}
OleDbCommand Com2 = new OleDbCommand("SELECT [??????].????????? FROM [??????];", con);
using (OleDbDataReader dr2 = Com2.ExecuteReader())
{
while (dr2.Read())
{
comboBox4.Items.Add(dr2.GetValue(0).ToString());
}
}
OleDbCommand Com3 = new OleDbCommand("SELECT ??????????.???????, ??????????.???, ??????????.????????, ??????????.?????_????????? FROM ??????????;", con);
using (OleDbDataReader dr3 = Com3.ExecuteReader())
{
while (dr3.Read())
{
comboBox3.Items.Add(dr3.GetValue(0).ToString() + ' ' + dr3.GetValue(1).ToString() + ' ' + dr3.GetValue(2).ToString() + ' ' + dr3.GetValue(3).ToString());
}
}
}
private void button1_Click(object sender, EventArgs e)
{
try
{
OleDbCommand insCom = new OleDbCommand("UPDATE ?????????? SET ??????????.?????? = '" + comboBox2.Text + "', ??????????.????_??????????_??????='"+dateTimePicker1.Value.ToShortDateString()+"' WHERE ??????????.?????_?????????=" + textBox4.Text + ";", con);
if (insCom.ExecuteNonQuery() == 1)
{
MessageBox.Show("?????? ????????", "?????????", MessageBoxButtons.OK);
this.Close();
}
else
MessageBox.Show("??????", "?????????", MessageBoxButtons.OK);
}
catch (Exception e4)
{
MessageBox.Show(e4.ToString());
}
}
private void button3_Click(object sender, EventArgs e)
{
this.Close();
}
private void button2_Click(object sender, EventArgs e)
{
string u = "UPDATE [??????????] SET [??????????].????????? = '" + comboBox4.Text + "' WHERE ((([??????????].?????_?????????)=" + textBox4.Text + "));";
OleDbCommand insCom = new OleDbCommand(u, con);
if (insCom.ExecuteNonQuery() == 1)
{
MessageBox.Show("????????? ????????", "?????????", MessageBoxButtons.OK);
this.Close();
}
else
MessageBox.Show("??????", "?????????", MessageBoxButtons.OK);
}
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
string d = "";
t = comboBox3.Text;
string fam = t.Substring(0, t.IndexOf(' '));
t = t.Substring(t.IndexOf(' ')+1);
string im = t.Substring(0,t.IndexOf(' '));
t = t.Substring(t.IndexOf(' ') + 1);
string ot = t.Substring(0, t.IndexOf(' '));
t = t.Substring(t.IndexOf(' ') + 1);
int n = Convert.ToInt32(t);
string q = "select * from [??????????] where (((??????????.???)='" + im + "') AND ((??????????.???????)='" + fam + "') AND ((??????????.????????)='" + ot + "') AND ((??????????.?????_?????????)=" + n + ")) ;";
OleDbCommand C = new OleDbCommand(q, con);
using (OleDbDataReader dr = C.ExecuteReader())
{
while (dr.Read())
{
for (int i = 0; i < 10; i++)
d += dr.GetValue(i).ToString() + " ";
dateTimePicker1.Value = Convert.ToDateTime(dr.GetValue(7).ToString());
comboBox2.Text = dr.GetValue(4).ToString();
comboBox4.Text = dr.GetValue(5).ToString();
}
}
label1.Visible = true;
label1.Text = d;
textBox1.Text = fam;
textBox2.Text = im;
textBox3.Text = ot;
textBox4.Text = n.ToString();
}
private void button4_Click(object sender, EventArgs e)
{
string u = "UPDATE [??????????] SET [??????????].??? = '" + textBox2.Text + "', [??????????].??????? = '" + textBox1.Text + "' , [??????????].???????? = '" + textBox3.Text + "', [??????????].?????_????????? = " + textBox4.Text + " WHERE (([??????????].?????_?????????)=" + t + ");";
OleDbCommand insCom = new OleDbCommand(u, con);
if (insCom.ExecuteNonQuery() == 1)
{
MessageBox.Show("?????? ?????? ?????????? ??????? ????????", "?????????", MessageBoxButtons.OK);
this.Close();
}
else
MessageBox.Show("??????", "?????????", MessageBoxButtons.OK);
}
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
dateTimePicker1.Value = DateTime.Now;
}
}
}
Form6.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form6 : Form
{
string I = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @"db1.mdb";
OleDbConnection con;
public Form6()
{
InitializeComponent();
con = new OleDbConnection(I);
con.Open();
OleDbCommand Com = new OleDbCommand("SELECT [??????].????????? FROM [??????];", con);
using (OleDbDataReader dr = Com.ExecuteReader())
{
while (dr.Read())
{
comboBox1.Items.Add(dr.GetValue(0).ToString());
}
}
}
private void button3_Click(object sender, EventArgs e)
{
try
{
string del = "DELETE * FROM ?????? WHERE (((??????.?????????)='" + comboBox1.SelectedItem + "'));";
OleDbCommand insCom = new OleDbCommand(del, con);
if (insCom.ExecuteNonQuery() == 1)
{
MessageBox.Show("????????? ???????", "????????", MessageBoxButtons.OK);
string q = "Update ?????????? Set ??????????.?????????=' ' Where ??????????.?????????='" + comboBox1.Text + "';";
OleDbCommand cmd = new OleDbCommand(q, con);
cmd.ExecuteNonQuery();
this.Close();
}
else
MessageBox.Show("??????", "????????", MessageBoxButtons.OK);
}
catch (Exception e2)
{
MessageBox.Show(e2.ToString());
}
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
Form7.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form7 : Form
{
string I = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @"db1.mdb";
OleDbConnection con;
public Form7()
{
InitializeComponent();
con = new OleDbConnection(I);
con.Open();
OleDbCommand Com = new OleDbCommand("SELECT [??????].????????? FROM [??????];", con);
using (OleDbDataReader dr = Com.ExecuteReader())
{
while (dr.Read())
{
comboBox1.Items.Add(dr.GetValue(0).ToString());
}
}
}
private void button4_Click(object sender, EventArgs e)
{
try
{
OleDbCommand insCom = new OleDbCommand("UPDATE ?????? SET ??????.????? = " + textBox3.Text + " WHERE ??????.?????????='" + comboBox1.Text + "';", con);
if (insCom.ExecuteNonQuery() == 1)
{
MessageBox.Show("????? ???????", "?????????", MessageBoxButtons.OK);
this.Close();
}
else
MessageBox.Show("??????", "?????????", MessageBoxButtons.OK);
}
catch (Exception e1)
{
MessageBox.Show(e1.ToString(), "??????", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
OleDbCommand Com = new OleDbCommand("SELECT [??????].????? FROM [??????] WHERE [??????].?????????='" + comboBox1.Text + "';", con);
using (OleDbDataReader dr = Com.ExecuteReader())
{
while (dr.Read())
{
textBox4.Text = (dr.GetValue(0).ToString());
}
}
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
Form9.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data.OleDb;
using System.Text.RegularExpressions;
namespace WindowsApplication1
{
public partial class Form9 : Form
{
public Form9()
{
InitializeComponent();
}
private void crystalReportViewer1_Load(object sender, EventArgs e)
{
}
}
}
Form10.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Windows.Forms;
using System.Web.UI.WebControls;
using System.Data.OleDb;
using System.IO;
using System.Diagnostics;
namespace WindowsApplication1
{
public partial class Form10 : Form
{
public string id;
public static string Start = Application.StartupPath;
public Form10()
{
InitializeComponent();
}
private void crystalReportViewer1_Load(object sender, EventArgs e)
{
string I = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @"db1.mdb";
OleDbConnection con = new OleDbConnection(I);
con.Open();
OleDbDataAdapter da = new OleDbDataAdapter();
DataTable dt = new DataTable();
da = new OleDbDataAdapter("SELECT ??????????.???????, ??????????.???, ??????????.????????, ??????????.??????, ??????????.?????????, ??????????.????_???????????_??_??????, ??????????.???? FROM ?????????? ", con);
da.Fill(dt);
con.Close();
CrystalReport3 cr = new CrystalReport3();
cr.SetDataSource(dt);
crystalReportViewer1.ReportSource = cr;
}
}
}
2
Документ
Категория
Без категории
Просмотров
32
Размер файла
919 Кб
Теги
иакц, пмр, развития
1/--страниц
Пожаловаться на содержимое документа