Example #1
0
        public string Iteration()
        // EXAMPLE SCRIPT BY  MY-GENERATION SOFTWARE
        {
            Projects emps     = new Projects();
            string   lastName = "";

            if (emps.LoadAll())
            {
                // Iteration walks the DataTable.DefaultView, see the FilterAndSort
                // sample for further clarification.
                do
                {
                    lastName = emps.ProjectName;
                }while (emps.MoveNext());

                emps.Rewind();

                do
                {
                    lastName = emps.ProjectName;
                }while (emps.MoveNext());
                return(lastName);
            }
            return(lastName);

            //-----------------------------------------------------------
            // Moral:
            //-----------------------------------------------------------
            // Iteration is simple, you can rewind and restart at any time
            //-----------------------------------------------------------
        }
        protected void MDIChildGenerate_Click(object sender, System.EventArgs e)
        {
            List <SinglePosterForm> ChildFormList = new List <SinglePosterForm>();
            SinglePosterForm        newMDIChild;
            Projects prjs = new Projects();

            prjs.LoadAll();
            int rownum    = prjs.RowCount;
            int itemindex = 0;

            for (int i = 1; i <= rownum; i++)
            {
                prjs.Filter = Projects.ColumnNames.Id + " = " + i.ToString();
                if (!prjs.EOF)
                {
                    newMDIChild = new SinglePosterForm(prjs.ProjectName, prjs.TopicsTable, prjs.AnswerTemplate);
                    ChildFormList.Add(newMDIChild);
                    itemindex = ChildFormList.Count - 1;
                    // Set the Parent Form of the Child window.
                    ChildFormList[itemindex].MdiParent = this;
                    // Display the new form.
                    ChildFormList[itemindex].Show();
                }
                prjs.Filter = null;
            }

            this.LayoutMdi(System.Windows.Forms.MdiLayout.TileVertical);
        }
Example #3
0
        private void setBtn_Click(object sender, System.EventArgs e)
        {
            Projects proj = new Projects();

            if (proj.LoadAll())
            {
                // Iteration walks the DataTable.DefaultView, see the FilterAndSort
                // sample for further clarification.
                proj.Filter = Projects.ColumnNames.ProjectName + " = 'TinyURL'";
                // proj.ImacrosCodeGeneric = textBox2.Text;
                proj.Save();
            }
        }
Example #4
0
        private string GetTinyURLmacro()
        {
            // GETS iMacros Code from DB for execution in the database

            Projects proj = new Projects();
            string   code = "";

            if (proj.LoadAll())
            {
                // Iteration walks the DataTable.DefaultView, see the FilterAndSort
                // sample for further clarification.
                proj.Filter = Projects.ColumnNames.ProjectName + " = 'TinyURL'";
                code        = proj.ImacrosCodeGeneric;
            }

            return(code);
        }
Example #5
0
        private string GetTinyURLmacro()
        {
            // GETS iMacros Code from DB for execution in the database

            Projects proj = new Projects();
            string code = "";

            if (proj.LoadAll())
            {
                // Iteration walks the DataTable.DefaultView, see the FilterAndSort
                // sample for further clarification.
                proj.Filter = Projects.ColumnNames.ProjectName + " = 'TinyURL'";
                code = proj.ImacrosCodeGeneric;

            }

            return code;
        }
        private void InitializeTreeView()
        {
            //
            TreeNode rootNode;
            Projects prjs = new Projects();

            prjs.LoadAll();
            int rownum = prjs.RowCount;

            for (int i = 1; i <= rownum; i++)
            {
                prjs.Filter = Projects.ColumnNames.Id + " = " + i.ToString();
                if (!prjs.EOF)
                {
                    rootNode      = new TreeNode(prjs.ProjectName);
                    rootNode.Name = prjs.ProjectName;
                    rootNode.Tag  = prjs;
                    treeView1.Nodes.Add(rootNode);
                }
                prjs.Filter = null;
            }
        }
        public string Iteration()
        // EXAMPLE SCRIPT BY  MY-GENERATION SOFTWARE
        {
            Projects emps = new Projects();
            string lastName = "";
            if (emps.LoadAll())
            {


                // Iteration walks the DataTable.DefaultView, see the FilterAndSort
                // sample for further clarification.
                do
                    lastName = emps.ProjectName;
                while (emps.MoveNext());

                emps.Rewind();

                do
                    lastName = emps.ProjectName;
                while (emps.MoveNext());
                return lastName;
            }
            return lastName;

            //-----------------------------------------------------------
            // Moral: 
            //-----------------------------------------------------------
            // Iteration is simple, you can rewind and restart at any time
            //-----------------------------------------------------------
        }
        private void setBtn_Click(object sender, System.EventArgs e)
        {
            Projects proj = new Projects();

            if (proj.LoadAll())
            {
                // Iteration walks the DataTable.DefaultView, see the FilterAndSort
                // sample for further clarification.
                proj.Filter = Projects.ColumnNames.ProjectName + " = 'TinyURL'";
                // proj.ImacrosCodeGeneric = textBox2.Text;
                proj.Save();
            }
        }
        protected void MDIChildGenerate_Click(object sender, System.EventArgs e)
        {
            List<SinglePosterForm> ChildFormList = new List<SinglePosterForm>();
            SinglePosterForm newMDIChild;
            Projects prjs = new Projects();
            prjs.LoadAll();
            int rownum = prjs.RowCount;
            int itemindex = 0;
            for (int i = 1; i <= rownum; i++)
            {
                prjs.Filter = Projects.ColumnNames.Id + " = " + i.ToString();
                if (!prjs.EOF)
                {
                    newMDIChild = new SinglePosterForm(prjs.ProjectName, prjs.TopicsTable, prjs.AnswerTemplate);
                    ChildFormList.Add(newMDIChild);
                    itemindex = ChildFormList.Count - 1;
                    // Set the Parent Form of the Child window.
                    ChildFormList[itemindex].MdiParent = this;
                    // Display the new form.
                    ChildFormList[itemindex].Show();
                }
                prjs.Filter = null;
            }

            this.LayoutMdi(System.Windows.Forms.MdiLayout.TileVertical);
        }
 private void InitializeTreeView()
 {
     //
     TreeNode rootNode;
     Projects prjs = new Projects();
     prjs.LoadAll();
     int rownum = prjs.RowCount;
     for (int i = 1; i <= rownum; i++)
     {
         prjs.Filter = Projects.ColumnNames.Id + " = " + i.ToString();
         if (!prjs.EOF)
         {
             rootNode = new TreeNode(prjs.ProjectName);
             rootNode.Name = prjs.ProjectName;
             rootNode.Tag = prjs;
             treeView1.Nodes.Add(rootNode);                
         }
         prjs.Filter = null;
     }
 }