, , ,

<<


 >>  ()
Pages:     | 1 | 2 ||

- ...

-- [ 3 ] --

} // privateintObrabotkaFinOZ(inti,int type) { int result = 0;

try { SqlCommandcomm = null;

if (type == 0) { comm = newSqlCommand("SELECT INFLUENCE_12,INFLUENCE_12_13 FROM [dbo].[FINAL_O3] WHERE IDENT_SR=" + i, conectGEO);

WriteLOG(" FINAL_O3 " + i + " :");

SqlDataReader r = comm.ExecuteReader();

while (r.Read()) { if (result Convert.ToInt32(r["INFLUENCE_12"].ToString())) { result = Convert.ToInt32(r["INFLUENCE_12"].ToString());

} WriteLOG("INFLUENCE_12=" + r["INFLUENCE_12"]);

if (result Convert.ToInt32(r["INFLUENCE_12_13"].ToString())) { result = Convert.ToInt32(r["INFLUENCE_12_13"].ToString());

} WriteLOG("INFLUENCE_12_13=" + r["INFLUENCE_12_13"]);

} r.Close();

} else { comm = newSqlCommand("SELECT INFLUENCE,INFLUENCE_1 FROM [dbo].[FINAL_O3] WHERE IDENT_SR=" + i, conectGEO);

WriteLOG(" FINAL_O3 " + i + " :");

SqlDataReader r = comm.ExecuteReader();

while (r.Read()) { if (result Convert.ToInt32(r["INFLUENCE"].ToString())) { result = Convert.ToInt32(r["INFLUENCE"].ToString());

} WriteLOG("INFLUENCE=" + r["INFLUENCE"]);

if (result Convert.ToInt32(r["INFLUENCE_1"].ToString())) { result = Convert.ToInt32(r["INFLUENCE_1"].ToString());

} WriteLOG("INFLUENCE_1=" + r["INFLUENCE_1"]);

} r.Close();

} } catch(Exception ex) { WriteLOG(ex.Message);

} return result;

} // / privateintObrabotkaObject(inti, int type) { intresult = 0;

try { SqlCommandcomm = null;

if (type == 0) { comm = newSqlCommand("SELECT INFLUENCE FROM [dbo].[RW_STRELKI_SPEED] WHERE RID=" + i, conectGEO);

} if (type == 1) { comm = newSqlCommand("SELECT INFLUENCE FROM [dbo].[RW_PEREEZD_SPEED] WHERE RID=" + i, conectGEO);

} if (type == 2) { comm = newSqlCommand("SELECT INFLUENCE FROM [dbo].[RW_CONSTRUCTION_SPEED] WHERE RID=" + i, conectGEO);

} if (type == 3) { comm = newSqlCommand("SELECT INFLUENCE FROM [dbo].[RW_CONSTRUCTION_SPEED] WHERE RID=" + i, conectGEO);

} SqlDataReader r = comm.ExecuteReader();

while (r.Read()) { if (result Convert.ToInt32(r["INFLUENCE"].ToString())) { result = Convert.ToInt32(r["INFLUENCE"].ToString());

} WriteLOG("INFLUENCE=" + r["INFLUENCE"]);

} r.Close();

} catch(Exception ex) { WriteLOG(ex.Message);

} returnresult;

} // / privateintObrabotkaFinRailWay(inti) { intresult = 0;

try { } catch (Exceptionex) { WriteLOG(ex.Message);

} returnresult;

} //, 3 privateintOzenka(int i1, int i2, int i3) { intresult = 0;

if (i1== 1 && i2 == 1 && i3 == 1 || i1 == 1 && i2 == 1 && i3 == 2 || i1 == 1 && i == 2 && i3 == 1) { result = 0;

} if (i1== 1 && i2 == 2 && i3 == 2 || i1 == 2 && i2 == 1 && i3 == 1 || i1 == 2 && i == 1 && i3 == 2) { result = 1;

} if (i1== 1 && i2 == 1 && i3 == 3 || i1 == 1 && i2 == 3 && i3 == 1 || i1 == 2 && i == 1 && i3 == 3||i1 == 2 && i2 == 2 && i3 == 1||i1 == 2 && i2 == 2 && i3 == 2||i == 3 && i2 == 1 && i3 == 1||i1 ==3 && i2 == 1 && i3 == 2) { result = 2;

} if (i1== 1 && i2 == 2 && i3 == 3 || i1 == 1 && i2 == 3 && i3 == 2 || i1 == 2 && i == 2 && i3 == 3||i1 == 3 && i2 == 1 && i3 == 3||i1 == 3 && i2 == 2 && i3 == 1||i == 3 && i2 == 2 && i3 == 2) { result = 3;

} if (i1== 1 && i2 == 3 && i3 == 3 || i1 == 2 && i2 == 3 && i3 == 1 || i1 == 2 && i == 3 && i3 == 2||i1 == 2 && i2 == 3 && i3 == 3||i1 == 3 && i2 == 3 && i3 == 1) { result = 4;

} if (i1== 3 && i2 == 2 && i3 == 3) { result = 5;

} if (i1== 3 && i2 == 3 && i3 == 2 || i1 == 3 && i2 == 3 && i3 == 3 ) { result = 6;

} if (i1== 4 && i2 == 1 || i1 == 4 && i2 == 2 && i3 == 1 || i1 == 4 && i2 == 2 && i == 2) { result = 7;

} if (i1== 4 && i2 == 2 && i3 == 3 || i1 == 4 && i2 == 3) { result = 8;

} return result;

} privatevoid Form1_Load(object sender, EventArgs e) { comboBox1.Items.Clear();

SqlCommandcomm = newSqlCommand("SELECT NAME_CS, ID_CS FROM [dbo].[CIRCULATIONSECTION]", conectGEO);

// CIRCULATIONSECTION SqlDataReader r = comm.ExecuteReader();

while (r.Read()) { comboBox1.Items.Add(r[0].ToString());

ID_CS.Add(Convert.ToInt32(r[1].ToString()));

} } } } Form2.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 Ozenka { publicpartialclassForm2 : Form { public Form2() { InitializeComponent();

} privatevoid Form2_Load(object sender, EventArgs e) { textBox1.Text = Properties.Settings.Default.ConBDGEO;

textBox2.Text = Properties.Settings.Default.NameBDGEO;

textBox3.Text = Properties.Settings.Default.ConBD;

textBox4.Text = Properties.Settings.Default.NameBD;

} privatevoid button1_Click(object sender, EventArgs e) { Properties.Settings.Default.ConBDGEO = textBox1.Text;

Properties.Settings.Default.NameBDGEO = textBox2.Text;

Properties.Settings.Default.ConBD = textBox3.Text ;

Properties.Settings.Default.NameBD = textBox4.Text ;

Properties.Settings.Default.Save();

this.Close();

} } }

Pages:     | 1 | 2 ||
 
 >>  ()





 
<<     |    
2013 www.libed.ru - -

, .
, , , , 1-2 .