コード例 #1
0
        private void submitBtn_Click(object sender, EventArgs e)
        {
            try
            {
                foreach (DataGridViewRow row in CustomersGrid.Rows)
                {
                    if ((row.Cells["Selected"].Value != null) && ((bool)((DataGridViewCheckBoxCell)row.Cells["Selected"]).Value))
                    {
                        /*if (actualDate != null)
                         * {
                         *  Database.UpdateCustomer(Convert.ToInt32(row.Cells["PK"].Value.ToString()), versionPK);
                         *
                         * }*/

                        int employeePK = Convert.ToInt32(row.Cells["AssignedTo"].Value);

                        Database.AddUpdate(versionPK, Convert.ToInt32(row.Cells["PK"].Value.ToString()), expectedDate, actualDate, comment, employeePK);
                    }
                }
            }
            catch (Exception ex)
            {
                System.Console.WriteLine(ex.StackTrace);
            }

            MessageBox.Show("Completed!");

            DataGridView dgv = mainMenu.getUpdatesGrid();

            dgv.DataSource = Database.GetUpdateList();

            mainMenu.getCurrentButton().Text = "All";

            this.Hide();
            mainMenu.Show();
        }
コード例 #2
0
ファイル: InspectUpdate.cs プロジェクト: Thomuscle/getshwifty
 private void backBtn_Click(object sender, EventArgs e)
 {
     this.Hide();
     updatesPage.Show();
 }