コード例 #1
0
ファイル: DayCheckingViewer.cs プロジェクト: ATGfx/MMSoft
        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);
                }
            }
        }
コード例 #2
0
ファイル: CheckingViewer.cs プロジェクト: ATGfx/MMSoft
        private void ToolStripBtnEdit_Click(object sender, EventArgs e)
        {
            if (mDBManager_O != null && mDBManager_O.mConnected_b)
            {
                UInt32 mPersID_UL = 0;
                UInt32.TryParse(mDBManager_O.GetTableField("PointageSelectPop", "PersID", "ComJobEtapeID=" + mEtapeID_UL), out mPersID_UL);

                UInt32 mJobID_UL = 0;
                UInt32.TryParse(mDBManager_O.GetTableField("PointageSelectPop", "ComJobID", "ComJobEtapeID=" + mEtapeID_UL), out mJobID_UL);

                FormCheckingEdition FormCheckingEdition_O = new FormCheckingEdition();
                FormCheckingEdition_O.Initialize(mDBManager_O, Convert.ToDateTime(mDate_st), mPersID_UL, mJobID_UL, CheckingEditionMode.Edit, mEtapeID_UL);
                FormCheckingEdition_O.SetFrameTitle("Edition pointage sur job n° " + mDBManager_O.GetTableField("ComJob", "NumOrdre", "ComJobID=" + mJobID_UL) + " dans " + mNumRefInterne_st + " : " + mLibelle_st);
                FormCheckingEdition_O.ShowDialog();

                DayCheckingsModified();
            }
        }
コード例 #3
0
ファイル: FormChecking.cs プロジェクト: ATGfx/MMSoft
        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);
                }
            }
        }