Example #1
0
        private void AddCheckingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (mDBManager_O != null && mDBManager_O.mConnected_b)
            {
                String JobOrder_ST     = mDBManager_O.GetTableField("ComJob", "NumOrdre", "ComJobID=" + DbListViewComJobs.GetSelectedItemID());
                String ComJobNumRef_ST = mDBManager_O.GetTableField("ComJobSelectPop", "NumRefInterne", "ComJobID=" + DbListViewComJobs.GetSelectedItemID());
                String JobLib_ST       = mDBManager_O.GetTableField("ComJob", "JobLib", "ComJobID=" + DbListViewComJobs.GetSelectedItemID());

                if (DbListViewComJobs.GetSelectedItemID() > 0)
                {
                    FormCheckingEdition FormCheckingEdition_O = new FormCheckingEdition();
                    FormCheckingEdition_O.Initialize(mDBManager_O, DayCheckingViewerCtrl.GetViewerDate(), mUserID_UL, DbListViewComJobs.GetSelectedItemID());
                    FormCheckingEdition_O.SetFrameTitle("Ajout pointage sur job n° " + JobOrder_ST + " dans " + ComJobNumRef_ST + " : " + JobLib_ST);
                    FormCheckingEdition_O.ShowDialog();

                    DbListViewComJobs.Refresh();
                    DayCheckingViewerCtrl.RefreshPersPointage(); // Check if easy to only add one check viewer in list instead of refresh everything
                }
                else
                {
                    MessageBox.Show("Veuillez sélectionner un job pour enregistrer un nouveau pointage.", "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }