close

Вход

Забыли?

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

?

пояснительная записка (2)

код для вставкиСкачать
 ???????????? ??????????? ? ????? ?????????? ?????????
??????????? ??????????????? ????????? ??????????????? ??????????
??????? ????????????????? ???????????
"??????????? ??????????????? ??????????? ???????????"
????????????? ??????? ? ???????? ??????
"???? ?????????? ????? ??????? ?? ????????"
?????? ?????????: _____________________??????? ?.?. ?????? ????-31
?????? ?? ???????? ??????: ______________________________ ???????? ?????????????: ???????? ?.?. ????????? "?????????????? ?????? ? ??????????"
??????? "?????????????? ???????"
??????? "?????????? ????????????????"
?????????????: 08080165 "?????????? ??????????? (? ?????????)"
????????? 2012
??????????
????? ?????????? ??????...................................................................3
?????????? ?????????????? ??????.......................................................4
Use-case ?????????...........................................................................5
????????? ???????...........................................................................6
????????? dll-??..............................................................................8
???????? ??? ???????????? ?????????..................................................9
???????? ??? ????????????...............................................................16
?????.......................................................... ................................43
????? ?????????? ??????
?????????? ??????? ????????? ????? ?????????? ????? ??????? ?? ???????? ????? ?? ???????-??????????? ?????. ???? ?????? ???????: ??? ???????? ?????? ?? ??????, ??? ?????? ?? ?? ?????? ?????????? ?????????? ?????? (???????? ?? ???????), ?????? ????????????? ??? ???????????. ?????????? ??????????? ???? ?? ???????. ???? ????? ?? ????????? ????, ?? ??? ??????????? ?????? ??????????? ?? ?????? ??????, ???? ????????? - ?? ???????, ???? ???????????? ????? ??????????? ??????. ???? ????? ????????? ???? ?? ???????, ?? ??? ??????????? ?????????????? ??????. ??? ???? ????? ?????? ?????????? ?? ????? 17 ???? ? ?????. ??? ???, ??? ?? ???????????? ??? ?????????? ????, ????????? ?????? ????. ???? ??????????? ???????? ????? ? ???????? ? ???????? ?????????????? ???????. ???? ????? ???????? ?????????????? ????? ??? 3 ?????? ?? ?????? ??????, ?? ???????? ?????? ???????? ?????? ? ?????????????? ?????? ??????.
????????????? ??????????? ??????? ?????????? ?? ?????? ? ???????, ? ??? ?? ???????? ?????? ? ??????. ?? ?????? ?????? ?????? ????????????? ????? ? pdf ? ??????? ? ???, ??????? ????? ????? ????? ?????? ????????. ?????? ???? ??????????? ??????????? ???? ?????, ??????????? ??? ??? ???????? ?? ??????????? ?????.
?? ???????? ??????????? ???????????? ????????? PropertyGrid. ???????????? ???????? ? ???????? ??????? ????? ????????? ? XML-???????.
?????????? ?????????????? ??????
? ??? ??????????? ???????:
? ???????????? ???? ?????????? ?? ??????? ? ???????
? ????????? ????? ??????? ? ??????? ? ??????, ??????????? ?????????????? ?????? ?????? ? ???????, ???????????? ?????? ??????
? ???????????? ???????? ? ???????? ??????? ??????? ? ??????? ? XML-???????
? ???????????? ??????????? ???????? ?????? ?? ?????
???????? ???????:
* ?????
* ?????
* ?????? ??????? * ?????? ??????? ???????? ????:
* ????? ??? ???????????
* ????? ??? ???????
* ????? ??? ??????????
* ????? ??? ?????? ??????? * ????? ??? ?????? ???????
* ????? ??? ?????????? ??????? * ????? ??? ?????????? ?????? * ????? ??? ?????
Use-case ?????????
????????? ???????
????? ????:
ID
Fio
Statys
Age
Adress
Tel
E_mail
Kolvo_zakazov_m
Kolvo_zakazov_k
Kolvo_otrab_dnei_m
Summa_ot_zakazov ?????????:
Nomer
FIO_zakazchika
FIO_agenta
oplata
Naimenovanie Kol_vo
Summa_zakaza ?????? ???????????:
List
??????:
Add();
Search();
Edit();
Close();
?????? ???????????:
List
??????:
Add();
Search();
Edit();
Close();
??????????? ?????????:
????????? ??????
????????? ?????
????????? ???????
????????? ??????
????? ??? ?????? ?????????????:
????? ??????
??????????? ??????
??????? ????
????? ??? ?????????? ????????????:
???????? ?????
??????? ????
????? ??? ?????????? ?????????????:
???????? ??????
??????? ????
????? ??? ?????? ?????????????:
???????? ??????
????? ??????
????????????? ???.
??????? ????
????? ??? ?????????????????:
?????
??????? ????
????? ??? ???????????:
????????? ?? ?????
??????? ????
????? ??? ????????????????:
?????????? ?????? ???????
???????? ??????
?????????? ?????? ???????
?????? ???????? ?? ?????
?????? ???????? ?? ???????
??????????
??????
?????
????? ??? ????????????:
?????????? ?????? ???????
???????? ?????
??????? ????
????????? dll-??
???????? ??? ????????????
????????????? ????????? ??????????:
? ???????????? ??????? Microsoft Windows Server 2003, Windows Vista, Windows XP, Windows7;
? ????????? Adobe Reader;
? ?????? ? ????????? (??? ???????? ?? ?????);
? ????????? ?? ???????. ?????? ????????? ????? ?? ????;
? 512 ?? ??????????? ?????? ? ????;
? 60 ?? ?????????? ????? ?? ??????? ?????.
??? ??????? ????????? ?????????? ?????????????? ???? ??? "????? + id ??????" "123 + id ??????", ???? ??? "?????????" "456":
???? ???????????? ????????????? ??? "?????", ?? ??? ??????????? ?????? ? ?????? ? ?????????? ???????:
????????? ?????? ?????? ???????, ??????? ?????????? ?? ?????? ???????.
??? ??????? ?? ?????? "??????? ????" ??????????? ?????? ?????, ?? ?? ???? ?????????, ??? ???????? ?????????, ?????????? ?????? "?????".
???? ???????????? ?????????? ????? ???????????? ?????, ?? ??? ????? ???? ???? "????? ??????". ????? ????? ?????????????? ?? ???????????? ??????, ???? ?? ?????? ??????. ?????????? ??????? ??????? ??????, ?????? ?????? ? ???? ?????? ? ?????? ?????? "?????".
??? ??????? ?????? "?????????????" ??????????? ?????? ? ?????????? ????????? ?????. ????? ???? ??? ???????????? ??????? ??????????? ??????, ?????????? ?????? ?????? "????????? ?????????", ????? ????????????????? ?????? ?? ??????????.
??? ??????? ?????? "???????? ?????" ??????????? ????? ??? ?????????? ???????? ??????:
? ???? ?????????? "0" ?????????? ?????? ???????? ????????, ? ?????? ????????????? ????? ????????? ?????? ????????? ?? ??????.
?????????? ????? ??? ???? ???????? ?????? ???? ?????????, ????? ????????? ?????? ????????? ?? ??????.
??? ??????? ?? ?????? "????????" ??????????? ????? ????? ???????? ? ??????????? ?????? ???????.
??? ??????? ?? ?????? "??????? ????" ????????? ?????? ? ?????? ?? ????? ????????? ? ?????? ???????.
???? ???????????? ????????????? ??? "?????????", ?? ??? ??????????? ?????? ? ?????? ??????? ? ?????????? ???????, ? ?????? ??????? ??? ???????? ???????????? ??????, ? ??????? ?????????? ?????, ? ? ?????????? ? ???????:
??? ??????? ?? ?????? "?????? ???????" ???????? ???? ? ????????:
???????????? ????? ???????? ?? ??????? ???????:
???????????? ????? ??????? ????? ?? ??? ? ?? ID ??????, ???????? ??????, ????????????? ?????????? ?? ?????? (? ??????????? ?????????) ??? ??????? ????.
????? ???????????? ????? ??????? ????? ? ?????????? ??????:
? ???? ?????????? "0" ?????????? ?????? ???????? ????????, ? ?????? ????????????? ????? ????????? ?????? ????????? ?? ??????.
??? ??????? ?? ?????? "????????" ??????????? ????? ????? ???????? ? ??????????? ?????? ???????.
??? ??????? ?? ?????? "??????? ????" ????????? ?????? ?? ?????? ?? ????? ????????? ? ?????? ???????.
? ??????????? ?????????? ?????? ???????????? ??????, ?????????????, ? ???? ???? ??????????? ???????? ?? ???? ??????? ???????:
??? ???????? ???? ????? ?? ????????????, ? ?? ?????? ??????. ??? ??????? ?????? "?????" ? ???? "???????? ??????" ???????????? ????????? ?????, ???? ????? ?? ??????? ?????? (??? ????????????) ?? ????? ??????, ????????? ?????? ??????????????? ?????????.
??????????? ?????? ????? ?????? ? ?? ?????????? ???????. ???? ????? ?? ???????, ?? ??? ??????? ?? ?????? "??????????? ??????" ????????? ??????? "????? ????????" ? ????????? ???????? "??" / "???". ??? ??????? ?????? "??", ?????? ? ???? "??????" ?????????? ?? "????????" .
???????????? ????? ?????????? ?????????? ? ???????:
???????? ??? ????????????
??????? ?????????:
???????????.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml.Serialization;
using System.Reflection;
namespace ????????
{
public class ???????????
{
public ????????_???.Zakazi Z = new ????????_???.Zakazi();
public ????????_???.SpisokZakazov SZ = new ????????_???.SpisokZakazov();
public ????????_???.Agents AG = new ????????_???.Agents();
public ????????_???.SpisokAgents SAG = new ????????_???.SpisokAgents();
public XmlSerializer AgentX = new XmlSerializer(typeof(????????_???.SpisokAgents));
public XmlSerializer ZakazX = new XmlSerializer(typeof(????????_???.SpisokZakazov));
public decimal SumZakCur = 0;
public void save(string path)
{
FileStream f = new FileStream(path, FileMode.Create, FileAccess.Write);
StreamWriter kk = new StreamWriter(f);
kk.Flush();
f.Close();
kk.Close();
}
public void LoadUser(string s)
{
FileStream f = new FileStream(s, FileMode.Open, FileAccess.Read);
StreamReader sr = new StreamReader(f);
SAG = (????????_???.SpisokAgents)AgentX.Deserialize(sr); // ?????????? ????
sr.Close();
f.Close();
}
public void SaveAgents(string s)
{
if (File.Exists(s)) File.Delete(s);
FileStream f = new FileStream(s, FileMode.CreateNew, FileAccess.Write);
StreamWriter sw = new StreamWriter(f);
AgentX.Serialize(sw, SAG);
sw.Close();
f.Close();
}
public void LoadAgents(string st)
{
FileStream ff = new FileStream(st, FileMode.Open, FileAccess.Read);
StreamReader sr1 = new StreamReader(ff);
SAG = (????????_???.SpisokAgents)AgentX.Deserialize(sr1); // ?????????? ????
sr1.Close();
ff.Close();
}
public void SaveZakazi(string st)
{
if (File.Exists(st)) File.Delete(st);
FileStream ff1 = new FileStream(st, FileMode.CreateNew, FileAccess.Write);
StreamWriter sw1 = new StreamWriter(ff1);
ZakazX.Serialize(sw1, SZ);
sw1.Close();
ff1.Close();
}
public void LoadZakazi(string st)
{
FileStream ff2 = new FileStream(st, FileMode.Open, FileAccess.Read);
StreamReader sr2 = new StreamReader(ff2);
SZ = (????????_???.SpisokZakazov)ZakazX.Deserialize(sr2); // ?????????? ????
sr2.Close();
ff2.Close();
}
private static string PathConverter(string file)
{
try
{
file = file.Replace(@"\", "/");
return "file:///" + file;
}
catch (System.Exception ex)
{
throw ex;
}
}
}
}
log.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ????????_???;
using System.IO;
namespace ????????
{
public partial class log : Form
{
public ??????????? Upr = new ???????????();
string ag = "?????";
string par_ag = "123";
string byh = "?????????";
string par_byh = "456";
string str1, str2;
public int nomer_agenta;
public log()
{
InitializeComponent();
}
private void log_Load(object sender, EventArgs e)
{
if (File.Exists("Agents.xml"))
Upr.LoadAgents("Agents.xml");
if (File.Exists("Zakazi.xml"))
Upr.LoadZakazi("Zakazi.xml");
this.Activate(); }
private void button1_Click(object sender, EventArgs e)
{
str1 = Convert.ToString(textBox1.Text);
str2 = Convert.ToString(textBox2.Text);
for (int i = 0; i < Upr.SAG.List.Count; i++)
{
if ((str1 == ag + i.ToString()) && (str2 == par_ag + i.ToString()))
{
nomer_agenta = i;
Program.Agentam.Show();
}
}
if ((str1 == byh) && (str2 == par_byh))
{
Program.f1.Show();
this.Hide();
}
if (((str1 != (ag+this.nomer_agenta.ToString())) || (str2 != par_ag+this.nomer_agenta.ToString())) && ((str1 != byh) || (str2 != par_byh)))
{ MessageBox.Show("?? ????????? ????? ?????/??????!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void log_Closing(object sender, FormClosingEventArgs e)
{
Upr.SaveAgents("Agents.xml");
Upr.SaveZakazi("Zakazi.xml");
}
private void log_Closing(object sender, FormClosedEventArgs e)
{
Application.Exit(); }
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
???????.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ????????_???;
using System.IO;
namespace ????????
{
public partial class ??????? : Form
{ public ???????()
{
InitializeComponent();
}
public int[] m;
int nom,x,double_ukaz,sum_old,kolvo,index;
int ukaz = -1;
private void button2_Click(object sender, EventArgs e)
{
Program.DZakaz.ShowDialog(); }
private void button1_Click(object sender, EventArgs e)
{
this.Hide(); }
private void ???????_Load(object sender, EventArgs e)
{
if (File.Exists("Zakazi.xml"))
Program.Activ.Upr.LoadZakazi("Zakazi.xml");
this.Activate();
listBox1.Items.Clear();
m = new int[Program.Activ.Upr.SZ.List.Count];
kolvo = 0;
foreach (????????_???.Zakazi Z in Program.Activ.Upr.SZ.List)
{
if ( Z.ID_agenta == Program.Activ.nomer_agenta)
{
listBox1.Items.Add(Z.naimenovanie);
m[kolvo] = Z.nomer;
kolvo++;
}
}
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
index = listBox1.SelectedIndex;
textBox1.Text = null;
textBox2.Text = null;
textBox3.Text = null;
textBox4.Text = null;
textBox5.Text = null;
textBox6.Text = null;
textBox7.Text = null;
textBox8.Text = null;
textBox10.Text = null;
int y=0;
for (int i = 0; i <= m.Length; i++)
{
if (i == index)
{
y = m[i];
}
}
foreach(????????_???.Zakazi Z in Program.Activ.Upr.SZ.List)
{
if (y ==Z.nomer)
{
nom = Z.nomer;
}
}
foreach (????????_???.Zakazi Z2 in Program.Activ.Upr.SZ.List)
{
if (nom == Z2.nomer)
{
textBox1.SelectedText = Convert.ToString(Z2.nomer);
textBox2.SelectedText = Convert.ToString(Z2.naimenovanie);
textBox3.SelectedText = Convert.ToString(Z2.FIO_zakazchika);
textBox4.SelectedText = Convert.ToString(Z2.FIO_agenta);
textBox5.SelectedText = Convert.ToString(Z2.ID_agenta);
textBox6.SelectedText = Convert.ToString(Z2.oplata);
textBox7.SelectedText = Convert.ToString(Z2.kol_vo);
textBox8.SelectedText = Convert.ToString(Z2.summa_zakaza);
textBox10.SelectedText = Convert.ToString(Z2.month);
} }
textBox2.ReadOnly = true;
textBox3.ReadOnly = true;
textBox7.ReadOnly = true;
textBox8.ReadOnly = true;
}
private void ???????_FormClosing(object sender, FormClosingEventArgs e)
{
Program.Activ.Upr.SaveZakazi("Zakazi.xml"); }
private void ?????ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
Application.Exit();
}
private void button3_Click(object sender, EventArgs e)
{
if (textBox6.Text == "?? ????????")
{
textBox2.ReadOnly = false;
textBox3.ReadOnly = false;
textBox7.ReadOnly = false;
textBox8.ReadOnly = false;
sum_old = Convert.ToInt32(textBox8.Text);
}
else
{
MessageBox.Show("????????????? ????? ?????? ?? ?????????? ??????.", "?????? ??????????????", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void button4_Click(object sender, EventArgs e)
{
if (radioButton1.Checked)
{
try
{
string poisk, lstr;
bool not_find = true;
poisk = Convert.ToString(textBox9.Text);
for (int i = 0; i < listBox1.Items.Count; i++)
{
lstr = listBox1.Items[i].ToString();
if ((lstr == poisk) & (not_find))
{
if (i > ukaz)
{
ukaz = i;
listBox1.SelectedIndex = i;
not_find = false;
}
}
if (lstr != poisk)
{
x++;
if (x == listBox1.Items.Count)
{
MessageBox.Show("????? ?? ??????.", "??????????", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
x = 0;
double_ukaz = ukaz;
}
catch { MessageBox.Show("?????? ?????!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
}
if (radioButton2.Checked)
{
try
{
int poisk_nom;
poisk_nom = Convert.ToInt32(textBox9.Text);
for (int i = 0; i < m.Length; i++)
{
if (m[i] == poisk_nom)
{
listBox1.SelectedIndex = i;
}
if (m[i] != poisk_nom)
{
x++;
if (x == m.Length)
{
MessageBox.Show("????? ?? ??????? ?????? ?? ??????.", "??????????", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
x = 0;
}
catch { MessageBox.Show("?????? ?????!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
}
if ((!radioButton1.Checked) && (!radioButton2.Checked))
{
MessageBox.Show("?????????? ??????? ?? ?????? ???????? ?? ???????????? ?????: ?? ???????????? ?????? ??? ?? ?????? ??????.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
private void button5_Click(object sender, EventArgs e)
{
????????_???.Zakazi Z = new ????????_???.Zakazi();
string naimenovanie, FIO_zakazchika;
int kol_vo, summa_zakaza;
naimenovanie = textBox2.Text;
FIO_zakazchika = textBox3.Text;
kol_vo = Convert.ToInt32(textBox7.Text);
summa_zakaza = Convert.ToInt32(textBox8.Text);
for (int i = 0; i <= m.Length; i++)
{
if (index == i)
{
Program.Activ.Upr.SZ.List[m[i]].naimenovanie = naimenovanie;
Program.Activ.Upr.SZ.List[m[i]].FIO_zakazchika = FIO_zakazchika;
Program.Activ.Upr.SZ.List[m[i]].kol_vo = kol_vo;
Program.Activ.Upr.SZ.List[m[i]].summa_zakaza = summa_zakaza;
}
}
Program.Activ.Upr.SaveZakazi("Zakazi.xml");
foreach (????????_???.Zakazi Z2 in Program.Activ.Upr.SZ.List)
{
if (Z2.summa_zakaza != sum_old)
{
foreach (????????_???.Agents AG2 in Program.Activ.Upr.SAG.List)
{
if (Z2.ID_agenta == AG2.id)
{
AG2.summa_ot_zakazov -= sum_old;
AG2.summa_ot_zakazov += Z2.summa_zakaza;
Program.Activ.Upr.SaveAgents("Agents.xml");
}
}
}
}
if (File.Exists("Zakazi.xml"))
Program.Activ.Upr.LoadZakazi("Zakazi.xml");
this.Activate();
listBox1.Items.Clear();
m = new int[Program.Activ.Upr.SZ.List.Count];
kolvo = 0;
foreach (????????_???.Zakazi Z4 in Program.Activ.Upr.SZ.List)
{
if (Z4.ID_agenta == Program.Activ.nomer_agenta)
{
listBox1.Items.Add(Z4.naimenovanie);
m[kolvo] = Z4.nomer;
kolvo++;
}
}
textBox2.ReadOnly = true;
textBox3.ReadOnly = true;
textBox7.ReadOnly = true;
textBox8.ReadOnly = true;
}
}
}
?????????? ??????.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace ????????
{
public partial class ??????????_?????? : Form
{
public ??????????_??????()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
this.Hide();
}
private void ??????????_??????_Load(object sender, EventArgs e)
{
textBox1.Text = null;
textBox2.Text = null;
textBox3.Text = null;
textBox4.Text = null;
textBox5.Text = null;
textBox6.Text = null;
textBox7.Text = null;
textBox8.Text = null;
textBox9.Text = null;
????????_???.Zakazi Z = new ????????_???.Zakazi();
textBox1.SelectedText = Convert.ToString(Z.nomer);
textBox2.SelectedText = Convert.ToString(Z.naimenovanie);
foreach (????????_???.Agents Ag in Program.Activ.Upr.SAG.List)
{
if (Ag.id == Program.Activ.nomer_agenta)
{
textBox4.SelectedText = Ag.fio;
}
}
textBox3.SelectedText = Convert.ToString(Z.FIO_zakazchika);
textBox5.SelectedText = Convert.ToString(Program.Activ.nomer_agenta);
textBox4.SelectedText = Convert.ToString(Z.FIO_agenta);
textBox6.SelectedText = "?? ????????";
textBox7.SelectedText = Convert.ToString(Z.kol_vo);
textBox8.SelectedText = Convert.ToString(Z.summa_zakaza);
textBox9.SelectedText = Convert.ToString(Z.month);
}
private void button1_Click(object sender, EventArgs e)
{
try
{
if ((textBox2.Text == "") || (textBox3.Text == "") || (textBox4.Text == "") || (textBox7.Text == "") || (textBox8.Text == "") || (textBox9.Text == "") || (Convert.ToInt32(textBox7.Text) <= 0) || (Convert.ToInt32(textBox8.Text) <= 0) || (Convert.ToInt32(textBox9.Text) <= 0))
{
MessageBox.Show("???? ???????? ??????!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
????????_???.Zakazi Z = new ????????_???.Zakazi();
string naimenovanie, FIO_zakazchika, FIO_agenta, oplata;
int ID_agenta, kol_vo, summa_zakaza,month;
naimenovanie = textBox2.Text;
FIO_zakazchika = textBox3.Text;
FIO_agenta = textBox4.Text;
month = Convert.ToInt32(textBox9.Text);
ID_agenta = Program.Activ.nomer_agenta;
oplata = "?? ????????";
kol_vo = Convert.ToInt32(textBox7.Text);
summa_zakaza = Convert.ToInt32(textBox8.Text);
foreach (????????_???.Agents Ag in Program.Activ.Upr.SAG.List)
{
if (Program.Activ.nomer_agenta == Ag.id)
{
Ag.summa_ot_zakazov += summa_zakaza;
}
}
Program.Activ.Upr.SZ.Add(Z.naimenovanie = naimenovanie, Z.FIO_zakazchika = FIO_zakazchika, Z.FIO_agenta=FIO_agenta, Z.ID_agenta = ID_agenta, Z.oplata = oplata, Z.nomer, Z.kol_vo = kol_vo, Z.summa_zakaza = summa_zakaza,Z.month=month);
Program.Activ.Upr.SaveZakazi("Zakazi.xml");
Program.Agentam.listBox1.Items.Clear();
foreach (????????_???.Zakazi ZZ in Program.Activ.Upr.SZ.List)
{
Program.Agentam.listBox1.Items.Add(ZZ.naimenovanie);
}
Program.Activ.Upr.SaveAgents("Agents.xml");
Program.SpisAgent.listBox1.Items.Clear();
foreach (????????_???.Agents AGT in Program.Activ.Upr.SAG.List)
{
Program.SpisAgent.listBox1.Items.Add(AGT.fio);
}
Program.Agentam.listBox1.Items.Clear();
Program.Agentam.m = new int[Program.Activ.Upr.SZ.List.Count];
int kolvo = 0;
foreach (????????_???.Zakazi Z2 in Program.Activ.Upr.SZ.List)
{
if (Z2.ID_agenta == Program.Activ.nomer_agenta)
{
Program.Agentam.listBox1.Items.Add(Z2.naimenovanie);
Program.Agentam.m[kolvo] = Z2.nomer;
kolvo++;
}
}
this.Hide();
}
}
catch { MessageBox.Show("?????? ?????!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
}
private void ??????????_??????_FormClosing(object sender, EventArgs e)
{
}
}
}
Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ????????_???;
using System.IO;
namespace ????????
{
public partial class Form1 : Form
{ public Form1()
{
InitializeComponent();
}
private void button4_Click(object sender, EventArgs e)
{
Program.Info.ShowDialog();
}
private void Form1_Load(object sender, EventArgs e)
{
if (File.Exists("Agents.xml"))
Program.Activ.Upr.LoadAgents("Agents.xml");
if (File.Exists("Zakazi.xml"))
Program.Activ.Upr.LoadZakazi("Zakazi.xml");
this.Activate(); }
private void button3_Click(object sender, EventArgs e)
{
this.Close();
}
private void button1_Click(object sender, EventArgs e)
{
Program.SpisAgent.ShowDialog();
}
private void button2_Click(object sender, EventArgs e)
{
Program.SpisZakaz.ShowDialog();
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
Program.Activ.Upr.SaveAgents("Agents.xml");
Program.Activ.Upr.SaveZakazi("Zakazi.xml");
}
private void ?????????????ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void ?????????????????ToolStripMenuItem_Click(object sender, EventArgs e)
{
Program.SpisAgent.ShowDialog();
}
private void ??????????????ToolStripMenuItem_Click(object sender, EventArgs e)
{
Program.SpisZakaz.ShowDialog();
}
private void ??????????ToolStripMenuItem_Click(object sender, EventArgs e)
{
Program.Information.ShowDialog();
}
private void ??????ToolStripMenuItem_Click(object sender, EventArgs e)
{
Program.Info.ShowDialog();
}
private void ?????ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
Application.Exit();
}
private void button1_Click_1(object sender, EventArgs e)
{
//Program.Mail.ShowDialog();
}
private void ??????????????ToolStripMenuItem_Click(object sender, EventArgs e)
{
Program.DAgent.ShowDialog();
}
private void ???????ToolStripMenuItem_Click(object sender, EventArgs e)
{
Program.Z_m.ShowDialog();
}
private void ?????????ToolStripMenuItem_Click(object sender, EventArgs e)
{
Program.Z_k.ShowDialog();
}
}
}
?????? ???????.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ????????
{
public partial class ??????_??????? : Form
{
public int CurIndAG;
int x;
public ??????_???????()
{
InitializeComponent();
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
int index = listBox1.SelectedIndex;
textBox2.Text = null;
textBox3.Text = null;
textBox4.Text = null;
textBox5.Text = null;
textBox6.Text = null;
textBox12.Text = null;
textBox7.Text = null;
textBox9.Text = null;
textBox10.Text = null;
textBox11.Text = null;
foreach (????????_???.Agents AG in Program.Activ.Upr.SAG.List)
{
if (index == AG.id)
{
textBox2.SelectedText = Convert.ToString(AG.id);
textBox3.SelectedText = Convert.ToString(AG.fio);
textBox4.SelectedText = Convert.ToString(AG.statys);
textBox5.SelectedText = Convert.ToString(AG.age);
textBox6.SelectedText = Convert.ToString(AG.adress);
textBox12.SelectedText = Convert.ToString(AG.tel);
textBox7.SelectedText = Convert.ToString(AG.e_mail);
textBox9.SelectedText = Convert.ToString(AG.kolvo_zakazov_k); textBox10.SelectedText = Convert.ToString(AG.kolvo_otrab_dnei_m);
textBox11.SelectedText = Convert.ToString(AG.summa_ot_zakazov);
}
}
textBox3.ReadOnly = true;
textBox4.ReadOnly = true;
textBox5.ReadOnly = true;
textBox6.ReadOnly = true;
textBox12.ReadOnly = true;
textBox7.ReadOnly = true;
textBox9.ReadOnly = true;
textBox10.ReadOnly = true;
}
private void ??????_???????_FormClosing(object sender, FormClosingEventArgs e)
{
Program.Activ.Upr.SaveAgents("Agents.xml");
}
private void ??????_???????_Load_1(object sender, EventArgs e)
{
listBox1.Items.Clear();
foreach (????????_???.Agents AG in Program.Activ.Upr.SAG.List)
{
listBox1.Items.Add(AG.fio);
AG.kolvo_zakazov_k = 0;
AG.summa_ot_zakazov = 0;
foreach (????????_???.Zakazi Z in Program.Activ.Upr.SZ.List)
{
if (Z.ID_agenta == AG.id)
{
AG.kolvo_zakazov_k++;
AG.summa_ot_zakazov += Z.summa_zakaza;
}
}
} }
private void button5_Click(object sender, EventArgs e)
{
textBox2.Text = null;
textBox3.Text = null;
textBox4.Text = null;
textBox5.Text = null;
textBox6.Text = null;
textBox12.Text = null;
textBox7.Text = null;
textBox9.Text = null;
textBox10.Text = null;
textBox11.Text = null;
this.Hide();
}
private void button4_Click_1(object sender, EventArgs e)
{
if (radioButton1.Checked)
{
try
{
string poisk, lstr;
poisk = Convert.ToString(textBox1.Text);
for (int i = 0; i < listBox1.Items.Count; i++)
{
lstr = listBox1.Items[i].ToString();
if (lstr == poisk)
{
listBox1.SelectedIndex = i;
}
if (lstr != poisk)
{
x++;
if (x == listBox1.Items.Count)
{
MessageBox.Show("????? ?? ??????.", "??????????", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
} x = 0;
}
catch { MessageBox.Show("?????? ?????!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
}
if (radioButton2.Checked)
{
try
{
int p;
p = Convert.ToInt32(textBox1.Text);
for (int i = 0; i < listBox1.Items.Count; i++)
{
if (i == p)
{
listBox1.SelectedIndex = i;
}
if (i != p)
{
x++;
if (x == listBox1.Items.Count)
{
MessageBox.Show("????? ?? ??????? ID ?? ??????.", "??????????", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
x = 0;
}
catch { MessageBox.Show("?????? ?????! ??? ?????? ??????? ID ??????.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
}
if((!radioButton1.Checked)&&(!radioButton2.Checked))
{
MessageBox.Show("?????????? ??????? ?? ?????? ???????? ?? ???????????? ?????: ?? ??? ?????? ??? ?? ID ??????.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void button2_Click_1(object sender, EventArgs e)
{
Program.DAgent.ShowDialog(); }
private void button3_Click(object sender, EventArgs e)
{
textBox3.ReadOnly = false;
textBox4.ReadOnly = false;
textBox5.ReadOnly = false; textBox6.ReadOnly = false;
textBox12.ReadOnly = false;
textBox7.ReadOnly = false;
textBox10.ReadOnly = false; }
private void button6_Click(object sender, EventArgs e)
{
????????_???.Agents AG = new ????????_???.Agents();
string FIO_agenta, statys, adres, e_mail;
int age, tel, kolvo_dnei;
FIO_agenta=textBox3.Text;
statys=textBox4.Text;
age=Convert.ToInt32(textBox5.Text);
adres=textBox6.Text;
tel=Convert.ToInt32(textBox12.Text);
e_mail=textBox7.Text;
kolvo_dnei=Convert.ToInt32(textBox10.Text);
Program.Activ.Upr.SAG.List[listBox1.SelectedIndex].fio =FIO_agenta ;
Program.Activ.Upr.SAG.List[listBox1.SelectedIndex].statys = statys;
Program.Activ.Upr.SAG.List[listBox1.SelectedIndex].age = age;
Program.Activ.Upr.SAG.List[listBox1.SelectedIndex].adress = adres;
Program.Activ.Upr.SAG.List[listBox1.SelectedIndex].tel = tel;
Program.Activ.Upr.SAG.List[listBox1.SelectedIndex].e_mail = e_mail;
Program.Activ.Upr.SAG.List[listBox1.SelectedIndex].kolvo_otrab_dnei_m = kolvo_dnei;
Program.Activ.Upr.SaveAgents("Agents.xml");
textBox3.ReadOnly = true;
textBox4.ReadOnly = true;
textBox5.ReadOnly = true;
textBox6.ReadOnly = true;
textBox12.ReadOnly = true;
textBox7.ReadOnly = true;
textBox10.ReadOnly = true;
}
}
}
?????????? ??????.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ????????
{
public partial class ??????????_?????? : Form
{
public ??????????_??????()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
this.Hide();
}
private void ??????????_??????_Load(object sender, EventArgs e)
{
textBox1.Text = null;
textBox2.Text = null;
textBox3.Text = null;
textBox4.Text = null;
textBox5.Text = null;
textBox6.Text = null;
textBox7.Text = null;
textBox9.Text = null;
textBox10.Text = null;
textBox11.Text = null;
????????_???.Agents AG = new ????????_???.Agents();
textBox1.SelectedText = Convert.ToString(AG.id);
textBox2.SelectedText = Convert.ToString(AG.fio);
textBox3.SelectedText = "?????";
textBox4.SelectedText = Convert.ToString(AG.age);
textBox5.SelectedText = Convert.ToString(AG.adress);
textBox6.SelectedText = Convert.ToString(AG.tel);
textBox7.SelectedText = Convert.ToString(AG.e_mail);
textBox9.SelectedText = Convert.ToString(AG.kolvo_zakazov_k);
textBox10.SelectedText = Convert.ToString(AG.kolvo_otrab_dnei_m);
textBox11.SelectedText = Convert.ToString(AG.summa_ot_zakazov); }
private void button1_Click(object sender, EventArgs e)
{
try
{
if ((textBox2.Text == "") || (textBox4.Text == "") || (textBox5.Text == "") || (textBox6.Text == "") || (textBox7.Text == "") || (textBox9.Text == "") || (textBox10.Text == "")||(Convert.ToInt32(textBox4.Text)<=0)||(Convert.ToInt32(textBox6.Text)<=0))
{
MessageBox.Show("???? ???????? ??????!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
string fio, statys, adress, e_mail;
int age, tel, kolvo_zakazov_k, kolvo_otrab_dnei_m, summa_ot_zakazov;
fio = textBox2.Text;
statys = textBox3.Text;
age = Convert.ToInt32(textBox4.Text);
adress = textBox5.Text;
tel = Convert.ToInt32(textBox6.Text);
e_mail = textBox7.Text;
kolvo_zakazov_k = Convert.ToInt32(textBox9.Text);
kolvo_otrab_dnei_m = Convert.ToInt32(textBox10.Text);
summa_ot_zakazov = Convert.ToInt32(textBox11.Text);
????????_???.Agents AG = new ????????_???.Agents();
Program.Activ.Upr.SAG.Add(AG.fio = fio, AG.statys = statys, AG.age = age, AG.adress = adress, AG.tel = tel, AG.e_mail = e_mail, AG.kolvo_zakazov_k = kolvo_zakazov_k, AG.kolvo_otrab_dnei_m = kolvo_otrab_dnei_m, AG.summa_ot_zakazov = summa_ot_zakazov, AG.id);
Program.Activ.Upr.SaveAgents("Agents.xml");
Program.SpisAgent.listBox1.Items.Clear();
foreach (????????_???.Agents AGT in Program.Activ.Upr.SAG.List)
{
Program.SpisAgent.listBox1.Items.Add(AGT.fio);
}
this.Hide();
}
}
catch { MessageBox.Show("?????? ?????!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
} private void ??????????_??????_FormClosing(object sender, EventArgs e)
{ }
}
}
?????? ???????.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ????????_???;
using System.IO;
namespace ????????
{
public partial class ??????_??????? : Form
{
int x;
int ukaz = -1;
public ??????_???????()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
textBox2.Text = null;
textBox3.Text = null;
textBox4.Text = null;
textBox5.Text = null;
textBox6.Text = null;
textBox9.Text = null;
textBox7.Text = null;
textBox8.Text = null;
textBox10.Text = null;
this.Hide();
}
private void ??????_???????_Load(object sender, EventArgs e)
{
if (File.Exists("Zakazi.xml"))
Program.Activ.Upr.LoadZakazi("Zakazi.xml");
this.Activate();
listBox1.Items.Clear();
foreach (????????_???.Zakazi Z in Program.Activ.Upr.SZ.List)
{
listBox1.Items.Add(Z.naimenovanie);
}
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
int index = listBox1.SelectedIndex;
textBox2.Text = null;
textBox3.Text = null;
textBox4.Text = null;
textBox5.Text = null;
textBox6.Text = null;
textBox9.Text = null;
textBox7.Text = null;
textBox8.Text = null;
textBox10.Text = null;
foreach (????????_???.Zakazi Z2 in Program.Activ.Upr.SZ.List)
{
if (index==Z2.nomer)
{
textBox2.SelectedText = Convert.ToString(Z2.nomer);
textBox3.SelectedText = Convert.ToString(Z2.naimenovanie);
textBox4.SelectedText = Convert.ToString(Z2.FIO_zakazchika);
textBox5.SelectedText = Convert.ToString(Z2.FIO_agenta);
textBox6.SelectedText = Convert.ToString(Z2.ID_agenta);
textBox9.SelectedText = Convert.ToString(Z2.oplata);
textBox7.SelectedText = Convert.ToString(Z2.kol_vo);
textBox8.SelectedText = Convert.ToString(Z2.summa_zakaza);
textBox10.SelectedText = Convert.ToString(Z2.month);
}
}
}
private void ??????_???????_FormClosing(object sender, FormClosingEventArgs e)
{
//Program.Activ.Upr.SaveZakazi("Zakazi.xml");
}
private void button3_Click(object sender, EventArgs e)
{
if (textBox9.Text == "?? ????????")
{
DialogResult dr = MessageBox.Show("????? ????????", "???????????? ??????", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
switch (dr)
{
case DialogResult.Yes: textBox9.Text = null; textBox9.Text = "????????";
????????_???.Zakazi Z = new ????????_???.Zakazi();
string oplata;
oplata = Convert.ToString(textBox9.Text);
Program.Activ.Upr.SZ.List[listBox1.SelectedIndex].oplata = oplata;
Program.Activ.Upr.SaveZakazi("Zakazi.xml");
break;
case DialogResult.No: break;
}
}
else //(textBox9.Text == "????????")
{
MessageBox.Show("??????????? ?????? ????? ?????? ? ?? ?????????? ???????.", "?? ????????????", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void button4_Click(object sender, EventArgs e)
{
if (radioButton1.Checked)
{
try
{
string poisk, lstr;
bool not_find = true;
poisk = Convert.ToString(textBox1.Text);
for (int i = 0; i < listBox1.Items.Count; i++)
{
lstr = listBox1.Items[i].ToString();
if ((lstr == poisk) & (not_find))
{
if (i > ukaz)
{
ukaz = i;
listBox1.SelectedIndex = i;
not_find = false;
}
}
if (lstr != poisk)
{
x++;
if (x == listBox1.Items.Count)
{
MessageBox.Show("????? ?? ??????.", "??????????", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
x = 0;
}
catch { MessageBox.Show("?????? ?????!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
}
if (radioButton2.Checked)
{
try
{
int p;
p = Convert.ToInt32(textBox1.Text);
for (int i = 0; i < listBox1.Items.Count; i++)
{
if (i == p)
{
listBox1.SelectedIndex = i;
}
if (i != p)
{
x++;
if (x == listBox1.Items.Count)
{
MessageBox.Show("????? ?? ??????? ?????? ?? ??????.", "??????????", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
x = 0;
}
catch { MessageBox.Show("?????? ?????! ??? ?????? ??????? ????? ??????.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
}
if ((!radioButton1.Checked) && (!radioButton2.Checked))
{
MessageBox.Show("?????????? ??????? ?? ?????? ???????? ?? ???????????? ?????: ?? ???????????? ?????? ??? ?? ?????? ??????.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
} } }
}
?????.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net.Mail;
using System.Net;
using System.Net.Mime;
namespace ????????
{
public partial class ????? : Form
{
public ?????()
{
InitializeComponent();
}
public string file;
private void button1_Click(object sender, EventArgs e)
{
//??????????? ?? SMTP ???????
SmtpClient Smtp = new SmtpClient("smtp.mail.ru", 25);
//Smtp.Credentials = new NetworkCredential("elena94024", textBox3.Text.Trim());
Smtp.Credentials = new NetworkCredential("didi17@bk.ru", textBox3.Text.Trim());
Smtp.EnableSsl = false; bool checkaddr = false;
bool checksubj = false;
bool checksubp = false;
if (textBox1.TextLength > 0) checkaddr = true;
if (checkaddr == false) MessageBox.Show("??????? ????? ??????????!");
if (textBox2.TextLength > 0) checksubj = true;
if (checksubj == false) MessageBox.Show("??????? ???? ?????????!");
if (textBox3.TextLength > 0) checksubp = true;
if (checksubp == false) MessageBox.Show("??????? ??????!");
if (checkaddr == true & checksubj == true & checksubp == true) {
MailMessage Msg = new MailMessage();
//Msg.From = new MailAddress("elena94024@mail.ru");
Msg.From = new MailAddress("didi17@bk.ru");
Msg.To.Add(new MailAddress(textBox1.Text.ToString()));
Msg.Subject = textBox2.Text.ToString();
Msg.Body = richTextBox1.Text;
string file = openFileDialog1.FileName.ToString(); ;
Attachment attach = new Attachment(file, MediaTypeNames.Application.Octet);
ContentDisposition disposition = attach.ContentDisposition;
disposition.CreationDate = System.IO.File.GetCreationTime(file);
disposition.ModificationDate = System.IO.File.GetLastWriteTime(file);
disposition.ReadDate = System.IO.File.GetLastAccessTime(file);
Msg.Attachments.Add(attach);
try
{
Smtp.Send(Msg);//!!!????????
MessageBox.Show("????????? ??????????!");
}
catch
{ MessageBox.Show("???????????? ????!"); }
}
else
{ MessageBox.Show("????????? ???? ???????? ?????????????!"); }
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
private void ?????_Load(object sender, EventArgs e)
{
}
}
}
??????????.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ????????
{
public partial class ?????????? : Form
{
public ??????????()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
private void ??????????_Load(object sender, EventArgs e)
{
}
}
}
?????????? ? ???????.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ????????
{
public partial class ?????? : Form
{
public ??????()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
this.Hide();
}
private void ??????_Load(object sender, EventArgs e)
{
}
}
}
Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace ????????
{
static class Program
{
public static Form1 f1;
public static ??????????_?????? DAgent;
public static ??????????_?????? DZakaz;
public static ?????? Info; public static ????? Mail;
public static ???????????_2 Upr2;
public static ??????_??????? SpisAgent;
public static ??????_??????? SpisZakaz;
public static ?????????? Information;
public static ????????_??_????? Z_m;
public static ?????????_???????? Zarp_Param;
public static ????????_??_??????? Z_k;
public static ?????????_?????? Premia_Param;
public static log Activ;
public static ??????? Agentam;
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
f1 = new Form1();
DAgent = new ??????????_??????();
DZakaz = new ??????????_??????();
Info = new ??????();
Mail = new ?????();
Upr2 = new ???????????_2();
SpisAgent = new ??????_???????();
SpisZakaz = new ??????_???????();
Information = new ??????????();
Z_m = new ????????_??_?????();
Zarp_Param = new ?????????_????????(); Z_k = new ????????_??_???????();
Premia_Param = new ?????????_??????();
Activ = new log();
Agentam = new ???????();
Application.Run(Activ);
}
}
}
???????? DLL
Agents.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ????????_???
{
public class Agents
{ public int id; public int ID
{
get
{ return id; }
//set
//{ number = value; }
}
public string fio;
public string Fio
{
get
{ return fio; }
set
{ fio = value; }
}
public string statys;
public string Statys
{
get
{ return statys; }
set
{ statys = value; }
}
public int age;
public int Age
{
get
{ return age; }
set
{ age = value; }
}
public string adress;
public string Adress
{
get
{ return adress; }
set
{ adress = value; }
}
public int tel;
public int Tel
{
get
{ return tel; }
set
{ tel = value; }
}
public string e_mail;
public string E_mail
{
get
{ return e_mail; }
set
{ e_mail = value; }
}
public int kolvo_zakazov_k;
public int Kolvo_zakazov_k
{
get
{ return kolvo_zakazov_k; }
set
{ kolvo_zakazov_k = value; }
}
public int kolvo_otrab_dnei_m;
public int Kolvo_otrab_dnei_m
{
get
{ return kolvo_otrab_dnei_m; }
set
{ kolvo_otrab_dnei_m = value; }
} public decimal summa_ot_zakazov;
public decimal Summa_ot_zakazov
{
get
{ return summa_ot_zakazov; }
set
{ summa_ot_zakazov = value; }
}
public Agents()
{ }
public Agents(string f,string s,int a,string ads,int t,string e_m,int k_z_k,int k_d_m,decimal sum,int id)
{
this.fio = f;
this.statys = s;
this.age = a;
this.adress = ads;
this.tel = t;
this.e_mail = e_m;
this.kolvo_zakazov_k = k_z_k;
this.kolvo_otrab_dnei_m = k_d_m;
this.summa_ot_zakazov = sum;
this.id = id;
}
}
public class SpisokAgents
{
public SpisokAgents()
{ }
public List<Agents> List = new List<Agents>();
public void Add( string f, string s, int a, string ads, int t, string e_m, int k_z_k, int k_d_m, decimal sum,int id)
{
Agents obj = new Agents(f, s, a, ads, t, e_m, k_z_k, k_d_m, sum,List.Count);
List.Add(obj);
}
}
}
Zakazi.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ????????_???
{
public class Zakazi
{
public int nomer;
public int Nomer
{
get
{ return nomer; }
//set
//{ index = value; }
}
public string naimenovanie;
public string Naimenovanie
{
get
{ return naimenovanie; }
set
{ naimenovanie = value; }
}
public int kol_vo;
public int Kol_vo
{
get
{ return kol_vo; }
set
{ kol_vo = value; }
}
public decimal summa_zakaza;
public decimal Summa_zakaza
{
get
{ return summa_zakaza; }
set
{ summa_zakaza = value; }
}
public string FIO_zakazchika;
public string Fio_zakazchika
{
get
{ return FIO_zakazchika; }
set
{ FIO_zakazchika = value; }
}
public string FIO_agenta;
public string Fio_agenta
{
get
{ return FIO_agenta; }
set
{ FIO_agenta = value; }
}
public int ID_agenta;
public int id_agenta
{
get
{ return ID_agenta; }
set
{ ID_agenta = value; }
}
public string oplata;
public string Oplata
{
get
{ return oplata; }
set
{ oplata = value; }
}
public int month;
public int Month
{
get { return month; }
set { month = value; }
}
public Zakazi()
{ }
public Zakazi( string naim, int kol, decimal sum, string fio_z, string fio_ag, int id_agenta, string opl,int n,int month)
{
this.naimenovanie = naim;
this.kol_vo = kol;
this.summa_zakaza = sum;
this.FIO_zakazchika = fio_z;
this.FIO_agenta = fio_ag;
this.ID_agenta = id_agenta;
this.oplata = opl;
this.nomer = n;
this.month = month;
}
}
public class SpisokZakazov
{
public SpisokZakazov()
{ }
public List<Zakazi> List = new List<Zakazi>();
public void Add(string naim, string fio_z, string fio_ag, int id_agenta, string opl, int n, int kol, decimal sum,int month)
{
Zakazi obj = new Zakazi(naim, kol, sum, fio_z, fio_ag, id_agenta, opl, List.Count, month);
List.Add(obj);
}
}
}
?????
?????? ????????? ????? ???? ???????????? ?? ??????????? ??? ????? ?????????? ????? ??????? ?? ????????. ??? ????? ???? ??????? ?????????, ?????????? TV, ????????????, ?????????, ??? ?????????? ??????? ?? ??????. ? ?????? ????????? ? ????? ?? ?????? ?????? ??????? ?? ???????? ???????????? ???????.
???????????? ?????????, ???????? ??, ??? ??? ?? ?????? ????? ???? ?????????? ????? ???????, ?? ? ???? ??????????? ?????????? ???????? ? ???????? ??????????????, ? ?? ??????????? ?? ?????? ????????? ?????????.
? ????????? ????????????? ???????? ??????? ??????? ?? ????????, ? ??????????? ??????????. 2
Документ
Категория
Без категории
Просмотров
26
Размер файла
3 715 Кб
Теги
пояснительная, записка
1/--страниц
Пожаловаться на содержимое документа