Example #1
0
        private void linkLabel6_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            DialogResult result = saveFileDialog1.ShowDialog();

            if (result == DialogResult.OK)
            {
                string output = "نام خانوادگی" + "           " + "نام" + "           " + "نوع کارمند" + "           " + "حقوق پرداختی";
                output += '\n';
                database DB = new database();
                DB.SortDataBase();
                for (int i = 0; i < (database.constbase_indexer + database.hourbase_indexer); i++)
                {
                    if (database.sorted_workers_indexes[i, 1] == 1)
                    {
                        output += ((i + 1) + "_" + database.hourbase[database.sorted_workers_indexes[i, 0]].Lname + "           " + database.hourbase[database.sorted_workers_indexes[i, 0]].Fname + "           " + "کارمند ساعتی" + "           " + Convert.ToString(database.hourbase[database.sorted_workers_indexes[i, 0]].Salary));
                        output += '\n';
                    }
                    else
                    {
                        output += ((i + 1) + "_" + database.constbase[database.sorted_workers_indexes[i, 0]].Lname + "           " + database.constbase[database.sorted_workers_indexes[i, 0]].Fname + "           " + "کارمند حقوق ثابت" + "           " + Convert.ToString(database.constbase[database.sorted_workers_indexes[i, 0]].Salary));
                        output += '\n';
                    }
                }
                FileStream   fs     = new FileStream(saveFileDialog1.FileName, FileMode.Create);
                StreamWriter writer = new StreamWriter(fs);
                writer.Write(output);
                writer.Close();
                MessageBox.Show("ذخیره ی فایل موفقیت آمیز بود");
                SaveHelp sv = new SaveHelp();
                sv.Show();
            }
        }
Example #2
0
        private void saveFileHelpToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SaveHelp sv = new SaveHelp();

            sv.Show();
        }
Example #3
0
        private void pictureBox8_Click(object sender, EventArgs e)
        {
            SaveHelp sv = new SaveHelp();

            sv.Show();
        }