Esempio n. 1
0
        private void ToolStripBtnEdit_Click(object sender, EventArgs e)
        {
            UInt32 EtapeID_UL = DBListViewCheckings.GetSelectedItemID();

            if (mDataBaseManager_O != null && mDataBaseManager_O.mConnected_b)
            {
                UInt32 mJobID_UL = 0;
                if (UInt32.TryParse(mDataBaseManager_O.GetTableField("PointageSelectPop", "ComJobID", "ComJobEtapeID=" + EtapeID_UL), out mJobID_UL))
                {
                    String JobNumber_st    = mDataBaseManager_O.GetTableField("PointageSelectPop", "NumOrdre", "ComJobEtapeID=" + EtapeID_UL);
                    String JobRefNumber_st = mDataBaseManager_O.GetTableField("PointageSelectPop", "NumRefInterne", "ComJobEtapeID=" + EtapeID_UL);
                    String JobLib_st       = mDataBaseManager_O.GetTableField("PointageSelectPop", "JobLib", "ComJobEtapeID=" + EtapeID_UL);

                    FormCheckingEdition FormCheckingEdition_O = new FormCheckingEdition();
                    FormCheckingEdition_O.Initialize(mDataBaseManager_O, CustomDateTimePickerCtrl.Value, mPersID_UL, mJobID_UL, CheckingEditionMode.Edit, EtapeID_UL);
                    FormCheckingEdition_O.SetFrameTitle("Edition pointage sur job n° " + JobNumber_st + " dans " + JobRefNumber_st + " : " + JobLib_st);
                    FormCheckingEdition_O.ShowDialog();

                    RefreshPersPointage();
                }
                else
                {
                    MessageBox.Show("Erreur lors de l'édition de job : le job ne peut pas être trouvé.", "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Esempio n. 2
0
        private void ToolStripBtnDelete_Click(object sender, EventArgs e)
        {
            if (mDataBaseManager_O != null && mDataBaseManager_O.mConnected_b)
            {
                DialogResult DlgRes_O = MessageBox.Show("La suppression d'un pointage est définitive, êtes-vous certain de vouloir continuer ?", "Attention !", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

                if (DlgRes_O == DialogResult.Yes)
                {
                    mDataBaseManager_O.mStoredProcedureManager_O.STPROC_DeletePointageAndEtape(DBListViewCheckings.GetSelectedItemID());
                    RefreshPersPointage();
                }
            }
        }