Example #1
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            // Create utility objects
            YaoDurant.Data.UtilData utilData = new UtilData();
            YaoDurant.GUI.UtilGUI   utilGUI  = new UtilGUI();

            //  Set references to data objects.
            dsetTimeTracker = utilData.GetProjectsDataSet();
            dtabProjects    = dsetTimeTracker.Tables["Projects"];
            dtabTasks       = dsetTimeTracker.Tables["Tasks"];

            //  Make the Project table the DataSource.
            //  Make the strIdent field of the currently
            //     select row the Text property of the DataGrid
            //     control.
            dgridDisplay.DataSource = dtabProjects;
            dgridDisplay.DataBindings.Clear();
            dgridDisplay.DataBindings.Add(
                "Text",
                dgridDisplay.DataSource,
                "strIdent");

            //  Use a utility routine to style the
            //     layout of Projects in the DataGrid.
            UtilGUI.AddCustomDataTableStyle(dgridDisplay,
                                            "Projects");

            //  Initialize the ContextMenu
            InitContextMenu();
        }
Example #2
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            //  Make the Project table the DataSource.
            YaoDurant.Data.UtilData utilData = new UtilData();
            dgrdProjects.DataSource = utilData.GetProjectsDT();

            //  Use a utility routine to style the
            //     layout of Projects in the DataGrid.
            UtilGUI.AddCustomDataTableStyle(dgrdProjects,
                                            "Projects");

            //  Create the TextBox to be used with InPlace
            //     editing and add it to the DataGrid control.
            textEdit         = new TextBox();
            textEdit.Visible = false;
            this.dgrdProjects.Controls.Add(textEdit);

            //  Set Form GUI state to "Not Editing".
            this.SetEditingState(false);
        }
Example #3
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            YaoDurant.Data.UtilData utilData = new UtilData();
            YaoDurant.GUI.UtilGUI   utilGUI  = new UtilGUI();

            //  Make the Project table the DataSource.
            //  Make the strIdent field of the currently
            //     select row the Text property of the DataGrid
            //     control.
            dgridProjects.DataSource = utilData.GetProjectsDT();
            dgridProjects.DataBindings.Clear();
            dgridProjects.DataBindings.Add(
                "Text",
                dgridProjects.DataSource,
                "strIdent");

            //  Use a utility routine to style the
            //     layout of Projects in the DataGrid.
            UtilGUI.AddCustomDataTableStyle(dgridProjects,
                                            "Projects");
        }
Example #4
0
        private void FormMain_Load(object sender, System.EventArgs e)
        {
            //  Make the Project table the DataSource.
            YaoDurant.Data.UtilData utilData = new UtilData();
            dgrdProjects.DataSource = utilData.GetProjectsDT();

            //  Use a utility routine to style the
            //     layout of Projects in the DataGrid.
            UtilGUI.AddCustomDataTableStyle(dgrdProjects,
                                            "Projects");

            //  Create the TextBox to be used with InPlace
            //     editing and add it to the DataGrid control.
            textEdit         = new TextBox();
            textEdit.Visible = false;
            this.dgrdProjects.Controls.Add(textEdit);

            //  Initialize the Update/Cancel context menu
            this.InitContextMenu();

            //  The default is:  Do the update.
            this.boolCancelUpdate = false;
        }