Система «Отдел кадров»

Автор работы: Пользователь скрыл имя, 05 Декабря 2012 в 10:26, курсовая работа

Краткое описание

Цель
Разработать систему, упрощающую работу отдела кадров.
Задачи
1. Изучить литературу по языку программирования С#.
2. Создать функциональную схему будущей системы.

Содержание работы

Введение 3
1. Необходимость проекта 4
1.1. Обоснование необходимости 4
1.2. Видение проекта 4
1.3. Анализ выгод 4
2. Концепция решения 5
2.1. Цели и Задачи 5
2.2. Анализ использования 5
2.3.1. Пользователи 5
2.3.2. Сценарии использования 5
2.4. Требования 6
2.4.1. Требования пользователей 6
2.4.2. Системные требования 6
3. Рамки 6
3.1. Функциональность решения 6
3.2. Критерии одобрения решения 6
4. Стратегии дизайна решения 7
4.1. Стратегия архитектурного дизайна 7
4.2. Стратегия технологического дизайна 8
5. Разработка программы 9
5.1. Формы 9
5.2. Классы 12
6. Руководство пользователя 12
6.1. Сотрудник отдела кадров 12
6.2. Начальник поста 13
Заключение 14
Приложение 15

Содержимое работы - 1 файл

Курсовая.docx

— 312.27 Кб (Скачать файл)

 

        public void Fff()

        {

            dataGridView1.DataSource = null;

            if(Program.OO.Z.S.Count!=0)

            dataGridView1.DataSource = bindingSource1;

        }

 

        private void toolStripMenuItem2_Click(object sender, EventArgs e)

        {

 

        }

 

        private void сотрудникToolStripMenuItem_Click(object sender, EventArgs e)

        {

 

        }

 

        private void должностьToolStripMenuItem_Click(object sender, EventArgs e)

        {

            Form2 f = new Form2();

            f.Show();

        }

 

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)

        {

            Program.OO.Clo();

        }

 

        private void подразделениеToolStripMenuItem_Click(object sender, EventArgs e)

        {

            Form4 h = new Form4();

            h.Show();

        }

 

        private void menuStrip2_ItemClicked(object sender, ToolStripItemClickedEventArgs e)

        {

 

        }

 

        private void dataGridView1_MouseDoubleClick(object sender, MouseEventArgs e)

        {

            Sotrudnic R = (Sotrudnic)bindingSource1.Current;

            Form5 F = new Form5(R.rodstv);

            F.ShowDialog();

        }

 

        private void редактироватьToolStripMenuItem_Click(object sender, EventArgs e)

        {

            if (!Fufel)

            {

                label1.Visible = true;

                textBox1.Visible = true;

            }

            else

            {

                label1.Visible = false;

                textBox1.Visible = false;

            }

        }

 

        private void textBox1_KeyPress(object sender, KeyPressEventArgs e)

        {

            int a = Convert.ToInt32(e.KeyChar);

            if (a == 13)

            {

                if (textBox1.Text == "13579")

                {

                    Fufel = true;

                    должностьToolStripMenuItem.Visible = подразделениеToolStripMenuItem.Visible = сотрудникToolStripMenuItem.Visible = true;

                    label1.Visible = false;

                    textBox1.Visible = false;

                }

            }

        }

 

        private void добавитьToolStripMenuItem_Click(object sender, EventArgs e)

        {

            Program.g = new Form3();

            Program.g.Show();

        }

 

        private void удалитьToolStripMenuItem_Click(object sender, EventArgs e)

        {

            Form6 Fg = new Form6();

            Fg.ShowDialog();

        }

 

        private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)

        {

            if ((dataGridView1.Rows[e.RowIndex].DataBoundItem != null) &&

                     (dataGridView1.Columns[e.ColumnIndex].DataPropertyName.Contains(".")))

            {

                e.Value = Program.OO.BindProperty(

                dataGridView1.Rows[e.RowIndex].DataBoundItem,

                dataGridView1.Columns[e.ColumnIndex].DataPropertyName

                );

            }

        }

 

        private void bindingSource1_CurrentChanged(object sender, EventArgs e)

        {

            Sotrudnic S = (Sotrudnic)bindingSource1.Current;

            panel1.BackgroundImage = Image.FromFile(S.Fot);

        }

 

        private void справкаToolStripMenuItem_Click(object sender, EventArgs e)

        {

            Form7 F = new Form7();

            F.ShowDialog();

        }

 

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)

        {

 

        }

 

        private void panel1_Paint(object sender, PaintEventArgs e)

        {

 

        }

    }

}

 

    public partial class Form2 : Form

    {

        public Form2()

        {

            InitializeComponent();

            if (Program.OO.Z.D == null) Program.OO.Z.D = new List<Dolgnost>();

            bindingSource2.DataSource = Program.OO.Z.D;

            dataGridView2.DataSource = bindingSource2;

            dataGridView2.Visible = true;

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            Dolgnost g = (Dolgnost)bindingSource2.Current;

            for (int i = 0; i < Program.OO.Z.D.Count; i++)

            {

                if (Program.OO.Z.D[i].name == g.name)

                {

                    Program.OO.Z.D.RemoveAt(i);

                    break;

                }

            }

            dataGridView2.DataSource = null;

            dataGridView2.DataSource = bindingSource2;

        }

 

        private void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e)

        {

 

        }

    }

 

{

    public partial class Form3 : Form

    {

        public Sotrudnic S = new Sotrudnic();

        public Form3()

        {

            InitializeComponent();

            bindingSource1.DataSource = Program.OO.Z.D;

            bindingSource2.DataSource = S.rodstv;

        }

 

        public void t_Tick()

        {

            if (S.Podraz != null)

            {

                 richTextBox1.Text=S.Podraz.name;

            }

        }

 

        private void label2_Click(object sender, EventArgs e)

        {

 

        }

 

        private void Form3_Load(object sender, EventArgs e)

        {

 

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            Form4 h = new Form4(0);

            h.Show();

        }

 

        private void button2_Click(object sender, EventArgs e)

        {

            try

            {

                bool f = false;

                for (int i = 0; i < Program.OO.Z.S.Count; i++)

                {

                    if (Convert.ToInt32(textBox5.Text) == Program.OO.Z.S[i].INN || Program.OO.Z.S[i].Num_P == Convert.ToInt32(textBox4.Text))

                        f = true;

                }

                if (!f)

                {

                    S.familiya = textBox1.Text;

                    S.imya = textBox2.Text;

                    S.Obraz = comboBox2.Text;

                    S.Oklad = Convert.ToInt32(textBox7.Text);

                    S.Staj = Convert.ToInt32(textBox6.Text);

                    S.otchestvo = textBox3.Text;

                    Dolgnost j = new Dolgnost();

                    j.name = comboBox1.Text;

                    S.dolgnost = j;

                    S.INN = Convert.ToInt32(textBox5.Text);

                    S.Num_P = Convert.ToInt32(textBox4.Text);

                    Program.OO.Z.S.Add(S);

                    Program.GG.Fff();

                    this.Close();

                }

                else

                {

                    MessageBox.Show("Данный номер уже существует!");

                }

            }

            catch

            {

                MessageBox.Show("Ошибка! Заполните обязательные поля.");

            }

        }

 

        private void button3_Click(object sender, EventArgs e)

        {

            openFileDialog1.FileName = "";

            if (openFileDialog1.ShowDialog() == DialogResult.OK)

            {

                richTextBox2.Text = openFileDialog1.FileName;

                S.Fot = openFileDialog1.FileName;

            }

        }

    }

public partial class Form4 : Form

    {

        public Form4()

        {

            InitializeComponent();

            if (Program.OO.Z.P == null) Program.OO.Z.P = new List<podraz>();

            bindingSource2.DataSource = Program.OO.Z.P;

            dataGridView2.DataSource = bindingSource2;

            dataGridView2.Visible = true;

            dataGridView1.Visible = false;

        }

        public Form4(int a)

        {

            InitializeComponent();

            if (Program.OO.Z.P == null) Program.OO.Z.P = new List<podraz>();

            bindingSource2.DataSource = Program.OO.Z.P;

            dataGridView2.DataSource = bindingSource2;

            dataGridView2.Visible = false;

            dataGridView1.Visible = true;

        }

 

        private void dataGridView1_MouseDoubleClick(object sender, MouseEventArgs e)

        {

            Program.g.S.Podraz = (podraz) bindingSource2.Current;

            Program.g.t_Tick();

            this.Close();

        }

 

        private void Form4_Load(object sender, EventArgs e)

        {

 

        }

 

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)

        {

 

        }

    }

public partial class Form5 : Form

    {

        public Form5(List<Rodstv> L)

        {

            InitializeComponent();

            bindingSource2.DataSource = L;

        }

 

        private void Form5_Load(object sender, EventArgs e)

        {

 

        }

    }

public partial class Form6 : Form

    {

        public Form6()

        {

            InitializeComponent();

            bindingSource1.DataSource = Program.OO.Z.S;

        }

 

        private void dataGridView1_MouseDoubleClick(object sender, MouseEventArgs e)

        {

            Sotrudnic F = (Sotrudnic)bindingSource1.Current;

            for (int i = 0; i < Program.OO.Z.S.Count; i++)

            {

                if (F.familiya == Program.OO.Z.S[i].familiya && F.imya == Program.OO.Z.S[i].imya && F.otchestvo == Program.OO.Z.S[i].otchestvo)

                {

                    Program.OO.Z.S.RemoveAt(i);

                    break;

                }

            }

            dataGridView1.DataSource = null;

            dataGridView1.DataSource = bindingSource1;

            Program.GG.Fff();

        }

 

        private void Form6_FormClosing(object sender, FormClosingEventArgs e)

        {

            Program.GG.Fff();

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            Sotrudnic F = (Sotrudnic)bindingSource1.Current;

            for (int i = 0; i < Program.OO.Z.S.Count; i++)

            {

                if (F.familiya == Program.OO.Z.S[i].familiya && F.imya == Program.OO.Z.S[i].imya && F.otchestvo == Program.OO.Z.S[i].otchestvo)

                {

                    Program.OO.Z.S.RemoveAt(i);

                    break;

                }

            }

            dataGridView1.DataSource = null;

            dataGridView1.DataSource = bindingSource1;

        }

 

        private void Form6_Load(object sender, EventArgs e)

        {

        }

  

public partial class Form7 : Form

    {

        public Form7()

        {

            InitializeComponent();

            StreamReader r = new StreamReader("2.txt");

            richTextBox1.Text = r.ReadToEnd();

            r.Close();

        }

 

        private void richTextBox1_TextChanged(object sender, EventArgs e)

        {

 

        }

 

        private void Form7_Load(object sender, EventArgs e)

        {

        }

}


Информация о работе Система «Отдел кадров»