Exemplo n.º 1
0
        public StatsUC(DatabaseManager DBManager_O, DocumentManager DocManager_O)
        {
            InitializeComponent();

            mDBManager_O  = DBManager_O;
            mDocManager_O = DocManager_O;

            DateTimePicker MonHoursDataTimePicker_O = new DateTimePicker();

            MonHoursDataTimePicker_O.Format       = DateTimePickerFormat.Custom;
            MonHoursDataTimePicker_O.CustomFormat = "MM yyyy";
            //MonHoursDataTimePicker_O.ShowUpDown = true; // to prevent the calendar from being displayed

            ToolStripControlHost ToolStripControlHost_O = new ToolStripControlHost(CustomDateTimePickerCtrl);

            this.ToolStripMonthSumHours.Items.Add(ToolStripControlHost_O);

            ToolStripMonthSumHours.Renderer = new BorderlessToolStripRenderer();

            CustomDateTimePickerCtrl.Format            = DateTimePickerFormat.Custom;
            CustomDateTimePickerCtrl.CustomFormat      = "MM/yyyy";
            CustomDateTimePickerCtrl.mDarkBackground_b = false;
            CustomDateTimePickerCtrl.mDisplayDay_b     = false;

            ControlStyle.SetFrameHeaderStyle(this);
            ControlStyle.SetFrameHeaderStyle(PanelHeader);
            ControlStyle.SetFrameStyle(PanelStats);
            ControlStyle.SetFrameStyle(ToolStripMonthSumHours);
            ControlStyle.SetFrameStyle(CustomDateTimePickerCtrl);
        }
Exemplo n.º 2
0
        public CheckingViewer()
        {
            InitializeComponent();

            this.DoubleBuffered = true;
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);

            // Init string variables
            mNumRefInterne_st = "";
            mClient_st        = "";
            mLibelle_st       = "";
            mTache_st         = "";
            mQte_st           = "";
            mDelai_st         = "";
            mDate_st          = "";
            mNbrH_st          = "";
            mRem_st           = "";
            mEtapeID_UL       = 0;

            // Fill list of textbox structure
            mCheckFields_O = new List <TextBox>();
            mCheckFields_O.Add(TxtNumRefInt);
            mCheckFields_O.Add(TxtClient);
            mCheckFields_O.Add(TxtLibelle);
            mCheckFields_O.Add(TxtTache);
            mCheckFields_O.Add(TxtQte);
            mCheckFields_O.Add(TxtDelai);
            mCheckFields_O.Add(TxtDate);
            mCheckFields_O.Add(TxtNbrH);
            mCheckFields_O.Add(TxtRem);

            for (int i = 0; i < mCheckFields_O.Count; i++)
            {
                // Set all textbox as non eidtable
                mCheckFields_O[i].ReadOnly = true;

                // Set textbox style
                ControlStyle.SetFrameStyle(mCheckFields_O[i]);

                // Forward mouse enter and leave args to parent : allow the background to be set as selected when mouse enter in a textbox
                mCheckFields_O[i].MouseEnter += new EventHandler(this.PanelChecking_MouseEnter);
                mCheckFields_O[i].MouseLeave += new EventHandler(this.PanelChecking_MouseLeave);
            }

            ToolStripBtnEdit.MouseEnter   += new EventHandler(this.PanelChecking_MouseEnter);
            ToolStripBtnCopy.MouseEnter   += new EventHandler(this.PanelChecking_MouseEnter);
            ToolStripBtnDelete.MouseEnter += new EventHandler(this.PanelChecking_MouseEnter);

            ToolStripBtnEdit.MouseLeave   += new EventHandler(this.PanelChecking_MouseLeave);
            ToolStripBtnCopy.MouseLeave   += new EventHandler(this.PanelChecking_MouseLeave);
            ToolStripBtnDelete.MouseLeave += new EventHandler(this.PanelChecking_MouseLeave);

            ControlStyle.SetFrameStyle(this);
            this.PanelBorder.BackColor = Color.White;
            ControlStyle.SetFrameStyle(PanelChecking);
            ToolStripCheckActions.Renderer = new BorderlessToolStripRenderer();
            ControlStyle.SetFrameStyle(ToolStripCheckActions);
        }
Exemplo n.º 3
0
        public void Initialize(DatabaseManager DBManager_O, DateTime Date_O, UInt32 PersID_UL, UInt32 ComJobID_UL, CheckingEditionMode Mode_e = CheckingEditionMode.Add, UInt32 ComJobEtapeID_UL = 0)
        {
            mDataBaseManager_O   = DBManager_O;
            mDate_O              = Date_O;
            mPersID_UL           = PersID_UL;
            mComJobID_UL         = ComJobID_UL;
            mComJobEtapeID_UL    = ComJobEtapeID_UL;
            mMode_e              = Mode_e;
            mPointageMachineID_O = new UInt32[4];

            // Define column DB fields
            mJobCheckDBField_O = new List <String>();
            mJobCheckDBField_O.Add("DatePrest");
            mJobCheckDBField_O.Add("TypeTacheCod");
            mJobCheckDBField_O.Add("TypeTacheLib");
            mJobCheckDBField_O.Add("PersNom");
            mJobCheckDBField_O.Add("Rem");
            mJobCheckDBField_O.Add("PointageID");

            // Define column headers text
            mJobCheckHeaders_O = new List <string>();
            mJobCheckHeaders_O.Add("Date");
            mJobCheckHeaders_O.Add("Type tâche");
            mJobCheckHeaders_O.Add("Tache libellé");
            mJobCheckHeaders_O.Add("Opérateur");
            mJobCheckHeaders_O.Add("Remarques");

            mJobTextAlign_O = new List <HorizontalAlignment>();

            for (int i = 0; i < mJobCheckHeaders_O.Count; i++)
            {
                mJobTextAlign_O.Add(HorizontalAlignment.Left);
            }


            mJobHeaderDefaultSize_i = new List <int>();
            mJobHeaderDefaultSize_i.Add(70);
            mJobHeaderDefaultSize_i.Add(70);
            mJobHeaderDefaultSize_i.Add(150);
            mJobHeaderDefaultSize_i.Add(100);
            mJobHeaderDefaultSize_i.Add(600);

            DBLstViewJobChecking.Initialize(mDataBaseManager_O, "PointageSelectPop", mJobCheckDBField_O, 5, mJobCheckHeaders_O, mJobHeaderDefaultSize_i, mJobTextAlign_O, "ComJobID=" + mComJobID_UL, "", true);

            ControlStyle.SetFrameStyle(this);
            ControlStyle.SetFrameStyle(this.DBLstViewJobChecking);
            ControlStyle.SetFrameStyle(this.DBComboxDep);
            ControlStyle.SetFrameStyle(this.DBComboxTask);
            ControlStyle.SetFrameHeaderStyle(this.splitContainer);
            ControlStyle.SetFrameStyle(this.splitContainer.Panel1);
            ControlStyle.SetFrameStyle(this.splitContainer.Panel2);

            // Not so good when dealing with different screen resolutions
            //this.splitContainer.SplitterDistance = (int)(this.Height * 0.75);
        }
Exemplo n.º 4
0
        public FormUserPref()
        {
            InitializeComponent();

            this.CenterToScreen();

            this.ToolStripValidatePref.Renderer = new BorderlessToolStripRenderer();

            ControlStyle.SetBackgroundColorFocusStyle(this);
            ControlStyle.SetFrameStyle(this.PanelUserPref);
            ControlStyle.SetFrameHeaderStyle(this.PanelFormHeader);
            ControlStyle.SetFrameHeaderStyle(this.ToolStripValidatePref);
        }
Exemplo n.º 5
0
        private void PanelChecking_MouseLeave(object sender, EventArgs e)
        {
            //this.PanelBorder.BackColor = Color.White;
            ControlStyle.SetFrameStyle(PanelChecking);

            for (int i = 0; i < mCheckFields_O.Count; i++)
            {
                // Set textbox style
                ControlStyle.SetFrameStyle(mCheckFields_O[i]);
            }

            ControlStyle.SetFrameStyle(ToolStripCheckActions);
        }
Exemplo n.º 6
0
        public FormVersion()
        {
            InitializeComponent();

            this.CenterToParent();

            ToolStripLblVersion.Text = "MMSoft version " + mVersion_O.Major + "." + mVersion_O.Minor + "." + mVersion_O.Build;

            ToolStripValidatePref.Renderer = new BorderlessToolStripRenderer();
            ControlStyle.SetBackgroundColorFocusStyle(this);
            ControlStyle.SetFrameStyle(this.PanelUserPref);
            ControlStyle.SetFrameHeaderStyle(this.ToolStripValidatePref);
        }
Exemplo n.º 7
0
        public JobHourCorrection(DatabaseManager DBManager_O, UInt32 ComJobID_UL)
        {
            InitializeComponent();

            mDBManager_O = DBManager_O;
            mComJobID_UL = ComJobID_UL;

            ToolStripJob.Renderer = new BorderlessToolStripRenderer();

            ControlStyle.SetFrameStyle(this);
            ControlStyle.SetFrameStyle(this.ToolStripJob);
            ControlStyle.SetFrameStyle(this.JobHourCorrectionPanel);

            InitializeInfos();
        }
Exemplo n.º 8
0
        public FormAskString(String FormTitle_ST)
        {
            InitializeComponent();

            mEnteredString_ST = "";

            this.CenterToParent();
            this.LblFormTitle.Text = FormTitle_ST;

            ToolStripValidatePref.Renderer = new BorderlessToolStripRenderer();
            ControlStyle.SetBackgroundColorFocusStyle(this);
            ControlStyle.SetFrameStyle(this.PanelUserPref);
            ControlStyle.SetFrameHeaderStyle(this.PanelFormHeader);
            ControlStyle.SetFrameHeaderStyle(this.ToolStripValidatePref);
        }
Exemplo n.º 9
0
        public JobLifeCycle(DatabaseManager DBManager_O, UInt32 ComJobID_UL)
        {
            InitializeComponent();

            mDBManager_O = DBManager_O;
            mComJobID_UL = ComJobID_UL;

            ToolStripJobStates.Renderer = new BorderlessToolStripRenderer();
            ToolStripJobInfos1.Renderer = new BorderlessToolStripRenderer();

            ControlStyle.SetFrameStyle(this);
            ControlStyle.SetFrameStyle(this.ToolStripJobStates);
            ControlStyle.SetFrameStyle(this.JobLifeCyclePanel);

            InitializeInfos();
            UpdateJobStatus();
        }
Exemplo n.º 10
0
        public ComJobUC(DatabaseManager DBManager_O, DocumentManager DocManager_O)
        {
            InitializeComponent();

            this.ComJobSelector.AddComToolStripBtn(this.ToolStripBtnCancelCmd);
            this.ComJobSelector.AddComToolStripBtn(this.ToolStripBtnAddCom);
            this.ToolStripCom.Visible = false;
            this.ComJobSelector.AddJobToolStripBtn(this.ToolStripBtnCancelJob);
            this.ComJobSelector.AddJobToolStripBtn(this.ToolStripBtnAddJob);
            this.ToolStripJob.Visible = false;

            mDBManager_O  = DBManager_O;
            mDocManager_O = DocManager_O;

            ComJobSelector.Initialize(mDBManager_O);

            SetComEditState(false);
            SetJobEditState(false);

            ComJobSelector.GetComListView().SelectionChanged += new DBListView.SelectionChangedHandler(this.ComClick);
            ComJobSelector.GetJobListView().SelectionChanged += new DBListView.SelectionChangedHandler(this.JobClick);

            JobAssociatedDep.Initialize(mDBManager_O);
            JobAssociatedDep.DepartmentsModified += new DepartmentSelector.DepartmentsModifiedHandler(this.JobValueChanged);

            ToolStripComTools.Renderer     = new BorderlessToolStripRenderer();
            ToolStripJobTools.Renderer     = new BorderlessToolStripRenderer();
            ToolStripComHeader.Renderer    = new BorderlessToolStripRenderer();
            ToolStripJobHeader.Renderer    = new BorderlessToolStripRenderer();
            ToolStripJobDocuments.Renderer = new BorderlessToolStripRenderer();
            ToolStripNEAndCertif.Renderer  = new BorderlessToolStripRenderer();
            ControlStyle.SetBackgroundStyle(this);
            ControlStyle.SetFrameHeaderStyle(this.ToolStripComTools);
            ControlStyle.SetFrameHeaderStyle(this.ToolStripJobTools);
            ControlStyle.SetBackgroundStyle(this.splitContainer1.Panel2);
            ControlStyle.SetFrameHeaderStyle(this.splitContainer2.Panel1);
            ControlStyle.SetFrameHeaderStyle(this.splitContainer2.Panel2);
            ControlStyle.SetFrameStyle(this.ToolStripComEditFooter);
            ControlStyle.SetFrameStyle(this.PanelCmdInfo);
            ControlStyle.SetFrameStyle(this.PanelJobInfo);
            ControlStyle.SetFrameStyle(this.ToolStripJobEditFooter);
            ControlStyle.SetFrameStyle(this.JobAssociatedDep);
            ControlStyle.SetFrameStyle(this.ToolStripJobDocuments);
            ControlStyle.SetFrameStyle(this.ToolStripNEAndCertif);
        }
Exemplo n.º 11
0
        public FormNeCertif(DatabaseManager DBManager_O, UInt32 ComJobID_UL)
        {
            InitializeComponent();

            this.CenterToParent();

            mDBManager_O = DBManager_O;
            mComJobID_UL = ComJobID_UL;

            ToolStripValidate.Renderer = new BorderlessToolStripRenderer();

            ControlStyle.SetBackgroundColorFocusStyle(this);
            ControlStyle.SetFrameHeaderStyle(PanelFormHeader);
            ControlStyle.SetFrameHeaderStyle(ToolStripValidate);
            ControlStyle.SetFrameStyle(this.PanelNECertfif);

            Initialize();
        }
Exemplo n.º 12
0
        public JobsState(DatabaseManager DBManager_O)
        {
            mDBManager_O = DBManager_O;

            InitializeComponent();

            ToolStripStatusFilter.Renderer = new BorderlessToolStripRenderer();
            ToolStripJobInfos1.Renderer    = new BorderlessToolStripRenderer();

            ToolStripBtnDone.Checked = true;

            ControlStyle.SetBackgroundStyle(this);
            ControlStyle.SetFrameStyle(MainFlowLayoutPanel);
            ControlStyle.SetFrameHeaderStyle(PanelFilterHeader);
            ControlStyle.SetFrameHeaderStyle(PanelJobLifeCycleHeader);
            ControlStyle.SetFrameHeaderStyle(this.splitContainer1.Panel1);
            ControlStyle.SetFrameHeaderStyle(this.splitContainer1.Panel2);
            ControlStyle.SetFrameStyle(ToolStripStatusFilter);
        }
Exemplo n.º 13
0
        public FormAskJobHourCorrection()
        {
            InitializeComponent();

            mEnteredString_ST = "";

            this.CenterToParent();

            ToolStripControlHost ToolStripControlHost_O = new ToolStripControlHost(TxtEnteredString);

            this.ToolStripValidatePref.Items.Insert(1, ToolStripControlHost_O);

            ToolStripValidatePref.Renderer = new BorderlessToolStripRenderer();
            ControlStyle.SetBackgroundColorFocusStyle(this);
            ControlStyle.SetFrameStyle(this.PanelUserPref);
            ControlStyle.SetFrameHeaderStyle(this.ToolStripValidatePref);

            this.ActiveControl = TxtEnteredString;
        }
Exemplo n.º 14
0
        public FormDocumentViewer(Microsoft.Office.Interop.Word.Document WordDoc_O)
        {
            InitializeComponent();

            ToolStripTools.Renderer = new BorderlessToolStripRenderer();

            ControlStyle.SetFrameStyle(this);
            ControlStyle.SetFrameStyle(this.ToolStripTools);
            ControlStyle.SetFrameStyle(this.WebBrowser);

            mWordDoc_O = WordDoc_O;

            mTempFileName_st = Path.Combine(MMSoftAppDataFolder_st, "Word_TEMP" + Directory.GetFiles(MMSoftAppDataFolder_st, "*.html").Length + ".pdf");

            // Call ConvertDocument asynchronously.
            ConvertDocumentDelegate Delegate_O = new ConvertDocumentDelegate(ConvertDocument);

            // Call DocumentConversionComplete when the method has completed.
            Delegate_O.BeginInvoke(DocumentConversionComplete, null);
        }
Exemplo n.º 15
0
        public FormAskClient(DatabaseManager DBManager_O)
        {
            InitializeComponent();

            mDBManager_O = DBManager_O;

            this.CenterToParent();
            this.DBListViewClient.ListTitle = "Sélection client";

            List <String> TableField_ST             = new List <String>();
            List <String> ColumnHeaderName_ST       = new List <String>();
            List <int>    ColumnHeaderDefaultSize_i = new List <int>();
            List <HorizontalAlignment> TextAlign_O  = new List <HorizontalAlignment>();

            TableField_ST.Add("NumClientInterne");
            TableField_ST.Add("ClientNom");
            TableField_ST.Add("NrTVA");
            TableField_ST.Add("ClientID");

            ColumnHeaderName_ST.Add("N° de client");
            ColumnHeaderName_ST.Add("Nom");
            ColumnHeaderName_ST.Add("N° TVA");

            ColumnHeaderDefaultSize_i.Add(100);
            ColumnHeaderDefaultSize_i.Add(300);
            ColumnHeaderDefaultSize_i.Add(150);

            TextAlign_O.Add(HorizontalAlignment.Left);
            TextAlign_O.Add(HorizontalAlignment.Left);
            TextAlign_O.Add(HorizontalAlignment.Left);

            DBListViewClient.Initialize(mDBManager_O, "Client", TableField_ST, 3, ColumnHeaderName_ST, ColumnHeaderDefaultSize_i, TextAlign_O);
            DBListViewClient.ItemDoubleClicked += new DBListView.ItemDoubleClickedHandler(this.ClientDoubleClic);

            ToolStripValidate.Renderer = new BorderlessToolStripRenderer();
            ControlStyle.SetBackgroundColorFocusStyle(this);
            ControlStyle.SetFrameStyle(this.PanelUserPref);
            ControlStyle.SetFrameHeaderStyle(this.ToolStripValidate);
        }
Exemplo n.º 16
0
        public NECertifUC(DatabaseManager DBManager_O, DocumentManager DocumentManager_O, UInt32 SendNoteID_UL)
        {
            InitializeComponent();

            mDBManager_O       = DBManager_O;
            mSendNoteID_UL     = SendNoteID_UL;
            mDocumentManager_O = DocumentManager_O;

            // Set UC style
            ToolStripNeCertif.Renderer = new BorderlessToolStripRenderer();
            ControlStyle.SetFrameStyle(ToolStripNeCertif);

            // Initialize user control
            if (mDBManager_O != null && mDBManager_O.mConnected_b)
            {
                try
                {
                    DateTime Date_O = Convert.ToDateTime(mDBManager_O.GetTableField("NoteEnvoiAndCertif", "DateExpedition", "NoteEnvoiID=" + mSendNoteID_UL));
                    ToolStripLblDate.Text = Date_O.ToShortDateString();

                    // Hide certif button if do not exist
                    UInt32 CertifID_UL;
                    if (!UInt32.TryParse(mDBManager_O.GetTableField("NoteEnvoiAndCertif", "CertifID", "NoteEnvoiID=" + mSendNoteID_UL), out CertifID_UL))
                    {
                        ToolStripBtnCertif.Visible = false;
                    }
                    else if (CertifID_UL == 0)
                    {
                        ToolStripBtnCertif.Visible = false;
                    }
                }
                catch (FormatException e)
                {
                    ToolStripLblDate.Text = mDBManager_O.GetTableField("NoteEnvoiAndCertif", "DateExpedition", "NoteEnvoiID=" + mSendNoteID_UL);
                }
            }
        }
Exemplo n.º 17
0
        public JobsCorrectionUC(DatabaseManager DBManager_O)
        {
            mDBManager_O = DBManager_O;

            InitializeComponent();

            DBListViewJobs.ListRefreshed += ApplyCorrectedHoursFormating;

            this.DBListViewJobs.ItemClicked += new DBListView.ItemClickedHandler(JobClicked);

            // Set default date from first day of month to today
            CustomDTPFrom.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
            CustomDTPTo.Value   = DateTime.Now;

            this.DBListViewJobs.ListTitle = "Cycle de vie des jobs";
            this.DBListViewJobs.AddToolStripBtn(this.ToolStripBtnPreviousMonth);
            this.DBListViewJobs.AddToolStripBtn(this.ToolStripBtnDTPFrom);
            ToolStripControlHost ToolStripControlHostFrom_O = new ToolStripControlHost(CustomDTPFrom);

            this.DBListViewJobs.AddToolStripControlHost(ToolStripControlHostFrom_O);
            this.DBListViewJobs.AddToolStripBtn(this.ToolStripBtnDTPTo);
            ToolStripControlHost ToolStripControlHostTo_O = new ToolStripControlHost(CustomDTPTo);

            this.DBListViewJobs.AddToolStripControlHost(ToolStripControlHostTo_O);
            this.DBListViewJobs.AddToolStripBtn(this.ToolStripBtnNextMonth);

            this.JobCorrectionToolStrip.Visible = false;

            List <String> TableFieldJobRecap_ST             = new List <String>();
            List <String> ColumnHeaderNameJobRecap_ST       = new List <String>();
            List <int>    ColumnHeaderDefaultSizeJobRecap_i = new List <int>();
            List <HorizontalAlignment> TextAlignJobRecap_O  = new List <HorizontalAlignment>();

            // Define column DB fields
            TableFieldJobRecap_ST.Add("NumRefInterne");
            TableFieldJobRecap_ST.Add("ClientNom");
            TableFieldJobRecap_ST.Add("NumOrdre");
            TableFieldJobRecap_ST.Add("JobLib");
            TableFieldJobRecap_ST.Add("DateEncod");
            TableFieldJobRecap_ST.Add("HTravEstim");
            TableFieldJobRecap_ST.Add("SommeHeuresTot");
            TableFieldJobRecap_ST.Add("SommeHeureCorrect");

            // Unshown elements
            TableFieldJobRecap_ST.Add("ComJobID");
            TableFieldJobRecap_ST.Add("ChkHoursCorrected");

            // Define column headers text
            ColumnHeaderNameJobRecap_ST.Add("Num cmd int");
            ColumnHeaderNameJobRecap_ST.Add("Client");
            ColumnHeaderNameJobRecap_ST.Add("# job");
            ColumnHeaderNameJobRecap_ST.Add("Job libellé");
            ColumnHeaderNameJobRecap_ST.Add("Date encodage");
            ColumnHeaderNameJobRecap_ST.Add("H estim.");
            ColumnHeaderNameJobRecap_ST.Add("H. tot.");
            ColumnHeaderNameJobRecap_ST.Add("H. tot. corr.");

            // size
            ColumnHeaderDefaultSizeJobRecap_i.Add(100);
            ColumnHeaderDefaultSizeJobRecap_i.Add(250);
            ColumnHeaderDefaultSizeJobRecap_i.Add(50);
            ColumnHeaderDefaultSizeJobRecap_i.Add(600);
            ColumnHeaderDefaultSizeJobRecap_i.Add(100);
            ColumnHeaderDefaultSizeJobRecap_i.Add(75);
            ColumnHeaderDefaultSizeJobRecap_i.Add(75);
            ColumnHeaderDefaultSizeJobRecap_i.Add(75);

            // alignment
            for (int i = 0; i < ColumnHeaderNameJobRecap_ST.Count; i++)
            {
                if (i == 2 || i == 5 || i == 6 || i == 7)
                {
                    TextAlignJobRecap_O.Add(HorizontalAlignment.Center);
                }
                else
                {
                    TextAlignJobRecap_O.Add(HorizontalAlignment.Left);
                }
            }

            DBListViewJobs.Initialize(mDBManager_O, "ComJobSelectPop", TableFieldJobRecap_ST, 8, ColumnHeaderNameJobRecap_ST, ColumnHeaderDefaultSizeJobRecap_i, TextAlignJobRecap_O,
                                      "JobStatusID <= 4 AND DateEncod >= '" + CustomDTPFrom.Value.ToShortDateString() + "' AND DateEncod <= dateadd(day, 1, '" + CustomDTPTo.Value.ToShortDateString() + "')");

            RefreshSum();

            ToolStripJobCorrectionFooter.Renderer = new BorderlessToolStripRenderer();

            ControlStyle.SetFrameHeaderStyle(this);
            ControlStyle.SetFrameHeaderStyle(this.CustomDTPFrom);
            ControlStyle.SetFrameHeaderStyle(this.CustomDTPTo);
            ControlStyle.SetFrameStyle(this.ToolStripJobCorrectionFooter);
        }
Exemplo n.º 18
0
        public void Initialize(DatabaseManager DBManager_O, String TableName_ST, List <String> TableFields_ST, UInt32 DBIDIndex_UL, List <String> ColumnHeaderName_ST,
                               List <int> ColumnHeaderDefaultSize_O, List <HorizontalAlignment> TextAlig_O, String InitialWhere_ST = null, String OrderBy_ST = null, bool InitList_b = true)
        {
            mDBManager_O              = DBManager_O;
            mDBIDIndex_UL             = DBIDIndex_UL;
            mTableFields_ST           = TableFields_ST;
            mTableName_ST             = TableName_ST;
            mColumnHeaderName_ST      = ColumnHeaderName_ST;
            mLastClickedFilterIndex_i = -1;
            Asc_b = true;
            mLastSQLRequest_st = "";
            mInitialWhere_ST   = InitialWhere_ST;
            mInitialOrderBy_ST = OrderBy_ST;

            mListView_O.View          = View.Details;
            mListView_O.FullRowSelect = true;
            PanelListView.Controls.Add(mListView_O);
            mListView_O.BringToFront();
            mListView_O.Dock                  = DockStyle.Fill;
            mListView_O.ColumnClick          += new ColumnClickEventHandler(this.ColumnClick);
            mListView_O.ColumnWidthChanging  += new ColumnWidthChangingEventHandler(this.ColumnWidthChanging);
            mListView_O.ColumnWidthChanged   += new ColumnWidthChangedEventHandler(this.ColumnWidthChanged);
            mListView_O.ItemSelectionChanged += new ListViewItemSelectionChangedEventHandler(this.ListViewItemSelectionChanged);
            mListView_O.MouseDoubleClick     += new System.Windows.Forms.MouseEventHandler(this.MouseDoubleClick);
            mListView_O.MouseClick           += new System.Windows.Forms.MouseEventHandler(this.MouseClick);

            // Define column headers objects
            List <ColumnHeader> ColumnHeaders_O = new List <ColumnHeader>();

            mFilterTextBox_O = new List <TextBox>();

            for (int i = 0; i < mColumnHeaderName_ST.Count; i++)
            {
                // Define column header
                ColumnHeaders_O.Add(new ColumnHeader());
                ColumnHeaders_O[i].Name      = mTableFields_ST[i];
                ColumnHeaders_O[i].Text      = mColumnHeaderName_ST[i];
                ColumnHeaders_O[i].TextAlign = TextAlig_O[i];
                ColumnHeaders_O[i].Width     = ColumnHeaderDefaultSize_O[i];

                // Add it to list view
                mListView_O.Columns.Add(ColumnHeaders_O[i]);

                // Define filter text box
                mFilterTextBox_O.Add(new TextBox());
                PanelFilter.Controls.Add(mFilterTextBox_O[i]);
                mFilterTextBox_O[i].TabIndex     = i;
                mFilterTextBox_O[i].Tag          = i;
                mFilterTextBox_O[i].TextChanged += new System.EventHandler(this.FilterTextChanged);
                mFilterTextBox_O[i].Width        = ColumnHeaders_O[i].Width - 2 * mFilterPadding_i; // cannot control height of textbox ! so it is set to 20 and filter panel is 22 to get a padding of 1 pixel
                mFilterTextBox_O[i].Location     = new Point((i == 0) ? mFilterPadding_i : mFilterTextBox_O[i - 1].Location.X + mFilterTextBox_O[i - 1].Width + 2 * mFilterPadding_i, mFilterPadding_i);
                mFilterTextBox_O[i].BorderStyle  = BorderStyle.FixedSingle;
                mFilterTextBox_O[i].BackColor    = Color.Gainsboro;
            }

            ControlStyle.SetFrameHeaderStyle(MainToolStrip);
            MainToolStrip.Renderer = new BorderlessToolStripRenderer();
            ControlStyle.SetFrameStyle(this);
            ControlStyle.SetFrameStyle(PanelListView);
            ControlStyle.SetFrameStyle(PanelFilter);

            if (InitList_b)
            {
                this.Refresh();
            }

            mInitialized_b = true;

            SelectFirst();
        }
Exemplo n.º 19
0
        public ProviderUC(DatabaseManager DBManager_O)
        {
            InitializeComponent();

            mInitializingData_b = false;

            // Add btn tool tool strip list view
            this.DBListViewProvider.ListTitle = "Sélection fournisseur";
            this.DBListViewProvider.AddToolStripBtn(this.ToolStripBtnAddProvider);
            ToolStripUCProviderTools.Visible = false;

            this.DBListViewBuyRecap.ListTitle = "Achats chez le fournisseur";

            ToolStripUCProviderTools.Renderer = new BorderlessToolStripRenderer();

            mDBManager_O = DBManager_O;

            List <String> TableField_ST             = new List <String>();
            List <String> ColumnHeaderName_ST       = new List <String>();
            List <int>    ColumnHeaderDefaultSize_i = new List <int>();
            List <HorizontalAlignment> TextAlign_O  = new List <HorizontalAlignment>();

            TableField_ST.Add("NumFournInterne");
            TableField_ST.Add("FournNom");
            TableField_ST.Add("NrTVA");
            TableField_ST.Add("FournID");

            ColumnHeaderName_ST.Add("N° de fournisseur");
            ColumnHeaderName_ST.Add("Nom");
            ColumnHeaderName_ST.Add("N° TVA");

            ColumnHeaderDefaultSize_i.Add(100);
            ColumnHeaderDefaultSize_i.Add(300);
            ColumnHeaderDefaultSize_i.Add(150);

            TextAlign_O.Add(HorizontalAlignment.Left);
            TextAlign_O.Add(HorizontalAlignment.Left);
            TextAlign_O.Add(HorizontalAlignment.Left);

            DBListViewProvider.Initialize(mDBManager_O, "Fourn", TableField_ST, 3, ColumnHeaderName_ST, ColumnHeaderDefaultSize_i, TextAlign_O);

            DBListViewProvider.SelectionChanged += new DBListView.SelectionChangedHandler(this.ProviderClick);

            DBComboxTypeSoc.FillList(mDBManager_O, "TypeSoc", "TypeSocID", "TypeSocLib");
            DBComboxCPFact.FillList(mDBManager_O, "CodePostal", "CodePostalID", "CodePostal");
            DBComboxCPLibFact.FillList(mDBManager_O, "CodePostal", "CodePostalID", "Localite");

            // Define comjob recap list view
            List <String> TableFieldJobRecap_ST             = new List <String>();
            List <String> ColumnHeaderNameJobRecap_ST       = new List <String>();
            List <int>    ColumnHeaderDefaultSizeJobRecap_i = new List <int>();
            List <HorizontalAlignment> TextAlignJobRecap_O  = new List <HorizontalAlignment>();

            // alignment
            for (int i = 0; i < ColumnHeaderNameJobRecap_ST.Count; i++)
            {
                if (i == 3 || i == 5)
                {
                    TextAlignJobRecap_O.Add(HorizontalAlignment.Center);
                }
                else
                {
                    TextAlignJobRecap_O.Add(HorizontalAlignment.Left);
                }
            }

            DBListViewBuyRecap.Initialize(mDBManager_O, "ComJobAchatSelectPop", TableFieldJobRecap_ST, 10, ColumnHeaderNameJobRecap_ST, ColumnHeaderDefaultSizeJobRecap_i, TextAlignJobRecap_O, null, null, false);

            Fields_O = new List <Control>();
            Fields_O.Add(DBComboxTypeSoc);
            Fields_O.Add(DBComboxCPFact);
            Fields_O.Add(DBComboxCPLibFact);
            Fields_O.Add(TxtTel);
            Fields_O.Add(TxtFax);
            Fields_O.Add(TxtAdressFact);
            Fields_O.Add(TxtContactMail);
            Fields_O.Add(TxtContactTel);
            Fields_O.Add(TxtContactName);
            Fields_O.Add(TxtTVA);
            Fields_O.Add(TxtMail);
            Fields_O.Add(TxtRem);

            SetEditState(false);

            TxtProviderNumber.Width = Math.Max(50, TxtProviderNumber.Width);
            TxtProviderName.Width   = ToolStripProviderHeader.Width - toolStripLabel1.Width - TxtProviderNumber.Width - toolStripLabel3.Width - 5;

            ToolStripProviderEditFooter.Renderer = new BorderlessToolStripRenderer();
            ToolStripProviderHeader.Renderer     = new BorderlessToolStripRenderer();
            ControlStyle.SetBackgroundStyle(this);
            ControlStyle.SetBackgroundStyle(this.ToolStripUCProviderTools);
            ControlStyle.SetFrameHeaderStyle(this.PanelProviderList);
            ControlStyle.SetFrameHeaderStyle(this.PanelCheckHeader);
            ControlStyle.SetFrameHeaderStyle(this.PanelJobRecap);
            ControlStyle.SetFrameHeaderStyle(this.splitContainer2.Panel1);
            ControlStyle.SetFrameStyle(this.PanelCheckContent);
            ControlStyle.SetFrameStyle(this.ToolStripProviderEditFooter);

            DBListViewProvider.ForeColor = Color.Black;
        }
Exemplo n.º 20
0
        public MembersUC(DatabaseManager DBManager_O, DocumentManager DocManager_O)
        {
            mDBManager_O  = DBManager_O;
            mDocManager_O = DocManager_O;

            mInitializingData_b = false;

            InitializeComponent();

            // Add btn tool tool strip list view
            this.DBListViewMembers.ListTitle = "Equipe Malcourant Mécanique";
            this.DBListViewMembers.AddToolStripBtn(this.ToolStripBtnAddMember);
            ToolStripUCMembersTools.Visible  = false;
            ToolStripUCMembersTools.Renderer = new BorderlessToolStripRenderer();

            List <String> TableField_ST             = new List <String>();
            List <String> ColumnHeaderName_ST       = new List <String>();
            List <int>    ColumnHeaderDefaultSize_i = new List <int>();
            List <HorizontalAlignment> TextAlign_O  = new List <HorizontalAlignment>();

            TableField_ST.Add("PersNom");
            TableField_ST.Add("NumTel");
            TableField_ST.Add("PersID");

            ColumnHeaderName_ST.Add("Nom");
            ColumnHeaderName_ST.Add("Téléphone");

            ColumnHeaderDefaultSize_i.Add(200);
            ColumnHeaderDefaultSize_i.Add(200);

            TextAlign_O.Add(HorizontalAlignment.Left);
            TextAlign_O.Add(HorizontalAlignment.Left);

            DBListViewMembers.Initialize(mDBManager_O, "Pers", TableField_ST, 2, ColumnHeaderName_ST, ColumnHeaderDefaultSize_i, TextAlign_O);
            DBListViewMembers.SelectionChanged += new DBListView.SelectionChangedHandler(this.MemberClick);

            DBComboxStatus.FillList(mDBManager_O, "PersStatus", "PersStatutID", "PersStatutLib");
            ComBoxFamilyState.Items.Add("Célibataire");
            ComBoxFamilyState.Items.Add("Cohabitant");
            ComBoxFamilyState.Items.Add("Marié");
            ComboxPostalCode.FillList(mDBManager_O, "CodePostal", "CodePostalID", "CodePostal");
            ComboxLocality.FillList(mDBManager_O, "CodePostal", "CodePostalID", "Localite");

            // Put fields of DB in a list to be able to set their edit state in one loop
            Fields_O = new List <Control>();
            Fields_O.Add(DBComboxStatus);
            Fields_O.Add(DTPBirthdate);
            Fields_O.Add(TxtCost);
            Fields_O.Add(DTPEntryDate);
            Fields_O.Add(TxtBankAccount);
            Fields_O.Add(TxtRegNumber);
            Fields_O.Add(ComBoxFamilyState);
            Fields_O.Add(TxtChilds);
            Fields_O.Add(CheckBoxActivePartner);
            Fields_O.Add(TxtTel);
            Fields_O.Add(TxtAdress);
            Fields_O.Add(ComboxPostalCode);
            Fields_O.Add(ComboxLocality);

            SetEditState(false);

            // Define checking recap list view
            List <String> TableFieldCheckingRecap_ST             = new List <String>();
            List <String> ColumnHeaderNameCheckingRecap_ST       = new List <String>();
            List <int>    ColumnHeaderDefaultSizeCheckingRecap_i = new List <int>();
            List <HorizontalAlignment> TextAlignCheckingRecap_O  = new List <HorizontalAlignment>();

            // Define column DB fields
            TableFieldCheckingRecap_ST.Add("NumRefInterne");
            TableFieldCheckingRecap_ST.Add("ClientNom");
            TableFieldCheckingRecap_ST.Add("TypeTacheCod");
            TableFieldCheckingRecap_ST.Add("JobLib");
            TableFieldCheckingRecap_ST.Add("QteProd");
            TableFieldCheckingRecap_ST.Add("DelaiPromis");
            TableFieldCheckingRecap_ST.Add("DatePrest");
            TableFieldCheckingRecap_ST.Add("NbrH");
            TableFieldCheckingRecap_ST.Add("Rem");
            // Unshown elements
            TableFieldCheckingRecap_ST.Add("PointageID");

            // Define column headers text
            ColumnHeaderNameCheckingRecap_ST.Add("Num ref int");
            ColumnHeaderNameCheckingRecap_ST.Add("Client");
            ColumnHeaderNameCheckingRecap_ST.Add("Tâche");
            ColumnHeaderNameCheckingRecap_ST.Add("Job libellé");
            ColumnHeaderNameCheckingRecap_ST.Add("Qte prod");
            ColumnHeaderNameCheckingRecap_ST.Add("Délais promis");
            ColumnHeaderNameCheckingRecap_ST.Add("Date prest");
            ColumnHeaderNameCheckingRecap_ST.Add("Nbr H");
            ColumnHeaderNameCheckingRecap_ST.Add("Remarques");

            // size
            ColumnHeaderDefaultSizeCheckingRecap_i.Add(100);
            ColumnHeaderDefaultSizeCheckingRecap_i.Add(100);
            ColumnHeaderDefaultSizeCheckingRecap_i.Add(50);
            ColumnHeaderDefaultSizeCheckingRecap_i.Add(600);
            ColumnHeaderDefaultSizeCheckingRecap_i.Add(50);
            ColumnHeaderDefaultSizeCheckingRecap_i.Add(100);
            ColumnHeaderDefaultSizeCheckingRecap_i.Add(100);
            ColumnHeaderDefaultSizeCheckingRecap_i.Add(50);
            ColumnHeaderDefaultSizeCheckingRecap_i.Add(300);

            // alignment
            for (int i = 0; i < ColumnHeaderNameCheckingRecap_ST.Count; i++)
            {
                if (i == 2 || i == 4 || i == 7)
                {
                    TextAlignCheckingRecap_O.Add(HorizontalAlignment.Center);
                }
                else
                {
                    TextAlignCheckingRecap_O.Add(HorizontalAlignment.Left);
                }
            }

            MemberDayChickingViewer.Initialize(mDBManager_O, DateTime.Today, 0, true);

            DBListViewMembers.AllowMultipleSelecion = false;

            DepartmentSelector.Initialize(mDBManager_O);
            DepartmentSelector.DepartmentsModified += new DepartmentSelector.DepartmentsModifiedHandler(this.ValueChanged);

            ToolStripMemberDocuments.Renderer = new BorderlessToolStripRenderer();

            ControlStyle.SetBackgroundStyle(this);
            ControlStyle.SetBackgroundStyle(ToolStripUCMembersTools);
            ControlStyle.SetFrameHeaderStyle(this.PanelMembersList);
            ControlStyle.SetFrameHeaderStyle(this.PanelCheckHeader);
            ControlStyle.SetFrameStyle(this.PanelCheckContent);
            ControlStyle.SetFrameHeaderStyle(this.splitContainer2.Panel2);
            ControlStyle.SetFrameHeaderStyle(this.splitContainer2.Panel1);
            ControlStyle.SetFrameStyle(this.PanelCheckContent);
            ControlStyle.SetFrameStyle(this.ToolStripMemberEditFooter);
            ControlStyle.SetFrameStyle(this.DepartmentSelector);
            ControlStyle.SetFrameStyle(this.ToolStripMemberDocuments);
        }
Exemplo n.º 21
0
        public ClientUC(DatabaseManager DBManager_O)
        {
            InitializeComponent();

            mInitializingData_b = false;

            // Add btn tool tool strip list view
            this.DBListViewClient.ListTitle = "Sélection client";
            this.DBListViewClient.AddToolStripBtn(this.ToolStripBtnAddClient);
            ToolStripUCClientTools.Visible = false;

            this.DBListViewComjobRecap.ListTitle = "Jobs du client";

            ToolStripUCClientTools.Renderer = new BorderlessToolStripRenderer();

            mDBManager_O = DBManager_O;

            List <String> TableField_ST             = new List <String>();
            List <String> ColumnHeaderName_ST       = new List <String>();
            List <int>    ColumnHeaderDefaultSize_i = new List <int>();
            List <HorizontalAlignment> TextAlign_O  = new List <HorizontalAlignment>();

            TableField_ST.Add("NumClientInterne");
            TableField_ST.Add("ClientNom");
            TableField_ST.Add("NrTVA");
            TableField_ST.Add("ClientID");

            ColumnHeaderName_ST.Add("N° de client");
            ColumnHeaderName_ST.Add("Nom");
            ColumnHeaderName_ST.Add("N° TVA");

            ColumnHeaderDefaultSize_i.Add(100);
            ColumnHeaderDefaultSize_i.Add(300);
            ColumnHeaderDefaultSize_i.Add(150);

            TextAlign_O.Add(HorizontalAlignment.Left);
            TextAlign_O.Add(HorizontalAlignment.Left);
            TextAlign_O.Add(HorizontalAlignment.Left);

            DBListViewClient.Initialize(mDBManager_O, "Client", TableField_ST, 3, ColumnHeaderName_ST, ColumnHeaderDefaultSize_i, TextAlign_O);
            DBListViewClient.SelectionChanged += new DBListView.SelectionChangedHandler(this.ClientClick);

            DBComboxTypeSoc.FillList(mDBManager_O, "TypeSoc", "TypeSocID", "TypeSocLib");
            DBComboxCPFact.FillList(mDBManager_O, "CodePostal", "CodePostalID", "CodePostal");
            DBComboxCPLivr.FillList(mDBManager_O, "CodePostal", "CodePostalID", "CodePostal");
            DBComboxCPLibFact.FillList(mDBManager_O, "CodePostal", "CodePostalID", "Localite");
            DBComboxCPLibLivr.FillList(mDBManager_O, "CodePostal", "CodePostalID", "Localite");

            // Define comjob recap list view
            List <String> TableFieldJobRecap_ST             = new List <String>();
            List <String> ColumnHeaderNameJobRecap_ST       = new List <String>();
            List <int>    ColumnHeaderDefaultSizeJobRecap_i = new List <int>();
            List <HorizontalAlignment> TextAlignJobRecap_O  = new List <HorizontalAlignment>();

            // Define column DB fields
            TableFieldJobRecap_ST.Add("NumRefInterne");
            TableFieldJobRecap_ST.Add("LibelleCmd");
            TableFieldJobRecap_ST.Add("NumCmdClient");
            TableFieldJobRecap_ST.Add("NumOrdre");
            TableFieldJobRecap_ST.Add("JobLib");
            TableFieldJobRecap_ST.Add("Qte");
            TableFieldJobRecap_ST.Add("NumPlan");
            TableFieldJobRecap_ST.Add("DelaiPromis");
            TableFieldJobRecap_ST.Add("JobStatusLib");
            TableFieldJobRecap_ST.Add("DateEncod");
            // Unshown elements
            TableFieldJobRecap_ST.Add("ComJobID");

            // Define column headers text
            ColumnHeaderNameJobRecap_ST.Add("Num cmd int");
            ColumnHeaderNameJobRecap_ST.Add("Libellé cmd");
            ColumnHeaderNameJobRecap_ST.Add("Num cmd client");
            ColumnHeaderNameJobRecap_ST.Add("# job");
            ColumnHeaderNameJobRecap_ST.Add("Job libellé");
            ColumnHeaderNameJobRecap_ST.Add("Qte");
            ColumnHeaderNameJobRecap_ST.Add("Num plan");
            ColumnHeaderNameJobRecap_ST.Add("Délai");
            ColumnHeaderNameJobRecap_ST.Add("Statut");
            ColumnHeaderNameJobRecap_ST.Add("Date encodage");

            // size
            ColumnHeaderDefaultSizeJobRecap_i.Add(100);
            ColumnHeaderDefaultSizeJobRecap_i.Add(100);
            ColumnHeaderDefaultSizeJobRecap_i.Add(150);
            ColumnHeaderDefaultSizeJobRecap_i.Add(50);
            ColumnHeaderDefaultSizeJobRecap_i.Add(600);
            ColumnHeaderDefaultSizeJobRecap_i.Add(50);
            ColumnHeaderDefaultSizeJobRecap_i.Add(100);
            ColumnHeaderDefaultSizeJobRecap_i.Add(100);
            ColumnHeaderDefaultSizeJobRecap_i.Add(100);
            ColumnHeaderDefaultSizeJobRecap_i.Add(100);

            // alignment
            for (int i = 0; i < ColumnHeaderNameJobRecap_ST.Count; i++)
            {
                if (i == 3 || i == 5)
                {
                    TextAlignJobRecap_O.Add(HorizontalAlignment.Center);
                }
                else
                {
                    TextAlignJobRecap_O.Add(HorizontalAlignment.Left);
                }
            }

            DBListViewComjobRecap.Initialize(mDBManager_O, "ComJobSelectPop", TableFieldJobRecap_ST, 10, ColumnHeaderNameJobRecap_ST, ColumnHeaderDefaultSizeJobRecap_i, TextAlignJobRecap_O, null, null, false);

            SetEditState(false);

            TxtClientNumber.Width = Math.Max(50, TxtClientNumber.Width);
            TxtClientName.Width   = ToolStripClientHeader.Width - toolStripLabel1.Width - TxtClientNumber.Width - toolStripLabel3.Width - 5;

            ToolStripClientEditFooter.Renderer = new BorderlessToolStripRenderer();
            ToolStripClientHeader.Renderer     = new BorderlessToolStripRenderer();
            ControlStyle.SetBackgroundStyle(this);
            ControlStyle.SetBackgroundStyle(this.ToolStripUCClientTools);
            ControlStyle.SetFrameHeaderStyle(this.PanelClientList);
            ControlStyle.SetFrameHeaderStyle(this.PanelCheckHeader);
            ControlStyle.SetFrameHeaderStyle(this.PanelJobRecap);
            ControlStyle.SetFrameHeaderStyle(this.splitContainer2.Panel1);
            ControlStyle.SetFrameStyle(this.PanelCheckContent);
            ControlStyle.SetFrameStyle(this.ToolStripClientEditFooter);

            DBListViewClient.ForeColor                  = Color.Black;
            DBListViewClient.AllowMultipleSelecion      = false;
            DBListViewComjobRecap.AllowMultipleSelecion = false;
        }
Exemplo n.º 22
0
        public DayCheckingViewer()
        {
            InitializeComponent();

            this.DBListViewCheckings.ListTitle = "Pointages";
            this.DBListViewCheckings.AddToolStripBtn(this.ToolStripBtnFastDayBack);
            this.DBListViewCheckings.AddToolStripBtn(this.ToolStripBtnDayBack);
            this.DBListViewCheckings.AddToolStripBtn(this.ToolStripBtnDayFwd);
            this.DBListViewCheckings.AddToolStripBtn(this.ToolStripBtnDayFastFwd);
            this.DBListViewCheckings.AddToolStripBtn(this.ToolStripBtnDateTimePick);
            ToolStripControlHost ToolStripControlHost_O = new ToolStripControlHost(CustomDateTimePickerCtrl);

            this.DBListViewCheckings.AddToolStripControlHost(ToolStripControlHost_O);
            this.DBListViewCheckings.AddToolStripBtn(this.ToolStripBtnEdit);
            this.DBListViewCheckings.AddToolStripBtn(this.ToolStripBtnDelete);

            FormCheckingToolStrip.Visible = false;

            mColumnPersCheckDBField_O = new List <String>();
            mColumnPersCheckDBField_O.Add("NumRefInterne");
            mColumnPersCheckDBField_O.Add("ClientNom");
            mColumnPersCheckDBField_O.Add("JobLib");
            mColumnPersCheckDBField_O.Add("TypeTacheLib");
            mColumnPersCheckDBField_O.Add("QteProd");
            mColumnPersCheckDBField_O.Add("DelaiPromis");
            mColumnPersCheckDBField_O.Add("DatePrest");
            mColumnPersCheckDBField_O.Add("NbrH");
            mColumnPersCheckDBField_O.Add("Rem");
            mColumnPersCheckDBField_O.Add("ComJobEtapeID");

            mColumnHeaderName_ST = new List <String>();
            mColumnHeaderName_ST.Add("N° ref interne");
            mColumnHeaderName_ST.Add("Client");
            mColumnHeaderName_ST.Add("Libellé job");
            mColumnHeaderName_ST.Add("Type tâche");
            mColumnHeaderName_ST.Add("Qte prod");
            mColumnHeaderName_ST.Add("Delai Promis");
            mColumnHeaderName_ST.Add("Date Prestation");
            mColumnHeaderName_ST.Add("NbrH");
            mColumnHeaderName_ST.Add("Remarques");

            mColumnHeaderDefaultSize_i = new List <int>();
            mColumnHeaderDefaultSize_i.Add(100);
            mColumnHeaderDefaultSize_i.Add(150);
            mColumnHeaderDefaultSize_i.Add(600);
            mColumnHeaderDefaultSize_i.Add(150);
            mColumnHeaderDefaultSize_i.Add(75);
            mColumnHeaderDefaultSize_i.Add(100);
            mColumnHeaderDefaultSize_i.Add(100);
            mColumnHeaderDefaultSize_i.Add(50);
            mColumnHeaderDefaultSize_i.Add(300);

            mTextAlign_O = new List <HorizontalAlignment>();
            for (int i = 0; i < mColumnHeaderName_ST.Count; i++)
            {
                if (i == 4 || i == 7)
                {
                    mTextAlign_O.Add(HorizontalAlignment.Center);
                }
                else
                {
                    mTextAlign_O.Add(HorizontalAlignment.Left);
                }
            }

            DBListViewCheckings.ItemDoubleClicked += new DBListView.ItemDoubleClickedHandler(this.CheckingDoubleClic);

            ControlStyle.SetFrameStyle(this);
            ControlStyle.SetFrameStyle(this.PanelCheckings);
            ControlStyle.SetFrameStyle(this.PanelFooter);
            ControlStyle.SetFrameHeaderStyle(this.PanelFooterPadding);
            ControlStyle.SetFrameHeaderStyle(this.CustomDateTimePickerCtrl);
            this.CustomDateTimePickerCtrl.ForeColor = Color.White;
        }
Exemplo n.º 23
0
 private void JobLifeCycle_MouseLeave(object sender, EventArgs e)
 {
     ControlStyle.SetFrameStyle(this);
 }
Exemplo n.º 24
0
        /// <summary>
        /// Initialization method
        /// </summary>
        public void Initialize(DatabaseManager DBManager_O)
        {
            mDBManager_O              = DBManager_O;
            mLastSQLRequest_st        = "";
            mLastClickedFilterIndex_i = -1;
            Asc_b = true;

            // Set list view style : done here because list view is private
            ControlStyle.SetFrameStyle(CustomComJobListView);

            // Define column DB fields
            mColumnDBField_O = new List <String>();
            mColumnDBField_O.Add("NumRefInterne");
            mColumnDBField_O.Add("LibelleCmd");
            mColumnDBField_O.Add("NumCmdClient");
            mColumnDBField_O.Add("ClientNom");
            mColumnDBField_O.Add("NumOrdre");
            mColumnDBField_O.Add("JobLib");
            mColumnDBField_O.Add("Qte");
            mColumnDBField_O.Add("NumPlan");
            mColumnDBField_O.Add("DelaiPromis");
            mColumnDBField_O.Add("ComStatusLib");
            mColumnDBField_O.Add("DateEncod");
            // Unshown elements
            mColumnDBField_O.Add("ComJobID");

            // Define column headers text
            mColumnHeaders_st = new List <string>();
            mColumnHeaders_st.Add("Num cmd int");
            mColumnHeaders_st.Add("Libellé cmd");
            mColumnHeaders_st.Add("Num cmd client");
            mColumnHeaders_st.Add("Nom client");
            mColumnHeaders_st.Add("# job");
            mColumnHeaders_st.Add("Job libellé");
            mColumnHeaders_st.Add("Qte");
            mColumnHeaders_st.Add("Num plan");
            mColumnHeaders_st.Add("Délai");
            mColumnHeaders_st.Add("Statut");
            mColumnHeaders_st.Add("Date encodage");

            // Define column headers objects
            mColumnHeaders_O = new List <ColumnHeader>();

            for (int i = 0; i < mColumnHeaders_st.Count; i++)
            {
                mColumnHeaders_O.Add(new ColumnHeader());
                mColumnHeaders_O[i].Name = mColumnDBField_O[i];
                mColumnHeaders_O[i].Text = mColumnHeaders_st[i];

                if (i == 4 || i == 6)
                {
                    mColumnHeaders_O[i].TextAlign = HorizontalAlignment.Center;
                }
                else
                {
                    mColumnHeaders_O[i].TextAlign = HorizontalAlignment.Left;
                }
            }

            mColumnHeaders_O[0].Width  = 100;
            mColumnHeaders_O[1].Width  = 100;
            mColumnHeaders_O[2].Width  = 150;
            mColumnHeaders_O[3].Width  = 150;
            mColumnHeaders_O[4].Width  = 50;
            mColumnHeaders_O[5].Width  = 600;
            mColumnHeaders_O[6].Width  = 50;
            mColumnHeaders_O[7].Width  = 100;
            mColumnHeaders_O[8].Width  = 100;
            mColumnHeaders_O[9].Width  = 100;
            mColumnHeaders_O[10].Width = 100;

            // Define list view column header
            for (int i = 0; i < mColumnHeaders_st.Count; i++)
            {
                CustomComJobListView.Columns.Add(mColumnHeaders_O[i]);
            }

            // Set text box as filter
            mFilterTextBox_O = new List <TextBox>();
            mFilterTextBox_O.Add(TxtNumPlan);
            mFilterTextBox_O.Add(TxtDelaiPromis);
            mFilterTextBox_O.Add(TxtDateEncod);
            mFilterTextBox_O.Add(TxtStatut);
            mFilterTextBox_O.Add(TxtJobNumOrdre);
            mFilterTextBox_O.Add(TxtJobLib);
            mFilterTextBox_O.Add(TxtQte);
            mFilterTextBox_O.Add(TxtLibCmd);
            mFilterTextBox_O.Add(TxtNumCmdClient);
            mFilterTextBox_O.Add(TxtNomClient);
            mFilterTextBox_O.Add(TxtNumCmdInt);

            //this.FilterPanel.Height = mFilterTextBox_O[0].Height + 3;

            for (int i = 0; i < mFilterTextBox_O.Count; i++)
            {
                mFilterTextBox_O[i].TabIndex     = i;
                mFilterTextBox_O[i].Tag          = i;
                mFilterTextBox_O[i].TextChanged += new System.EventHandler(this.FilterTextChanged);
            }

            // Set filter txt according to column header
            RefreshFilterTxt(true);

            // Set filter text box style
            ControlStyle.SetFrameStyle(this);
            ControlStyle.SetFrameStyle(this.ListViewPanel);
            ControlStyle.SetFrameStyle(this.CustomComJobListView);
            ControlStyle.SetFrameStyle(this.FilterPanel);
            ControlStyle.SetFrameHeaderStyle(this.FilterPanelPadding);
            ControlStyle.SetFrameStyle(this.TxtNumCmdInt);
            ControlStyle.SetFrameStyle(this.TxtNomClient);
            ControlStyle.SetFrameStyle(this.TxtNumCmdClient);
            ControlStyle.SetFrameStyle(this.TxtLibCmd);
            ControlStyle.SetFrameStyle(this.TxtQte);
            ControlStyle.SetFrameStyle(this.TxtJobLib);
            ControlStyle.SetFrameStyle(this.TxtJobNumOrdre);
            ControlStyle.SetFrameStyle(this.TxtStatut);
            ControlStyle.SetFrameStyle(this.TxtDateEncod);
            ControlStyle.SetFrameStyle(this.TxtDelaiPromis);
            ControlStyle.SetFrameStyle(this.TxtNumPlan);
            ControlStyle.SetFrameStyle(this.BtnClearFilter);

            // Display jobs
            RefreshJobs();
        }