Автоматизированная информационная система турагенства

Автор работы: Пользователь скрыл имя, 02 Ноября 2012 в 23:03, курсовая работа

Описание

Современные автоматизированные системы предназначены для использования менеджерами турагентств для работы с клиентами и поставщиками: оформление туров, подготовка заявок туристов, выписка путевок, подготовка отчетов туроператорам.
Актуальность данного проекта заключается в том, что разработка и внедрение автоматизированной системы работы с клиентами турфирмы будет являться одним из основных источников существования туристического предприятия. Поэтому целью курсовой работы является разработка автоматизированной информационной системы «AMEGA».

Содержание

Введение..…………………………………………..…………….……....5
1. Разработка информационной системы “Турфирма”:
1.1 Анализ требований……………………………….…………......6
1.2 Проектирование……………………………………………..…..7
1.3 Кодирование……………………………………………...….…11
1.4 Разработка пользовательского интерфейса……………………12
1.5 Инструкция пользователя…………………………………..…20
1.6 Тестирование………………………………………………..….21
Заключение…..……………………………………………………..…....27
Список используемых источников……………....……………….…..28
Приложение А Листинг программы……….…………….…………...29

Работа состоит из  1 файл

курсовик.doc

— 1.63 Мб (Скачать документ)

                        this.dateTimePicker4.Value.Minute,

                        this.dateTimePicker4.Value.Second),

                    this.numericUpDown2.Value,

                    this.comboBox1.SelectedValue};

            }

        }

 

        private void fTur_Load(object sender, EventArgs e)

        {

            // TODO: This line of code loads data into the 'tutuDataSet.Selecter_oteli' table. You can move, or remove it, as needed.

            this.selecter_oteliTableAdapter.Fill(this.tutuDataSet.Selecter_oteli);

            this.Clear();

        }

 

        private void button3_Click(object sender, EventArgs e)

        {

            var res = DateTime.Compare(new DateTime(this.dateTimePicker1.Value.Year, this.dateTimePicker1.Value.Month, this.dateTimePicker1.Value.Day, this.dateTimePicker2.Value.Hour, this.dateTimePicker2.Value.Minute, this.dateTimePicker2.Value.Second),

                new DateTime(this.dateTimePicker3.Value.Year, this.dateTimePicker3.Value.Month, this.dateTimePicker3.Value.Day, this.dateTimePicker4.Value.Hour, this.dateTimePicker4.Value.Minute, this.dateTimePicker4.Value.Second));

 

            if (this.comboBox1.SelectedIndex == -1 || this.numericUpDown1.Value == this.numericUpDown1.Minimum ||

                this.numericUpDown2.Value == this.numericUpDown2.Minimum || res>=0 )

            {

                MessageBox.Show(this, "Проверьте правильность указанных данных!", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Error);

                return;

            }

            else

            {

                this.DialogResult = DialogResult.OK;

            }

        }

 

        private void button2_Click(object sender, EventArgs e)

        {

            this.Clear();

        }

 

        private void Clear()

        {

            this.numericUpDown1.Value = this.numericUpDown1.Minimum;

            this.numericUpDown2.Value = this.numericUpDown2.Minimum;

 

            this.dateTimePicker1.Value = this.dateTimePicker2.Value =

                this.dateTimePicker3.Value = this.dateTimePicker4.Value =

                DateTime.Now;

            this.comboBox1.SelectedIndex = -1;

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            this.Close();

        }

 

   

    }

}

 

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 TurA.Forms

{

    public partial class fStr : Form

    {

        public fStr()

        {

            InitializeComponent();

        }

 

        public object[] Results

        {

            get

            {

                return new object[] { this.textBox1.Text };

            }

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            this.Close();

        }

 

        private void button2_Click(object sender, EventArgs e)

        {

            this.textBox1.Text = String.Empty;

        }

 

        private void button3_Click(object sender, EventArgs e)

        {

            if (this.textBox1.Text.Length == 0 )

            {

                MessageBox.Show(this,"Проверьте правильность указанных данных!", "Внимание", MessageBoxButtons.OK,MessageBoxIcon.Error);

                return;

            }

            else

            {

                this.DialogResult = DialogResult.OK;

            }

        }

    }

}

 

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 TurA.Forms

{

    public partial class fSotr : Form

    {

        public fSotr()

        {

            InitializeComponent();

        }

 

        public object[] Results

        {

            get

            {

                return new object[] { this.textBox1.Text,

                this.textBox2.Text,

                this.textBox3.Text,

                this.textBox4.Text};

            }

        }

        //добавить

        private void button3_Click(object sender, EventArgs e)

        {

            if (this.textBox1.Text.Length == 0 || this.textBox2.Text.Length == 0 ||

                this.textBox3.Text.Length == 0 || this.textBox4.Text.Length == 0 )

            {

                MessageBox.Show(this, "Проверьте правильность указанных данных!", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Error);

                return;

            }

            else

            {

                this.DialogResult = DialogResult.OK;

            }

        }

        //очистить

        private void button2_Click(object sender, EventArgs e)

        {

            this.textBox1.Text = this.textBox2.Text =

            this.textBox3.Text = this.textBox4.Text = String.Empty;

        }

        //закрыть

        private void button1_Click(object sender, EventArgs e)

        {

            this.Close();

        }

    }

}

 

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 TurA.Forms

{

    public partial class fOtel : Form

    {

        public fOtel()

        {

            InitializeComponent();

        }

 

        public object[] Results {

            get {

                return new object[] {

                    this.textBox1.Text,

                    this.numericUpDown1.Value,

                    this.numericUpDown2.Value,

                    this.comboBox1.SelectedValue

                    };

            }

        }

 

        private void fOtel_Load(object sender, EventArgs e)

        {

            // TODO: This line of code loads data into the 'tutuDataSet.Selecter_kurorti' table. You can move, or remove it, as needed.

            this.selecter_kurortiTableAdapter.Fill(this.tutuDataSet.Selecter_kurorti);

            this.Clear();

        }

 

        private void button2_Click(object sender, EventArgs e)

        {

            this.Clear();

        }

 

        private void Clear()

        {

            this.textBox1.Text = String.Empty;

            this.comboBox1.SelectedIndex = -1;

            this.numericUpDown1.Value = this.numericUpDown1.Minimum;

            this.numericUpDown2.Value = this.numericUpDown2.Minimum;

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            this.Close();

        }

 

        private void button3_Click(object sender, EventArgs e)

        {

            if (this.textBox1.Text.Length == 0 || this.comboBox1.SelectedIndex == -1 ||

                this.numericUpDown1.Value == this.numericUpDown1.Minimum ||

                this.numericUpDown2.Value == this.numericUpDown2.Minimum)

            {

                MessageBox.Show(this, "Проверьте правильность указанных данных!", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Error);

                return;

            }

            else

            {

                this.DialogResult = DialogResult.OK;

            }

        }

    }

}

 

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 TurA.Forms

{

    public partial class fKurort : Form

    {

        public fKurort()

        {

            InitializeComponent();

        }

 

        public object[] Results {

                get {

                    return new object[]

                    {

                        this.textBox1.Text, this.comboBox1.SelectedValue

                    };

            }

        }

 

       private void button3_Click(object sender, EventArgs e)

        {

            if (this.textBox1.Text.Length == 0 || this.comboBox1.SelectedIndex == -1)

            {

                MessageBox.Show(this, "Проверьте правильность указанных данных!", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Error);

                return;

            }

            else

            {

                this.DialogResult = DialogResult.OK;

            }

        }

 

        private void button2_Click(object sender, EventArgs e)

        {

            this.Clear();

        }

 

        private void Clear()

        {

            this.textBox1.Text = String.Empty;

            this.comboBox1.SelectedIndex = -1;

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            this.Close();

        }

 

        private void fKurort_Load(object sender, EventArgs e)

        {

            // TODO: This line of code loads data into the 'tutuDataSet.Strani' table. You can move, or remove it, as needed.

            this.straniTableAdapter.Fill(this.tutuDataSet.Strani);

            this.Clear();

        }

    }

}

 

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 TurA.Forms

{

    public partial class fClie : Form

    {

        public fClie()

        {

            InitializeComponent();

        }

 

        public object[] Results {

            get{

                return new object[]{

                    this.textBox1.Text , this.textBox2.Text ,

                    this.textBox3.Text , this.textBox4.Text ,

                    this.textBox5.Text , this.textBox6.Text ,

                    this.textBox7.Text };

            }

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            this.Close();

        }

 

        private void button2_Click(object sender, EventArgs e)

        {

            this.textBox1.Text = this.textBox2.Text =

           this.textBox3.Text = this.textBox4.Text =

            this.textBox5.Text = this.textBox6.Text =

            this.textBox7.Text = String.Empty;

        }

 

        private void button3_Click(object sender, EventArgs e)

        {

            if (this.textBox1.Text.Length == 0 || this.textBox2.Text.Length == 0 ||

                this.textBox3.Text.Length == 0 || this.textBox4.Text.Length == 0 ||

                this.textBox5.Text.Length == 0 || this.textBox6.Text.Length == 0 ||

                this.textBox7.Text.Length == 0 )

            {

                MessageBox.Show(this, "Проверьте правильность указанных данных!", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Error);

                return;

            }

            else

            {

                this.DialogResult = DialogResult.OK;

            }

        }

    }

}

 

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Drawing;

using System.Data;

using System.Linq;

using System.Text;

using System.Windows.Forms;

 

namespace TurA.Controls

{

    public partial class search : UserControl

    {

        private DataGridView pole;

        private SplitContainer owner;

        List<object> arrmass = new List<object>();

 

        public search()

        {

            InitializeComponent();

        }

 

        internal void Init(ref DataGridView dataGridView, ref SplitContainer onwer)

       {

            this.pole = dataGridView;

            this.owner = onwer;

           

            this.checkedListBox1.Items.Clear();

            foreach (DataGridViewColumn item in dataGridView.Columns)

            {

                if (item.Visible)

                {

                    this.checkedListBox1.Items.Add(item.HeaderText, false);

                }

            }

        }

        //hide

        private void button3_Click(object sender, EventArgs e)

        {

            this.owner.Panel2Collapsed = true;

        }

        //search

 

        private void button1_Click(object sender, EventArgs e)

        {

            if (this.textBox1.Text.Length==0 || this.checkedListBox1.CheckedItems.Count==0)

            {

                MessageBox.Show(this, "Заданы неверные параметры поиска!", "Ошибка поиска", MessageBoxButtons.OK, MessageBoxIcon.Error);

                return;

            }

            this.ClearTable();

 

            foreach (DataGridViewRow item in this.pole.Rows)

            {

                List<String> arr = new List<string>();

                foreach (DataGridViewCell itemc in item.Cells)

            {

                    if (itemc.Visible)

                {

                        string name = this.pole.Columns[itemc.ColumnIndex].HeaderText;

                        if (this.checkedListBox1.CheckedItems.Contains(this.pole.Columns[itemc.ColumnIndex].HeaderText))

                        {

                            arr.Add(itemc.Value.ToString());

                        }

                }

            }

                foreach (string comp in arr)

                {

                    if (comp.ToLower().Contains(this.textBox1.Text.ToLower()))

                    {

                        item.DefaultCellStyle.BackColor = Color.LightGreen;

                    }

                }

                if (item.DefaultCellStyle.BackColor == Color.LightGreen)

                {

                    arrmass.Add(item.Cells[0].Value);                   

                }

            }

            arrmass.Sort(); // результаты

            this.label1.Text = "НАЙДЕНО:  " + arrmass.Count + " записей";

            this.label1.Visible = true;

        }

        //clear

        private void button2_Click(object sender, EventArgs e)

        {

            this.ClrSearch();

        }

 

        internal void ClrSearch()

        {

            this.textBox1.Text = String.Empty;

            this.pole.DefaultCellStyle.BackColor = Color.White;

 

            this.ClearTable();

 

            foreach (int i in this.checkedListBox1.CheckedIndices)

            {

                this.checkedListBox1.SetItemCheckState(i, CheckState.Unchecked);

            }

        }

 

        private void ClearTable()

        {

            this.label1.Visible = false;

            arrmass.Clear();

            foreach (DataGridViewRow item in this.pole.Rows)

            {

                item.DefaultCellStyle.BackColor = Color.White;

            }

        }

    }

}

 

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Drawing;

using System.Data;

using System.Linq;

using System.Text;

using System.Windows.Forms;

using System.Data.SqlClient;

 

namespace TurA.Controls

{

    public partial class UserControl3 : UserControl

    {

        private search scctrl = new search();

        public UserControl3()

        {

            InitializeComponent();

            scctrl.Parent = this.splitContainer1.Panel2;

            scctrl.Dock = DockStyle.Fill;

        }

 

        internal void UpdateData()

        {

            this.straniTableAdapter.Fill(this.tutuDataSet.Strani);

            this.dataGridView1.ClearSelection();

            this.scctrl.Init(ref this.dataGridView1, ref this.splitContainer1);

        }

 

        internal void Insert(object[] p)

        {

            SqlConnection sc = new SqlConnection(Properties.Settings.Default.ConnectionString);

            SqlCommand scm = new SqlCommand("SELECT id_strani FROM [dbo].[Strani]", sc);

            sc.Open();

            var reader = scm.ExecuteReader();

            List<int> ar = new List<int>();

            while (reader.Read())

            {

                ar.Add(reader.GetInt32(0));

            }

            sc.Close();

            Int32 max = (ar.Count == 0) ? 0 : ar.Max();

 

            this.straniTableAdapter.Insert(++max, Convert.ToString(p[0]));

        }

 

        internal void DeleteSelected()

        {

            foreach (DataGridViewRow item in this.dataGridView1.SelectedRows)

            {

                this.straniTableAdapter.Delete(Convert.ToInt32(item.Cells["idstraniDataGridViewTextBoxColumn"].Value));

            }

            this.UpdateData();

        }

 

        internal void ClearTable()

        {

            foreach (DataGridViewRow item in this.dataGridView1.Rows)

Информация о работе Автоматизированная информационная система турагенства