Exemplo n.º 1
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.º 2
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.º 3
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.º 4
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.º 5
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.º 6
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.º 7
0
        public FormCheckingEdition()
        {
            InitializeComponent();

            ToolStripAddChecking.Renderer = new BorderlessToolStripRenderer();

            // Register on checking validated event
            CheckingEditionCtrl.CheckingValidated += new CheckingEdition.CheckingValidatedHandler(CheckingValidated);

            ControlStyle.SetBackgroundColorFocusStyle(CheckingEditionPanel);

            // Not so good for different screen resolutions
            //this.Width = (int)(Screen.PrimaryScreen.Bounds.Width * 0.75);
            //this.Height = (int)(Screen.PrimaryScreen.Bounds.Height * 0.75);

            this.CenterToScreen();

            ControlStyle.SetFrameHeaderStyle(this);
            ControlStyle.SetFrameHeaderStyle(this.ToolStripAddChecking);
        }
Exemplo n.º 8
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.º 9
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.º 10
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.º 11
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.º 12
0
 private void JobLifeCycle_MouseLeave(object sender, EventArgs e)
 {
     ControlStyle.SetFrameStyle(this);
 }
Exemplo n.º 13
0
 private void JobLifeCycle_MouseEnter(object sender, EventArgs e)
 {
     ControlStyle.SetBackgroundColorFocusStyle(this);
 }
Exemplo n.º 14
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.º 15
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();
        }
Exemplo n.º 16
0
        public void Initialize(DatabaseManager DBManager_O)
        {
            mDBManager_O = DBManager_O;

            this.DBListViewCom.ListTitle = "Commandes";
            this.DBListViewJob.ListTitle = "Jobs";

            List <String> TableFieldCom_ST             = new List <String>();
            List <String> ColumnHeaderNameCom_ST       = new List <String>();
            List <int>    ColumnHeaderDefaultSizeCom_i = new List <int>();
            List <HorizontalAlignment> TextAlignCom_O  = new List <HorizontalAlignment>();

            // Fill com info
            TableFieldCom_ST.Add("NumRefInterne");
            TableFieldCom_ST.Add("ComDate");
            TableFieldCom_ST.Add("LibelleCmd");
            TableFieldCom_ST.Add("NumCmdClient");
            TableFieldCom_ST.Add("ClientNom");

            TableFieldCom_ST.Add("ComID");

            ColumnHeaderNameCom_ST.Add("Num cmd interne");
            ColumnHeaderNameCom_ST.Add("Date");
            ColumnHeaderNameCom_ST.Add("Libellé commande");
            ColumnHeaderNameCom_ST.Add("Num cmd client");
            ColumnHeaderNameCom_ST.Add("Client");

            ColumnHeaderDefaultSizeCom_i.Add(90);
            ColumnHeaderDefaultSizeCom_i.Add(80);
            ColumnHeaderDefaultSizeCom_i.Add(150);
            ColumnHeaderDefaultSizeCom_i.Add(100);
            ColumnHeaderDefaultSizeCom_i.Add(200);

            TextAlignCom_O.Add(HorizontalAlignment.Left);
            TextAlignCom_O.Add(HorizontalAlignment.Left);
            TextAlignCom_O.Add(HorizontalAlignment.Left);
            TextAlignCom_O.Add(HorizontalAlignment.Left);
            TextAlignCom_O.Add(HorizontalAlignment.Left);

            DBListViewCom.Initialize(mDBManager_O, "ComSelectPop", TableFieldCom_ST, 5, ColumnHeaderNameCom_ST, ColumnHeaderDefaultSizeCom_i, TextAlignCom_O, null, "NumRefInterne DESC");

            List <String> TableFieldJob_ST             = new List <String>();
            List <String> ColumnHeaderNameJob_ST       = new List <String>();
            List <int>    ColumnHeaderDefaultSizeJob_i = new List <int>();
            List <HorizontalAlignment> TextAlignJob_O  = new List <HorizontalAlignment>();

            // Fill job info
            TableFieldJob_ST.Add("NumOrdre");
            TableFieldJob_ST.Add("JobLib");
            TableFieldJob_ST.Add("Qte");
            TableFieldJob_ST.Add("JobStatusLib");
            TableFieldJob_ST.Add("DelaiPromis");
            TableFieldJob_ST.Add("NumPlan");
            TableFieldJob_ST.Add("DateEncod");

            TableFieldJob_ST.Add("ComJobID");

            ColumnHeaderNameJob_ST.Add("Job #");
            ColumnHeaderNameJob_ST.Add("Libellé");
            ColumnHeaderNameJob_ST.Add("Qte");
            ColumnHeaderNameJob_ST.Add("Statut");
            ColumnHeaderNameJob_ST.Add("Délai promis");
            ColumnHeaderNameJob_ST.Add("N° plan");
            ColumnHeaderNameJob_ST.Add("Date d'encodage");

            ColumnHeaderDefaultSizeJob_i.Add(40);
            ColumnHeaderDefaultSizeJob_i.Add(300);
            ColumnHeaderDefaultSizeJob_i.Add(40);
            ColumnHeaderDefaultSizeJob_i.Add(80);
            ColumnHeaderDefaultSizeJob_i.Add(80);
            ColumnHeaderDefaultSizeJob_i.Add(100);
            ColumnHeaderDefaultSizeJob_i.Add(90);

            TextAlignJob_O.Add(HorizontalAlignment.Left);
            TextAlignJob_O.Add(HorizontalAlignment.Left);
            TextAlignJob_O.Add(HorizontalAlignment.Left);
            TextAlignJob_O.Add(HorizontalAlignment.Left);
            TextAlignJob_O.Add(HorizontalAlignment.Left);
            TextAlignJob_O.Add(HorizontalAlignment.Left);
            TextAlignJob_O.Add(HorizontalAlignment.Left);

            DBListViewJob.Initialize(mDBManager_O, "ComJobSelectPop", TableFieldJob_ST, 7, ColumnHeaderNameJob_ST, ColumnHeaderDefaultSizeJob_i, TextAlignJob_O, null, null, false);

            // Record on selection changed event for DBListViewCom
            DBListViewCom.SelectionChanged += new DBListView.SelectionChangedHandler(ComSelectionChanged);

            ControlStyle.SetFrameHeaderStyle(this);
        }
Exemplo n.º 17
0
        public HomeUC(DatabaseManager DBManager_O)
        {
            InitializeComponent();

            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("PersNom");
            TableField_ST.Add("Msg");
            TableField_ST.Add("MsgID");

            ColumnHeaderName_ST.Add("Expéditeur");
            ColumnHeaderName_ST.Add("Message");

            ColumnHeaderDefaultSize_i.Add(100);
            ColumnHeaderDefaultSize_i.Add(DBListViewMsg.Width - 100);

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

            DBListViewMsg.Initialize(mDBManager_O, "MsgSelectPop", TableField_ST, 2, ColumnHeaderName_ST, ColumnHeaderDefaultSize_i, TextAlign_O);
            DBListViewMsg.ListTitle             = "Messages";
            DBListViewMsg.AllowMultipleSelecion = true;

            DBListViewMsg.AddToolStripBtn(ToolStripBtnDelete);
            FormMsgToolStrip.Visible = false;

            // Initialize db list view com job
            DbListViewComJobs.ListTitle = "Sélection des jobs";

            List <String> mComJobTableField_ST             = new List <String>();
            List <String> mComJobColumnHeaderName_ST       = new List <String>();
            List <int>    mComJobColumnHeaderDefaultSize_i = new List <int>();
            List <HorizontalAlignment> mComJobTextAlign_O  = new List <HorizontalAlignment>();

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

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

            // Define column headers objects
            mComJobTextAlign_O = new List <HorizontalAlignment>();

            for (int i = 0; i < mComJobColumnHeaderName_ST.Count; i++)
            {
                if (i == 4 || i == 6)
                {
                    mComJobTextAlign_O.Add(HorizontalAlignment.Center);
                }
                else
                {
                    mComJobTextAlign_O.Add(HorizontalAlignment.Left);
                }
            }

            mComJobColumnHeaderDefaultSize_i = new List <int>();
            mComJobColumnHeaderDefaultSize_i.Add(100);
            mComJobColumnHeaderDefaultSize_i.Add(100);
            mComJobColumnHeaderDefaultSize_i.Add(150);
            mComJobColumnHeaderDefaultSize_i.Add(150);
            mComJobColumnHeaderDefaultSize_i.Add(50);
            mComJobColumnHeaderDefaultSize_i.Add(600);
            mComJobColumnHeaderDefaultSize_i.Add(50);
            mComJobColumnHeaderDefaultSize_i.Add(100);
            mComJobColumnHeaderDefaultSize_i.Add(100);
            mComJobColumnHeaderDefaultSize_i.Add(100);
            mComJobColumnHeaderDefaultSize_i.Add(100);

            DbListViewComJobs.Initialize(mDBManager_O, "ComJobSelectPop", mComJobTableField_ST, 11, mComJobColumnHeaderName_ST, mComJobColumnHeaderDefaultSize_i, mComJobTextAlign_O);

            ControlStyle.SetFrameHeaderStyle(this);
            ControlStyle.SetFrameHeaderStyle(this.splitContainer1);
        }
Exemplo n.º 18
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.º 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 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.º 21
0
        /// <summary>
        /// Constructor
        /// </summary>
        public FormChecking(DatabaseManager DBManager_O, UInt32 UserID_UL)
        {
            InitializeComponent();

            // Init Database Manager
            mDBManager_O  = DBManager_O;
            mDocManager_O = new DocumentManager(mDBManager_O);
            mUserID_UL    = UserID_UL;

            DbListViewComJobs.AddToolStripBtn(ToolStripBtnAddChecking);
            DbListViewComJobs.AddToolStripBtn(ToolStripBtnCloseJob);
            DbListViewComJobs.AddToolStripBtn(ToolStripBtnAll);
            FormCheckingToolStrip.Visible = false;

            // Set drag bar parent window an title
            this.FormDragBar.SetParentWindow(this);
            this.FormDragBar.SetTitle("MMSoft - Pointages");

            // Initialize db list view com job
            DbListViewComJobs.ListTitle = "Sélection des jobs";

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

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

            // Define column headers objects
            mComJobTextAlign_O = new List <HorizontalAlignment>();

            for (int i = 0; i < mComJobColumnHeaderName_ST.Count; i++)
            {
                if (i == 4 || i == 6)
                {
                    mComJobTextAlign_O.Add(HorizontalAlignment.Center);
                }
                else
                {
                    mComJobTextAlign_O.Add(HorizontalAlignment.Left);
                }
            }

            mComJobColumnHeaderDefaultSize_i = new List <int>();
            mComJobColumnHeaderDefaultSize_i.Add(100);
            mComJobColumnHeaderDefaultSize_i.Add(100);
            mComJobColumnHeaderDefaultSize_i.Add(150);
            mComJobColumnHeaderDefaultSize_i.Add(150);
            mComJobColumnHeaderDefaultSize_i.Add(50);
            mComJobColumnHeaderDefaultSize_i.Add(600);
            mComJobColumnHeaderDefaultSize_i.Add(50);
            mComJobColumnHeaderDefaultSize_i.Add(100);
            mComJobColumnHeaderDefaultSize_i.Add(100);
            mComJobColumnHeaderDefaultSize_i.Add(100);
            mComJobColumnHeaderDefaultSize_i.Add(100);

            DbListViewComJobs.Initialize(mDBManager_O, "PersComJobSelectPop", mComJobTableField_ST, 10, mComJobColumnHeaderName_ST, mComJobColumnHeaderDefaultSize_i, mComJobTextAlign_O,
                                         "JobStatusID < 3 AND PersID=" + mUserID_UL, null);
            DbListViewComJobs.ItemDoubleClicked += new DBListView.ItemDoubleClickedHandler(ComJobDoubleClick);

            // Initialize day checking viewer
            DayCheckingViewerCtrl.Initialize(mDBManager_O, DateTime.Today, mUserID_UL, false);
            DayCheckingViewerCtrl.RefreshPersPointage();

            this.splitContainer1.SplitterDistance = this.Height / 3;

            // Set menu items renderer
            MainMenuStrip.RenderMode = ToolStripRenderMode.Professional;
            MainMenuStrip.Renderer   = new CustomMenuItemRenderer();

            //Display user name
            if (mDBManager_O.mConnected_b)
            {
                LblUsername.Text = mDBManager_O.GetTableField("Pers", "PersNom", "PersID=" + mUserID_UL);
            }

            LblConnectionStatus.Text = mDBManager_O.mDBInstanceName_ST;

            // Set control style
            ControlStyle.SetBackgroundStyle(this.splitContainer1);
            ControlStyle.SetFrameHeaderStyle(this.splitContainer1.Panel1);
            ControlStyle.SetFrameHeaderStyle(this.splitContainer1.Panel2);
            ControlStyle.SetBackgroundStyle(MainMenuStrip);
            ControlStyle.SetBackgroundStyle(this.StatusStripFormChecking);
            RefreshPersPointage();
        }