コード例 #1
0
 private void newOfferToolStripMenuItem_Click(object sender, EventArgs e)
 {
     StartProgressBar(2);
     using (flcsMain formMain = new flcsMain())
     {
         StopProgressBar();
         formMain.ShowDialog();
     }
     DisplayAllPackageOffers(false);
 }
コード例 #2
0
        private void dataGridViewLibrary_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex != -1 && dataGridViewLibrary.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != null && dataGridViewLibrary.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() == "Delete")
            {
                switch (MessageBox.Show("This will delete selected offer - continue?", "Delete Offer", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
                {
                case System.Windows.Forms.DialogResult.Yes:

                    StartProgressBar(25);
                    if (packageHandler == null)
                    {
                        packageHandler = new PackageGenerator.PackageHandler(false, ConfigurationManager.AppSettings["enviroment"].ToString());
                    }

                    packageHandler.DeleteDealById(Convert.ToInt32(dataGridViewLibrary.Rows[e.RowIndex].Cells[2].Value), libraryProgressbar);
                    packageHandler.Dispose();
                    DisplayAllPackageOffers(false);
                    StopProgressBar();
                    break;

                case System.Windows.Forms.DialogResult.No:
                    return;
                }
            }
            else if (e.RowIndex != -1 && dataGridViewLibrary.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != null && dataGridViewLibrary.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() == "View")
            {
                StartProgressBar(2);
                //ProgressBar();
                flcsMain flcsMain = new flcsMain(Convert.ToInt32(dataGridViewLibrary.Rows[e.RowIndex].Cells[2].Value));
                flcsMain.ShowDialog();
                flcsMain.Dispose();
                DisplayAllPackageOffers(false);
                StopProgressBar();
            }
            else if (e.RowIndex != -1 && dataGridViewLibrary.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != null && dataGridViewLibrary.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() == "Update")
            {
                StartProgressBar(2);
                using (flcsDealPage flcsDealPage = new flcsDealPage(Convert.ToInt32(dataGridViewLibrary.Rows[e.RowIndex].Cells[2].Value))) flcsDealPage.ShowDialog();
                StopProgressBar();
            }
            else if (e.RowIndex != -1 && dataGridViewLibrary.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != null && dataGridViewLibrary.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() == "Copy")
            {
                switch (MessageBox.Show("This will copy selected offer - continue?", "Copy Offer", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
                {
                case System.Windows.Forms.DialogResult.Yes:

                    StartProgressBar(25);
                    if (packageHandler == null)
                    {
                        packageHandler = new PackageGenerator.PackageHandler(false, ConfigurationManager.AppSettings["enviroment"].ToString());
                    }
                    packageHandler.CopyDeal(Convert.ToInt32(dataGridViewLibrary.Rows[e.RowIndex].Cells[2].Value), libraryProgressbar);
                    packageHandler.Dispose();
                    cbShowAll.Checked = true;
                    DisplayAllPackageOffers(false);
                    StopProgressBar();
                    break;

                case System.Windows.Forms.DialogResult.No:
                    return;
                }
            }
        }
コード例 #3
0
 private void mixAndMatchFlightsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (flcsMain formMain = new flcsMain()) formMain.ShowDialog();
 }