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;
using System.Collections;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
namespace Mehr
{
public partial class Tolidi : Form
{
public Tolidi()
{
InitializeComponent();
}
private void label26_Click(object sender, EventArgs e)
{
}
private void textBox20_TextChanged(object sender, EventArgs e)
{
}
private void tableLayoutPanel5_Paint(object sender, PaintEventArgs e)
{
}
private void Tolidi_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'databaseDataSet.MoSHtaraK' table. You can move, or remove it, as needed.
this.moSHtaraKTableAdapter.Fill(this.databaseDataS et.MoSHtaraK);
// TODO: This line of code loads data into the 'databaseDataSet.Tolidi' table. You can move, or remove it, as needed.
this.tolidiTableAdapter.Fill(this.databaseDataSet. Tolidi);
moSHtaraKBindingSource.Position = moSHtaraKBindingSource.Find("id_net", Class1.Id_net);
tolidiBindingSource.Position = tolidiBindingSource.Find("id_net", Class1.Id_net);
}
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
{
moSHtaraKBindingSource.SuspendBinding();
moSHtaraKTableAdapter.Update(databaseDataSet.MoSHt araK);
tolidiBindingSource.SuspendBinding();
tolidiTableAdapter.Update(databaseDataSet.Tolidi);
MessageBox.Show("با موفقیت ذخیره شد");
this.Close();
}
private void importToolStripMenuItem_Click(object sender, EventArgs e)
{
int i = 0;
string ads;
openFileDialog1.ShowDialog();
ads = openFileDialog1.FileName;
if (ads != "openFileDialog1")
{
string data = System.IO.File.ReadAllText(ads);
foreach (string s in data.Split('\n'))
{
i += 1;
if (i == 1)
textBox1.Text = s;
if (i == 2)
textBox2.Text = s;
if (i == 3)
textBox3.Text = s;
if (i == 4)
textBox4.Text = s;
if (i == 5)
textBox5.Text = s;
if (i == 6)
textBox6.Text = s;
if (i == 7)
textBox7.Text = s;
if (i == 8)
textBox8.Text = s;
if (i == 9)
textBox9.Text = s;
if (i == 10)
textBox10.Text = s;
if (i == 11)
textBox11.Text = s;
if (i == 12)
textBox12.Text = s;
if (i == 13)
textBox13.Text = s;
if (i == 14)
textBox14.Text = s;
if (i == 15)
textBox15.Text = s;
if (i == 16)
textBox16.Text = s;
if (i == 17)
textBox17.Text = s;
if (i == 18)
textBox18.Text = s;
if (i == 19)
textBox19.Text = s;
if (i == 20)
textBox20.Text = s;
if (i == 21)
{
if (s == "بلی")
{
checkBox1.Checked = true;
}
if (s == "خیر")
checkBox2.Checked = false;
}
if (i == 22)
textBox21.Text = s;
if (i == 23)
{
//checkBox3;
//checkBox4;
//checkBox5;
}
if (i == 24)
{
//checkBox6;
//checkBox7;
}
if(i == 25)
{
//checkBox7;
//checkBox8;
}
if (i == 26)
textBox22.Text = s;
}
}
}
private void groupBox1_Enter(object sender, EventArgs e)
{
}
}
}